From 0c8767b686cf1627a679222e7fd61a4c81fc6bd4 Mon Sep 17 00:00:00 2001 From: Jan Zerebecki Date: Mon, 5 Jan 2009 19:55:57 +0100 Subject: [PATCH] push 212f1dad91f15aefd8e676124180e0b86d7c9ee6 --- ANNOUNCE | 1404 +++--- LICENSE | 2 +- Make.rules.in | 3 +- README | 4 +- VERSION | 2 +- configure | 89 +- configure.ac | 24 +- dlls/Makedll.rules.in | 2 +- dlls/advapi32/advapi32.spec | 4 +- dlls/advapi32/cred.c | 164 + dlls/advapi32/crypt.c | 2 +- dlls/advapi32/crypt.h | 1 - dlls/advapi32/crypt_des.c | 27 - dlls/advapi32/tests/cred.c | 60 + dlls/advapi32/tests/security.c | 26 +- dlls/advpack/tests/files.c | 30 +- dlls/appwiz.cpl/Ro.rc | 82 + dlls/appwiz.cpl/appwiz.rc | 1 + dlls/browseui/browseui_main.c | 2 +- dlls/browseui/progressdlg.c | 2 +- dlls/browseui/tests/autocomplete.c | 26 +- dlls/cabinet/cabinet.h | 1 - dlls/cabinet/cabinet_main.c | 27 +- dlls/cabinet/fci.c | 10 +- dlls/cabinet/fdi.c | 16 +- dlls/cabinet/tests/extract.c | 30 +- dlls/cabinet/tests/fdi.c | 48 +- dlls/cfgmgr32/cfgmgr32.spec | 10 +- dlls/comctl32/comboex.c | 4 +- dlls/comctl32/commctrl.c | 4 +- dlls/comctl32/datetime.c | 4 +- dlls/comctl32/hotkey.c | 12 +- dlls/comctl32/nativefont.c | 4 +- dlls/comctl32/tests/dpa.c | 16 +- dlls/comctl32/tests/header.c | 2 +- dlls/comctl32/tests/imagelist.c | 4 +- dlls/comctl32/tests/listview.c | 2 +- dlls/comctl32/tests/monthcal.c | 71 +- dlls/comctl32/tests/propsheet.c | 2 +- dlls/comctl32/tests/subclass.c | 2 +- dlls/comctl32/tests/tab.c | 2 +- dlls/comctl32/tests/toolbar.c | 2 +- dlls/comctl32/tests/trackbar.c | 2 +- dlls/comctl32/tests/updown.c | 2 +- dlls/comctl32/toolbar.c | 121 +- dlls/comdlg32/cdlg.h | 2 - dlls/comdlg32/colordlg.c | 2 +- dlls/comdlg32/filedlg.c | 1 - dlls/comdlg32/printdlg.c | 27 +- dlls/crypt32/crypt32_Nl.rc | 62 + dlls/crypt32/tests/cert.c | 2 +- dlls/cryptui/certheader.bmp | Bin 0 -> 1490 bytes dlls/cryptui/certwatermark.bmp | Bin 0 -> 52870 bytes dlls/cryptui/cryptui.rc | 6 + dlls/cryptui/cryptui_En.rc | 7 +- dlls/cryptui/cryptuires.h | 3 + dlls/cryptui/main.c | 58 +- dlls/d3d8/device.c | 2 +- dlls/d3d8/tests/Makefile.in | 1 + dlls/d3d8/tests/stateblock.c | 1558 ++++++ dlls/d3d8/tests/surface.c | 4 + dlls/d3d8/tests/texture.c | 4 + dlls/d3d8/tests/visual.c | 5 +- dlls/d3d8/tests/volume.c | 4 + dlls/d3d9/cubetexture.c | 4 +- dlls/d3d9/device.c | 11 +- dlls/d3d9/pixelshader.c | 20 +- dlls/d3d9/query.c | 4 +- dlls/d3d9/stateblock.c | 2 +- dlls/d3d9/surface.c | 5 +- dlls/d3d9/tests/shader.c | 10 + dlls/d3d9/tests/stateblock.c | 25 +- dlls/d3d9/tests/surface.c | 4 + dlls/d3d9/tests/texture.c | 5 + dlls/d3d9/tests/vertexdeclaration.c | 12 + dlls/d3d9/tests/visual.c | 2 +- dlls/d3d9/tests/volume.c | 4 + dlls/d3d9/texture.c | 4 +- dlls/d3d9/vertexdeclaration.c | 4 + dlls/d3d9/vertexshader.c | 19 +- dlls/d3d9/volumetexture.c | 4 +- dlls/d3dxof/Makefile.in | 1 + dlls/d3dxof/d3dxof.c | 1257 +---- dlls/d3dxof/d3dxof_private.h | 10 +- dlls/d3dxof/parsing.c | 1290 +++++ dlls/d3dxof/tests/d3dxof.c | 2 +- dlls/dbghelp/dbghelp_private.h | 7 - dlls/dbghelp/minidump.c | 16 +- dlls/dbghelp/module.c | 4 +- dlls/dbghelp/storage.c | 2 +- dlls/ddraw/ddraw.c | 19 +- dlls/ddraw/ddraw_thunks.c | 25 +- dlls/ddraw/surface.c | 7 +- dlls/ddraw/tests/d3d.c | 12 +- dlls/ddraw/tests/ddrawmodes.c | 16 + dlls/ddraw/tests/dsurface.c | 128 +- dlls/ddraw/vertexbuffer.c | 8 +- dlls/dinput/device.c | 11 +- dlls/dinput/joystick_linux.c | 12 +- dlls/dinput/joystick_linuxinput.c | 185 +- dlls/dinput/keyboard.c | 2 +- dlls/dinput/mouse.c | 4 +- dlls/dmloader/loader.c | 8 +- dlls/dnsapi/tests/record.c | 14 +- dlls/dplayx/tests/dplayx.c | 421 +- dlls/dpnet/address.c | 44 +- dlls/dpnet/dpnet_main.c | 2 +- dlls/dpnet/dpnet_private.h | 5 - dlls/dsound/buffer.c | 3 + dlls/dsound/capture.c | 2 +- dlls/dsound/dsound_convert.c | 2 +- dlls/dsound/dsound_main.c | 8 +- dlls/dsound/dsound_private.h | 2 - dlls/dsound/primary.c | 11 +- dlls/dsound/tests/ds3d.c | 4 + dlls/dxdiagn/provider.c | 135 +- dlls/gdi32/freetype.c | 85 +- dlls/gdi32/tests/font.c | 2 +- dlls/gdiplus/brush.c | 14 + dlls/gdiplus/gdiplus.spec | 6 +- dlls/gdiplus/pen.c | 26 + dlls/iphlpapi/tests/iphlpapi.c | 3 +- dlls/itircl/itircl_main.c | 2 +- dlls/jscript/tests/jscript.c | 10 + dlls/jscript/tests/run.c | 10 + dlls/kernel32/cpu.c | 6 +- dlls/kernel32/debugger.c | 70 +- dlls/kernel32/format_msg.c | 4 +- dlls/kernel32/heap.c | 77 +- dlls/kernel32/kernel_private.h | 11 + dlls/kernel32/local16.c | 2 +- dlls/kernel32/string.c | 10 +- dlls/kernel32/tests/atom.c | 20 +- dlls/kernel32/tests/comm.c | 65 +- dlls/kernel32/tests/debugger.c | 2 +- dlls/kernel32/tests/file.c | 17 +- dlls/kernel32/tests/heap.c | 44 +- dlls/kernel32/tests/loader.c | 4 + dlls/kernel32/tests/pipe.c | 2 +- dlls/kernel32/tests/sync.c | 2 +- dlls/kernel32/tests/thread.c | 10 +- dlls/kernel32/tests/toolhelp.c | 17 +- dlls/kernel32/tests/virtual.c | 2 +- dlls/kernel32/thunk.c | 72 + dlls/kernel32/toolhelp.c | 14 +- dlls/kernel32/wowthunk.c | 5 +- dlls/mciavi32/wnd.c | 5 +- dlls/mlang/tests/mlang.c | 2 +- dlls/mpr/pwcache.c | 4 +- dlls/mscms/tests/profile.c | 136 +- dlls/mshtml/Makefile.in | 1 + dlls/mshtml/Pt.rc | 10 +- dlls/mshtml/{Si.rc => Ro.rc} | 41 +- dlls/mshtml/Si.rc | 10 +- dlls/mshtml/htmlelem2.c | 78 +- dlls/mshtml/htmlstyle.h | 4 +- dlls/mshtml/htmlwindow.c | 11 +- dlls/mshtml/mshtml_private.h | 22 +- dlls/mshtml/mutation.c | 576 +++ dlls/mshtml/nsembed.c | 90 +- dlls/mshtml/nsevents.c | 207 - dlls/mshtml/nsiface.idl | 218 +- dlls/mshtml/nsio.c | 67 +- dlls/mshtml/rsrc.rc | 1 + dlls/mshtml/tests/dom.c | 15 +- dlls/msi/database.c | 14 +- dlls/msi/format.c | 4 +- dlls/msi/handle.c | 8 +- dlls/msi/install.c | 16 +- dlls/msi/msi.c | 10 +- dlls/msi/msiquery.c | 32 +- dlls/msi/package.c | 4 +- dlls/msi/preview.c | 10 +- dlls/msi/record.c | 26 +- dlls/msi/suminfo.c | 20 +- dlls/msi/tests/automation.c | 4 +- dlls/msi/tests/db.c | 6 +- dlls/msi/tests/format.c | 4 +- dlls/msi/tests/install.c | 30 +- dlls/msi/tests/package.c | 12 +- dlls/msvcrt/console.c | 8 +- dlls/msvcrt/errno.c | 2 +- dlls/msvcrt/file.c | 58 +- dlls/msvcrt/msvcrt.h | 10 +- dlls/msvcrt/process.c | 132 +- dlls/msvcrt/scanf.c | 42 +- dlls/msvcrt/scanf.h | 10 +- dlls/msvcrt/tests/file.c | 15 +- dlls/msvcrt/tests/headers.c | 1 + dlls/msvcrt/tests/heap.c | 9 +- dlls/msvcrt/tests/printf.c | 75 +- dlls/msvcrt/tests/scanf.c | 3 +- dlls/msvcrt/wcs.c | 43 +- dlls/ntdll/actctx.c | 6 +- dlls/ntdll/directory.c | 14 +- dlls/ntdll/exception.c | 14 +- dlls/ntdll/file.c | 72 +- dlls/ntdll/loader.c | 18 +- dlls/ntdll/nt.c | 23 +- dlls/ntdll/ntdll.spec | 1 - dlls/ntdll/ntdll_misc.h | 18 +- dlls/ntdll/process.c | 15 +- dlls/ntdll/relay.c | 109 +- dlls/ntdll/resource.c | 2 +- dlls/ntdll/rtlbitmap.c | 3 +- dlls/ntdll/sec.c | 7 +- dlls/ntdll/serial.c | 5 +- dlls/ntdll/server.c | 37 +- dlls/ntdll/signal_i386.c | 3 +- dlls/ntdll/sync.c | 140 +- dlls/ntdll/tests/atom.c | 16 +- dlls/ntdll/tests/exception.c | 77 + dlls/ntdll/tests/info.c | 58 +- dlls/ntdll/tests/large_int.c | 16 + dlls/ntdll/tests/string.c | 15 +- dlls/ntdll/thread.c | 10 +- dlls/ntdll/threadpool.c | 2 +- dlls/ntdll/virtual.c | 89 +- dlls/ntoskrnl.exe/ntoskrnl.c | 33 +- dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 4 +- dlls/ole32/clipboard.c | 2 +- dlls/ole32/ole32.spec | 4 + dlls/ole32/ole32_oleidl.idl | 1 - dlls/ole32/rpc.c | 16 +- dlls/ole32/tests/compobj.c | 4 +- dlls/ole32/tests/moniker.c | 2 +- dlls/ole32/tests/usrmarshal.c | 11 + dlls/ole32/usrmarshal.c | 99 + dlls/oleacc/main.c | 9 +- dlls/oleacc/oleacc.spec | 2 +- dlls/oleaut32/oleaut32_ocidl.idl | 1 - dlls/oleaut32/tests/typelib.c | 2 +- dlls/oleaut32/usrmarshal.c | 72 +- dlls/opengl32/make_opengl | 18 +- dlls/opengl32/opengl_ext.c | 7436 +++++++++++++++++----------- dlls/psapi/psapi_main.c | 6 +- dlls/qedit/tests/mediadet.c | 2 +- dlls/quartz/nullrenderer.c | 13 - dlls/quartz/transform.c | 14 - dlls/quartz/videorenderer.c | 31 +- dlls/riched20/editor.c | 6 +- dlls/riched20/tests/txtsrv.c | 3 +- dlls/rpcrt4/ndr_clientserver.c | 2 +- dlls/rpcrt4/rpc_assoc.c | 2 +- dlls/rpcrt4/rpc_binding.c | 14 +- dlls/rpcrt4/rpc_epmap.c | 2 +- dlls/rpcrt4/rpc_message.c | 2 +- dlls/rpcrt4/rpc_server.c | 6 +- dlls/rpcrt4/rpcrt4_main.c | 2 +- dlls/rpcrt4/tests/ndr_marshall.c | 18 +- dlls/rpcrt4/tests/rpc.c | 94 +- dlls/rpcrt4/tests/rpc_async.c | 12 +- dlls/rpcrt4/tests/server.c | 10 +- dlls/secur32/schannel.c | 328 +- dlls/setupapi/misc.c | 9 + dlls/setupapi/setupapi.spec | 14 +- dlls/setupapi/setupcab.c | 18 +- dlls/setupapi/stubs.c | 56 + dlls/shdocvw/shdocvw.spec | 4 +- dlls/shdocvw/shdocvw_main.c | 101 + dlls/shdocvw/tests/shdocvw.c | 197 +- dlls/shell32/idb_tb_large.bmp | Bin 0 -> 108342 bytes dlls/shell32/idb_tb_small.bmp | Bin 0 -> 48182 bytes dlls/shell32/shellord.c | 12 +- dlls/shell32/shlfileop.c | 2 +- dlls/shell32/shres.rc | 12 + dlls/shell32/shresdef.h | 9 + dlls/shell32/tests/shlexec.c | 45 +- dlls/shell32/tests/shlfileop.c | 233 +- dlls/shlwapi/ordinal.c | 22 +- dlls/shlwapi/wsprintf.c | 16 +- dlls/urlmon/tests/misc.c | 4 +- dlls/user32/class.c | 16 +- dlls/user32/hook.c | 20 +- dlls/user32/message.c | 45 +- dlls/user32/spy.c | 7 +- dlls/user32/sysparams.c | 114 +- dlls/user32/tests/combo.c | 21 +- dlls/user32/tests/cursoricon.c | 2 +- dlls/user32/tests/dde.c | 2 +- dlls/user32/tests/listbox.c | 2 +- dlls/user32/tests/menu.c | 14 +- dlls/user32/tests/win.c | 58 +- dlls/user32/win.c | 14 +- dlls/user32/winstation.c | 9 +- dlls/user32/wsprintf.c | 20 +- dlls/winealsa.drv/midi.c | 2 +- dlls/winecoreaudio.drv/audio.c | 29 +- dlls/winecoreaudio.drv/audiounit.c | 1 + dlls/winecoreaudio.drv/coremidi.c | 3 - dlls/winecrt0/stub.c | 2 +- dlls/wined3d/arb_program_shader.c | 63 +- dlls/wined3d/ati_fragment_shader.c | 2 +- dlls/wined3d/cubetexture.c | 2 +- dlls/wined3d/device.c | 118 +- dlls/wined3d/directx.c | 3 +- dlls/wined3d/drawprim.c | 8 +- dlls/wined3d/glsl_shader.c | 8 +- dlls/wined3d/nvidia_texture_shader.c | 4 +- dlls/wined3d/pixelshader.c | 179 +- dlls/wined3d/state.c | 54 +- dlls/wined3d/stateblock.c | 254 +- dlls/wined3d/surface.c | 42 +- dlls/wined3d/surface_gdi.c | 4 +- dlls/wined3d/texture.c | 2 +- dlls/wined3d/utils.c | 8 +- dlls/wined3d/vertexbuffer.c | 3 +- dlls/wined3d/vertexshader.c | 118 +- dlls/wined3d/volumetexture.c | 4 +- dlls/wined3d/wined3d_private.h | 132 +- dlls/winedos/ioports.c | 95 +- dlls/wineoss.drv/mixer.c | 2 +- dlls/winex11.drv/mouse.c | 86 +- dlls/winex11.drv/settings.c | 3 +- dlls/winex11.drv/xrender.c | 68 +- dlls/winhttp/net.c | 4 +- dlls/winhttp/request.c | 12 +- dlls/winhttp/session.c | 2 +- dlls/winhttp/tests/url.c | 95 +- dlls/winhttp/tests/winhttp.c | 12 +- dlls/winhttp/url.c | 45 +- dlls/winhttp/winhttp_private.h | 1 + dlls/wininet/http.c | 4 +- dlls/wininet/tests/http.c | 21 +- dlls/winmm/joystick.c | 4 + dlls/winmm/playsound.c | 5 + dlls/winmm/tests/capture.c | 6 +- dlls/winmm/tests/wave.c | 12 +- dlls/wldap32/add.c | 4 +- dlls/wldap32/ber.c | 12 +- dlls/wldap32/bind.c | 12 +- dlls/wldap32/compare.c | 10 +- dlls/wldap32/control.c | 4 +- dlls/wldap32/delete.c | 6 +- dlls/wldap32/error.c | 4 +- dlls/wldap32/init.c | 4 +- dlls/wldap32/misc.c | 12 +- dlls/wldap32/modify.c | 8 +- dlls/wldap32/modrdn.c | 12 +- dlls/wldap32/page.c | 6 +- dlls/wldap32/parse.c | 8 +- dlls/wldap32/search.c | 10 +- dlls/wldap32/tests/parse.c | 2 +- dlls/wnaspi32/aspi.c | 2 +- dlls/ws2_32/socket.c | 48 +- dlls/xinput1_3/tests/xinput.c | 34 + dlls/xinput1_3/xinput1_3.spec | 4 +- dlls/xinput1_3/xinput1_3_main.c | 21 + include/cfgmgr32.h | 6 + include/commctrl.h | 10 +- include/config.h.in | 6 +- include/d3d9types.h | 14 +- include/d3dtypes.h | 6 +- include/ddraw.h | 6 +- include/mshtml.idl | 137 + include/msi.h | 2 +- include/msvcrt/crtdefs.h | 14 +- include/msvcrt/process.h | 2 +- include/olectl.h | 8 +- include/oleidl.idl | 2 + include/psapi.h | 20 +- include/richedit.h | 6 +- include/rpc.h | 2 +- include/rpcdce.h | 72 +- include/rpcndr.h | 2 +- include/shellapi.h | 4 + include/shlwapi.h | 4 +- include/shobjidl.idl | 42 +- include/tlhelp32.h | 40 +- include/winbase.h | 6 +- include/wincred.h | 39 + include/windef.h | 12 + include/wine/port.h | 13 - include/wine/server.h | 12 + include/wine/server_protocol.h | 391 +- include/wine/wine_common_ver.rc | 2 +- include/wine/wined3d.idl | 13 +- include/wingdi.h | 2 + include/winnt.h | 5 + include/winsock.h | 19 +- include/winternl.h | 109 +- include/winuser.h | 10 +- include/winuser.rh | 190 + include/xinput.h | 34 + libs/port/poll.c | 23 +- libs/port/spawn.c | 5 +- libs/wine/string.c | 86 +- libs/wpp/preproc.c | 1 + loader/preloader.c | 1 + programs/cmd/builtins.c | 2 +- programs/cmd/directory.c | 1019 ++-- programs/cmd/wcmdmain.c | 3679 +++++++------- programs/reg/reg.c | 10 +- programs/rpcss/epmp.c | 2 +- programs/start/start.c | 1 + programs/winecfg/Ko.rc | 2 +- programs/winedbg/tgt_module.c | 2 - programs/winemenubuilder/winemenubuilder.c | 5 +- programs/winemine/dialog.c | 18 - programs/winemine/main.c | 830 ++-- programs/winemine/main.h | 51 - programs/winetest/Makefile.in | 2 +- programs/xcopy/xcopy.c | 4 +- server/async.c | 10 +- server/change.c | 4 +- server/class.c | 10 +- server/context_alpha.c | 4 +- server/context_i386.c | 4 +- server/context_powerpc.c | 4 +- server/context_sparc.c | 4 +- server/context_x86_64.c | 4 +- server/debugger.c | 156 +- server/device.c | 12 +- server/fd.c | 12 +- server/file.h | 9 +- server/hook.c | 6 +- server/mach.c | 27 +- server/mailslot.c | 2 +- server/mapping.c | 10 +- server/named_pipe.c | 20 +- server/object.h | 4 +- server/process.c | 21 +- server/process.h | 12 +- server/procfs.c | 35 +- server/protocol.def | 389 +- server/ptrace.c | 28 +- server/queue.c | 85 +- server/serial.c | 2 +- server/thread.c | 61 +- server/thread.h | 4 +- server/timer.c | 6 +- server/trace.c | 555 ++- server/user.h | 6 +- server/window.c | 6 +- tools/make_requests | 10 +- tools/widl/Makefile.in | 1 + tools/widl/client.c | 46 +- tools/widl/expr.c | 18 +- tools/widl/header.c | 338 +- tools/widl/header.h | 12 - tools/widl/parser.h | 3 + tools/widl/parser.y | 602 +-- tools/widl/proxy.c | 84 +- tools/widl/server.c | 46 +- tools/widl/typegen.c | 337 +- tools/widl/typelib.c | 15 - tools/widl/typelib.h | 2 - tools/widl/typetree.c | 98 + tools/widl/typetree.h | 107 + tools/widl/widl.c | 153 +- tools/widl/widl.h | 14 +- tools/widl/widl.man.in | 4 + tools/widl/widltypes.h | 35 +- tools/widl/write_msft.c | 88 +- tools/wine.inf.in | 1 + tools/winebuild/import.c | 16 +- tools/winebuild/relay.c | 6 + tools/winebuild/spec32.c | 77 +- tools/wineinstall | 10 +- 459 files changed, 20209 insertions(+), 12968 deletions(-) rewrite ANNOUNCE (97%) create mode 100644 dlls/appwiz.cpl/Ro.rc create mode 100644 dlls/cryptui/certheader.bmp create mode 100644 dlls/cryptui/certwatermark.bmp create mode 100644 dlls/d3d8/tests/stateblock.c create mode 100644 dlls/d3dxof/parsing.c copy dlls/mshtml/{Si.rc => Ro.rc} (55%) create mode 100644 dlls/mshtml/mutation.c create mode 100644 dlls/shell32/idb_tb_large.bmp create mode 100644 dlls/shell32/idb_tb_small.bmp create mode 100644 tools/widl/typetree.c create mode 100644 tools/widl/typetree.h diff --git a/ANNOUNCE b/ANNOUNCE dissimilarity index 97% index bbbe77dffe0..ef6dca9d0f8 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,832 +1,572 @@ -The Wine development release 1.1.11 is now available. - -What's new in this release (see below for details): - - Numerous fixes for IE7 support. - - Support for 64-bit cross-compile using Mingw64. - - User interface support for crypto certificates. - - Better support for MSI installation patches. - - Various Direct3D optimizations. - - Various bug fixes. - -The source is available from the following locations: - - http://ibiblio.org/pub/linux/system/emulators/wine/wine-1.1.11.tar.bz2 - http://prdownloads.sourceforge.net/wine/wine-1.1.11.tar.bz2 - -Binary packages for various distributions will be available from: - - http://www.winehq.org/site/download - -You will find documentation on http://www.winehq.org/site/documentation - -You can also get the current source directly from the git -repository. Check http://www.winehq.org/site/git for details. - -Wine is available thanks to the work of many people. See the file -AUTHORS in the distribution for the complete list. - ----------------------------------------------------------------- - -Bugs fixed in 1.1.11: - - 986 ODBC.dll unimplemented - 1973 Bug in StretchDIBits with biBitCount=32 - 4293 text invisible in myODBC installer 2.5 -buggy refresh? - 5182 Wrong Time read into program - 5241 X BadAlloc failure (X_CreatePixmap) in StrePla.exe - 5463 ie6 installs now, but doesn't work... - 6126 SoulSeek crashes - 6139 Spanish Vocabulary Builder won't install => devision by zero - 6458 Wing Commander Prophecy: Objects are no longer rendered correctly - 6618 Warcraft III Crash on intro movie playback - 6921 C&C Tiberian Sun menu disappears after save - 7292 SystemDrive and a bunch other variables not set - 7543 Window position geometry not saved between app executions - 7795 Zoo Tycoon 2 D3D Device error - 8264 Streaming Media Player v5.0: "Unspecified error" when "Play from remote playlist..." is attempted - 9350 Cannot change country in iTunes 6.0 due to unimpletmented 'TrackPopupMenuEx' function - 9462 Mouse cursor appears only when clickling left mouse button (Star Wars: KOTOR) - 9500 StarCraft Battle.net-Hitting the Browse button hangs the game - 9528 Battlefield 2142 breaks on startup with ReportEventW errors - 9839 Game cannot connect using DirectPlay8.1 - 9994 mshtml: No icons visible in the Adobe Reader 8.1 "First Run" - Advertisement - 10005 Ever 17 - out of infinity crashes - 10036 The General PL: Problem with RichLine, it makes game unplayable - 10124 Turok doesn't see D3D Compatible Adapter. - 10137 WinSock ServerSocket - 10221 "make test" fails on d3d9/tests/visual.c - 10294 Mouse Y is off by 100 pixels in some fullscreen games - 10378 Programmer's Notepad 2 gives an error message, closes after using search function - 10457 Application complains that directsound is not detected - 10470 Radmin viewer 3.1: Black squares in the voice chat window - 10714 wps do not work - 10769 Window contents spontaneously move to root (0,0), stops updating - 10805 EmEditor hangs - 10820 Unhandled division by zero in ALSA_AddRingMessage in PowerPoint Viewer 2008 - 10976 Palm Desktop fails to install - 11186 Worms 2 regression: Page fault if you start the game by throwing a grenade - 11229 Sonic Adventure DX 3D models leave behind a "ghost" - 11376 Origin 7.5 crashes while plotting data - 11403 Installation fails after selecting the install folder - 11444 Pirates Of the Caribbean Online having login issue - 11544 Audio problems with Heroes II and ALSA Driver - 11634 erratic mouse in Starfleet Command Volume II Empires at war - 11816 Magic Workstation main window disappears immediately? - 11912 Wine desktop minimized icon on top - 11961 Zinc-based apps don't run? (Go Diego Go Wolf Pup Rescue, Virble) - 11979 Legacy 5 - Can't check for online update - 12075 Endnote X1: crashes when selecting text by mouse - 12158 Installer Everest Poker - 12247 Page fault in quartz during DLL registration prevents video playback in Ares P2P client - 12252 Need for Speed: Hot Pursuit 2 demo crashes on car select - 12360 load/save preferences.ini file error[file corrupt] - 12438 Marratech 6.1 hangs on startup - 12495 The free DWG viewer from brava doesn't work - 12528 You can resize the WinMerge dialog vertically on Wine, but not Windows - 12588 Trillian crashes at startup when trying to load dwmapi.dll - 12602 Duo Princess - using dmime crashes the game - 12628 wine: Call from 0x7b840fc8 to unimplemented function hal.dll.ExAcquireFastMutex - 12800 CIsco IP Communicator crash calling winhttp.dll.WinHttpCreateUrl - 12823 newer games using OpenGL cannot be played - 12991 eMule ScarAngel - 13111 xfile support is still non-existant in wine - 13361 firefox 3 can't handle local paths in location window [dogfood] - 13425 The Punisher demo sound effect from launcher gets stuck - 13458 Starcraft hangs in wine-1.0rc2 in dsound - 13478 Winehelp crash in textpad - 13512 Sniper Elite: game hangs on applying options (change to try resolution and crash) - 13625 Page fault when closing help viewer - 13639 Regression: No sound in Scorcher Demo - 13640 Scorcher Demo crashes on start - 13680 DC++: closing help browser crashes wine - 13697 sound problems in Battlezone 2 - 13764 SMPlayer doesn't render video properly [dogfood] - 13793 Prince of Persia: the Sands of Time crashes mid-way through. - 13824 Flash8 draws outside from frame after desktop switching - 13841 Babylon 7: Babylon freezes in trial version mode - 13842 SW: Knights of the Old Republic PL and fonts - 13859 Star Wars Race cursor duplicate - 13897 Live For Speed CMX Viewer S2Y: Lost window when shade window or switch workspace - 13904 Axis & Allies starts in zero sized window mode - 14215 Terragen crashes immediately on startup - 14322 Crashes when I try to run FeedDemon - 14488 Bonjour Service with iTunes - 14493 RumbleBox fails to install ==> Crash - 14515 AutoWikiBrowser doesn't install (uses gdiplus and .NET 2 framework) - 14587 wineprefixcreate creates useless directories in "My Files" directory - 14664 VeZA Route Planner 2005: crashes on startup - 14687 Helium Music Manager 2008 installation doesn't work - 14709 The White Chamber game crashes on exit - 14808 CS2 Compiz tooltips - 14952 Microsoft Word 2003 hangs while instaling a new feature - 15044 Random crash in MSN Messenger 7.0 - 15183 MagicMaps crashes with nvidia above version 169.12 - 15296 Installation of MS office broken until last GIT - 15309 Flashplayer crashes in quartz when used with an IM. - 15338 setup_exception_record stack overflow when running wineboot - 15491 Star Wars: Jedi Knight - Jedi Academy : Clicking install button in autorun menu freezes autorun.exe - 15578 Px-map crashes (probably caused because reading registry-key fails) - 15699 Winecfg crashes if no audio driver is present - 15835 Rapid Uploader: Delete button shows a popup menu that self closes. - 15840 SuddenStrike: crashes when loading a level - 15931 Photoshop CS4 Crashes while launching - 16086 Problems with sound in Soldier of Fortune - 16101 WMP10: Crashes on launch - 16103 Google Sketchup 7 crashes after downloading model - 16164 Google Sketchup 7 crashes when you click "Start using Sketchup" - 16317 Unhandled exception unimplemented function setupapi.dll.SetupPromptForDiskA - 16334 tools/fnt2bdf.c: format not a string literal and no format arguments - 16335 winex11.drv/xrender: format not a string literal and no format arguments - 16336 advpack/tests/install: format not a string literal and no format arguments - 16337 dinput/tests/joystick: format not a string literal and no format arguments - 16338 msxml3/tests/xmldoc: format not a string literal and no format arguments - 16339 setupapi/tests: format not a string literal and no format arguments - 16340 winedbg/db_disasm: format not a string literal and no format arguments - 16341 wineserver/trace: format not a string literal and no format arguments - 16345 ShadowFlare: Crashes on entering game - 16376 Braille2000 does not authenticate with server - 16381 Fading effects not working in Lineage2 and other graphic issues - 16386 FAR crashes with Unimplemented KERNEL32.dll.GetConsoleAliasW - 16414 New Xlive (8.12.2008 and newer) is not working - 16443 Regression in ntdll breaks IE6 setup - 16458 Endless Online installer crashes on start - 16464 IMVU crashes on startup - 16482 FeedDemon pops up an error about msxml on startup - 16511 Google Sketchup rejects some ruby scripts containing CRLF - ----------------------------------------------------------------- - -Changes since 1.1.10: - -Alex Balut (1): - mshtml: Removed the reference counting of the DLL. - -Alexander Morozov (2): - hal: Add missing WINAPI. - ntoskrnl.exe: Add stubs for Io{Allocate,Get}DriverObjectExtension. - -Alexander Nicolaysen Sørnes (1): - kernel32: Add stub for GetConsoleAliasW. - -Alexandre Julliard (73): - server: Convert the registry key modification time to a win32-style time. - server: The name len in the get_directory_entry request must be a data_size_t. - kernel32/tests: Added some tests for behavior of 64-bit kernel handles. - include: Fix the 64-bit value of magic handle constants. - server: Make object handles ints instead of pointers. - server: Add functions for conversions between server object handles and pointer-style handles. - widl: Use local functions where possible instead of STUB_FORWARDING_FUNCTION in stub vtables. - user32/tests: Added some tests for behavior of 64-bit user handles. - server: Make user handles ints instead of pointers. - server: Add functions for conversions between server user handles and pointer-style handles. - winebuild: Make the cpu flag more generic to allow supporting a given entry point on multiple platforms. - include: Implemented inline asm functions for x86_64. Export Interlocked* only on i386. - include: Added some definitions for x86_64 exception handling. - ntdll: Added stubs for RtlLookupFunctionEntry and RtlVirtualUnwind. - kernel32/tests: Fixed the handle test for Win9x. - include: Added the msvcrt memory.h header. - wininet: Include ws2tcpip.h before anything else for the Windows build. - server: Get rid of the support for module snapshots, it is no longer needed. - server: Don't use size_t for module sizes, they are limited to 2Gb anyway. - configure: Add a wrapper macro for mkdir on Windows. - configure: Add a check for the grp.h header. - shell32: Disable the Unix folder for the Windows build. - include: Disable the asm optimizations for the Windows build. - include: Fix the definition of 64-bit types for Mingw64. - configure: Add detection of Mingw64 for crosstests. - include: Fix a few compiler warnings for the Mingw64 build. - ntdll: Add a function to export the host OS type and version. - winetest: Report information about the CPU and host OS. - wininet/tests: Use new test URLs on test.winehq.org. - server: Define an lparam_t type for message parameters that can hold all sorts of data. - server: Windows properties are actually generic params, not handles. - tools: Re-use the file updating routines from make_makefiles in make_requests. - tools: Keep track of requests sizes and alignments in make_requests. - ntdll: Add a heuristic to detect dlls that are wrongly marked as using native subsystem. - cabinet: Don't allocate a huge buffer on the stack. - ntdll: Enforce correct protection values in virtual memory functions. - include: Fix typo in the 64-bit version of GetProcessHeap(). - ntdll: Convert the handles to server handles in NTDLL_wait_for_multiple_objects. - ntdll: Fix heap management for 64-bit. - libwine: Don't try to use the preloader on non-i386. - msi: Don't include msvcrt headers. - setupapi: Don't include msvcrt headers. - msvcrt: Don't include msvcrt headers, instead duplicate the definitions in msvcrt.h. - include: Add the msvcrt/crtdefs.h header and include it where needed. - msvcrt: Use intptr_t or size_t instead of long where appropriate. - msvcrt: Use iob_func instead of p__iob on non-x86. - msvcrt/tests: Load __mb_cur_max and _mbctype dynamically since they may not be available to link against. - msvcrt: Avoid truncated relocations on 64-bit. - winegcc: Fix the file mode check. - server: Add an apc_param_t type to store APC client-side parameters. - server: Make async I/O transfer sizes always 32-bit. - include: Allow 64-bit pointers to pass through LDT functions unmolested. - ntdll: NtCurrentTeb is not exported on x86_64. - msvcrt: The _CI* math functions are only exported on i386. - msvcrt: Add a few more *_func functions to replace the __p_* ones. - msvcrt: The __p_* functions are only exported on i386. - msvcrt: Rename _ftime to avoid conflicts. - widl: Use ULONG_PTR instead of unsigned long for pointer casts in generated code. - winetest: Use main instead of WinMain as entry point. - winebuild: Generate stub entry points for x86_64. - ntdll: Add support for dynamically generated stub entry points. - msvcrt: Rewrite va_list to string conversions to avoid depending on va_copy. - configure: Get rid of the va_copy checks. - msvcrt: Add __cdecl to all function prototypes. - include: Use __p__iob on i386 to avoid problems with Mingw libraries. - server: Add a mem_size_t type to represent memory sizes and offsets. - server: Make mem_size_t always 64-bit. - server: Use mem_size_t instead of file_pos_t for memory mapping sizes. - server: Make apc_param_t always 64-bit. - cryptui: Commit checks.bmp missed in a previous patch. - d3dxof/tests: Avoid size_t in a trace. - msi/tests: Avoid sizeof in traces. - msvcrt/tests: Avoid sizeof in a trace. - -Alistair Leslie-Hughes (11): - mshtml: Implement IHTMLStyle get/put posWidth. - mshtml: Implement IHTMLStyle get/put posHeight. - mshtml: Add support for V_I4 in IHTMLStyle put_zIndex. - mshtml: Implement IHTMLStyle put_fontStyle. - mshtml: Implement IHTMLStyle get/put fontVariant. - mshtml: Implement IHTMLScriptElement get/put Defer. - mshtml: Implement IHTMLStyle get_backgroundImage. - msxml3: Corrected getAttributeNode to return correct values. - mshtml: Implement IHTMLStyle get_position. - msxml3: Make functions static. - msxml3: Add ISupportErrorInfo interface to IXMLDOMDocument. - -Andrei Derevyanko (2): - mshtml: Silence IMarshal QueryInterface FIXME. - mshtml: Updated test of QueryInterface. - -Andrew Nguyen (4): - jscript: Fix some errors detected by Valgrind. - jscript: Fix the lexicographical order of the String class properties array. - jscript: Implement the String.sub() method. - jscript: Implement the String.sup() method. - -Andrew Talbot (34): - widl: Remove unneeded address-of operators from array names. - widl: Remove unneeded address-of operators from function names. - winex11.drv: Sign-compare warnings fix. - msi: Remove an unused declaration. - winhttp: Sign-compare warning fix. - wininet: Sign-compare warnings fix. - shdocvw: Remove unneeded address-of operators from array name. - wined3d: Remove unneeded address-of operators from array names. - wintrust: Sign-compare warnings fix. - ws2_32: Sign-compare warnings fix. - winmm: Sign-compare warning fix. - user32: Sign-compare warnings fix. - comctl32: Remove unused Wine debug channel. - d3drm: Remove unused Wine debug channel. - d3dx8: Remove unused Wine debug channel. - d3dx9_24: Remove unused Wine debug channel. - d3dx9_25: Remove unused Wine debug channel. - d3dx9_26: Remove unused Wine debug channel. - d3dx9_27: Remove unused Wine debug channel. - d3dx9_28: Remove unused Wine debug channel. - d3dx9_29: Remove unused Wine debug channel. - d3dx9_30: Remove unused Wine debug channel. - d3dx9_31: Remove unused Wine debug channel. - d3dx9_32: Remove unused Wine debug channel. - d3dx9_33: Remove unused Wine debug channel. - d3dx9_34: Remove unused Wine debug channel. - d3dx9_35: Remove unused Wine debug channel. - d3dx9_36: Remove unused Wine debug channel. - d3dx9_37: Remove unused Wine debug channel. - ole32: Remove unused Wine debug channel. - msvcrt40: Remove unused Wine debug channel. - msvcr71: Remove unused Wine debug channel. - kernel32: Remove unused Wine debug channel. - jscript: Remove unused Wine debug channel. - -Aric Stewart (9): - imm32: Implement ImmAssociateContextEx. - imm32: Implement W/A handling in ImmEscape. - user32: Implement handling of WM_INPUTLANGCHANGE. - user32: Proper handling of WM_INPUTLANGCHANGEREQUEST. - msi: EndDialog with Ignore should not be an error. - x11drv: If a keyboard layout is an IME only check the loword when comparing to the x11 keyboard layout. - x11drv: Allow ActivateKeyboardLayout to set the keyboard for the thread and GetKeyboardLayout to return the stored keyboard. - user32: Remove the driver call for GetKeyboardLayoutList and instead populate from the registry. - msi: Fix some NULL checking in MSI_RecordGetStringA. - -Austin English (3): - shell32: Fix German translation. - uxtheme: Fix a compiler warning. - kernel32: Convert a warn to an err. - -ByeongSik Jeon (3): - gdi32: Unify Chinese and Japanese default font name. - *Zh.rc: Update the Chinese resource font name to "MS Shell Dlg". - *Ko.rc: Update Korean resource. - -Chris Wulff (1): - mscoree: Add a stub for LockClrVersion. - -Christian Costa (23): - quartz: Accept null clsMinorType for pins when registering filters + tests. - ddraw: Fix trace. - winedbg: Make frame numbers display starting from 0 so we match frame command. - d3dxof: Increase strings buffer size. - devenum: Fix traces and fixmes. - quartz: Turn some fixmes into traces. - setupx: Add stub for DiInstallClass. - d3dxof: Add a test to dump an X object data (enabled when objects.txt and templates.txt are present). - d3dxof: Improve error handling. - d3dxof: Increase string buffer size. - dplayx: Fix typo. - dmime: Improve IDirectMusicPerformance8Impl_PlaySegment(Ex) stubs. - dmime: Check input params in IDirectMusicSegmentState8Impl_QueryInterface. - amstream: Implement IDirectDrawMediaStream. - amstream: Some fixes. - amstream: Add stubbed implementation of MediaStreamFilter. - d3dxof: Improve IDirectXFileImpl_CreateSaveObject stub. - d3dxof: Add some preliminary support for binary objects. - d3dxof: Remove IDirectXFileObjectImpl stuff. That's not needed. - dswave: Add missing segment vtbl initialisation (with DirectMusicSegment8_Segment_Vtbl). - winealsa.drv: Initialize correctly the header before adding it to the queue. - dmusic: Move IDirectMusicThru and IDirectMusicPortDownload to DirectMusicPort object where they belong. - winealsa.drv: Handle midi sysex greater than a buffer. - -Damjan Jovanovic (1): - winemenubuilder: Create xdg_config_dir if it does not exist. - -Dan Kegel (2): - msvcrt: fread: Exhaust buffered data before using unbuffered data in ascii mode. - winver: Add version resource. - -Daniel Nylander (6): - clock: Updated Swedish translation. - winefile: Updated Swedish translation. - winhlp32: Updated Swedish translation. - notepad: Updated Swedish translation. - winecfg: Updated Swedish translation. - shell32: Updated Swedish translation. - -Dylan Smith (15): - richedit: Use ME_EnsureVisible to implement EM_SCROLLCARET. - richedit: Compare editor rather than hWnd in ME_CalculateClickCount. - richedit: Removed an unnecessary call to GetScrollInfo. - richedit: Removed unused hwndEdit variable for the RTF parser. - richedit: Missing capitalization on TxGetScrollBars. - richedit: Move implementation of EM_GETTEXTRANGE to its own function. - richedit: Move implementation of EM_GETTEXTEX to its own function. - richedit: Removed some unnecessary SendMessage calls to itself. - richedit: Move implementation of WM_CHAR to its own function. - richedit: Fixed ITextHostImpl return values for tests. - richedit: Added tests for the formatting rectangle. - richedit: Made sure text is offset by formatting rectangle. - richedit: Removed redundant editor height variables and calculations. - richedit: Avoid re-calculating positions found in wrapping for painting. - richedit: Move message handling to function callable without window. - -Francois Gouget (70): - ws2_32: Add MSG_WAITALL and MSG_INTERRUPT. - ws2_32: Add the inet_ntop() and inet_pton() prototypes and their relatives. - dsound: Remove unneeded casts of zero. - winspool.drv: Remove unneeded casts of zero. - port: Remove unneeded casts of zero. - fnt2bdf: Remove unneeded casts of zero. - winealsa: Fix a couple of types and avoid unneeded casts. - avifil32: Remove unneeded casts of zero. - crypt32: Remove unneeded casts of zero. - kernel32: Remove unneeded casts of zero. - msacm32: Remove unneeded casts of zero. - netapi32: Remove unneeded casts of zero. - oleaut32: Remove unneeded casts of zero. - wnaspi32: Remove unneeded casts. - gdiplus: Add a trailing '\n' to a Wine trace. - wininet & winhttp: Fix a pointer type mismatch warning when compiling on Windows. On Windows setsockopt() expects a char* while on Unix it accepts anything. - msvcrt/tests: Stricter fstat() tests. - msvcrt/tests: Add a stat() test. - msvcrt: Fix the permissions returned by fstat*() (with test). - appwiz.cpl: It's ok to use "SysListView32" directly. - clock: Remove spaces before '\n' in the Swedish resources. - msvcrt/tests: Add a trailing '\n' to ok() calls. - msvcrt: Remove _adjust_fdiv() as it is unused. - shell32: Add a couple of spaces in the spec file. - ole32: Fix the STORAGE_dump_pps_entry() description. - cabinet/tests: Make CopyProgress() static. - d3d9/tests: Make some functions static. - gdi32/tests: Make test_GdiAlphaBlend() static. - msvcrt/tests: Make void test_cp_table() static. - ntdll/tests: Make rtlraiseexception_vectored_handler() static. - shell32/tests: Make test_cbsize() static. - ole32/tests: Make test_runnable() static. - user32/tests: Make some functions static. - msvcrt: Point the set_new_handler() entrypoint to the right implementation. - wineoss.drv: Make widOpen() and wodOpen() static. - userenv/tests: Make userenv_dbgstr_w() static. - kernel32: Remove _hread16() as it is not used. Move _hwrite16() next to the other related functions. - wininet & winhttp: Remove the MSG_WAITALL definition as it is not needed. - devenum: French and German should use SUBLANG_NEUTRAL. - ole32: Use the IStream16_(CreateStream,CreateStorage,Write) implementations. - cmd: Make WCMD_DumpCommands() static. - d3d8: Make D3D8CB_CreateSurface() static. - port: S_IWUSR and S_IX* are not needed. Remove them. - msiexec: Make KillService() static. - winapi_check: Add support for '-arch=xxx' in spec files. - explorer: Make appbar_wndproc() static. - winejack.drv: Make some functions static. - wineesd.drv: Make some functions static. - wineaudioio.drv: Export widMessage(). - setupapi/tests: Make devinst_RegDeleteTreeW() static. - riched20/tests: Make keep_responsive() and customWordBreakProc() static. - mlang/tests: Make strstrW() static. - gdi32: Make [GS]etDCState() static. - gdi32: Export three implemented 16bit Engine*() functions. - kernel32: Make some functions static. - ddraw/tests: Make some functions static. - net: Make output_string() and output_error_string() static. - oleaut32/tests: Make the Widget_*() and KindaEnum_*() functions static. - msi/tests: Make enum_stream_names() and package_RegDeleteTreeW() static. - devenum: Explicitly identify the translation as being for SUBLANG_PORTUGUESE_BRAZILIAN. - wrc: Add a trailing '\n' to some warning and error messages. - msvcrt/tests: Add a trailing '\n' to an ok() call. - dmloader: Add a trailing '\n' to a Wine trace. - rpcrt4/tests: Fix the trailing '\n' in an ok() call. - wined3d: Fix double const. - winapi_check: Extend support for '-arch=xxx' in spec files. - devenum: Make the Romanian translation LANG_NEUTRAL. - wintrust/tests: Add a trailing '\n' to ok() calls. - wineoss.drv: Fix the m[io]dMessage() documentation. - winealsa.drv: Fix the m[io]dMessage() documentation. - -Hans Leidekker (34): - setupapi: Forward pSetupIsUserAdmin to IsUserAdmin. - setupapi: Implement StringTableAddStringEx. - setupapi: Fix typo in StringTableGetExtraData. - wininet: Set secure flag when scheme is https. - winhttp: Prepend slash to request path if necessary. - clusapi: Add stubs for OpenCluster and CloseCluster. - ws2_32: Implement WSAIoctl(SIO_KEEPALIVE_VALS). - winhttp: Validate parameters per component in WinHttpCrackUrl. - winhttp: Resolve host port at the latest possible moment. - wininet: Adapt tests to winehq changes. - hal: Add version resource. - wine.inf: Create fake hal.dll. - pidgen: Add stub implementation. - pidgen: Add a placeholder BINK resource. - janitorial: Don't depend on user32 for the self registration functions. - janitorial: Remove unneeded user32 imports. - wuapi: New dll. - include: Add IAutomaticUpdates, IUpdateSession, IUpdateSearcher, IUpdateDownloader and IUpdateInstaller interfaces. - wuapi: Add a stub implementation of IUpdateDownloader. - wuapi: Add a stub implementation of IUpdateInstaller. - wuapi: Add a stub implementation of IUpdateSearcher. - wuapi: Add a stub implementation of IAutomaticUpdates. - wuapi: Add a stub implementation of IUpdateSession. - wuapi: Add class factory. - wuapi: Register interfaces. - wintrust: Open test file with share mode FILE_SHARE_READ. - wintrust: Don't test last error on success. - wintrust: Implement CryptCATAdminAcquireContext. - wintrust: Implement CryptCATAdminReleaseContext. - wininet: Relax a notification test. - wintrust: Implement CryptCATAdminAddCatalog, CryptCATAdminReleaseCatalogContext and CryptCATAdminReleaseContext. - wintrust: Add tests for adding and removing catalog files. - mscat32: Forward more functions to wintrust. - wintrust: Implement CryptCATAdminCalcHashFromFileHandle. - -Henri Verbeet (50): - wined3d: Load texture coordinates from the correct streams. - wined3d: Explicitly pass the shader version to shader_get_param(). - wined3d: Explicitly pass the shader version to shader_skip_unrecognized(). - wined3d: Return early from shader_trace_init() when a NULL pFunction is passed. - wined3d: Avoid disabling numbered arrays if we're going to enable them afterwards anyway. - wined3d: Remove some unused code. - wined3d: Don't leak memory in IWineD3DPixelShaderImpl_GenerateShader(). - wined3d: Add functions to initialize and free shader buffers. - wined3d: Fix the IWineD3DVertexShader and IWineD3DPixelShader IUnknown methods. - wined3d: Fix some spelling errors. - wined3d: Use the actual fixup for the stage in gen_ati_shader(). - wined3d: Rename texture_stage_op.color_correction to texture_stage_op.color_fixup. - wined3d: Compare & copy with the correct clipplane size in IWineD3DStateBlockImpl_Capture(). - wined3d: Make some constant arrays also static. - wined3d: Get rid of the "len" variable in shader_trace_init(). - wined3d: baseShader.functionLength should be 0 when a NULL pFunction is passed. - wined3d: Remove some more unused code. - wined3d: shader_trace_init() shouldn't have side effects. - wined3d: Don't trace the shader if nobody's looking. - wined3d: Don't reparse the entire shader just to update the sampler types. - wined3d: We only care is a sampler is sampled at all in device_map_vsamplers(), not the specific type. - wined3d: Get rid of the textureDimensions field in the state block. - wined3d: Use a simpler way to calculate the number of texture levels. - wined3d: Don't leak memory on failure in allocate_shader_constants(). - wined3d: Explicitly pass the shader version to some more functions. - wined3d: Move the shader version to reg_maps. - wined3d: Simplify shader_generate_main() a bit. - d3d8: Create a d3d8 declaration as parent for FVF based declarations. - d3d8: Use the wined3d declaration to retrieve the d3d8 shader in IDirect3DDevice8Impl_GetVertexShader(). - d3d8: Remove unused code. - wined3d: Refuse to create shaders with a NULL function. - wined3d: Shaders will never have a NULL function. - wined3d: Fix use_vs() usage in vertexdeclaration(). - d3d8: Add a test for GetVertexShader() with a FVF set. - wined3d: Remove GetFVF() and SetFVF() from IWineD3DDevice. - wined3d: Record floating point pixel shader constants in EndStateBlock() as well. - d3d9: Fix the shader constant test. - wined3d: Remove the shader_cleanup() method from the shader backend. - winex11.drv: Fix color conversion for 16 bpp cursors. - d3d9: Fix a trace. - d3d9: Add a test for shader constant application through IDirect3DStateBlock9_Apply(). - wined3d: Fix constant setting for the ARB backend. - wined3d: Don't mark shader constants dirty when we're recording a stateblock. - wined3d: Track shader constants in the shader backend. - wined3d: Don't call allocate_shader_constants() from Init3D(). - wined3d: Set the initial viewport in InitStartupStateBlock(). - wined3d: Properly reset the stateblock. - wined3d: Only apply shader constants that changed. - wined3d: Remove a useless FIXME. - wined3d: Consistently use .xyzw for vector components. - -Hwang YunSong(황윤성) (2): - cryptdlg: New Korean resource. - oleview: Updated Korean resource. - -Jacek Caban (14): - mshtml: Make IHTMLElement::get_document vtbl offset independent. - mshtml: Skip tests on broken IE6 versions. - mshtml: Fixed a typo. - jscript: Added Math.PI implementation. - jscript: Added Math.E implementation. - jscript: Added Math.LOG2E implementation. - jscript: Added Math.LOG10E implementation. - jscript: Delay setting named info if SCRIPTITEM_GLOBALMEMBER flag is not set. - mshtml: Fixed IHTMLInputTextElement vtbl and QueryInterface implementation. - jscript: Correctly handle SCRIPTITEM_GLOBALMEMBERS flag in identifier_eval. - urlmon: Remove broken IBindCtx ref count test. - mshtml: Use stored nsINetUtil interface. - mshtml: Added nsIChannel::[Get|Set]Owner implementation. - mshtml: Write aCount bytes in nsIInputStream::ReadSegments. - -James Hawkins (27): - msi: Fix the type of the last parameter of MsiEnumPatchesEx. - msi: Add the MSIPATCHSTATE enumeration. - msi: Forward MsiEnumPatchesExA to MsiEnumPatchesExW. - msi: Implement MsiEnumPatchesExW. - msi: Fix an uninitialized variable. - msi: Add tests for MsiEnumPatchesEx. - msi: Add the ability to open multiple users product keys. - msi: Add the ability to open multiple users' component keys. - msi: Add the ability to open multiple users' install properties key. - msi: Remove a duplicated function. - msi: Remove a duplicated function. - msi: Add the ability to delete multiple users' component keys. - msi: Forward MsiEnumPatchesA to MsiEnumPatchesW. - msi: Implement MsiEnumPatchesW. - msi: Add tests for MsiEnumPatches. - msi: Forward MsiGetProductPropertyA to MsiGetProductPropertyW. - msi: Implement MsiGetProductPropertyW. - msi: Add tests for MsiGetProductProperty. - msi: Add a stub implementation of MsiGetPatchInfoEx. - msi: Forward MsiGetPatchInfoExA to MsiGetPatchInfoExW. - msi: Add the ability to query a specific context for a product key. - msi: Add the ability to query a specific context for a patch. - msi: Add the ability to query a specific context for install properties. - msi: Implement MsiGetPatchInfoExW. - msi: Publish the patch information. - msi: Set the property specified by the Source attribute of the Media table when applying a patch. - msi: Add tests for MsiGetPatchInfo. - -Jeff Zaroyko (2): - msadp32.acm: Make the szFormatTag the same as windows. - imaadp32: Report the same driver details as windows. - -Jeremy Drake (1): - oleaut32/tests: Fix double GlobalFree in olepicture tests. - -Jonathan Ernst (7): - wordpad: Updated French translation. - winhlp32: WINE->Wine. - winhlp32: Updated French translation. - shell32: Updated French translation. - crypt32: Updated French translation. - cryptdlg: New French translation. - oleacc: New French translation. - -Juan Lang (57): - crypt32: Remove unnecessary casts. - crypt32: Allow setting CERT_KEY_PROV_HANDLE_PROP_ID if CERT_KEY_CONTEXT_PROP_ID has not previously been set. - wintrust: Add stub for WVTAsn1SpcSpOpusInfoEncode. - wintrust: Add tests for WVTAsn1SpcSpOpusInfoEncode. - wintrust: Implement WVTAsn1SpcSpOpusInfoEncode. - wintrust: Add tests for WVTAsn1SpcSpOpusInfoDecode. - crypt32: Add tests for CryptQueryObject. - crypt32: Validate input arguments to CryptQueryObject. - crypt32: Don't claim to have queried an object as a serialized context when reading it has failed. - crypt32: Downgrade a fixme to a warn. - crypt32: Support base64-encoded context objects in CryptQueryObject. - crypt32: Split querying PKCS messages into helper functions. - crypt32: Support base64-encoded PKCS messages in CryptQueryObject. - crypt32: Implement CryptStringToBinaryW. - crypt32: Support wide character base64-encoded PKCS messages in CryptQueryObject. - cryptui: Ignore additional prop sheet pages when calling CryptUIViewCertificateW from CryptUIViewCertificateA. - cryptui: Call WinVerifyTrust if the caller has not. - cryptui: Show (empty) certificate dialog. - cryptui: Show subject, issuer, and validity period for a cert in the properties dialog. - cryptui: Show icon and text representing trust state of certificate. - cryptui: Show valid policies for a cert. - cryptui: Show issuer statement in cert properties dialog. - cryptui: Add a (empty) details page to the cert properties dialog. - cryptui: Add selections to field selection list in details page. - cryptui: Show the X.509 v1 certificate fields in the details page. - cryptui: Show detailed value of a field when it's selected in the details page. - cryptui: Show the certificate extensions in the details page. - cryptui: Show the certificate properties in the details page. - cryptui: Remove unnecessary check. - cryptui: Add a (empty) hierarchy page to the cert properties dialog. - cryptui: Show cert chain in hierarchy page. - cryptui: Show status for end cert in hierarchy page. - cryptui: Show certificate status for selected certificate in hierarchy page. - cryptui: Allow viewing another cert in the chain from the hierarchy page. - crypt32: Make a function static. - cryptui: Remove code duplication in formatting an enhanced key usage value. - cryptui: Show cert when it's double-clicked in the hierarchy page. - cryptui: Add (empty) edit cert properties dialog. - cryptui: Show cert's friendly name and description in edit properties dialog. - cryptui: Show/hide description's scrollbar depending on how much text it has. - cryptui: Show a cert's allowed usages in cert properties dialog. - cryptui: Redraw purposes list based on purpose selection. - cryptui: Set purpose selection radio button based on enhanced key usage value. - cryptui: Add an add purpose dialog. - cryptui: Show/hide add purpose OID's scrollbar depending on how much text it has. - cryptui: Validate OID in add purpose dialog. - cryptui: Toggle a usage when it's clicked. - cryptui: Set cert friendly name and description in response to applying the edit cert properties dialog. - cryptui: Apply changes to enabled usages in response to applying the edit cert properties dialog. - cryptui: Refresh tabs in response to cert properties changes being applied. - include: Document definitions missing from cryptuiapi.h. - cryptui: Partially implement CryptUIDlgViewContext. - cryptui: Don't crash if a chain can't be created for the viewed cert. - cryptui: Fix problem with usage checkbox bitmap not being visible after the first time the edit cert properties dialog is shown. - crypt32: Don't restrict file stores to binary-encoded files. - crypt32: Don't check for the TLV after indefinite-length sequence items, the item's decoder has already done so. - crypt32: Fix encoding OIDs with only two components. - -Jörg Höhle (2): - msvfw32/tests: ICCOpen() is case-insensitive on MS-Windows. - winecfg: Prevent crash when clearing volume serial number input. - -Konstantin Kondratyuk (1): - mshtml: Correct UIDs of interfaces. - -Lei Zhang (5): - user32: Check input to GetAsyncKeyState(). - qcap: Don't clip intermediate values in YUV to RGB conversion code. - quartz: Enumerate all the pins on filter and check directions when rendering. - gdi32: Prevent integer overflow in CreateBitmapIndirect. - quartz: Ignore unknown chunks when parsing AVI headers. - -Maarten Lankhorst (7): - includes: Fix packing for commdlg in Win64. - wintab32/winex11.drv: Add CDECL to imported functions. - winex11.drv: Make XIM functions hidden. - winex11.drv/explorer: Add CDECL to exported functions. - ntdll: Make all exported wine functions CDECL. - gdi32/user32: Make __wine_make_gdi_object_system CDECL. - ntoskrnl.exe/winedevice: Make wine_ntoskrnl_main_loop CDECL. - -Marcus Meissner (2): - gphoto2.ds: Merge ds_ctrl.c into gphoto2_main.c. - include: Add prototype for GetConsoleInputExeNameA/W(). - -Michael Stefaniuc (6): - rsaenh: Do not cast zero. - taskmgr: Replace malloc with HeapAlloc. - taskmgr: Remove some superfluous casts. - setupapi: Remove some superfluous casts. - winedos: Don't cast zero. - d3dxof/tests: Remove redundant NULL check before HeapFree (Smatch). - -Mikołaj Zalewski (1): - devenum: Italian, Spanish, Dutch and VERSIONINFO should use SUBLANG_NEUTRAL. - -Nikolay Sivov (6): - oleaut32: Added SAFEARRAY support for RecordInfo::RecordClear. - gdiplus: Stub for GdipGetNearestColor. - oleaut32: Added PICTYPE_NONE and PICTYPE_UNINITIALIZED to IPicture::Render. - gdiplus: Added GdipAddPathCurve3/GdipAddPathCurve3I with tests. - gdiplus: Fix Font test failure on charset mismatch. - ole32: Make OleSetClipboard affected by previous OleInitialize() calls. - -Paul Chitescu (1): - shell32.dll: Return SE_ERR_FNF if file not found before checking for associations. - -Paul Vriens (33): - advapi32/tests: Fix a few test failures on NT4. - crypt32/tests: Fix some test failures on Win9x and NT4. - advapi32/tests: Fix some test failures on NT4. - riched32/tests: Remove an incorrect comment. - msi/tests: Run tests again on Win9x and NT4. - advapi32/tests: Only skip tests on NT4. - advapi32/tests: Fix a test failure on NT4. - gdi32/tests: Fix a failure on NT4. - riched32/tests: Remove the todo_wine logic where appropriate. - riched20/tests: Remove the todo_wine logic where appropriate. - msi/tests: Skip tests on win9x due to different registry keys. - gdi32/tests: Remove the todo_wine logic where appropriate. - rsaenh/tests: Fix a test failure on NT4. - setupapi/tests: Fix a test failure on Vista/W2K8. - ddraw/tests: Fix a test failure on a Win98 VMware box. - gdi32/tests: Fix some test failures on Win9x. - gdi32/tests: Fix a few failures on Win9x. - user32/tests: Destroy the windows after the tests. - xinput1_3/tests: Call FreeLibrary() after tests. - rpcrt4/tests: Use GetModuleHandle instead of LoadLibrary. - rpcrt4/tests: Move function pointer initialization to the init function. - msi/tests: Run tests again on Win9x and NT4. - comctl32/tests: Destroy the window after the tests. - riched20/tests: Fix test failures on Win9x, WinMe and Wine in win9x mode. - jscript/tests: Fix test failures on Win9x. - shlwapi/tests: Fix some test failures on Vista. - setupapi/tests: Fix a test failure on Vista (and skip some tests). - imm32/tests: We check for failure not success. - quartz/tests: Fix test failures on Win9x by using A-functions. - riched20/tests: Fix tests on Win9x by using A-calls. - wintrust/tests: Fix test crash on Win9x. - wintrust/tests: Don't crash on NT4 and W2K. - msvfw32/tests: Fix a test failure on W2K3. - -Ricardo Filipe (5): - clusapi: Add stubs for ClusterEnum, ClusterOpenEnum and ClusterCloseEnum. - hal: Add stubs for ExAcquireFastMutex and ExReleaseFastMutex. - advapi32: Add stub for UnregisterTraceGuids. - include: Add DEVNODEID and DEVINSTID definitions. - include: Add header information for CDN_INCLUDEITEM notification. - -Rico Schüller (3): - wordpad: Fix German translation. - winhlp32: Fix German translation. - comdlg32: Fix German translation. - -Roderick Colenbrander (4): - wined3d: Add GL_ARB_texture_rg / GL_EXT_texture_swizzle support. These extensions are needed for more efficient R32F/RG32F support. - wined3d: Add R16F using ARB_texture_rg. - wined3d: Add R32F using ARB_texture_rg. - wined3d: Add GL_RG16F / GL_RG32F support using ARB_texture_rg. - -Rok Mandeljc (12): - regedit: Updated Slovenian translation. - serialui: Added Slovenian translation. - start: Updated Slovenian translation. - winecfg: Updated Slovenian translation. - mshtml: Fixed Slovenian translation. - shell32: Updated Slovenian translation. - wordpad: Updated Slovenian translation. - cmdlgtst: Fix problem with ellipses in Slovenian translation. - winefile: Fix problem with ellipses in Slovenian translation. - appwiz.cpl: Added Slovenian translation. - winhlp32: Updated Slovenian translation. - setupapi: Added Slovenian translation. - -Simon C. Ion (1): - winemaker: Correctly process directories containing regexp metacharacters. - -Stefan Dösinger (21): - ntdll: Print the SYSTEM_PERFORMANCE_INFORMATION only once. - wined3d: Don't load INT and BOOL constants needlessly. - WineD3D: Abstract some ATIfs op debug TRACEs. - wined3d: Fix ARG_UNUSED and use it properly. - wined3d: Give ATIFS a pixel shader handler. - wined3d: Remove a blank line in state.c. - wined3d: Fake GL_ARB_multitexture. - wined3d: Set up the shaders when delaying fixed func applying. - wined3d: Reinstall the G16R16F format surface load fixup. - wined3d: Some GL_EXT_fog_coord prototype fixes. - wined3d: Remove some needless initializations. - wined3d: Emulate GL_EXT_fog_coord. - wined3d: Correct a stage number. - wined3d: Initialize max_combined_samplers properly. - wined3d: Avoid loading opengl32.dll. - wined3d: Get rid of IWineD3DPixelShaderImpl_GenerateShader. - wined3d: Pass the ps_compile_args structures to the shader generation code. - wined3d: Make use of the ps_compile_args structure in glsl_shader. - wined3d: Make use of ps_compile_args in arb shader. - wined3d: Use the ps_compile_args struct in glsl. - wined3d: Make pixelshaders disable fog properly. - -Vincent Povirk (10): - explorer,shell32: Improve ABM_GETTASKBARPOS stub. - gdiplus: Fix a memory leak in GdipCombineRegionRegion. - gdiplus/tests: Fix a double-free in the region test. - gdiplus/tests: Fix a double-free in the graphics test. - shell32: Fix a memory leak in the run dialog code. - shell32: Use the NO_UI flag in ShellExecute. - shell32: Display error messages in ShellExecuteEx. - shell32: Use ShellExecuteEx instead of ShellExecute in the run dialog. - shell32: Use ShellExecuteEx to create error dialogs for the run dialog. - winex11.drv: Do not assume window managers support _NET_WORKAREA. - -Vitaliy Margolen (1): - dinput: Remove DIEnumDevicesCallbackAtoW. - -Wolfgang Walter (1): - wineps.drv: Fix freeing of not allocated memory in type42.c. - --- -Alexandre Julliard -julliard@winehq.org +The Wine development release 1.1.12 is now available. + +What's new in this release (see below for details): + - Some simple 64-bit apps should now run. + - Support for subpixel font rendering. + - 64-bit code generation in the IDL compiler. + - New version of the Gecko engine. + - Various bug fixes. + +The source is available from the following locations: + + http://ibiblio.org/pub/linux/system/emulators/wine/wine-1.1.12.tar.bz2 + http://prdownloads.sourceforge.net/wine/wine-1.1.12.tar.bz2 + +Binary packages for various distributions will be available from: + + http://www.winehq.org/site/download + +You will find documentation on http://www.winehq.org/site/documentation + +You can also get the current source directly from the git +repository. Check http://www.winehq.org/site/git for details. + +Wine is available thanks to the work of many people. See the file +AUTHORS in the distribution for the complete list. + +---------------------------------------------------------------- + +Bugs fixed in 1.1.12: + + 3276 warhammer 40 k failed to initialize video card - Initialisation of Graphics driver fails in W40K: Dawn of War. + 3577 Wine suffers a big slow down after renaming an item + 5048 mswsock:TransmitFile not implemented + 6275 Adobe Audition 2.0 installation program fails to start, needs IXMLDOMDocument2 + 7294 Aura aborts silently on startup + 7814 EVE Online mini maps in agent missions/browser are corrupted + 7815 Photomatix 2.4 crashes when copying/pasting license information + 8383 Black & White 2 quirks and crash + 8442 configure finds sysctl.h but it does not compile on OpenBSD 4.1 + 8946 EA's FIFA Games only show a black screen + 9511 Wine uses wrong icon on desktop for installed application + 9927 qq installer crashes near end + 10489 Winemaker fails to process directories with '+' in them. + 10594 EVE Online has several rendering/stability problems + 11001 Flanker 2.0 Demo: stack overflow after mission loads + 11142 Roland XV-Editor program crashes when setting midi ports + 11182 Unimplemented function winmm.midiDisconnect + 11565 Cypress PSoC Designer installer hang/crash + 11755 MediaMonkey 3.0.2 Error initializing Media Player + 12179 MSN Messenger 7.0 crashes while starting + 12208 TsRemux v0.20 crashes when launching (needs gdiplus.GetFontHeightGivenDPI) + 12226 DrawTextA/W + DT_CALCRECT + Empty String returns 0 + 12261 Sonic Heroes Demo's shadows are messed up + 12299 Commandos 3 crashes when selecting soldier + 12339 Yahoo! Messenger 8.1 crashes in new user registration wizard + 12344 eISLP -HTML rendering produces strange characters + 12355 Utopia Angel tool crashes in statup and is unstable + 12387 Civilization 4 fails to install + 12477 NBC Direct installer requires installation of Windows Installer 3.1 redist + 12604 SimGolf v1.03 exits when starting a new game + 12638 Photodex ProShowGold crashes on service startup + 12753 CIRCAD 5.3b: does not start + 13069 EdWord needs oleacc.dll.AccessibleObjectFromPoint + 13219 ProntoEdit NG 2.1.8 Emulator; Freezes on launch and beeps continuously + 13226 Fury: Unable to patch, because of buggy Window/Buttons/... + 13392 Game Maker games have screen corruptions that renders them unplayable + 13452 Typing anything in ePSXe freezes the application + 13580 ARX Fatalis crashes + 13726 handycafe.com installer unpacker hangs + 13818 Yahoo! Messenger 9.0 beta installer crashes in ntdll when changing window focus + 13894 Kyodai Mahjongg 2006 crashes, when started in 3D mode + 13906 Guild Wars crashes on startup, before rendering scene + 13911 Unhandled page fault on prefix creation on osx 10.5 + 13943 Active Worlds: crashes on startup + 13977 CallWave: Crash on install + 13998 other programs cant use alsa + 14021 CallWave does not work + 14042 Midnight Club II does not run with sound enabled + 14044 Google SketchUp fails to run + 14050 Forces Of Corruption : Empty launcher, can't load game + 14063 Unimplemented function gdiplus.dll.GdipGetPropertyCount and gdiplus.dll.GdipGetPropertyIdList + 14088 Gvox Encore: no sound + 14112 PhotoAcute: Does not open browser links + 14257 UltimateBet: Installs, but does nothing when run + 14289 winhelp: crash with ME_InsertTableCellFromCursor: Assertion `run->member.run.pCell->next' failed. + 14508 Music doesn't work in Hears of Iron 2: Armageddon + 14777 T-Online Browser installer fails with unhandled exception on first try + 15163 Installation of MP3Gain hangs + 15652 Adobe Photoshop CS4 installer fails + 15768 lego star wars II crashes with 2 joysticks plugged in + 16165 Warhammer Online refuses to patch with builtin winhttp.dll + 16293 Activeworlds client 4.2 crashes in IDirectXFileEnumObjectImpl_Create + 16344 cmd.exe builtin time prints wrong message : current date instead of current time + 16421 EVE Online fails to start with hardware vertex shaders + 16544 winmm: mixerOpen(): when CALLBACK_WINDOW flag given, NULL Callback is also valid + 16547 Pampered Chef Plus installer doesn't recognize windows version + 16554 FeedDemon startup dialog is incomplete + 16558 Google Sketchup 7 "Tools / Interact" cursor wrapped + 16561 warning: implicit declaration of function '_mkdir' + 16587 Warhammer: Battle March - Copy protection (?) prevents loading + 16591 Sword of the Stars crashes after intro movies, before main menu + 16603 DllRegisterServer not implemented in itircl.dll + 16605 riched20 regression: FullTiltPoker client crashes when leaving game window + 16610 libport compilation fails because widl isn't there + 16611 Regression: WoW crashes on startup in git + 16646 Digital download, World of Goo 1.2 crashes wine + 16659 configure doesn't pick up libpng on OpenBSD unless -lz is given + 16665 build broken in dlls/winhttp/cookie.c on OpenBSD 4.4 + +---------------------------------------------------------------- + +Changes since 1.1.11: + +Aleksey Bragin (1): + ntdll: Fix memory corruption in RtlSetBits. + +Alexandre Julliard (73): + configure: Better check for the broken mkdir on Windows. + libport: Add a stub replacement for symlink(). + wininet: Store file time as a SYSTEMTIME instead of a Unix struct tm. + shell32: Use Win32 functions instead of Unix ones to retrieve the current time. + winedevice: Make sure that all dependencies of the driver are relocated too. + libport: Replacement for poll(). + secur32: Check for lack of fork() support. + ws2_32: Added implementation for inet_ntop. + rpcrt4: Disable TCP/IP connection support if we don't have socketpair. + shell32: Use RtlRandom instead of the non-portable rand_r. + include: Add the needed dllimport attribute to the RtlUnwind declaration. + gdi32: Fix the build without Freetype LCD support. + libport: Avoid including winsock2.h. + user32: Fix SPI_SETMOUSESPEED handling, the parameter is not a pointer. + server: Store data for hardware messages in the message extra data. + server: Make lparam_t always 64-bit. + server: Store the async handle inside the async_data_t structure. + server: Use the same field for process and thread handle in the queue_apc request. + server: Get rid of the unused count parameter in fd_queue_async(). + widl: Move determination of the exact type of structures and array to the code generation phase. + widl: Store the size of a pointer in a variable instead of hardcoding the value of the host compiler. + widl: Add --win32/--win64 options to select the type of code generated. + widl: Add support for generating 32-bit and/or 64-bit code for proxies/clients/servers. + configure: When cross-compiling, propagate the target specification to winebuild. + configure: Improve check for libresolv. + winetest: Link against the Wine import libraries for the dist version too. + kernel32: Move AllocMappedBuffer/FreeMappedBuffer to thunk.c. + include: Move the DEFINE_REGS_ENTRYPOINT macros to the dlls that use it. + winebuild: Generate the __wine_call_from_32_regs function along with the 16-bit kernel routines. + winebuild: Fix delay load code to preserve stack alignment and save the correct registers. + winebuild: Generate relay debugging thunks for x86_64. + ntdll: Make the relay debug code more generic to allow supporting 64-bit platforms. + ntdll: Add support for relay debugging on x86_64. + libport: Check for ENOTSUP being defined before using it. + ntdll: Make sure we don't return from a stub exception. + server: Add a module_handle_t type to represent client-side module handles. + server: Make module handles always 64-bit. + server: Store module names as client_ptr_t instead of void pointers. + server: Store debugging output strings as client_ptr_t instead of void pointers. + server: Make the select cookie a client_ptr_t instead of a void pointer. + server: Make the class opaque data a client_ptr_t instead of a void pointer. + server: Make the device opaque data a client_ptr_t instead of a void pointer. + server: Make hook procedures client_ptr_t instead of void pointers. + server: Make timer callback function and argument client_ptr_t instead of void pointers. + opengl32: Define an enum for extensions to make diffs smaller when adding new extensions. + server: Make the message callback function a client_ptr_t instead of a void pointer. + server: Make the address argument for read/write_process_memory a client_ptr_t. + server: Make the mapping base address a client_ptr_t instead of a void pointer. + server: Make the address parameters in inter-process virtual memory calls client_ptr_t. + server: Make padding explicit in the wake_up_reply structure. + server: Make a couple of fields smaller in the apc_call_t/apc_result_t structures. + server: Make the arguments for CreateRemoteThread client_ptr_t instead of void pointers. + server: Explicitly specify when an ioctl call needs to be blocking. + server: Specify the user APC to call only once the system APC has executed. + server: Make the various async I/O parameters client_ptr_t instead of void pointers. + server: Send the version with the initial fd so that it can be checked before sending the first request. + server: Move ldt_copy to the init_process_done request and make it a client_ptr_t. + server: Make thread entry points client_ptr_t instead of void pointers. + server: Make TEB and PEB client_ptr_t instead of void pointers. + server: Make atom_t an unsigned int to avoid padding issues. + server: Reorganize some requests to avoid padding, and make remaining padding explicit. + cmd: Don't include time.h before winsock.h to avoid conflicts. + user32: Convert wvsprintfA/W to use an MS ABI vararg list for x86_64. + shlwapi: Convert wvnsprintfA/W to use an MS ABI vararg list for x86_64. + shlwapi: Convert SHPackDispParams to use an MS ABI vararg list for x86_64. + wldap32: Convert ber_printf to use an MS ABI vararg list for x86_64. + kernel32: Convert FormatMessageA/W to use an MS ABI vararg list for x86_64. + ntdll: Use INT_MAX for the semaphore count since LONG_MAX won't work on 64-bit. + include: Don't pack shellapi.h on 64-bit. + include: Fix a couple of winsock structures for 64-bit. + kernel32/tests: Use the correct value for invalid heap sizes on 64-bit. + winecoreaudio: Fix a redefinition warning. + Update copyright info for 2009. + +Alistair Leslie-Hughes (1): + msxml3: Use xmlNodeGetContent to get text data. + +Allan Tong (1): + wined3d: Add mapping for MOV instructions in shader_hw_map2gl. + +Anders Jonsson (2): + mciseq: Fix typo. + mciavi32: Fix typo. + +Andrew Fenn (4): + xinput: Added prototypes to header file. + xinput: Added stub for XInputEnable. + xinput1_3: Added stub XInputSetState. + xinput1_3: Added tests for XInputSetState. + +Andrew Nguyen (6): + winmm/tests: Fix a mismatched failure message. + winmm/tests: Refactor the mixerOpen and mixerClose tests and add a few additional test cases. + winmm: mixerOpen should return success with NULL dwCallback and CALLBACK_WINDOW flag. + cfgmgr32: Forward and stub CM_Connect_MachineA. + setupapi: Stub the SetupDiDestroyClassImageList function. + cfgmgr32: Forward and stub CM_Create_DevNodeA/W. + +Andrew Riedi (3): + itircl: Fix documentation typo. + winex11.drv: Calculate the cursor bitmap offsets in a way consistent with user32. + winex11: Factor out the 'alpha_zero' test and use it for legacy cursor support. + +Andrew Talbot (20): + dmime: Remove unused Wine debug channel. + dmstyle: Remove unused Wine debug channel. + sxs: Remove unused Wine debug channel. + winealsa.drv: Do nothing if HAVE_ALSA is not defined. + winecoreaudio.drv: Do nothing if HAVE_AUDIOUNIT_AUDIOUNIT_H is not defined. + riched20: Remove unused Wine debug channel. + mshtml: Remove superfluous semicolons. + msvfw32: Remove superfluous semicolon. + winex11.drv: Superfluous semicolons fix. + ddraw: Remove a superfluous semicolon. + wineoss: Remove a superfluous semicolon. + wined3d: Remove superfluous semicolons. + ole32: Superfluous semicolons fix. + ntdll: Remove a superfluous semicolon. + msvcrt: Remove a superfluous semicolon. + advapi32: Remove unused function. + comdlg32: Unreachable code fix. + cabinet: Declare a function static. + comctl32: Declare some variables static. + comdlg32: Declare a function static. + +Andrey Turkin (1): + advapi32: Implement CredReadDomainCredentials stub and tests. + +Austin English (5): + itircl: Add stub functions. + configure: Fix sysctl.h check for OpenBSD. + configure: Fix libpng detection on OpenBSD. + winhttp: Fix a missing include for OpenBSD. + kernel32/tests: Fix compile on powerpc. + +ByeongSik Jeon (1): + gdi32, winex11: Add support for subpixel font rendering. + +Byeongsik Jeon (4): + gdi32: Don't truncate the added pixels with FT_LCD_FILTER_DEFAULT. + gdi32: Restore the trimmed bitmap image by FT_Render_Glyph(). + user32: Implementation the SPI_{GET|SET}FONTSMOOTHING* actions. + winex11.drv: Add the basic antialias type decision code. + +Chris Robinson (1): + d3d9: Use the correct size for D3DFVF_XYZW. + +Christian Costa (29): + wineoss.drv: Initialize correctly the header before adding it to the queue. + winecoreaudio.drv: Initialize correctly the header before adding it to the queue. + dmusic: Improve IDirectMusicPortImpl_DownloadInstrument stub. + dmusic: Add support for IID_IDirectMusicDownloadedInstrument8 query in IDirectMusicDownloadedInstrumentImpl_QueryInterface. + dmusic: Fix IDirectMusicPortImpl_QueryInterface. + dmusic: Improve IDirectMusicPortDownloadImpl_GetBuffer stub. + dmusic: Implement IDirectMusic8Impl_CreateMusicBuffer. + d3dxof: Simplify error handling in IDirectXFileEnumObjectImpl_GetNextDataObject. + d3dxof: Allocate subobjects at object creation time. + d3dxof: Release properly all allocated resources. + d3dxof: Make FileEnumObject keep references to top level objects. Add corresponding test. + d3dxof: Release allocated xobjects. + d3dxof: Small cleanup. + ddraw: Display fixme only once in IDirect3DVertexBufferImpl_Optimize. + d3dxof: Initialize object member names correctly. + d3dxof: Template names are case insensitive. + ntoskrnl.exe: Add stub for KeInitializeEvent. + ntoskrnl.exe: Fix some FIXMEs. + ntoskrnl.exe: Add stub for PsSetCreateThreadNotifyRoutine. + quartz: Fix some traces and fixmes. + winedos: Document CMOS image bytes. + winedos: Compute CMOS image checksum automatically. + winedos: Increase extended memory from 7MB to 15MB. + quartz: Remove unused IMemInputPin vtables. + cmd.exe: Use WCMD_CURRENTTIME resource to show the time. + d3dxof: Move X files parsing into a separate file. + ddraw: Display fixme only once in IDirectDrawImpl_WaitForVerticalBlank. + winmm: Check param in joyConfigChanged. + mciavi: Implement MCI_DGV_PUT_WINDOW in MCIAVI_mciPut. + +Damjan Jovanovic (1): + winemenubuilder: Improve icon generation. + +Dan Kegel (2): + tools: Remove bashisms from wineinstall. + winmm: Don't crash on PlaySound(... SND_ALIAS_ID). + +Detlef Riekenberg (3): + shdocvw/tests: Fix a test on IE 5.x. + shdocvw: Implement ParseURLFromOutsideSource. + shdocvw/tests: Add tests for ParseURLFromOutsideSource. + +Dylan Smith (1): + richedit: Prevented a dereference of a freed pointer. + +Francois Gouget (13): + kernel32: Fix a comment in LocalInit16(). + shell32/tests: Add a trailing '\n' to ok() calls. + wnaspi32: Add a trailing '\n' to a Wine trace. + advapi32/tests: Add a trailing '\n' to ok() calls. + winecoreaudio.drv: Remove an unused debug channel (midi). + winedbg: Remove an unused debug channel (winedbg). + browseui/tests: Make some functions static. + configure: Fix the linux/ipx.h check. + Assorted spelling fixes. + cmd: Reorder some functions to avoid forward declarations. + cmd: Reorder some functions to avoid forward declarations. + winemine: Remove AboutDlgProc() as it is unused. + winemine: Reorder some functions to avoid forward declarations. + +Frans Kool (1): + crypt32: Updated Dutch translations. + +Ge van Geldorp (1): + kernel32/tests: Use shared Windows directory on TS to find regedit.exe. + +Gerald Pfeifer (6): + comctl32: Shed off some unused parameters. + comctl32: Simplify DATETIME_Char. + comctl32: Simplify COMBOEX_Command. + comctl32: Simplify NATIVEFONT_Create. + wpp: Add missing #include . + comctl32: Simplify fifteen functions by removing unused parameters. + +Hans Leidekker (11): + pidgen: Fix typo. + include/mscat.h: Add a few declarations. + wintrust: Record full catalog filename in catalog info structure, not just the basename. + wintrust: Implement CryptCATAdminEnumCatalogFromHash. + wintrust: Implement CryptCATOpen and CryptCATClose. + wintrust: Test find handles against INVALID_HANDLE_VALUE. + wintrust: Implement CryptCATEnumerateMember. + wintrust: Implement CryptCATAdminResolveCatalogPath and CryptCATCatalogInfoFromContext. + wintrust: Add stub implementations of CryptCATEnumerateAttr, CryptCATEnumerateCatAttr, CryptCATGetAttrInfo, CryptCATGetCatAttrInfo and CryptCATGetMemberInfo. + wintrust: Add some tests. + wintrust: Fix message handle type. + +Henri Verbeet (28): + d3d9: Don't crash in GetFVF() if a NULL vertex declaration is set. + secur32: Try an EMPTY buffer if we can't find one of type TOKEN. + secur32: Dump the buffer descs in schan_InitializeSecurityContextW(). + secur32: Add stubs for schannel QueryContextAttributesA() and QueryContextAttributesW(). + secur32: Handle SECPKG_ATTR_STREAM_SIZES in schan_QueryContextAttributesW(). + secur32: Implement schannel EncryptMessage(). + secur32: Implement schannel DecryptMessage(). + d3d9: Release the vertex declaration once we're done with it. + d3d: Make sure the device is properly released when exiting the tests. + wined3d: The initial value for D3DRS_POINTSIZE_MAX depends on the pointsize limit. + d3d9: Use a HAL device for the stateblock tests. + wined3d: D3DRS_POINTSIZE_MIN is initially 0.0f for d3d8. + d3d8: Port the d3d9 stateblock tests to d3d8. + wined3d: Get rid of the glname field in struct SHADER_OPCODE. + d3d9: Use separate codepaths for failure and NULL return values in GetVertexShader() / GetPixelShader(). + d3d: Correct some debug levels. + wined3d: Handle D3DFVF_XYZW in ConvertFvfToDeclaration(). + configure: Check for gnutls_mac_get_key_size() instead of gnutls_transport_set_errno(). + wined3d: Make use_vs() and use_ps() work on a stateblock instead of a device. + wined3d: Remove an unused field from the device. + wined3d: Convert some BOOLs to bitfields in struct WineD3DContext. + wined3d: Convert some BOOLs to bitfields in struct IWineD3DDeviceImpl. + wined3d: Convert some BOOLs to bitfields in struct SAVEDSTATES. + wined3d: Use slightly nicer loops in device_map_fixed_function_samplers(). + wined3d: Fix a few format specifiers in IWineD3DStateBlockImpl_Capture(). + wined3d: Fix the value of HIGHEST_TRANSFORMSTATE. + wined3d: Convert streamSource and streamFreq to bitmaps in struct SAVEDSTATES. + wined3d: Convert clipplane to a bitmap in struct SAVEDSTATES. + +Hervé Chanal (2): + shell32: A nicer icon for "folder". + shell32: A nicer icon for "open folder". + +Huw Davies (1): + comdlg32: Use [G|S]etPropW instead of [G|S]etPropA. + +Hwang YunSong(황윤성) (1): + winecfg: Updated Korean resource. + +Jacek Caban (11): + mshtml: Pass window to GetCommandState and DoCommand. + mshtml: Release owner in nsChannel destructor. + mshtml: Move preferences settings to separated function. + cabinet: Make sure that parent directories exist when creating a new directory. + mshtml: Wine Gecko 0.9.0 release. + mshtml: Remove no longer needed set_profile. + mshtml: Remove no longer used node_insert_listener. + mshtml: Move handle_insert_comment to mutation.c. + mshtml: Set XPCOM_DEBUG_BREAK to 'warn' before loading Gecko. + mshtml: Added gecko debug channel to control Gecko logging. + mshtml.idl: Added HTMLStyle coclass declaration. + +James Hawkins (1): + advapi32: Request the owner and group token size instead of hardcoding the value. + +Jeff Zaroyko (4): + iphlpapi/tests: Fix a failing test. + dsound: Fix a typo in convert_32_to_24. + dsound: Check for invalid parameter when unlocking primary buffers. + dsound: Check for invalid parameter when locking primary and secondary buffers. + +Jesse Allen (1): + winecfg: Make virtual desktop shortcut key unique. + +Joris Huizer (1): + mshtml: Increment pointer as intended. + +Juan Lang (39): + cryptui: Add stubs for CryptUIDlgSelectStoreA/W. + cryptui: Add declarations for undocumented types used by CryptUIDlgSelectStoreA/W. + cryptui: Implement CryptUIDlgSelectStoreA on top of CryptUIDlgSelectStoreW. + cryptui: Add a (empty) select store dialog. + include: Add declaration of CryptFindLocalizedName. + cryptui: Add system stores to the select store dialog. + cryptui: Add additional stores to select store dialog. + cryptui: Make sure a store is selected when the user click OK in the select store dialog. + cryptui: Return selected store from CryptUIDlgSelectStoreW. + cryptui: Test mismatches between allowed and given types in CryptUIWizImport. + cryptui: Test importing from a store. + crypt32: Support add disposition CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES. + cryptui: Use helper function for importing certificates. + cryptui: Inherit existing properties when importing a cert. + cryptui: Check for type mismatches in CryptUIWizImport. + cryptui: Implement importing CRLs with CryptUIWizImport. + cryptui: Implement importing stores in CryptUIWizImport. + cryptui: Implement importing CTLs in CryptUIWizImport. + cryptui: Use CryptQueryObject to import files in CryptUIWizImport. + cryptui: Add a non-operational wizard for CryptUIWizImport. + cryptui: Implement browsing for input file in CryptUIWizImport. + cryptui: Show UI rather than failing if no import source is specified. + cryptui: Make sure input file is not empty. + cryptui: Separate opening a file from importing it. + cryptui: Validate input file in CryptUIWizImport. + cryptui: Store input file as a store in the file page of CryptUIWizImport. + cryptui: Skip the file page in CryptUIWizImport when the import source isn't a file. + cryptui: Implement specifying the destination store in CryptUIWizImport. + cryptui: Ensure that a destination store is selected in CryptUIWizImport. + cryptui: Show file name and type of destination store in final page of CryptUIWizImport. + cryptui: Show the content type on the final page of CryptUIWizImport. + cryptui: Perform import when finishing the CryptUIWizImport wizard. + cryptui: Call CryptUIWizImport from CryptUIDlgViewCertificateW. + crypt32: Don't crash when querying the length of the hash of a CRL or a CTL. + wintrust: Fix encoding OIDs with only two components. + cryptui: Use an appropriate title font for the welcome and finish wizard pages. + cryptui: Hide the column header on the finish page of CryptUIWizImport. + cryptui: Add watermark image to welcome and finish pages of CryptUIWizImport. + cryptui: Add a header bitmap to CryptUIWizImport's interior pages. + +Maarten Lankhorst (10): + winex11.drv/wined3d: Fix tsx11 calling convention. + gdi32/winex11.drv: Change all gdi/opengl operations to use CDECL calling convention. + user32/winex11.drv: Change all user32 operations to use CDECL. + kernel32: Change all functions to use CDECL. + msi: Add missing CDECL to cabinet functions. + includes: Fix EDITSTREAM definition for win64. + riched20: Fix cast for dwCookie. + ntdll: Print the expected and found assembly versions if no compatible version is found. + ntdll: Make the loader process relocations correctly for x86_64. + dsound: Correct amount of buffers used for playing. + +Michael Karcher (4): + include: Add missing local attributes to shobjidl.idl. + include: Fix out string type from LPCSTR to LPSTR in shobjidl.idl. + include: Add a missing [unique] to shobjidl.idl. + widl: Recurse search for need of delegation. + +Michael Stefaniuc (6): + msvcrt/tests: Use the C standard for multiline strings. + opengl32: make_opengl: Do not add explicit casts of function pointers to void pointers. + dplayx/tests: Do not explicitly cast LPVOID function arguments. + dplayx/tests: Fix typo. + cabinet: Don't cast the return value of PF[CD]I_ALLOC; those are void pointers. + dnsapi/tests: Remove superfluous casts. + +Mike Ruprecht (1): + wininet/tests: Add test for FtpFindFirstFile. + +Nick Burns (3): + wined3d: Fix a couple of typos in wined3d_gl.h + wined3d: Fix glReadPixels call from read_from_framebuffer. + ddraw: Fix surface version setting. + +Nikolay Sivov (4): + ole32: Fix return value for IDataObject_GetData. + gdiplus: Stub for GdipResetPenTransform. + gdiplus: Stub for GdipScalePenTransform. + gdiplus: Stub for GdipRotateLineTransform. + +Paul TBBle Hampson (4): + winhttp: Fix resolution-failure TRACE in netconn_resolve to use input WCHAR* rather than already-freed CHAR*. + winhttp/tests: Add tests for WinHttpCrackUrl port number handling. + winhttp: Correctly parse specified ports in WinHttpCrackUrl. + winhttp: Don't try and call a null callback. + +Paul Vriens (3): + shell32/tests: Cope with Vista's behavior. + winmm/tests: Fix a test failure on NT4 and W2K. + shell32/tests: Fix a few test failures on Vista and W2K8. + +Reece Dunn (1): + dsound: Correct the dsound fraglen calculations. + +Ricardo Filipe (4): + setupapi: Add stubs for CM_Locate_DevNodeA/W. + cfgmgr32: Forward CM_Locate_DevNodeA/W to setupapi. + oleacc: Fix LresultFromObject return type. + oleacc: Add stub for AccessibleObjectFromPoint. + +Rico Schüller (4): + wined3d: Fix compilation for Windows build. + d3d9/tests: Don't create a Null-shader in d3d9, it will crash. + ddraw/tests: Fis some ok() lines in alpha_test(). + ddraw/tests: Fix alpha_test and offscreen_test on geforce 8800 on XP. + +Rob Shearman (18): + mshtml: Check for the container's doc being NULL in nsTooltipListener_OnShowTooltip and nsTooltipListener_OnHideTooltip. + widl: Structures and arrays with pointers should be complex when generating code for 64-bit platforms. + include: Include winuser.h from generated oleidl.h header. + widl: Follow aliases in check_remoting_fields so that the fields for the type are correctly enumerated. + widl: Hide the details of where arguments, fields, values and cases are stored in the type_t structure for functions, structures, enums and unions. + widl: Store the type-specific information in a union in the type_t structure. + widl: Don't create a temporary variable in the t_ident rule. + widl: Create a separate type_t object for each structure declaration or defintion. + widl: Write the typelib based on the statement list generated in the typelib_t object instead of using hooks in the parser code. + widl: Write the generated file containing IID, DIID, CLSID and LIBID data based on the parsed list of statements instead of using hooks in the parser code. + widl: Write the local stubs file based on the parsed list of statements, rather than using hooks in the parser code. + widl: Generate header files from the parse tree instead of using hooks in the parser. + widl: Don't add NULL pointer checks in generated code for user types. + widl: Remove duplicate pointer handling code in get_struct_type. + winecoreaudio: Remove some unnecessary text conversions by using snprintfW instead of snprintf. + comctl32: Add names for now documented toolbar messages. + configure.ac: Fix test for libresolv on Mac OS 10.4.x. + widl: Use is_string_type instead of is_attr(..., ATTR_STRING) for detecting strings. + +Roderick Colenbrander (1): + d3d9: Relax color matching in bumpmap test. + +Vincent Pelletier (3): + user32: Fix SPI_GETMOUSESPEED and SPI_SETMOUSESPEED. + d3d9: Set IDirect3DDevice9Impl_GetVertexShader return value to NULL on error. + wined3d: Detect intel 945 GM. + +Vitaliy Margolen (9): + winmm: Stub joyConfigChanged. + dinput: Make find_joydevs re-entrant. + dinput: snprintf zero-terminates string no need to do it explicitly. + dinput: Warn if failed to open device. + dinput: Replace perror with more appropriate ERR and WARN. + dinput: Fix usage of HeapReAlloc. + dinput: Fix remaining formatting of the find_joydevs(). + dxdiagn: Fix DxDiag_DirectXFiles container to have child sub containers. + dxdiagn: Add dxdiagn.dll to DxDiag_DirectXFiles container. Create fake dll for it as well. + +Wolfgang Walter (1): + ntdll: Fix set_XOff and set_XOn. + +-- +Alexandre Julliard +julliard@winehq.org diff --git a/LICENSE b/LICENSE index 597f4c581f9..d6844a69afb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 1993-2008 the Wine project authors (see the file AUTHORS +Copyright (c) 1993-2009 the Wine project authors (see the file AUTHORS for a complete list) Wine is free software; you can redistribute it and/or modify it under diff --git a/Make.rules.in b/Make.rules.in index d49d2a36446..0c86aa16f10 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -43,6 +43,7 @@ STRIP = @STRIP@ WINDRES = @WINDRES@ LN = @LN@ LN_S = @LN_S@ +TARGET = @TARGET@ TOOLSDIR = @TOOLSDIR@ AS = @AS@ LD = @LD@ @@ -61,7 +62,7 @@ EXTRACFLAGS = @EXTRACFLAGS@ ALLCFLAGS = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) $(MODCFLAGS) ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS) IDLFLAGS = $(INCLUDES) $(DEFS) $(EXTRAIDLFLAGS) -WINEBUILDFLAGS = $(DLLFLAGS) --as-cmd "$(AS)" +WINEBUILDFLAGS = $(DLLFLAGS) $(TARGET:%=--target %) --as-cmd "$(AS)" MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755 WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi/winapi_check WINEWRAPPER = $(TOPSRCDIR)/tools/winewrapper diff --git a/README b/README index baa49296bc0..1f6c384d945 100644 --- a/README +++ b/README @@ -29,7 +29,7 @@ especially the wealth of information found at http://www.winehq.org. To compile and run Wine, you must have one of the following: Linux version 2.0.36 or above - FreeBSD 7.0 or later + FreeBSD 6.3 or later Solaris x86 9 or later NetBSD-current Mac OS X 10.4 or later @@ -45,7 +45,7 @@ Linux info: FreeBSD info: Wine will generally not work properly on versions before FreeBSD - 7.0. FreeBSD 6.3 has patches available to allow Wine to run. See + 6.3 or 7.0, and FreeBSD 6.3 has additional patches available. See for more information. Solaris info: diff --git a/VERSION b/VERSION index f4052b2d916..16aafb3cebc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Wine version 1.1.11 +Wine version 1.1.12 diff --git a/configure b/configure index ce93133bafe..36ec8a1b2bb 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for Wine 1.1.11. +# Generated by GNU Autoconf 2.61 for Wine 1.1.12. # # Report bugs to . # @@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='Wine' PACKAGE_TARNAME='wine' -PACKAGE_VERSION='1.1.11' -PACKAGE_STRING='Wine 1.1.11' +PACKAGE_VERSION='1.1.12' +PACKAGE_STRING='Wine 1.1.12' PACKAGE_BUGREPORT='wine-devel@winehq.org' ac_unique_file="server/atom.c" @@ -676,6 +676,7 @@ CXXFLAGS ac_ct_CXX CPPBIN TOOLSDIR +TARGET XMKMF CPP X_CFLAGS @@ -1305,7 +1306,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Wine 1.1.11 to adapt to many kinds of systems. +\`configure' configures Wine 1.1.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1374,7 +1375,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Wine 1.1.11:";; + short | recursive ) echo "Configuration of Wine 1.1.12:";; esac cat <<\_ACEOF @@ -1506,7 +1507,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Wine configure 1.1.11 +Wine configure 1.1.12 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1520,7 +1521,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Wine $as_me 1.1.11, which was +It was created by Wine $as_me 1.1.12, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -3729,6 +3730,11 @@ fi echo "${ECHO_T}$wine_cv_toolsdir" >&6; } TOOLSDIR=$wine_cv_toolsdir +if test "$cross_compiling" = "yes" +then + TARGET="$host_alias" + +fi ac_ext=c @@ -7246,7 +7252,6 @@ done - for ac_header in \ AudioUnit/AudioUnit.h \ Carbon/Carbon.h \ @@ -7287,6 +7292,7 @@ for ac_header in \ linux/major.h \ linux/param.h \ linux/serial.h \ + linux/types.h \ linux/ucdrom.h \ mach/mach.h \ mach/machine.h \ @@ -7348,7 +7354,6 @@ for ac_header in \ sys/statvfs.h \ sys/strtio.h \ sys/syscall.h \ - sys/sysctl.h \ sys/time.h \ sys/times.h \ sys/uio.h \ @@ -7360,7 +7365,6 @@ for ac_header in \ termios.h \ unistd.h \ utime.h \ - winsock2.h \ valgrind/memcheck.h \ valgrind/valgrind.h @@ -7581,7 +7585,8 @@ fi -for ac_header in sys/mount.h sys/statfs.h sys/user.h sys/vfs.h + +for ac_header in sys/mount.h sys/statfs.h sys/sysctl.h sys/user.h sys/vfs.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -7848,6 +7853,9 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_SYS_SOCKET_H # include #endif + #ifdef HAVE_LINUX_TYPES_H + # include + #endif #include <$ac_header> _ACEOF @@ -12830,7 +12838,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -typeof(gnutls_transport_set_errno) *pfunc; +typeof(gnutls_mac_get_key_size) *pfunc; ; return 0; } @@ -13817,31 +13825,22 @@ RESOLVLIBS="" if test "$ac_cv_header_resolv_h" = "yes" then - { echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5 -echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6; } -if test "${ac_cv_lib_resolv_res_query+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lresolv $LIBS" -cat >conftest.$ac_ext <<_ACEOF + ac_save_LIBS="$LIBS" + LIBS="$LIBS -lresolv" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +#ifdef HAVE_NETINET_IN_H +#include #endif -char res_query (); +#include int main () { -return res_query (); +res_init(); ; return 0; } @@ -13864,29 +13863,22 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_resolv_res_query=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_resolv_res_query=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_query" >&5 -echo "${ECHO_T}$ac_cv_lib_resolv_res_query" >&6; } -if test $ac_cv_lib_resolv_res_query = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_RESOLV 1 _ACEOF RESOLVLIBS="-lresolv" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_save_LIBS" fi LCMSLIBS="" @@ -16093,7 +16085,7 @@ if test "${ac_cv_lib_soname_png+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_soname_save_LIBS=$LIBS -LIBS="-lpng -lm $LIBS" +LIBS="-lpng -lm -lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -26473,7 +26465,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Wine $as_me 1.1.11, which was +This file was extended by Wine $as_me 1.1.12, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -26526,7 +26518,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -Wine config.status 1.1.11 +Wine config.status 1.1.12 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -27212,6 +27204,7 @@ CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CPPBIN!$CPPBIN$ac_delim TOOLSDIR!$TOOLSDIR$ac_delim +TARGET!$TARGET$ac_delim XMKMF!$XMKMF$ac_delim CPP!$CPP$ac_delim X_CFLAGS!$X_CFLAGS$ac_delim @@ -27232,7 +27225,6 @@ ARFLAGS!$ARFLAGS$ac_delim RANLIB!$RANLIB$ac_delim STRIP!$STRIP$ac_delim WINDRES!$WINDRES$ac_delim -LN_S!$LN_S$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 82; then @@ -27294,6 +27286,7 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +LN_S!$LN_S$ac_delim LN!$LN$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim @@ -27384,7 +27377,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 88; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.ac b/configure.ac index 0109e354816..8392bd80ec0 100644 --- a/configure.ac +++ b/configure.ac @@ -160,6 +160,10 @@ AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir, AC_MSG_ERROR([could not find Wine tools in $with_wine_tools.]) fi]) AC_SUBST(TOOLSDIR,$wine_cv_toolsdir) +if test "$cross_compiling" = "yes" +then + AC_SUBST(TARGET,"$host_alias") +fi AC_PATH_XTRA @@ -279,6 +283,7 @@ AC_CHECK_HEADERS(\ linux/major.h \ linux/param.h \ linux/serial.h \ + linux/types.h \ linux/ucdrom.h \ mach/mach.h \ mach/machine.h \ @@ -340,7 +345,6 @@ AC_CHECK_HEADERS(\ sys/statvfs.h \ sys/strtio.h \ sys/syscall.h \ - sys/sysctl.h \ sys/time.h \ sys/times.h \ sys/uio.h \ @@ -352,7 +356,6 @@ AC_CHECK_HEADERS(\ termios.h \ unistd.h \ utime.h \ - winsock2.h \ valgrind/memcheck.h \ valgrind/valgrind.h ) @@ -360,7 +363,7 @@ AC_HEADER_STAT() dnl **** Checks for headers that depend on other ones **** -AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/user.h sys/vfs.h],,, +AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/sysctl.h sys/user.h sys/vfs.h],,, [#include #ifdef HAVE_SYS_PARAM_H # include @@ -430,6 +433,9 @@ AC_CHECK_HEADERS([linux/ipx.h],,, #endif #ifdef HAVE_SYS_SOCKET_H # include + #endif + #ifdef HAVE_LINUX_TYPES_H + # include #endif]) AC_CHECK_HEADERS([resolv.h],,, @@ -933,7 +939,7 @@ then ac_gnutls_cflags="`$PKG_CONFIG --cflags gnutls 2>/dev/null`" CPPFLAGS="$CPPFLAGS $ac_gnutls_cflags" AC_CHECK_HEADER(gnutls/gnutls.h, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[typeof(gnutls_transport_set_errno) *pfunc;]])], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[typeof(gnutls_mac_get_key_size) *pfunc;]])], [WINE_CHECK_SONAME(gnutls,gnutls_global_init, [AC_SUBST(GNUTLSINCL,"$ac_gnutls_cflags")],,[$ac_gnutls_libs])])]) CPPFLAGS="$ac_save_CPPFLAGS" @@ -1004,9 +1010,15 @@ dnl **** Check for resolver library *** AC_SUBST(RESOLVLIBS,"") if test "$ac_cv_header_resolv_h" = "yes" then - AC_CHECK_LIB(resolv, res_query, + ac_save_LIBS="$LIBS" + LIBS="$LIBS -lresolv" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_NETINET_IN_H +#include +#endif +#include ]],[[res_init();]])], [AC_DEFINE(HAVE_RESOLV, 1, [Define if you have the resolver library and header]) RESOLVLIBS="-lresolv"]) + LIBS="$ac_save_LIBS" fi dnl **** Check for LittleCMS *** @@ -1231,7 +1243,7 @@ WINE_WARNING_WITH(jpeg,[test "x$ac_cv_lib_soname_jpeg" = "x"], dnl **** Check for libpng **** if test "$ac_cv_header_png_h" = "yes" then - WINE_CHECK_SONAME(png,png_create_read_struct,,,-lm,[[libpng[[0-9]]*]]) + WINE_CHECK_SONAME(png,png_create_read_struct,,,-lm -lz,[[libpng[[0-9]]*]]) fi WINE_WARNING_WITH(png,[test "x$ac_cv_lib_soname_png" = "x"], [libpng ${notice_platform}development files not found, PNG won't be supported.]) diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in index c91696604d7..b043f9e474e 100644 --- a/dlls/Makedll.rules.in +++ b/dlls/Makedll.rules.in @@ -48,7 +48,7 @@ all implib: $(IMPORTLIBFILE) $(IMPLIB_SRCS:%=__static_implib__%) $(IMPLIB_SRCS:%=__static_implib__%): $(STATICIMPLIB) $(SPEC_DEF) $(IMPORTLIB:%=lib%.def): $(MAINSPEC) - $(WINEBUILD) -w --def -o $@ --export $(SRCDIR)/$(MAINSPEC) + $(WINEBUILD) $(TARGET:%=--target %) -w --def -o $@ --export $(SRCDIR)/$(MAINSPEC) $(IMPORTLIB:%=lib%.def.a): $(IMPLIB_OBJS) $(RM) $@ diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index 972ea7b8d14..3140f627a75 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -116,8 +116,8 @@ # @ stub CredMarshalCredentialW @ stub CredProfileLoaded @ stdcall CredReadA(str long long ptr) -# @ stub CredReadDomainCredentialsA -# @ stub CredReadDomainCredentialsW +@ stdcall CredReadDomainCredentialsA(ptr long ptr ptr) +@ stdcall CredReadDomainCredentialsW(ptr long ptr ptr) @ stdcall CredReadW(wstr long long ptr) # @ stub CredRenameA # @ stub CredRenameW diff --git a/dlls/advapi32/cred.c b/dlls/advapi32/cred.c index 1e51c4105a0..9ad4fb15862 100644 --- a/dlls/advapi32/cred.c +++ b/dlls/advapi32/cred.c @@ -1539,6 +1539,170 @@ BOOL WINAPI CredReadW(LPCWSTR TargetName, DWORD Type, DWORD Flags, PCREDENTIALW } /****************************************************************************** + * CredReadDomainCredentialsA [ADVAPI32.@] + */ +BOOL WINAPI CredReadDomainCredentialsA(PCREDENTIAL_TARGET_INFORMATIONA TargetInformation, + DWORD Flags, DWORD *Size, PCREDENTIALA **Credentials) +{ + PCREDENTIAL_TARGET_INFORMATIONW TargetInformationW; + DWORD len, i; + WCHAR *buffer, *end; + BOOL ret; + PCREDENTIALW* CredentialsW; + + TRACE("(%p, 0x%x, %p, %p)\n", TargetInformation, Flags, Size, Credentials); + + /* follow Windows behavior - do not test for NULL, initialize early */ + *Size = 0; + *Credentials = NULL; + + if (!TargetInformation) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + len = sizeof(*TargetInformationW); + if (TargetInformation->TargetName) + len += MultiByteToWideChar(CP_ACP, 0, TargetInformation->TargetName, -1, NULL, 0) * sizeof(WCHAR); + if (TargetInformation->NetbiosServerName) + len += MultiByteToWideChar(CP_ACP, 0, TargetInformation->NetbiosServerName, -1, NULL, 0) * sizeof(WCHAR); + if (TargetInformation->DnsServerName) + len += MultiByteToWideChar(CP_ACP, 0, TargetInformation->DnsServerName, -1, NULL, 0) * sizeof(WCHAR); + if (TargetInformation->NetbiosDomainName) + len += MultiByteToWideChar(CP_ACP, 0, TargetInformation->NetbiosDomainName, -1, NULL, 0) * sizeof(WCHAR); + if (TargetInformation->DnsDomainName) + len += MultiByteToWideChar(CP_ACP, 0, TargetInformation->DnsDomainName, -1, NULL, 0) * sizeof(WCHAR); + if (TargetInformation->DnsTreeName) + len += MultiByteToWideChar(CP_ACP, 0, TargetInformation->DnsTreeName, -1, NULL, 0) * sizeof(WCHAR); + if (TargetInformation->PackageName) + len += MultiByteToWideChar(CP_ACP, 0, TargetInformation->PackageName, -1, NULL, 0) * sizeof(WCHAR); + + TargetInformationW = HeapAlloc(GetProcessHeap(), 0, len); + if (!TargetInformationW) + { + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + buffer = (WCHAR*)(TargetInformationW + 1); + end = (WCHAR *)((char *)TargetInformationW + len); + + if (TargetInformation->TargetName) + { + TargetInformationW->TargetName = buffer; + buffer += MultiByteToWideChar(CP_ACP, 0, TargetInformation->TargetName, -1, + TargetInformationW->TargetName, end - buffer); + } else + TargetInformationW->TargetName = NULL; + + if (TargetInformation->NetbiosServerName) + { + TargetInformationW->NetbiosServerName = buffer; + buffer += MultiByteToWideChar(CP_ACP, 0, TargetInformation->NetbiosServerName, -1, + TargetInformationW->NetbiosServerName, end - buffer); + } else + TargetInformationW->NetbiosServerName = NULL; + + if (TargetInformation->DnsServerName) + { + TargetInformationW->DnsServerName = buffer; + buffer += MultiByteToWideChar(CP_ACP, 0, TargetInformation->DnsServerName, -1, + TargetInformationW->DnsServerName, end - buffer); + } else + TargetInformationW->DnsServerName = NULL; + + if (TargetInformation->NetbiosDomainName) + { + TargetInformationW->NetbiosDomainName = buffer; + buffer += MultiByteToWideChar(CP_ACP, 0, TargetInformation->NetbiosDomainName, -1, + TargetInformationW->NetbiosDomainName, end - buffer); + } else + TargetInformationW->NetbiosDomainName = NULL; + + if (TargetInformation->DnsDomainName) + { + TargetInformationW->DnsDomainName = buffer; + buffer += MultiByteToWideChar(CP_ACP, 0, TargetInformation->DnsDomainName, -1, + TargetInformationW->DnsDomainName, end - buffer); + } else + TargetInformationW->DnsDomainName = NULL; + + if (TargetInformation->DnsTreeName) + { + TargetInformationW->DnsTreeName = buffer; + buffer += MultiByteToWideChar(CP_ACP, 0, TargetInformation->DnsTreeName, -1, + TargetInformationW->DnsTreeName, end - buffer); + } else + TargetInformationW->DnsTreeName = NULL; + + if (TargetInformation->PackageName) + { + TargetInformationW->PackageName = buffer; + buffer += MultiByteToWideChar(CP_ACP, 0, TargetInformation->PackageName, -1, + TargetInformationW->PackageName, end - buffer); + } else + TargetInformationW->PackageName = NULL; + + TargetInformationW->Flags = TargetInformation->Flags; + TargetInformationW->CredTypeCount = TargetInformation->CredTypeCount; + TargetInformationW->CredTypes = TargetInformation->CredTypes; + + ret = CredReadDomainCredentialsW(TargetInformationW, Flags, Size, &CredentialsW); + + HeapFree(GetProcessHeap(), 0, TargetInformationW); + + if (ret) + { + char *buf; + + len = *Size * sizeof(PCREDENTIALA); + for (i = 0; i < *Size; i++) + convert_PCREDENTIALW_to_PCREDENTIALA(CredentialsW[i], NULL, &len); + + *Credentials = HeapAlloc(GetProcessHeap(), 0, len); + if (!*Credentials) + { + CredFree(CredentialsW); + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + + buf = (char *)&(*Credentials)[*Size]; + for (i = 0; i < *Size; i++) + { + len = 0; + (*Credentials)[i] = (PCREDENTIALA)buf; + convert_PCREDENTIALW_to_PCREDENTIALA(CredentialsW[i], (*Credentials)[i], &len); + buf += len; + } + + CredFree(CredentialsW); + } + return ret; +} + +/****************************************************************************** + * CredReadDomainCredentialsW [ADVAPI32.@] + */ +BOOL WINAPI CredReadDomainCredentialsW(PCREDENTIAL_TARGET_INFORMATIONW TargetInformation, DWORD Flags, + DWORD *Size, PCREDENTIALW **Credentials) +{ + FIXME("(%p, 0x%x, %p, %p) stub\n", TargetInformation, Flags, Size, Credentials); + + /* follow Windows behavior - do not test for NULL, initialize early */ + *Size = 0; + *Credentials = NULL; + if (!TargetInformation) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + SetLastError(ERROR_NOT_FOUND); + return FALSE; +} + +/****************************************************************************** * CredWriteA [ADVAPI32.@] */ BOOL WINAPI CredWriteA(PCREDENTIALA Credential, DWORD Flags) diff --git a/dlls/advapi32/crypt.c b/dlls/advapi32/crypt.c index 5d0b15e78fb..8ef0a5f5220 100644 --- a/dlls/advapi32/crypt.c +++ b/dlls/advapi32/crypt.c @@ -305,7 +305,7 @@ static void CRYPT_CreateMachineGuid(void) '%','0','2','x','%','0','2','x', '%','0','2','x',0 }; - pUuidCreate = GetProcAddress(lib, "UuidCreate"); + pUuidCreate = (void *)GetProcAddress(lib, "UuidCreate"); rs = pUuidCreate(&uuid); if (rs == S_OK) { diff --git a/dlls/advapi32/crypt.h b/dlls/advapi32/crypt.h index 8fb51398404..3d630da0bcf 100644 --- a/dlls/advapi32/crypt.h +++ b/dlls/advapi32/crypt.h @@ -82,7 +82,6 @@ typedef struct tagCRYPTHASH #define MAXPROVTYPES 999 -extern unsigned char *CRYPT_DESkey8to7( unsigned char *dst, const unsigned char *key ); extern unsigned char *CRYPT_DEShash( unsigned char *dst, const unsigned char *key, const unsigned char *src ); extern unsigned char *CRYPT_DESunhash( unsigned char *dst, const unsigned char *key, diff --git a/dlls/advapi32/crypt_des.c b/dlls/advapi32/crypt_des.c index 840eb1bf775..2da2d77e2d8 100644 --- a/dlls/advapi32/crypt_des.c +++ b/dlls/advapi32/crypt_des.c @@ -252,33 +252,6 @@ static void xor( unsigned char *dst, const unsigned char *a, const unsigned char dst[i] = a[i] ^ b[i]; } -unsigned char *CRYPT_DESkey8to7( unsigned char *dst, const unsigned char *key ) -{ - int i; - unsigned char tmp[7]; - static const unsigned char map8to7[56] = - { - 0, 1, 2, 3, 4, 5, 6, - 8, 9, 10, 11, 12, 13, 14, - 16, 17, 18, 19, 20, 21, 22, - 24, 25, 26, 27, 28, 29, 30, - 32, 33, 34, 35, 36, 37, 38, - 40, 41, 42, 43, 44, 45, 46, - 48, 49, 50, 51, 52, 53, 54, - 56, 57, 58, 59, 60, 61, 62 - }; - - if ((dst == NULL) || (key == NULL)) - return NULL; - - Permute( tmp, key, map8to7, 7 ); - - for (i = 0; i < 7; i++) - dst[i] = tmp[i]; - - return dst; -} - unsigned char *CRYPT_DEShash( unsigned char *dst, const unsigned char *key, const unsigned char *src ) { int i; diff --git a/dlls/advapi32/tests/cred.c b/dlls/advapi32/tests/cred.c index df14439bc0f..e23f8721c09 100644 --- a/dlls/advapi32/tests/cred.c +++ b/dlls/advapi32/tests/cred.c @@ -34,6 +34,8 @@ static BOOL (WINAPI *pCredGetSessionTypes)(DWORD,LPDWORD); static BOOL (WINAPI *pCredReadA)(LPCSTR,DWORD,DWORD,PCREDENTIALA *); static BOOL (WINAPI *pCredRenameA)(LPCSTR,LPCSTR,DWORD,DWORD); static BOOL (WINAPI *pCredWriteA)(PCREDENTIALA,DWORD); +static BOOL (WINAPI *pCredReadDomainCredentialsA)(PCREDENTIAL_TARGET_INFORMATIONA,DWORD,DWORD*,PCREDENTIALA**); + #define TEST_TARGET_NAME "credtest.winehq.org" #define TEST_TARGET_NAME2 "credtest2.winehq.org" @@ -136,6 +138,61 @@ static void test_CredDeleteA(void) GetLastError()); } +static void test_CredReadDomainCredentialsA(void) +{ + BOOL ret; + char target_name[] = "no_such_target"; + CREDENTIAL_TARGET_INFORMATIONA info = {target_name, NULL, target_name, NULL, NULL, NULL, NULL, 0, 0, NULL}; + DWORD count; + PCREDENTIAL* creds; + + if (!pCredReadDomainCredentialsA) + { + win_skip("CredReadDomainCredentialsA() is not implemented\n"); + return; + } + + /* these two tests would crash on both native and Wine. Implementations + * does not check for NULL output pointers and try to zero them out early */ +#if 0 + ok(!pCredReadDomainCredentialsA(&info, 0, NULL, &creds) && + GetLastError() == ERROR_INVALID_PARAMETER, "!\n"); + ok(!pCredReadDomainCredentialsA(&info, 0, &count, NULL) && + GetLastError() == ERROR_INVALID_PARAMETER, "!\n"); +#endif + + SetLastError(0xdeadbeef); + ret = pCredReadDomainCredentialsA(NULL, 0, &count, &creds); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "CredReadDomainCredentialsA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + GetLastError()); + + SetLastError(0xdeadbeef); + creds = (void*)0x12345; + count = 2; + ret = pCredReadDomainCredentialsA(&info, 0, &count, &creds); + ok(!ret && GetLastError() == ERROR_NOT_FOUND, + "CredReadDomainCredentialsA should have failed with ERROR_NOT_FOUND instead of %d\n", + GetLastError()); + ok(count ==0 && creds == NULL, "CredReadDomainCredentialsA must not return any result\n"); + + info.TargetName = NULL; + + SetLastError(0xdeadbeef); + ret = pCredReadDomainCredentialsA(&info, 0, &count, &creds); + ok(!ret && GetLastError() == ERROR_NOT_FOUND, + "CredReadDomainCredentialsA should have failed with ERROR_NOT_FOUND instead of %d\n", + GetLastError()); + + info.DnsServerName = NULL; + + SetLastError(0xdeadbeef); + ret = pCredReadDomainCredentialsA(&info, 0, &count, &creds); + ok(!ret && GetLastError() == ERROR_NOT_FOUND, + "CredReadDomainCredentialsA should have failed with ERROR_NOT_FOUND instead of %d\n", + GetLastError()); +} + static void check_blob(int line, DWORD cred_type, PCREDENTIALA cred) { if (cred_type == CRED_TYPE_DOMAIN_PASSWORD) @@ -279,6 +336,7 @@ START_TEST(cred) pCredDeleteA = (void *)GetProcAddress(GetModuleHandle("advapi32.dll"), "CredDeleteA"); pCredReadA = (void *)GetProcAddress(GetModuleHandle("advapi32.dll"), "CredReadA"); pCredRenameA = (void *)GetProcAddress(GetModuleHandle("advapi32.dll"), "CredRenameA"); + pCredReadDomainCredentialsA = (void *)GetProcAddress(GetModuleHandle("advapi32.dll"), "CredReadDomainCredentialsA"); if (!pCredEnumerateA || !pCredFree || !pCredWriteA || !pCredDeleteA || !pCredReadA) @@ -304,6 +362,8 @@ START_TEST(cred) test_CredWriteA(); test_CredDeleteA(); + test_CredReadDomainCredentialsA(); + trace("generic:\n"); if (persists[CRED_TYPE_GENERIC] == CRED_PERSIST_NONE) skip("CRED_TYPE_GENERIC credentials are not supported or are disabled. Skipping\n"); diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index d521e90633a..0eccbaae96a 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -1870,7 +1870,8 @@ static void test_granted_access(HANDLE handle, ACCESS_MASK access, static void test_process_security(void) { BOOL res; - char owner[32], group[32]; + PTOKEN_OWNER owner; + PTOKEN_PRIMARY_GROUP group; PSID AdminSid = NULL, UsersSid = NULL; PACL Acl = NULL; SECURITY_DESCRIPTOR *SecurityDescriptor = NULL; @@ -1879,7 +1880,7 @@ static void test_process_security(void) STARTUPINFOA startup; SECURITY_ATTRIBUTES psa; HANDLE token, event; - DWORD tmp; + DWORD size; Acl = HeapAlloc(GetProcessHeap(), 0, 256); res = InitializeAcl(Acl, 256, ACL_REVISION); @@ -1900,16 +1901,31 @@ static void test_process_security(void) return; } - res = GetTokenInformation( token, TokenOwner, owner, sizeof(owner), &tmp ); + res = GetTokenInformation( token, TokenOwner, NULL, 0, &size ); + ok(!res, "Expected failure, got %d\n", res); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + + owner = HeapAlloc(GetProcessHeap(), 0, size); + res = GetTokenInformation( token, TokenOwner, owner, size, &size ); ok(res, "GetTokenInformation failed with error %d\n", GetLastError()); AdminSid = ((TOKEN_OWNER*)owner)->Owner; - res = GetTokenInformation( token, TokenPrimaryGroup, group, sizeof(group), &tmp ); + + res = GetTokenInformation( token, TokenPrimaryGroup, NULL, 0, &size ); + ok(!res, "Expected failure, got %d\n", res); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + + group = HeapAlloc(GetProcessHeap(), 0, size); + res = GetTokenInformation( token, TokenPrimaryGroup, group, size, &size ); ok(res, "GetTokenInformation failed with error %d\n", GetLastError()); UsersSid = ((TOKEN_PRIMARY_GROUP*)group)->PrimaryGroup; CloseHandle( token ); if (!res) { + HeapFree(GetProcessHeap(), 0, group); + HeapFree(GetProcessHeap(), 0, owner); HeapFree(GetProcessHeap(), 0, Acl); return; } @@ -1969,6 +1985,8 @@ static void test_process_security(void) CloseHandle( info.hProcess ); CloseHandle( info.hThread ); CloseHandle( event ); + HeapFree(GetProcessHeap(), 0, group); + HeapFree(GetProcessHeap(), 0, owner); HeapFree(GetProcessHeap(), 0, Acl); HeapFree(GetProcessHeap(), 0, SecurityDescriptor); } diff --git a/dlls/advpack/tests/files.c b/dlls/advpack/tests/files.c index 9ddd3bc0062..611bbc4bb58 100644 --- a/dlls/advpack/tests/files.c +++ b/dlls/advpack/tests/files.c @@ -174,33 +174,33 @@ static void test_AddDelBackupEntry(void) /* the FCI callbacks */ -static void *mem_alloc(ULONG cb) +static void * CDECL mem_alloc(ULONG cb) { return HeapAlloc(GetProcessHeap(), 0, cb); } -static void mem_free(void *memory) +static void CDECL mem_free(void *memory) { HeapFree(GetProcessHeap(), 0, memory); } -static BOOL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) +static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) { return TRUE; } -static long progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) +static long CDECL progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) { return 0; } -static int file_placed(PCCAB pccab, char *pszFile, long cbFile, - BOOL fContinuation, void *pv) +static int CDECL file_placed(PCCAB pccab, char *pszFile, long cbFile, + BOOL fContinuation, void *pv) { return 0; } -static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) +static INT_PTR CDECL fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) { HANDLE handle; DWORD dwAccess = 0; @@ -224,7 +224,7 @@ static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) return (INT_PTR)handle; } -static UINT fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwRead; @@ -236,7 +236,7 @@ static UINT fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) return dwRead; } -static UINT fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwWritten; @@ -248,7 +248,7 @@ static UINT fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) return dwWritten; } -static int fci_close(INT_PTR hf, int *err, void *pv) +static int CDECL fci_close(INT_PTR hf, int *err, void *pv) { HANDLE handle = (HANDLE)hf; ok(CloseHandle(handle), "Failed to CloseHandle\n"); @@ -256,7 +256,7 @@ static int fci_close(INT_PTR hf, int *err, void *pv) return 0; } -static long fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) +static long CDECL fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD ret; @@ -267,7 +267,7 @@ static long fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) return ret; } -static int fci_delete(char *pszFile, int *err, void *pv) +static int CDECL fci_delete(char *pszFile, int *err, void *pv) { BOOL ret = DeleteFileA(pszFile); ok(ret, "Failed to DeleteFile %s\n", pszFile); @@ -275,7 +275,7 @@ static int fci_delete(char *pszFile, int *err, void *pv) return 0; } -static BOOL get_temp_file(char *pszTempName, int cbTempName, void *pv) +static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv) { LPSTR tempname; @@ -294,8 +294,8 @@ static BOOL get_temp_file(char *pszTempName, int cbTempName, void *pv) return FALSE; } -static INT_PTR get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, - USHORT *pattribs, int *err, void *pv) +static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, + USHORT *pattribs, int *err, void *pv) { BY_HANDLE_FILE_INFORMATION finfo; FILETIME filetime; diff --git a/dlls/appwiz.cpl/Ro.rc b/dlls/appwiz.cpl/Ro.rc new file mode 100644 index 00000000000..321e9ddd52e --- /dev/null +++ b/dlls/appwiz.cpl/Ro.rc @@ -0,0 +1,82 @@ +/* +* Add/Remove Programs Romanian resources +* +* Copyright 2001-2002, 2008 Owen Rudge +* Copyright 2009 Michael Stefaniuc +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +* +*/ + +LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL + +#pragma code_page(65001) + +STRINGTABLE +{ + IDS_CPL_TITLE, "Adăugare/eliminare programe" + IDS_CPL_DESC, "Permite instalarea sau dezinstalarea de aplicații pe calculatorul d-voastră." + IDS_TAB1_TITLE, "Aplicații" + + IDS_UNINSTALL_FAILED, "Nu am putut rula dezinstalarea pentru „%s”. Vreți să înlăturați înregistrarea de dezinstalare a acestei aplicații?" + IDS_NOT_SPECIFIED, "Ne specificat" + + IDS_COLUMN_NAME, "Nume" + IDS_COLUMN_PUBLISHER, "Emitent" + IDS_COLUMN_VERSION, "Versiune" +} + +IDD_MAIN DIALOG 0, 0, 320, 220 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalare/dezinstalare" +FONT 8, "MS Shell Dlg" +{ + CONTROL "Pentru a instala un program de pe dischetă, CD-ROM sau discul fix, apăsați pe „Instalează”.", 1000, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 40, 7, 270, 20 + CONTROL "&Instalează...", IDC_INSTALL, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 246, 26, 64, 14 + CONTROL "", -1, "STATIC", SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE, 7, 46, 303, 1 + CONTROL 2, 1001, "STATIC", SS_ICON | WS_CHILD | WS_VISIBLE, 7, 7, 21, 20 + CONTROL "Urmatoarele programe pot fi îndepărtate automat. Pentru a îndepărta un program sau pentru ai modifica componentele instalate, alegeți programul din listă și apăsați pe „Adaugă/&șterge”.", 1002, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 40, 57, 270, 30 + CONTROL "", IDL_PROGRAMS, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SORTASCENDING | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 90, 303, 100 + CONTROL "Adaugă/&șterge...", IDC_ADDREMOVE, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 236, 198, 74, 14 + CONTROL "Informații a&sistență...", IDC_SUPPORT_INFO, "button", BS_PUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 156, 198, 74, 14 + CONTROL 3, 1003, "STATIC", SS_ICON | WS_CHILD | WS_VISIBLE, 7, 57, 21, 20 +} + +IDD_INFO DIALOG 0, 0, 256, 138 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Informații de asistență" +FONT 8, "MS Shell Dlg" +{ + CONTROL "OK", IDOK, "BUTTON", BS_DEFPUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 103, 116, 50, 14 + CONTROL "Următoarele informații pot fi folosite la obținerea de asistență technică pentru „%s”:", IDC_INFO_LABEL, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 12, 9, 228, 19 + CONTROL "Emitent:", -1, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 16, 30, 60, 8 + CONTROL "Versiune:", -1, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 16, 40, 60, 8 + CONTROL "Contact:", -1, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 16, 50, 60, 8 + CONTROL "Informații de asistență:", -1, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 16, 60, 84, 8 + CONTROL "Asistență prin telefon:", -1, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 16, 70, 84, 8 + CONTROL "Readme:", -1, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 16, 80, 60, 8 + CONTROL "Actualizări produs:", -1, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 16, 90, 60, 8 + CONTROL "Comentarii:", -1, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 16, 100, 60, 8 + CONTROL "", IDC_INFO_PUBLISHER, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 104, 30, 136, 8 + CONTROL "", IDC_INFO_VERSION, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 104, 40, 136, 8 + CONTROL "", IDC_INFO_CONTACT, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 104, 50, 136, 8 + CONTROL "", IDC_INFO_SUPPORT, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 104, 60, 136, 8 + CONTROL "", IDC_INFO_PHONE, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 104, 70, 136, 8 + CONTROL "", IDC_INFO_README, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 104, 80, 136, 8 + CONTROL "", IDC_INFO_UPDATES, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 104, 90, 136, 8 + CONTROL "", IDC_INFO_COMMENTS, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 104, 100, 136, 8 +} + +#pragma code_page(default) diff --git a/dlls/appwiz.cpl/appwiz.rc b/dlls/appwiz.cpl/appwiz.rc index 7c95366362a..843662a5eaa 100644 --- a/dlls/appwiz.cpl/appwiz.rc +++ b/dlls/appwiz.cpl/appwiz.rc @@ -32,6 +32,7 @@ #include "Nl.rc" #include "No.rc" #include "Pt.rc" +#include "Ro.rc" #include "Ru.rc" #include "Si.rc" #include "Zh.rc" diff --git a/dlls/browseui/browseui_main.c b/dlls/browseui/browseui_main.c index 447e4f7a1f7..54e9c5271f9 100644 --- a/dlls/browseui/browseui_main.c +++ b/dlls/browseui/browseui_main.c @@ -146,7 +146,7 @@ static HRESULT ClassFactory_Constructor(LPFNCONSTRUCTOR ctor, LPVOID *ppvOut) This->vtbl = &ClassFactoryVtbl; This->ref = 1; This->ctor = ctor; - *ppvOut = (LPVOID)This; + *ppvOut = This; TRACE("Created class factory %p\n", This); BROWSEUI_refCount++; return S_OK; diff --git a/dlls/browseui/progressdlg.c b/dlls/browseui/progressdlg.c index 120f072c3aa..42e73227560 100644 --- a/dlls/browseui/progressdlg.c +++ b/dlls/browseui/progressdlg.c @@ -223,7 +223,7 @@ static DWORD WINAPI dialog_thread(LPVOID lpParameter) { /* Note: until we set the hEvent in WM_INITDIALOG, the ProgressDialog object * is protected by the critical section held by StartProgress */ - struct create_params *params = (struct create_params *)lpParameter; + struct create_params *params = lpParameter; HWND hwnd; MSG msg; diff --git a/dlls/browseui/tests/autocomplete.c b/dlls/browseui/tests/autocomplete.c index 966721c3fd3..85a7da5ebc7 100644 --- a/dlls/browseui/tests/autocomplete.c +++ b/dlls/browseui/tests/autocomplete.c @@ -45,10 +45,10 @@ ok(FALSE, #exp " failed: %x\n", res); \ } -LPWSTR strdup_AtoW(LPCSTR str) +static LPWSTR strdup_AtoW(LPCSTR str) { int size = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - LPWSTR wstr = (LPWSTR)CoTaskMemAlloc((size + 1)*sizeof(WCHAR)); + LPWSTR wstr = CoTaskMemAlloc((size + 1)*sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, str, -1, wstr, size+1); return wstr; } @@ -86,14 +86,14 @@ static TestACL *TestACL_Constructor(int limit, const char **strings) return This; } -ULONG STDMETHODCALLTYPE TestACL_AddRef(IEnumString *iface) +static ULONG STDMETHODCALLTYPE TestACL_AddRef(IEnumString *iface) { TestACL *This = (TestACL *)iface; trace("ACL(%p): addref (%d)\n", This, This->ref+1); return InterlockedIncrement(&This->ref); } -ULONG STDMETHODCALLTYPE TestACL_Release(IEnumString *iface) +static ULONG STDMETHODCALLTYPE TestACL_Release(IEnumString *iface) { TestACL *This = (TestACL *)iface; ULONG res; @@ -103,7 +103,7 @@ ULONG STDMETHODCALLTYPE TestACL_Release(IEnumString *iface) return res; } -HRESULT STDMETHODCALLTYPE TestACL_QueryInterface(IEnumString *iface, REFIID iid, LPVOID *ppvOut) +static HRESULT STDMETHODCALLTYPE TestACL_QueryInterface(IEnumString *iface, REFIID iid, LPVOID *ppvOut) { TestACL *This = (TestACL *)iface; *ppvOut = NULL; @@ -129,7 +129,7 @@ HRESULT STDMETHODCALLTYPE TestACL_QueryInterface(IEnumString *iface, REFIID iid, return E_NOINTERFACE; } -HRESULT STDMETHODCALLTYPE TestACL_Next(IEnumString *iface, ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched) +static HRESULT STDMETHODCALLTYPE TestACL_Next(IEnumString *iface, ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched) { TestACL *This = (TestACL *)iface; ULONG i; @@ -150,19 +150,19 @@ HRESULT STDMETHODCALLTYPE TestACL_Next(IEnumString *iface, ULONG celt, LPOLESTR return S_FALSE; } -HRESULT STDMETHODCALLTYPE TestACL_Skip(IEnumString *iface, ULONG celt) +static HRESULT STDMETHODCALLTYPE TestACL_Skip(IEnumString *iface, ULONG celt) { ok(FALSE, "Unexpected call to TestACL_Skip\n"); return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE TestACL_Clone(IEnumString *iface, IEnumString **out) +static HRESULT STDMETHODCALLTYPE TestACL_Clone(IEnumString *iface, IEnumString **out) { ok(FALSE, "Unexpected call to TestACL_Clone\n"); return E_OUTOFMEMORY; } -HRESULT STDMETHODCALLTYPE TestACL_Reset(IEnumString *iface) +static HRESULT STDMETHODCALLTYPE TestACL_Reset(IEnumString *iface) { TestACL *This = (TestACL *)iface; trace("ACL(%p): Reset\n", This); @@ -170,7 +170,7 @@ HRESULT STDMETHODCALLTYPE TestACL_Reset(IEnumString *iface) return S_OK; } -HRESULT STDMETHODCALLTYPE TestACL_Expand(IACList *iface, LPCOLESTR str) +static HRESULT STDMETHODCALLTYPE TestACL_Expand(IACList *iface, LPCOLESTR str) { TestACL *This = impl_from_IACList(iface); trace("ACL(%p): Expand\n", impl_from_IACList(iface)); @@ -190,17 +190,17 @@ IEnumStringVtbl TestACLVtbl = TestACL_Clone }; -ULONG STDMETHODCALLTYPE TestACL_ACList_AddRef(IACList *iface) +static ULONG STDMETHODCALLTYPE TestACL_ACList_AddRef(IACList *iface) { return TestACL_AddRef((IEnumString *)impl_from_IACList(iface)); } -ULONG STDMETHODCALLTYPE TestACL_ACList_Release(IACList *iface) +static ULONG STDMETHODCALLTYPE TestACL_ACList_Release(IACList *iface) { return TestACL_Release((IEnumString *)impl_from_IACList(iface)); } -HRESULT STDMETHODCALLTYPE TestACL_ACList_QueryInterface(IACList *iface, REFIID iid, LPVOID *ppvout) +static HRESULT STDMETHODCALLTYPE TestACL_ACList_QueryInterface(IACList *iface, REFIID iid, LPVOID *ppvout) { return TestACL_QueryInterface((IEnumString *)impl_from_IACList(iface), iid, ppvout); } diff --git a/dlls/cabinet/cabinet.h b/dlls/cabinet/cabinet.h index e786c1feb0f..8b38f9b587c 100644 --- a/dlls/cabinet/cabinet.h +++ b/dlls/cabinet/cabinet.h @@ -656,6 +656,5 @@ typedef struct { /* from fdi.c */ void QTMupdatemodel(struct QTMmodel *model, int sym); int make_decode_table(cab_ULONG nsyms, cab_ULONG nbits, const cab_UBYTE *length, cab_UWORD *table); -cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum); #endif /* __WINE_CABINET_H */ diff --git a/dlls/cabinet/cabinet_main.c b/dlls/cabinet/cabinet_main.c index 35810e3b659..fde5d9af0c2 100644 --- a/dlls/cabinet/cabinet_main.c +++ b/dlls/cabinet/cabinet_main.c @@ -69,17 +69,17 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi) /* FDI callback functions */ -static void *mem_alloc(ULONG cb) +static void * CDECL mem_alloc(ULONG cb) { return HeapAlloc(GetProcessHeap(), 0, cb); } -static void mem_free(void *memory) +static void CDECL mem_free(void *memory) { HeapFree(GetProcessHeap(), 0, memory); } -static INT_PTR fdi_open(char *pszFile, int oflag, int pmode) +static INT_PTR CDECL fdi_open(char *pszFile, int oflag, int pmode) { HANDLE handle; DWORD dwAccess = 0; @@ -120,7 +120,7 @@ static INT_PTR fdi_open(char *pszFile, int oflag, int pmode) return (INT_PTR) handle; } -static UINT fdi_read(INT_PTR hf, void *pv, UINT cb) +static UINT CDECL fdi_read(INT_PTR hf, void *pv, UINT cb) { HANDLE handle = (HANDLE) hf; DWORD dwRead; @@ -131,7 +131,7 @@ static UINT fdi_read(INT_PTR hf, void *pv, UINT cb) return 0; } -static UINT fdi_write(INT_PTR hf, void *pv, UINT cb) +static UINT CDECL fdi_write(INT_PTR hf, void *pv, UINT cb) { HANDLE handle = (HANDLE) hf; DWORD dwWritten; @@ -142,13 +142,13 @@ static UINT fdi_write(INT_PTR hf, void *pv, UINT cb) return 0; } -static int fdi_close(INT_PTR hf) +static int CDECL fdi_close(INT_PTR hf) { HANDLE handle = (HANDLE) hf; return CloseHandle(handle) ? 0 : -1; } -static long fdi_seek(INT_PTR hf, long dist, int seektype) +static long CDECL fdi_seek(INT_PTR hf, long dist, int seektype) { HANDLE handle = (HANDLE) hf; return SetFilePointer(handle, dist, NULL, seektype); @@ -182,7 +182,7 @@ static BOOL file_in_list(struct FILELIST *pNode, LPCSTR szFilename, return FALSE; } -static INT_PTR fdi_notify_extract(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) +static INT_PTR CDECL fdi_notify_extract(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) { switch (fdint) { @@ -237,7 +237,18 @@ static INT_PTR fdi_notify_extract(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pf /* create the destination directory if it doesn't exist */ if (GetFileAttributesA(szDirectory) == INVALID_FILE_ATTRIBUTES) + { + char *ptr; + + for(ptr = szDirectory + strlen(pDestination->Destination)+1; *ptr; ptr++) { + if(*ptr == '\\') { + *ptr = 0; + CreateDirectoryA(szDirectory, NULL); + *ptr = '\\'; + } + } CreateDirectoryA(szDirectory, NULL); + } hFile = CreateFileA(szFullPath, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); diff --git a/dlls/cabinet/fci.c b/dlls/cabinet/fci.c index ed413f821e1..81175dcc448 100644 --- a/dlls/cabinet/fci.c +++ b/dlls/cabinet/fci.c @@ -382,7 +382,7 @@ static BOOL fci_flush_data_block (HFCI hfci, int* err, /* inefficient, but it's harder to forget about freeing the buffer :-). */ /* Reserved areas are used seldom besides that... */ if (cbReserveCFData!=0) { - if(!(reserved = (char*)PFCI_ALLOC(hfci, cbReserveCFData))) { + if(!(reserved = PFCI_ALLOC(hfci, cbReserveCFData))) { fci_set_error( FCIERR_ALLOC_FAIL, ERROR_NOT_ENOUGH_MEMORY, TRUE ); return FALSE; } @@ -852,7 +852,7 @@ static BOOL fci_flushfolder_copy_cffolder(HFCI hfci, int* err, UINT cbReserveCFF /* add optional reserved area */ if (cbReserveCFFolder!=0) { - if(!(reserved = (char*)PFCI_ALLOC(hfci, cbReserveCFFolder))) { + if(!(reserved = PFCI_ALLOC(hfci, cbReserveCFFolder))) { fci_set_error( FCIERR_ALLOC_FAIL, ERROR_NOT_ENOUGH_MEMORY, TRUE ); return FALSE; } @@ -1419,7 +1419,7 @@ static BOOL fci_flush_folder( /* save size of file CFDATA2 - required for the folder's offset to data */ sizeFileCFDATA2old = p_fci_internal->sizeFileCFDATA2; - if(!(reserved = (char*)PFCI_ALLOC(hfci, cbReserveCFData+sizeof(CFDATA)))) { + if(!(reserved = PFCI_ALLOC(hfci, cbReserveCFData+sizeof(CFDATA)))) { fci_set_error( FCIERR_ALLOC_FAIL, ERROR_NOT_ENOUGH_MEMORY, TRUE ); PFCI_CLOSE(hfci,handleCFDATA1new,&err,p_fci_internal->pv); /* TODO error handling of err */ @@ -1753,7 +1753,7 @@ static BOOL fci_flush_cabinet( /* add optional reserved area */ if (cbReserveCFHeader!=0) { - if(!(reserved = (char*)PFCI_ALLOC(hfci, cbReserveCFHeader))) { + if(!(reserved = PFCI_ALLOC(hfci, cbReserveCFHeader))) { fci_set_error( FCIERR_ALLOC_FAIL, ERROR_NOT_ENOUGH_MEMORY, TRUE ); return FALSE; } @@ -2397,7 +2397,7 @@ BOOL __cdecl FCIAddFile( fci_set_error( FCIERR_NONE, ERROR_GEN_FAILURE, TRUE ); return FALSE; } - if(!(p_fci_internal->data_in = (char*)PFCI_ALLOC(hfci,CB_MAX_CHUNK))) { + if(!(p_fci_internal->data_in = PFCI_ALLOC(hfci,CB_MAX_CHUNK))) { fci_set_error( FCIERR_ALLOC_FAIL, ERROR_NOT_ENOUGH_MEMORY, TRUE ); return FALSE; } diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c index 49234041522..e36066df5bc 100644 --- a/dlls/cabinet/fdi.c +++ b/dlls/cabinet/fdi.c @@ -293,7 +293,7 @@ int make_decode_table(cab_ULONG nsyms, cab_ULONG nbits, const cab_UBYTE *length, /************************************************************************* * checksum (internal) */ -cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum) { +static cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum) { int len; cab_ULONG ul = 0; @@ -1054,7 +1054,7 @@ struct Ziphuft **t, cab_LONG *m, fdi_decomp_state *decomp_state) l[h] = j; /* set table size in stack */ /* allocate and link in new table */ - if (!(q = (struct Ziphuft *) PFDI_ALLOC(CAB(hfdi), (z + 1)*sizeof(struct Ziphuft)))) + if (!(q = PFDI_ALLOC(CAB(hfdi), (z + 1)*sizeof(struct Ziphuft)))) { if(h) fdi_Ziphuft_free(CAB(hfdi), ZIP(u)[0]); @@ -2180,8 +2180,8 @@ static int fdi_decomp(const struct fdi_file *fi, int savemode, fdi_decomp_state if (cab->mii.folder_resv > 0) PFDI_SEEK(CAB(hfdi), cab->cabhf, cab->mii.folder_resv, SEEK_CUR); - - fol = (struct fdi_folder *) PFDI_ALLOC(CAB(hfdi), sizeof(struct fdi_folder)); + + fol = PFDI_ALLOC(CAB(hfdi), sizeof(struct fdi_folder)); if (!fol) { ERR("out of memory!\n"); return DECR_NOMEMORY; @@ -2202,8 +2202,8 @@ static int fdi_decomp(const struct fdi_file *fi, int savemode, fdi_decomp_state for (i = 0; i < fdici.cFiles; i++) { if (PFDI_READ(CAB(hfdi), cab->cabhf, buf2, cffile_SIZEOF) != cffile_SIZEOF) return DECR_INPUT; - - file = (struct fdi_file *) PFDI_ALLOC(CAB(hfdi), sizeof(struct fdi_file)); + + file = PFDI_ALLOC(CAB(hfdi), sizeof(struct fdi_file)); if (!file) { ERR("out of memory!\n"); return DECR_NOMEMORY; @@ -2592,7 +2592,7 @@ BOOL __cdecl FDICopy( if (CAB(mii).folder_resv > 0) PFDI_SEEK(hfdi, cabhf, CAB(mii).folder_resv, SEEK_CUR); - fol = (struct fdi_folder *) PFDI_ALLOC(hfdi, sizeof(struct fdi_folder)); + fol = PFDI_ALLOC(hfdi, sizeof(struct fdi_folder)); if (!fol) { ERR("out of memory!\n"); PFDI_INT(hfdi)->perf->erfOper = FDIERROR_ALLOC_FAIL; @@ -2622,7 +2622,7 @@ BOOL __cdecl FDICopy( goto bail_and_fail; } - file = (struct fdi_file *) PFDI_ALLOC(hfdi, sizeof(struct fdi_file)); + file = PFDI_ALLOC(hfdi, sizeof(struct fdi_file)); if (!file) { ERR("out of memory!\n"); PFDI_INT(hfdi)->perf->erfOper = FDIERROR_ALLOC_FAIL; diff --git a/dlls/cabinet/tests/extract.c b/dlls/cabinet/tests/extract.c index 156df177a9b..b6b3cbba96f 100644 --- a/dlls/cabinet/tests/extract.c +++ b/dlls/cabinet/tests/extract.c @@ -111,33 +111,33 @@ static void delete_test_files(void) /* the FCI callbacks */ -static void *mem_alloc(ULONG cb) +static void * CDECL mem_alloc(ULONG cb) { return HeapAlloc(GetProcessHeap(), 0, cb); } -static void mem_free(void *memory) +static void CDECL mem_free(void *memory) { HeapFree(GetProcessHeap(), 0, memory); } -static BOOL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) +static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) { return TRUE; } -static long progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) +static long CDECL progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) { return 0; } -static int file_placed(PCCAB pccab, char *pszFile, long cbFile, - BOOL fContinuation, void *pv) +static int CDECL file_placed(PCCAB pccab, char *pszFile, long cbFile, + BOOL fContinuation, void *pv) { return 0; } -static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) +static INT_PTR CDECL fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) { HANDLE handle; DWORD dwAccess = 0; @@ -161,7 +161,7 @@ static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) return (INT_PTR)handle; } -static UINT fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwRead; @@ -173,7 +173,7 @@ static UINT fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) return dwRead; } -static UINT fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwWritten; @@ -185,7 +185,7 @@ static UINT fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) return dwWritten; } -static int fci_close(INT_PTR hf, int *err, void *pv) +static int CDECL fci_close(INT_PTR hf, int *err, void *pv) { HANDLE handle = (HANDLE)hf; ok(CloseHandle(handle), "Failed to CloseHandle\n"); @@ -193,7 +193,7 @@ static int fci_close(INT_PTR hf, int *err, void *pv) return 0; } -static long fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) +static long CDECL fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD ret; @@ -204,7 +204,7 @@ static long fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) return ret; } -static int fci_delete(char *pszFile, int *err, void *pv) +static int CDECL fci_delete(char *pszFile, int *err, void *pv) { BOOL ret = DeleteFileA(pszFile); ok(ret, "Failed to DeleteFile %s\n", pszFile); @@ -212,7 +212,7 @@ static int fci_delete(char *pszFile, int *err, void *pv) return 0; } -static BOOL get_temp_file(char *pszTempName, int cbTempName, void *pv) +static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv) { LPSTR tempname; @@ -231,8 +231,8 @@ static BOOL get_temp_file(char *pszTempName, int cbTempName, void *pv) return FALSE; } -static INT_PTR get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, - USHORT *pattribs, int *err, void *pv) +static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, + USHORT *pattribs, int *err, void *pv) { BY_HANDLE_FILE_INFORMATION finfo; FILETIME filetime; diff --git a/dlls/cabinet/tests/fdi.c b/dlls/cabinet/tests/fdi.c index e9765adb0db..058172f4fe9 100644 --- a/dlls/cabinet/tests/fdi.c +++ b/dlls/cabinet/tests/fdi.c @@ -32,22 +32,22 @@ CHAR CURR_DIR[MAX_PATH]; /* FDI callbacks */ -static void *fdi_alloc(ULONG cb) +static void * CDECL fdi_alloc(ULONG cb) { return HeapAlloc(GetProcessHeap(), 0, cb); } -static void *fdi_alloc_bad(ULONG cb) +static void * CDECL fdi_alloc_bad(ULONG cb) { return NULL; } -static void fdi_free(void *pv) +static void CDECL fdi_free(void *pv) { HeapFree(GetProcessHeap(), 0, pv); } -static INT_PTR fdi_open(char *pszFile, int oflag, int pmode) +static INT_PTR CDECL fdi_open(char *pszFile, int oflag, int pmode) { HANDLE handle; handle = CreateFileA(pszFile, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, @@ -57,7 +57,7 @@ static INT_PTR fdi_open(char *pszFile, int oflag, int pmode) return (INT_PTR) handle; } -static UINT fdi_read(INT_PTR hf, void *pv, UINT cb) +static UINT CDECL fdi_read(INT_PTR hf, void *pv, UINT cb) { HANDLE handle = (HANDLE) hf; DWORD dwRead; @@ -66,7 +66,7 @@ static UINT fdi_read(INT_PTR hf, void *pv, UINT cb) return 0; } -static UINT fdi_write(INT_PTR hf, void *pv, UINT cb) +static UINT CDECL fdi_write(INT_PTR hf, void *pv, UINT cb) { HANDLE handle = (HANDLE) hf; DWORD dwWritten; @@ -75,13 +75,13 @@ static UINT fdi_write(INT_PTR hf, void *pv, UINT cb) return 0; } -static int fdi_close(INT_PTR hf) +static int CDECL fdi_close(INT_PTR hf) { HANDLE handle = (HANDLE) hf; return CloseHandle(handle) ? 0 : -1; } -static long fdi_seek(INT_PTR hf, long dist, int seektype) +static long CDECL fdi_seek(INT_PTR hf, long dist, int seektype) { HANDLE handle = (HANDLE) hf; return SetFilePointer(handle, dist, NULL, seektype); @@ -315,33 +315,33 @@ static void delete_test_files(void) /* FCI callbacks */ -static void *mem_alloc(ULONG cb) +static void * CDECL mem_alloc(ULONG cb) { return HeapAlloc(GetProcessHeap(), 0, cb); } -static void mem_free(void *memory) +static void CDECL mem_free(void *memory) { HeapFree(GetProcessHeap(), 0, memory); } -static BOOL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) +static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) { return TRUE; } -static long progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) +static long CDECL progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) { return 0; } -static int file_placed(PCCAB pccab, char *pszFile, long cbFile, - BOOL fContinuation, void *pv) +static int CDECL file_placed(PCCAB pccab, char *pszFile, long cbFile, + BOOL fContinuation, void *pv) { return 0; } -static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) +static INT_PTR CDECL fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) { HANDLE handle; DWORD dwAccess = 0; @@ -365,7 +365,7 @@ static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) return (INT_PTR)handle; } -static UINT fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwRead; @@ -377,7 +377,7 @@ static UINT fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) return dwRead; } -static UINT fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwWritten; @@ -389,7 +389,7 @@ static UINT fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) return dwWritten; } -static int fci_close(INT_PTR hf, int *err, void *pv) +static int CDECL fci_close(INT_PTR hf, int *err, void *pv) { HANDLE handle = (HANDLE)hf; ok(CloseHandle(handle), "Failed to CloseHandle\n"); @@ -397,7 +397,7 @@ static int fci_close(INT_PTR hf, int *err, void *pv) return 0; } -static long fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) +static long CDECL fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD ret; @@ -408,7 +408,7 @@ static long fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) return ret; } -static int fci_delete(char *pszFile, int *err, void *pv) +static int CDECL fci_delete(char *pszFile, int *err, void *pv) { BOOL ret = DeleteFileA(pszFile); ok(ret, "Failed to DeleteFile %s\n", pszFile); @@ -416,7 +416,7 @@ static int fci_delete(char *pszFile, int *err, void *pv) return 0; } -static BOOL get_temp_file(char *pszTempName, int cbTempName, void *pv) +static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv) { LPSTR tempname; @@ -435,8 +435,8 @@ static BOOL get_temp_file(char *pszTempName, int cbTempName, void *pv) return FALSE; } -static INT_PTR get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, - USHORT *pattribs, int *err, void *pv) +static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, + USHORT *pattribs, int *err, void *pv) { BY_HANDLE_FILE_INFORMATION finfo; FILETIME filetime; @@ -544,7 +544,7 @@ static void test_FDIIsCabinet(void) /* invalid file handle */ ZeroMemory(&cabinfo, sizeof(FDICABINETINFO)); SetLastError(0xdeadbeef); - ret = FDIIsCabinet(hfdi, (int)INVALID_HANDLE_VALUE, &cabinfo); + ret = FDIIsCabinet(hfdi, -1, &cabinfo); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); diff --git a/dlls/cfgmgr32/cfgmgr32.spec b/dlls/cfgmgr32/cfgmgr32.spec index dec3940e04c..f080e7d8f50 100644 --- a/dlls/cfgmgr32/cfgmgr32.spec +++ b/dlls/cfgmgr32/cfgmgr32.spec @@ -7,10 +7,10 @@ @ stub CM_Add_Range @ stub CM_Add_Res_Des @ stub CM_Add_Res_Des_Ex -@ stub CM_Connect_MachineA +@ stdcall CM_Connect_MachineA(str ptr) setupapi.CM_Connect_MachineA @ stdcall CM_Connect_MachineW(wstr ptr) setupapi.CM_Connect_MachineW -@ stub CM_Create_DevNodeA -@ stub CM_Create_DevNodeW +@ stdcall CM_Create_DevNodeA(ptr str long long) setupapi.CM_Create_DevNodeA +@ stdcall CM_Create_DevNodeW(ptr wstr long long) setupapi.CM_Create_DevNodeW @ stub CM_Create_DevNode_ExA @ stub CM_Create_DevNode_ExW @ stub CM_Create_Range_List @@ -117,8 +117,8 @@ @ stub CM_Intersect_Range_List @ stub CM_Invert_Range_List @ stub CM_Is_Dock_Station_Present -@ stub CM_Locate_DevNodeA -@ stub CM_Locate_DevNodeW +@ stdcall CM_Locate_DevNodeA(ptr str long) setupapi.CM_Locate_DevNodeA +@ stdcall CM_Locate_DevNodeW(ptr wstr long) setupapi.CM_Locate_DevNodeW @ stub CM_Locate_DevNode_ExA @ stub CM_Locate_DevNode_ExW @ stub CM_Merge_Range_List diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index f576eee2dc1..0f55f4e9772 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -1118,7 +1118,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs) } -static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam, LPARAM lParam) +static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam) { LRESULT lret; INT command = HIWORD(wParam); @@ -2273,7 +2273,7 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) /* Window messages passed to parent */ case WM_COMMAND: - return COMBOEX_Command (infoPtr, wParam, lParam); + return COMBOEX_Command (infoPtr, wParam); case WM_NOTIFY: if (infoPtr->NtfUnicode) diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index 4e447aff60c..949b62af75b 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -125,9 +125,9 @@ static const char manifest_filename[] = ARCH "_" NAME "_" PUBLIC_KEY "_" VERSION static LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); -LPWSTR COMCTL32_wSubclass = NULL; +static LPWSTR COMCTL32_wSubclass = NULL; HMODULE COMCTL32_hModule = 0; -LANGID COMCTL32_uiLang = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL); +static LANGID COMCTL32_uiLang = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL); HBRUSH COMCTL32_hPattern55AABrush = NULL; COMCTL32_SysColor comctl32_color; diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 34c750a9fcc..ae538a535e9 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -949,7 +949,7 @@ DATETIME_KeyDown (DATETIME_INFO *infoPtr, DWORD vkCode) static LRESULT -DATETIME_Char (DATETIME_INFO *infoPtr, WPARAM vkCode, LPARAM keyData) +DATETIME_Char (DATETIME_INFO *infoPtr, WPARAM vkCode) { int fieldNum = infoPtr->select & DTHT_DATEFIELD; @@ -1353,7 +1353,7 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return DATETIME_KeyDown (infoPtr, wParam); case WM_CHAR: - return DATETIME_Char (infoPtr, wParam, lParam); + return DATETIME_Char (infoPtr, wParam); case WM_KILLFOCUS: return DATETIME_KillFocus (infoPtr, (HWND)wParam); diff --git a/dlls/comctl32/hotkey.c b/dlls/comctl32/hotkey.c index 33f39206c7a..165d95dad7b 100644 --- a/dlls/comctl32/hotkey.c +++ b/dlls/comctl32/hotkey.c @@ -342,7 +342,7 @@ HOTKEY_KeyDown (HOTKEY_INFO *infoPtr, DWORD key, DWORD flags) static LRESULT -HOTKEY_KeyUp (HOTKEY_INFO *infoPtr, DWORD key, DWORD flags) +HOTKEY_KeyUp (HOTKEY_INFO *infoPtr, DWORD key) { BYTE bOldMod; @@ -383,7 +383,7 @@ HOTKEY_KeyUp (HOTKEY_INFO *infoPtr, DWORD key, DWORD flags) static LRESULT -HOTKEY_KillFocus (HOTKEY_INFO *infoPtr, HWND receiveFocus) +HOTKEY_KillFocus (HOTKEY_INFO *infoPtr) { infoPtr->bFocus = FALSE; DestroyCaret (); @@ -424,7 +424,7 @@ HOTKEY_NCCreate (HWND hwnd, const CREATESTRUCTW *lpcs) } static LRESULT -HOTKEY_SetFocus (HOTKEY_INFO *infoPtr, HWND lostFocus) +HOTKEY_SetFocus (HOTKEY_INFO *infoPtr) { infoPtr->bFocus = TRUE; @@ -505,10 +505,10 @@ HOTKEY_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_KEYUP: case WM_SYSKEYUP: - return HOTKEY_KeyUp (infoPtr, wParam, lParam); + return HOTKEY_KeyUp (infoPtr, wParam); case WM_KILLFOCUS: - return HOTKEY_KillFocus (infoPtr, (HWND)wParam); + return HOTKEY_KillFocus (infoPtr); case WM_LBUTTONDOWN: return HOTKEY_LButtonDown (infoPtr); @@ -522,7 +522,7 @@ HOTKEY_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return 0; case WM_SETFOCUS: - return HOTKEY_SetFocus (infoPtr, (HWND)wParam); + return HOTKEY_SetFocus (infoPtr); case WM_SETFONT: return HOTKEY_SetFont (infoPtr, (HFONT)wParam, LOWORD(lParam)); diff --git a/dlls/comctl32/nativefont.c b/dlls/comctl32/nativefont.c index 26347a33324..2e11a9e665a 100644 --- a/dlls/comctl32/nativefont.c +++ b/dlls/comctl32/nativefont.c @@ -47,7 +47,7 @@ typedef struct #define NATIVEFONT_GetInfoPtr(hwnd) ((NATIVEFONT_INFO *)GetWindowLongPtrW (hwnd, 0)) static LRESULT -NATIVEFONT_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) +NATIVEFONT_Create (HWND hwnd) { NATIVEFONT_INFO *infoPtr; @@ -85,7 +85,7 @@ NATIVEFONT_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) switch (uMsg) { case WM_CREATE: - return NATIVEFONT_Create (hwnd, wParam, lParam); + return NATIVEFONT_Create (hwnd); case WM_DESTROY: return NATIVEFONT_Destroy (infoPtr); diff --git a/dlls/comctl32/tests/dpa.c b/dlls/comctl32/tests/dpa.c index 08a7b02bd0a..a0d19202981 100644 --- a/dlls/comctl32/tests/dpa.c +++ b/dlls/comctl32/tests/dpa.c @@ -182,7 +182,7 @@ static BOOL CheckDPA(HDPA dpa, DWORD dwIn, PDWORD pdwOut) do { - pDPA_InsertPtr(dpa, 0, (PVOID)(dwIn & 0xf)); + pDPA_InsertPtr(dpa, 0, (PVOID)(ULONG_PTR)(dwIn & 0xf)); dwIn >>= 4; } while(dwIn); @@ -242,9 +242,9 @@ static void test_dpa(void) for(i = 1; i <= 6; i++) { INT j, k; - k = pDPA_GetPtrIndex(dpa, (PVOID)i); + k = pDPA_GetPtrIndex(dpa, (PVOID)(INT_PTR)i); /* Linear searches should work on unsorted DPAs */ - j = pDPA_Search(dpa, (PVOID)i, 0, CB_CmpLT, 0xdeadbeef, 0); + j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, 0, CB_CmpLT, 0xdeadbeef, 0); ok(j == k, "j=%d k=%d\n", j, k); } @@ -279,16 +279,16 @@ static void test_dpa(void) INT j; /* The array is in order so ptr == index+1 */ - j = pDPA_GetPtrIndex(dpa, (PVOID)i); + j = pDPA_GetPtrIndex(dpa, (PVOID)(INT_PTR)i); ok(j+1 == i, "j=%d i=%d\n", j, i); - j = pDPA_Search(dpa, (PVOID)i, 0, CB_CmpLT, 0xdeadbeef, DPAS_SORTED); + j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, 0, CB_CmpLT, 0xdeadbeef, DPAS_SORTED); ok(j+1 == i, "j=%d i=%d\n", j, i); /* Linear searches respect iStart ... */ - j = pDPA_Search(dpa, (PVOID)i, i+1, CB_CmpLT, 0xdeadbeef, 0); + j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, i+1, CB_CmpLT, 0xdeadbeef, 0); ok(j == DPA_ERR, "j=%d\n", j); /* ... but for a binary search it's ignored */ - j = pDPA_Search(dpa, (PVOID)i, i+1, CB_CmpLT, 0xdeadbeef, DPAS_SORTED); + j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, i+1, CB_CmpLT, 0xdeadbeef, DPAS_SORTED); todo_wine ok(j+1 == i, "j=%d i=%d\n", j, i); } @@ -331,7 +331,7 @@ static void test_dpa(void) * should be bogus */ for(i = 0; i < 6; i++) { - INT j = pDPA_Search(dpa, (PVOID)i, 0, CB_CmpGT, 0xdeadbeef, + INT j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, 0, CB_CmpGT, 0xdeadbeef, DPAS_SORTED|DPAS_INSERTBEFORE); ok(j != i, "i=%d\n", i); } diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c index c0ff7cd8493..5598e586164 100644 --- a/dlls/comctl32/tests/header.c +++ b/dlls/comctl32/tests/header.c @@ -466,7 +466,7 @@ static BOOL register_parent_wnd_class(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(NULL); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "Header test parent class"; diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c index 4b4964f5b2c..3fe249f3ad5 100644 --- a/dlls/comctl32/tests/imagelist.c +++ b/dlls/comctl32/tests/imagelist.c @@ -136,8 +136,8 @@ static HWND create_a_window(void) cls.cbClsExtra = 0; cls.cbWndExtra = 0; cls.hInstance = 0; - cls.hIcon = LoadIconA (0, (LPSTR)IDI_APPLICATION); - cls.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); + cls.hIcon = LoadIconA (0, IDI_APPLICATION); + cls.hCursor = LoadCursorA (0, IDC_ARROW); cls.hbrBackground = GetStockObject (WHITE_BRUSH); cls.lpszMenuName = 0; cls.lpszClassName = className; diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 4d8028aec91..4033e9e683a 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -194,7 +194,7 @@ static BOOL register_parent_wnd_class(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(NULL); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "Listview test parent class"; diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index a8861fd82c3..cccb1b9ea0b 100644 --- a/dlls/comctl32/tests/monthcal.c +++ b/dlls/comctl32/tests/monthcal.c @@ -215,10 +215,6 @@ static const struct message monthcal_hit_test_seq[] = { { MCM_HITTEST, sent|wparam, 0}, { MCM_HITTEST, sent|wparam, 0}, { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, { 0 } }; @@ -422,7 +418,7 @@ static BOOL register_parent_wnd_class(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(NULL); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "Month-Cal test parent class"; @@ -463,8 +459,6 @@ static LRESULT WINAPI monthcal_subclass_proc(HWND hwnd, UINT message, WPARAM wPa LRESULT ret; struct message msg; - trace("monthcal: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - msg.message = message; msg.flags = sent|wparam|lparam; if (defwndproc_counter) msg.flags |= defwinproc; @@ -727,6 +721,12 @@ static void test_monthcal_HitTest(HWND hwnd) MCHITTESTINFO mchit; UINT res; SYSTEMTIME st; + LONG x; + UINT title_index; + static const UINT title_hits[] = + { MCHT_NOWHERE, MCHT_TITLEBK, MCHT_TITLEBTNPREV, MCHT_TITLEBK, + MCHT_TITLEMONTH, MCHT_TITLEBK, MCHT_TITLEYEAR, MCHT_TITLEBK, + MCHT_TITLEBTNNEXT, MCHT_TITLEBK, MCHT_NOWHERE }; memset(&mchit, 0, sizeof(MCHITTESTINFO)); @@ -781,42 +781,6 @@ static void test_monthcal_HitTest(HWND hwnd) expect(mchit.uHit, res); expect(MCHT_CALENDARBK, res); - /* (50, 40) is in active area - previous month button */ - mchit.pt.x = 50; - mchit.pt.y = 40; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(50, mchit.pt.x); - expect(40, mchit.pt.y); - expect(mchit.uHit, res); - todo_wine {expect(MCHT_TITLEBTNPREV, res);} - - /* (90, 40) is in active area - background section of the title */ - mchit.pt.x = 90; - mchit.pt.y = 40; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(90, mchit.pt.x); - expect(40, mchit.pt.y); - expect(mchit.uHit, res); - todo_wine {expect(MCHT_TITLE, res);} - - /* (140, 40) is in active area - month section of the title */ - mchit.pt.x = 140; - mchit.pt.y = 40; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(140, mchit.pt.x); - expect(40, mchit.pt.y); - expect(mchit.uHit, res); - todo_wine {expect(MCHT_TITLEMONTH, res);} - - /* (250, 40) is in active area - next month button */ - mchit.pt.x = 250; - mchit.pt.y = 40; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(250, mchit.pt.x); - expect(40, mchit.pt.y); - expect(mchit.uHit, res); - todo_wine {expect(MCHT_TITLEBTNNEXT, res);} - /* (70, 70) is in active area - day of the week */ mchit.pt.x = 70; mchit.pt.y = 70; @@ -910,6 +874,27 @@ static void test_monthcal_HitTest(HWND hwnd) todo_wine {expect(MCHT_TODAYLINK, res);} ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_hit_test_seq, "monthcal hit test", TRUE); + + /* The horizontal position of title bar elements depends on locale (y pos + is constant), so we sample across a horizontal line and make sure we + find all elements. */ + mchit.pt.y = 40; + title_index = 0; + for (x = 0; x < 300; x++){ + mchit.pt.x = x; + res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); + expect(x, mchit.pt.x); + expect(40, mchit.pt.y); + expect(mchit.uHit, res); + if (res != title_hits[title_index]){ + title_index++; + if (sizeof(title_hits) / sizeof(title_hits[0]) <= title_index) + break; + todo_wine {expect(title_hits[title_index], res);} + } + } + todo_wine {ok(300 <= x && title_index + 1 == sizeof(title_hits) / sizeof(title_hits[0]), + "Wrong title layout\n");} } static void test_monthcal_todaylink(HWND hwnd) diff --git a/dlls/comctl32/tests/propsheet.c b/dlls/comctl32/tests/propsheet.c index 45c8d973dc0..4164f68c60e 100644 --- a/dlls/comctl32/tests/propsheet.c +++ b/dlls/comctl32/tests/propsheet.c @@ -158,7 +158,7 @@ static void register_parent_wnd_class(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(NULL); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "parent class"; diff --git a/dlls/comctl32/tests/subclass.c b/dlls/comctl32/tests/subclass.c index c225f726fe7..f4d0b727794 100644 --- a/dlls/comctl32/tests/subclass.c +++ b/dlls/comctl32/tests/subclass.c @@ -234,7 +234,7 @@ static void test_subclass(void) ok_sequence(Sub_AfterDeletedTest, "After Deleted"); pSetWindowSubclass(hwnd, WndProcSub, 2, 0); - origProc3 = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG)WndProc3); + origProc3 = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)WndProc3); SendMessage(hwnd, WM_USER, 1, 0); SendMessage(hwnd, WM_USER, 2, 0); ok_sequence(Sub_OldAfterNewTest, "Old after New"); diff --git a/dlls/comctl32/tests/tab.c b/dlls/comctl32/tests/tab.c index 61bab44a873..b39f52ea3cf 100644 --- a/dlls/comctl32/tests/tab.c +++ b/dlls/comctl32/tests/tab.c @@ -350,7 +350,7 @@ static BOOL registerParentWindowClass(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(NULL); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "Tab test parent class"; diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index 328ee2f6ba5..c92f3f20e34 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -1151,7 +1151,7 @@ static void test_setrows(void) memset(&rc, 0xCC, sizeof(rc)); SendMessageA(hToolbar, TB_SETROWS, MAKELONG(tbrows_results[i].nRows, tbrows_results[i].bLarger), - (LONG) &rc); + (LPARAM) &rc); rows = SendMessageA(hToolbar, TB_GETROWS, MAKELONG(0,0), MAKELONG(0,0)); ok(rows == tbrows_results[i].expectedRows, diff --git a/dlls/comctl32/tests/trackbar.c b/dlls/comctl32/tests/trackbar.c index f54e32e0f38..26cdeac796f 100644 --- a/dlls/comctl32/tests/trackbar.c +++ b/dlls/comctl32/tests/trackbar.c @@ -432,7 +432,7 @@ static BOOL register_parent_wnd_class(void){ cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(NULL); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "Trackbar test parent class"; diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index 86b72cc516e..2d6d437c300 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -234,7 +234,7 @@ static BOOL register_parent_wnd_class(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(NULL); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "Up-Down test parent class"; diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 797260573c3..a233b391926 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -495,7 +495,7 @@ TOOLBAR_DrawFlatSeparator (const RECT *lpRect, HDC hdc, const TOOLBAR_INFO *info * FIXME: It is possible that the height of each line is really SM_CYBORDER. */ static void -TOOLBAR_DrawDDFlatSeparator (const RECT *lpRect, HDC hdc, const TBUTTON_INFO *btnPtr, +TOOLBAR_DrawDDFlatSeparator (const RECT *lpRect, HDC hdc, const TOOLBAR_INFO *infoPtr) { RECT myrect; @@ -848,7 +848,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc, DWORD dwBaseCustDr /* when drawing the vertical bar... */ if ((dwStyle & TBSTYLE_FLAT) /* && (btnPtr->iBitmap == 0) */) { if (btnPtr->fsStyle & BTNS_DROPDOWN) - TOOLBAR_DrawDDFlatSeparator (&rc, hdc, btnPtr, infoPtr); + TOOLBAR_DrawDDFlatSeparator (&rc, hdc, infoPtr); else TOOLBAR_DrawFlatSeparator (&rc, hdc, infoPtr); } @@ -3060,7 +3060,7 @@ TOOLBAR_AutoSize (HWND hwnd) static LRESULT -TOOLBAR_ButtonCount (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_ButtonCount (HWND hwnd) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); @@ -3069,7 +3069,7 @@ TOOLBAR_ButtonCount (HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT -TOOLBAR_ButtonStructSize (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_ButtonStructSize (HWND hwnd, WPARAM wParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); @@ -3151,7 +3151,7 @@ TOOLBAR_CheckButton (HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT -TOOLBAR_CommandToIndex (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_CommandToIndex (HWND hwnd, WPARAM wParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); @@ -3197,7 +3197,7 @@ TOOLBAR_Customize (HWND hwnd) static LRESULT -TOOLBAR_DeleteButton (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_DeleteButton (HWND hwnd, WPARAM wParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); INT nIndex = (INT)wParam; @@ -3296,7 +3296,7 @@ TOOLBAR_GetAnchorHighlight (HWND hwnd) static LRESULT -TOOLBAR_GetBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_GetBitmap (HWND hwnd, WPARAM wParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); INT nIndex; @@ -3310,7 +3310,7 @@ TOOLBAR_GetBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam) static inline LRESULT -TOOLBAR_GetBitmapFlags (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_GetBitmapFlags (HWND hwnd) { return (GetDeviceCaps (0, LOGPIXELSX) >= 120) ? TBBF_LARGE : 0; } @@ -3512,7 +3512,7 @@ TOOLBAR_GetDefImageList (HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT -TOOLBAR_GetInsertMark (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_GetInsertMark (HWND hwnd, LPARAM lParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); TBINSERTMARK *lptbim = (TBINSERTMARK*)lParam; @@ -3526,7 +3526,7 @@ TOOLBAR_GetInsertMark (HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT -TOOLBAR_GetInsertMarkColor (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_GetInsertMarkColor (HWND hwnd) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); @@ -3564,7 +3564,7 @@ TOOLBAR_GetItemRect (HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT -TOOLBAR_GetMaxSize (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_GetMaxSize (HWND hwnd, LPARAM lParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); LPSIZE lpSize = (LPSIZE)lParam; @@ -3623,7 +3623,7 @@ TOOLBAR_GetRect (HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT -TOOLBAR_GetRows (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_GetRows (HWND hwnd) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); @@ -3632,7 +3632,7 @@ TOOLBAR_GetRows (HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT -TOOLBAR_GetState (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_GetState (HWND hwnd, WPARAM wParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); INT nIndex; @@ -3646,14 +3646,14 @@ TOOLBAR_GetState (HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT -TOOLBAR_GetStyle (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_GetStyle (HWND hwnd) { return GetWindowLongW(hwnd, GWL_STYLE); } static LRESULT -TOOLBAR_GetTextRows (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_GetTextRows (HWND hwnd) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); @@ -3662,7 +3662,7 @@ TOOLBAR_GetTextRows (HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT -TOOLBAR_GetToolTips (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_GetToolTips (HWND hwnd) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); @@ -3673,7 +3673,7 @@ TOOLBAR_GetToolTips (HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT -TOOLBAR_GetUnicodeFormat (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_GetUnicodeFormat (HWND hwnd) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); @@ -4287,7 +4287,7 @@ TOOLBAR_Restore(TOOLBAR_INFO *infoPtr, const TBSAVEPARAMSW *lpSave) * delete */ for (i = infoPtr->nNumButtons - 1; i >= 0; i--) if (infoPtr->buttons[i].iBitmap == -1) - TOOLBAR_DeleteButton(infoPtr->hwndSelf, i, 0); + TOOLBAR_DeleteButton(infoPtr->hwndSelf, i); /* only indicate success if at least one button survived */ if (infoPtr->nNumButtons > 0) ret = TRUE; @@ -5242,12 +5242,11 @@ static LRESULT TOOLBAR_Unkwn45D(HWND hwnd, WPARAM wParam, LPARAM lParam) } -/* UNDOCUMENTED MESSAGE: This is an extended version of the - * TB_SETHOTITEM message. It allows the caller to specify a reason why the - * hot item changed (rather than just the HICF_OTHER that TB_SETHOTITEM - * sends). */ +/* This is an extended version of the TB_SETHOTITEM message. It allows the + * caller to specify a reason why the hot item changed (rather than just the + * HICF_OTHER that TB_SETHOTITEM sends). */ static LRESULT -TOOLBAR_Unkwn45E (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_SetHotItem2 (HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd); INT nOldHotItem = infoPtr->nHotItem; @@ -5268,18 +5267,15 @@ TOOLBAR_Unkwn45E (HWND hwnd, WPARAM wParam, LPARAM lParam) return (nOldHotItem < 0) ? -1 : (LRESULT)nOldHotItem; } -/* UNDOCUMENTED MESSAGE: This sets the toolbar global iListGap parameter - * which controls the amount of spacing between the image and the text - * of buttons for TBSTYLE_LIST toolbars. */ -static LRESULT TOOLBAR_Unkwn460(HWND hwnd, WPARAM wParam, LPARAM lParam) +/* Sets the toolbar global iListGap parameter which controls the amount of + * spacing between the image and the text of buttons for TBSTYLE_LIST + * toolbars. */ +static LRESULT TOOLBAR_SetListGap(HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd); TRACE("hwnd=%p iListGap=%ld\n", hwnd, wParam); - if (lParam != 0) - FIXME("lParam = 0x%08lx. Please report\n", lParam); - infoPtr->iListGap = (INT)wParam; InvalidateRect(hwnd, NULL, TRUE); @@ -5287,9 +5283,9 @@ static LRESULT TOOLBAR_Unkwn460(HWND hwnd, WPARAM wParam, LPARAM lParam) return 0; } -/* UNDOCUMENTED MESSAGE: This returns the number of maximum number - * of image lists associated with the various states. */ -static LRESULT TOOLBAR_Unkwn462(HWND hwnd, WPARAM wParam, LPARAM lParam) +/* Returns the number of maximum number of image lists associated with the + * various states. */ +static LRESULT TOOLBAR_GetImageListCount(HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd); @@ -5299,7 +5295,7 @@ static LRESULT TOOLBAR_Unkwn462(HWND hwnd, WPARAM wParam, LPARAM lParam) } static LRESULT -TOOLBAR_Unkwn463 (HWND hwnd, WPARAM wParam, LPARAM lParam) +TOOLBAR_GetIdealSize (HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); LPSIZE lpsize = (LPSIZE)lParam; @@ -5314,7 +5310,7 @@ TOOLBAR_Unkwn463 (HWND hwnd, WPARAM wParam, LPARAM lParam) * lParam pointer to SIZE structure * */ - TRACE("[0463] wParam %ld, lParam 0x%08lx -> 0x%08x 0x%08x\n", + TRACE("wParam %ld, lParam 0x%08lx -> 0x%08x 0x%08x\n", wParam, lParam, lpsize->cx, lpsize->cy); switch(wParam) { @@ -5341,11 +5337,10 @@ TOOLBAR_Unkwn463 (HWND hwnd, WPARAM wParam, LPARAM lParam) lpsize->cy = infoPtr->rcBound.bottom - infoPtr->rcBound.top; break; default: - ERR("Unknown wParam %ld for Toolbar message [0463]. Please report\n", - wParam); + FIXME("Unknown wParam %ld\n", wParam); return 0; } - TRACE("[0463] set to -> 0x%08x 0x%08x\n", + TRACE("set to -> 0x%08x 0x%08x\n", lpsize->cx, lpsize->cy); return 1; } @@ -5826,7 +5821,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam) if (pt.x < (btnPtr->rect.left + (btnPtr->rect.right - btnPtr->rect.left)/2)) { if ((nButton > 0) && (infoPtr->buttons[nButton-1].fsStyle & BTNS_SEP)) - TOOLBAR_DeleteButton(hwnd, nButton - 1, 0); + TOOLBAR_DeleteButton(hwnd, nButton - 1); } else /* else insert a separator before the dragged button */ { @@ -5853,7 +5848,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam) else { TRACE("button %d dragged out of toolbar\n", infoPtr->nButtonDrag); - TOOLBAR_DeleteButton(hwnd, (WPARAM)infoPtr->nButtonDrag, 0); + TOOLBAR_DeleteButton(hwnd, (WPARAM)infoPtr->nButtonDrag); } /* button under cursor changed so need to re-set hot item */ @@ -6676,10 +6671,10 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return TOOLBAR_AutoSize (hwnd); case TB_BUTTONCOUNT: - return TOOLBAR_ButtonCount (hwnd, wParam, lParam); + return TOOLBAR_ButtonCount (hwnd); case TB_BUTTONSTRUCTSIZE: - return TOOLBAR_ButtonStructSize (hwnd, wParam, lParam); + return TOOLBAR_ButtonStructSize (hwnd, wParam); case TB_CHANGEBITMAP: return TOOLBAR_ChangeBitmap (hwnd, wParam, lParam); @@ -6688,13 +6683,13 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return TOOLBAR_CheckButton (hwnd, wParam, lParam); case TB_COMMANDTOINDEX: - return TOOLBAR_CommandToIndex (hwnd, wParam, lParam); + return TOOLBAR_CommandToIndex (hwnd, wParam); case TB_CUSTOMIZE: return TOOLBAR_Customize (hwnd); case TB_DELETEBUTTON: - return TOOLBAR_DeleteButton (hwnd, wParam, lParam); + return TOOLBAR_DeleteButton (hwnd, wParam); case TB_ENABLEBUTTON: return TOOLBAR_EnableButton (hwnd, wParam, lParam); @@ -6703,10 +6698,10 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return TOOLBAR_GetAnchorHighlight (hwnd); case TB_GETBITMAP: - return TOOLBAR_GetBitmap (hwnd, wParam, lParam); + return TOOLBAR_GetBitmap (hwnd, wParam); case TB_GETBITMAPFLAGS: - return TOOLBAR_GetBitmapFlags (hwnd, wParam, lParam); + return TOOLBAR_GetBitmapFlags (hwnd); case TB_GETBUTTON: return TOOLBAR_GetButton (hwnd, wParam, lParam); @@ -6742,16 +6737,16 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return TOOLBAR_GetDefImageList (hwnd, wParam, lParam); case TB_GETINSERTMARK: - return TOOLBAR_GetInsertMark (hwnd, wParam, lParam); + return TOOLBAR_GetInsertMark (hwnd, lParam); case TB_GETINSERTMARKCOLOR: - return TOOLBAR_GetInsertMarkColor (hwnd, wParam, lParam); + return TOOLBAR_GetInsertMarkColor (hwnd); case TB_GETITEMRECT: return TOOLBAR_GetItemRect (hwnd, wParam, lParam); case TB_GETMAXSIZE: - return TOOLBAR_GetMaxSize (hwnd, wParam, lParam); + return TOOLBAR_GetMaxSize (hwnd, lParam); /* case TB_GETOBJECT: */ /* 4.71 */ @@ -6762,10 +6757,10 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return TOOLBAR_GetRect (hwnd, wParam, lParam); case TB_GETROWS: - return TOOLBAR_GetRows (hwnd, wParam, lParam); + return TOOLBAR_GetRows (hwnd); case TB_GETSTATE: - return TOOLBAR_GetState (hwnd, wParam, lParam); + return TOOLBAR_GetState (hwnd, wParam); case TB_GETSTRINGA: return TOOLBAR_GetStringA (hwnd, wParam, lParam); @@ -6774,16 +6769,16 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return TOOLBAR_GetStringW (hwnd, wParam, lParam); case TB_GETSTYLE: - return TOOLBAR_GetStyle (hwnd, wParam, lParam); + return TOOLBAR_GetStyle (hwnd); case TB_GETTEXTROWS: - return TOOLBAR_GetTextRows (hwnd, wParam, lParam); + return TOOLBAR_GetTextRows (hwnd); case TB_GETTOOLTIPS: - return TOOLBAR_GetToolTips (hwnd, wParam, lParam); + return TOOLBAR_GetToolTips (hwnd); case TB_GETUNICODEFORMAT: - return TOOLBAR_GetUnicodeFormat (hwnd, wParam, lParam); + return TOOLBAR_GetUnicodeFormat (hwnd); case TB_HIDEBUTTON: return TOOLBAR_HideButton (hwnd, wParam, lParam); @@ -6920,17 +6915,17 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case TB_UNKWN45D: return TOOLBAR_Unkwn45D(hwnd, wParam, lParam); - case TB_UNKWN45E: - return TOOLBAR_Unkwn45E (hwnd, wParam, lParam); + case TB_SETHOTITEM2: + return TOOLBAR_SetHotItem2 (hwnd, wParam, lParam); - case TB_UNKWN460: - return TOOLBAR_Unkwn460(hwnd, wParam, lParam); + case TB_SETLISTGAP: + return TOOLBAR_SetListGap(hwnd, wParam, lParam); - case TB_UNKWN462: - return TOOLBAR_Unkwn462(hwnd, wParam, lParam); + case TB_GETIMAGELISTCOUNT: + return TOOLBAR_GetImageListCount(hwnd, wParam, lParam); - case TB_UNKWN463: - return TOOLBAR_Unkwn463 (hwnd, wParam, lParam); + case TB_GETIDEALSIZE: + return TOOLBAR_GetIdealSize (hwnd, wParam, lParam); case TB_UNKWN464: return TOOLBAR_Unkwn464(hwnd, wParam, lParam); diff --git a/dlls/comdlg32/cdlg.h b/dlls/comdlg32/cdlg.h index c85f877c473..54174233576 100644 --- a/dlls/comdlg32/cdlg.h +++ b/dlls/comdlg32/cdlg.h @@ -193,8 +193,6 @@ BOOL CC_HookCallChk( const CHOOSECOLORW *lpcc ); int CC_MouseCheckResultWindow( HWND hDlg, LPARAM lParam ); LRESULT CC_WMLButtonDown( HWND hDlg, WPARAM wParam, LPARAM lParam ); LRESULT CC_WMLButtonUp( HWND hDlg, WPARAM wParam, LPARAM lParam ); -LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD - notifyCode, HWND hwndCtl ); LRESULT CC_WMMouseMove( HWND hDlg, LPARAM lParam ); LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam ); void CC_SwitchToFullSize( HWND hDlg, COLORREF result, LPCRECT lprect ); diff --git a/dlls/comdlg32/colordlg.c b/dlls/comdlg32/colordlg.c index d4a43af7619..52439d39f1d 100644 --- a/dlls/comdlg32/colordlg.c +++ b/dlls/comdlg32/colordlg.c @@ -955,7 +955,7 @@ static LONG CC_WMInitDialog( HWND hDlg, WPARAM wParam, LPARAM lParam ) /*********************************************************************** * CC_WMCommand [internal] */ -LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notifyCode, HWND hwndCtl ) +static LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notifyCode, HWND hwndCtl ) { int r, g, b, i, xx; UINT cokmsg; diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index e1eedd19eca..386a201bab4 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -2205,7 +2205,6 @@ BOOL FILEDLG95_OnOpen(HWND hwnd) ret = EndDialog(hwnd, FALSE); COMDLG32_SetCommDlgExtendedError(FNERR_BUFFERTOOSMALL); } - goto ret; } break; } diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c index bdc2a0dc40d..69767e78d4b 100644 --- a/dlls/comdlg32/printdlg.c +++ b/dlls/comdlg32/printdlg.c @@ -79,7 +79,9 @@ static const WCHAR pd32_collateW[] = { 'P', 'D', '3', '2', '_', 'C', 'O', 'L', ' static const WCHAR pd32_nocollateW[] = { 'P', 'D', '3', '2', '_', 'N', 'O', 'C', 'O', 'L', 'L', 'A', 'T', 'E', 0 }; static const WCHAR pd32_portraitW[] = { 'P', 'D', '3', '2', '_', 'P', 'O', 'R', 'T', 'R', 'A', 'I', 'T', 0 }; static const WCHAR pd32_landscapeW[] = { 'P', 'D', '3', '2', '_', 'L', 'A', 'N', 'D', 'S', 'C', 'A', 'P', 'E', 0 }; -static const WCHAR propW[] = {'_','_','W','I','N','E','_','P','R','I','N','T','D','L','G','D','A','T','A',0}; +static const WCHAR printdlg_prop[] = {'_','_','W','I','N','E','_','P','R','I','N','T','D','L','G','D','A','T','A',0}; +static const WCHAR pagesetupdlg_prop[] = { '_', '_', 'W', 'I', 'N', 'E', '_', 'P', 'A', 'G', 'E', + 'S', 'E', 'T', 'U', 'P', 'D', 'L', 'G', 'D', 'A', 'T', 'A', 0 }; /*********************************************************************** * PRINTDLG_OpenDefaultPrinter @@ -1854,12 +1856,12 @@ static INT_PTR CALLBACK PrintDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, INT_PTR res = FALSE; if (uMsg!=WM_INITDIALOG) { - PrintStructures = GetPropA(hDlg,"__WINE_PRINTDLGDATA"); + PrintStructures = GetPropW(hDlg, printdlg_prop); if (!PrintStructures) return FALSE; } else { PrintStructures = (PRINT_PTRA*) lParam; - SetPropA(hDlg,"__WINE_PRINTDLGDATA",PrintStructures); + SetPropW(hDlg, printdlg_prop, PrintStructures); if(!check_printer_setup(hDlg)) { EndDialog(hDlg,FALSE); @@ -1903,12 +1905,12 @@ static INT_PTR CALLBACK PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, INT_PTR res = FALSE; if (uMsg!=WM_INITDIALOG) { - PrintStructures = GetPropW(hDlg, propW); + PrintStructures = GetPropW(hDlg, printdlg_prop); if (!PrintStructures) return FALSE; } else { PrintStructures = (PRINT_PTRW*) lParam; - SetPropW(hDlg, propW, PrintStructures); + SetPropW(hDlg, printdlg_prop, PrintStructures); if(!check_printer_setup(hDlg)) { EndDialog(hDlg,FALSE); @@ -3215,7 +3217,7 @@ PRINTDLG_PagePaintProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return CallWindowProcA(lpfnStaticWndProc, hWnd, uMsg, wParam, lParam); /* Processing WM_PAINT message */ - pda = GetPropA(hWnd, "__WINE_PAGESETUPDLGDATA"); + pda = GetPropW(hWnd, pagesetupdlg_prop); if (!pda) { WARN("__WINE_PAGESETUPDLGDATA prop not set?\n"); return FALSE; @@ -3311,8 +3313,8 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) hDrawWnd = GetDlgItem(hDlg, rct1); TRACE("set property to %p\n", pda); - SetPropA(hDlg, "__WINE_PAGESETUPDLGDATA", pda); - SetPropA(hDrawWnd, "__WINE_PAGESETUPDLGDATA", pda); + SetPropW(hDlg, pagesetupdlg_prop, pda); + SetPropW(hDrawWnd, pagesetupdlg_prop, pda); GetWindowRect(hDrawWnd, &pda->rtDrawRect); /* Calculating rect in client coordinates where paper draws */ ScreenToClient(hDlg, (LPPOINT)&pda->rtDrawRect); ScreenToClient(hDlg, (LPPOINT)(&pda->rtDrawRect.right)); @@ -3404,7 +3406,7 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) PRINTDLG_PS_ChangePaperPrev(pda); return TRUE; } else { - pda = GetPropA(hDlg,"__WINE_PAGESETUPDLGDATA"); + pda = GetPropW(hDlg, pagesetupdlg_prop); if (!pda) { WARN("__WINE_PAGESETUPDLGDATA prop not set?\n"); return FALSE; @@ -3424,9 +3426,6 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) static INT_PTR CALLBACK PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { - static const WCHAR __WINE_PAGESETUPDLGDATA[] = - { '_', '_', 'W', 'I', 'N', 'E', '_', 'P', 'A', 'G', 'E', - 'S', 'E', 'T', 'U', 'P', 'D', 'L', 'G', 'D', 'A', 'T', 'A', 0 }; PageSetupDataW *pdw; BOOL res = FALSE; @@ -3434,7 +3433,7 @@ PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) res = TRUE; pdw = (PageSetupDataW*)lParam; pdw->curdlg = *pdw->dlgw; - SetPropW(hDlg, __WINE_PAGESETUPDLGDATA, pdw); + SetPropW(hDlg, pagesetupdlg_prop, pdw); if (pdw->dlgw->Flags & PSD_ENABLEPAGESETUPHOOK) { res = pdw->dlgw->lpfnPageSetupHook(hDlg,uMsg,wParam,(LPARAM)pdw->dlgw); if (!res) { @@ -3490,7 +3489,7 @@ PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) return TRUE; } else { - pdw = GetPropW(hDlg, __WINE_PAGESETUPDLGDATA); + pdw = GetPropW(hDlg, pagesetupdlg_prop); if (!pdw) { WARN("__WINE_PAGESETUPDLGDATA prop not set?\n"); return FALSE; diff --git a/dlls/crypt32/crypt32_Nl.rc b/dlls/crypt32/crypt32_Nl.rc index b98f21302c6..c9857f80f24 100644 --- a/dlls/crypt32/crypt32_Nl.rc +++ b/dlls/crypt32/crypt32_Nl.rc @@ -172,3 +172,65 @@ STRINGTABLE DISCARDABLE IDS_LOCALIZEDNAME_CA "Certificatie Tussen-Autoriteiten" IDS_LOCALIZEDNAME_ADDRESSBOOK "Overige Personen" } +STRINGTABLE DISCARDABLE +{ + IDS_KEY_ID "SleutelID=" + IDS_CERT_ISSUER "Certificaat verstrekker" + IDS_CERT_SERIAL_NUMBER "Certificaat serienummer=" + IDS_ALT_NAME_OTHER_NAME "Andere naam=" + IDS_ALT_NAME_RFC822_NAME "Email Adres=" + IDS_ALT_NAME_DNS_NAME "DNS naam=" + IDS_ALT_NAME_DIRECTORY_NAME "Directory adres" + IDS_ALT_NAME_URL "URL=" + IDS_ALT_NAME_IP_ADDRESS "IP adres=" + IDS_ALT_NAME_MASK "Masker=" + IDS_ALT_NAME_REGISTERED_ID "Geregistreerd ID=" + IDS_USAGE_UNKNOWN "Onbekend gebruik van sleutel" + IDS_SUBJECT_TYPE "Onderwerp type=" + IDS_SUBJECT_TYPE_CA "CA" + IDS_SUBJECT_TYPE_END_CERT "Eind Entiteit" + IDS_PATH_LENGTH "Lengte van pad beperking=" + IDS_PATH_LENGTH_NONE "Geen" + IDS_INFO_NOT_AVAILABLE "Informatie niet beschikbaar" + IDS_AIA "Authoriteit Informatie Toegang" + IDS_ACCESS_METHOD "Toegang methode=" + IDS_ACCESS_METHOD_OCSP "OCSP" + IDS_ACCESS_METHOD_CA_ISSUERS "CA verstrekkers" + IDS_ACCESS_METHOD_UNKNOWN "Onbekende toegangsmethode" + IDS_ACCESS_LOCATION "Alternatieve Naam" + IDS_CRL_DIST_POINT "CRL Distributie Punt" + IDS_CRL_DIST_POINT_NAME "Naam distributiepunt" + IDS_CRL_DIST_POINT_FULL_NAME "Volledige naam" + IDS_CRL_DIST_POINT_RDN_NAME "RDN naam" + IDS_CRL_DIST_POINT_REASON "CRL reden=" + IDS_CRL_DIST_POINT_ISSUER "CRL verstrekker" + IDS_REASON_KEY_COMPROMISE "Key Compromie" + IDS_REASON_CA_COMPROMISE "CA Compromie" + IDS_REASON_AFFILIATION_CHANGED "Samenwerking gewijzigd" + IDS_REASON_SUPERSEDED "Verouderd" + IDS_REASON_CESSATION_OF_OPERATION "Werkzaamheden gestaakt" + IDS_REASON_CERTIFICATE_HOLD "Certificaat bevroren" + IDS_FINANCIAL_CRITERIA "Financiele informatie=" + IDS_FINANCIAL_CRITERIA_AVAILABLE "Beschikbaar" + IDS_FINANCIAL_CRITERIA_NOT_AVAILABLE "Niet beschikbaar" + IDS_FINANCIAL_CRITERIA_MEETS_CRITERIA "Past bij criteria=" + IDS_YES "Ja" + IDS_NO "Nee" + IDS_DIGITAL_SIGNATURE "Digitale handtekening" + IDS_NON_REPUDIATION "Non-Repudiatie" + IDS_KEY_ENCIPHERMENT "sleutel codering" + IDS_DATA_ENCIPHERMENT "Data codering" + IDS_KEY_AGREEMENT "Sleutel overeenkomst" + IDS_CERT_SIGN "Certificaat tekenen" + IDS_OFFLINE_CRL_SIGN "Off-line CRL Certificeren" + IDS_CRL_SIGN "CRL Certificeren" + IDS_ENCIPHER_ONLY "Codeer alleen" + IDS_DECIPHER_ONLY "Decodeer alleen" + IDS_NETSCAPE_SSL_CLIENT "SSL Client Authentificatie" + IDS_NETSCAPE_SSL_SERVER "SSL Server Authentificatie" + IDS_NETSCAPE_SMIME "S/MIME" + IDS_NETSCAPE_SIGN "Handtekening" + IDS_NETSCAPE_SSL_CA "SSL CA" + IDS_NETSCAPE_SMIME_CA "S/MIME CA" + IDS_NETSCAPE_SIGN_CA "Handtekening CA" +} diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index c26398b4a6f..69e7ce6e819 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -551,7 +551,7 @@ static void testCertProperties(void) ok(ret, "CertSetCertificateContextProperty failed: %08x\n", GetLastError()); /* Now that that's set, the key prov handle property is also gettable. */ - size = sizeof(DWORD); + size = sizeof(keyContext.hCryptProv); ret = CertGetCertificateContextProperty(context, CERT_KEY_PROV_HANDLE_PROP_ID, &keyContext.hCryptProv, &size); ok(ret, "Expected to get the CERT_KEY_PROV_HANDLE_PROP_ID, got %08x\n", diff --git a/dlls/cryptui/certheader.bmp b/dlls/cryptui/certheader.bmp new file mode 100644 index 0000000000000000000000000000000000000000..de67d4ed7385abe1d0bd6b311a1e31c47410f27b GIT binary patch literal 1490 zcwWVmF-`)@3Xuw{ywB^{&!zjdrGTq_DkD_K_7L==X$-0hwYb`G3cW%`Q!sjzu5n9 zd_LwRoBfchx_XDBodnWVK7HrJ+cQQU!oDn?hFReoVHL~NLk6o0mug#7rm%5Cg>ndo zNJ8nvs38I|INFs=&}7aSV=qV}V@1{VY67#knab z34?2zsOIEyHPTDDcCTK@>9m966Y<4n7SCX>Ck`0}gq$V}&d(PuR{j474s~1mlhH3_ zRG(*yMP)~e&HgOT(bA96Vo}*8t8q}hqh<4Cb=BK-Y#uE2$qhDCMw8zPDNGh2-5TIB XwexC#^BpeW`A!TWf!7(B>Ss`B~3&hr4aS{&F6L1#qvK(f{e_Pbhe2(+^%lDtD^{qTUmB)|r`1(Gjcj-gh|8YLv{!aTI+HZPzm^SsN?kZ1@kB?15N%rjt!4n@%>JY&zL=vgu^g z$)=M{C!0<-ooqVUbh7DW)5)fjO(&a9Hl1ub*>tk$WYfu}lT9a^PBxuvI@xrx>15N% zrjt!4n@%>JY&zL=vgu^g$)=M{C!0<-ooqVUbh7DW)5)fjO(&a9Hl1ub*>tk$WYfu} zlT9a^PBxuvI@xrx>15N%rjt!4n@%>JY&zL=vgu^g$)=M{C!0<-ooqVUbh7DW)5)fj zO(&a9Hl1ub*>tk$WYfu}lT9a^PBxuvI@xrx>15N%rjt!4n@%>JY&zL=vgu^g$)=M{ zC!0<-ooqVUbh7DW)5)fjO(&a9Hl1ub*>tk$WYfu}lT9a^PBxuvI@xrx>15N%rjt!4 z+rM`9`D*LyZgF3m)Po3qcC-wy_z?Yck1&T(jGeR445 z%;#!6)U#e7=PA#kQ#x!8u?!bY6^c-%zCZDB*s@vu5;%fiN-{biN5Ij9Re zhMdFLjVTvyTf}Z&%rWH5=eDBLsFpo_+s2%^NXyf-rez4aaU8?WB0VlMS{8R&%yYzf zXv92SQFS(R-J3)2`}C&w4YgcIZDIq?X*|2U&1S(Kg3dagJ5;@pp6$BBSthe<>p5TQ zWp6izoWodVvCnM+rsX`f@r*e0d3CPKStmB)%tg9G4a<0joN4>OJWua^8_$6Al-JLs z-N$@BMx5Ox<;x5mmgPLeob3Z>yA4gtS;sTt9G~4X4{c_n&RY9#ulM)1^M2>Bd}A8s zwX6l5yKi>e{e6fzpL|bRZ<*(qbN8m#rg^G=-S6D4@uhm!6mr(h@D!W-sB>G$^}3%o zA!lpDF4ug}xyLRO3piU1JMTlB3l?_PPPlW6bS}Ml=hfEN-R8X7`ntF1d~LTlUz<)g LooqVU{*Ln(_VQjR literal 0 HcwPel00001 diff --git a/dlls/cryptui/cryptui.rc b/dlls/cryptui/cryptui.rc index 71dc3a08084..c0bc8233aa5 100644 --- a/dlls/cryptui/cryptui.rc +++ b/dlls/cryptui/cryptui.rc @@ -40,4 +40,10 @@ IDB_CERT_WARNING BITMAP LOADONCALL DISCARDABLE certwarning.bmp /* @makedep: checks.bmp */ IDB_CHECKS BITMAP LOADONCALL DISCARDABLE checks.bmp +/* @makedep: certwatermark.bmp */ +IDB_CERT_WATERMARK BITMAP LOADONCALL DISCARDABLE certwatermark.bmp + +/* @makedep: certheader.bmp */ +IDB_CERT_HEADER BITMAP LOADONCALL DISCARDABLE certheader.bmp + #include "cryptui_En.rc" diff --git a/dlls/cryptui/cryptui_En.rc b/dlls/cryptui/cryptui_En.rc index 0bd34786747..06092290ad8 100644 --- a/dlls/cryptui/cryptui_En.rc +++ b/dlls/cryptui/cryptui_En.rc @@ -93,6 +93,7 @@ STRINGTABLE DISCARDABLE IDS_IMPORT_CONTENT_STORE "Certificate Store" IDS_IMPORT_SUCCEEDED "The import was successful." IDS_IMPORT_FAILED "The import failed." + IDS_WIZARD_TITLE_FONT "Arial" IDS_PURPOSE_SERVER_AUTH "Ensures the identify of a remote computer" IDS_PURPOSE_CLIENT_AUTH "Proves your identity to a remote computer" IDS_PURPOSE_CODE_SIGNING "Ensures software came from software publisher\nProtects software from alteration after publication" @@ -234,7 +235,7 @@ CAPTION "Certificate Import Wizard" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Welcome to the Certificate Import Wizard", IDC_IMPORT_TITLE, - 115,1,195,24 + 115,1,195,40 LTEXT "This wizard helps you import certificates, certificate revocation lists, and certificate trust lists from a file to a certificate store.", stc1, 115,33,195,16 LTEXT "A certificate can be used to identify you or the computer with which you are communicating. It can also be used for authentication, and to sign messages. Certificate stores are collections of certificates, certificate revocation lists, and certificate trust lists.", @@ -277,12 +278,12 @@ CAPTION "Certificate Import Wizard" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Completing the Certificate Import Wizard", IDC_IMPORT_TITLE, - 115,1,195,24 + 115,1,195,40 LTEXT "You have successfully completed the Certificate Import Wizard.", stc1, 115,33,195,24 LTEXT "You have specified the following settings:", stc2, 115,57,195,12 CONTROL "", IDC_IMPORT_SETTINGS, "SysListView32", - LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, + LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END diff --git a/dlls/cryptui/cryptuires.h b/dlls/cryptui/cryptuires.h index fbbf441b6d1..14f576ef19c 100644 --- a/dlls/cryptui/cryptuires.h +++ b/dlls/cryptui/cryptuires.h @@ -90,6 +90,7 @@ #define IDS_IMPORT_CONTENT_STORE 1070 #define IDS_IMPORT_SUCCEEDED 1071 #define IDS_IMPORT_FAILED 1072 +#define IDS_WIZARD_TITLE_FONT 1073 #define IDS_PURPOSE_SERVER_AUTH 1100 #define IDS_PURPOSE_CLIENT_AUTH 1101 @@ -135,6 +136,8 @@ #define IDB_CERT_ERROR 202 #define IDB_CERT_WARNING 203 #define IDB_CHECKS 204 +#define IDB_CERT_WATERMARK 205 +#define IDB_CERT_HEADER 206 #define IDC_STATIC 2000 #define IDC_CERTIFICATE_ICON 2001 diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c index 286899dde85..987599d6f64 100644 --- a/dlls/cryptui/main.c +++ b/dlls/cryptui/main.c @@ -3690,6 +3690,21 @@ static BOOL import_file(DWORD dwFlags, HWND hwnd, LPCWSTR szTitle, return ret; } +struct ImportWizData +{ + HFONT titleFont; + DWORD dwFlags; + LPCWSTR pwszWizardTitle; + CRYPTUI_WIZ_IMPORT_SRC_INFO importSrc; + LPWSTR fileName; + DWORD contentType; + BOOL freeSource; + HCERTSTORE hDestCertStore; + BOOL freeDest; + BOOL autoDest; + BOOL success; +}; + static LRESULT CALLBACK import_welcome_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) { @@ -3697,6 +3712,26 @@ static LRESULT CALLBACK import_welcome_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, switch (msg) { + case WM_INITDIALOG: + { + struct ImportWizData *data; + PROPSHEETPAGEW *page = (PROPSHEETPAGEW *)lp; + WCHAR fontFace[MAX_STRING_LEN]; + HDC hDC = GetDC(hwnd); + int height; + + data = (struct ImportWizData *)page->lParam; + LoadStringW(hInstance, IDS_WIZARD_TITLE_FONT, fontFace, + sizeof(fontFace) / sizeof(fontFace[0])); + height = -MulDiv(12, GetDeviceCaps(hDC, LOGPIXELSY), 72); + data->titleFont = CreateFontW(height, 0, 0, 0, FW_BOLD, 0, 0, 0, + DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, + DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, fontFace); + SendMessageW(GetDlgItem(hwnd, IDC_IMPORT_TITLE), WM_SETFONT, + (WPARAM)data->titleFont, TRUE); + ReleaseDC(hwnd, hDC); + break; + } case WM_NOTIFY: { NMHDR *hdr = (NMHDR *)lp; @@ -3780,20 +3815,6 @@ static WCHAR *make_import_file_filter(DWORD dwFlags) return filter; } -struct ImportWizData -{ - DWORD dwFlags; - LPCWSTR pwszWizardTitle; - CRYPTUI_WIZ_IMPORT_SRC_INFO importSrc; - LPWSTR fileName; - DWORD contentType; - BOOL freeSource; - HCERTSTORE hDestCertStore; - BOOL freeDest; - BOOL autoDest; - BOOL success; -}; - static BOOL import_validate_filename(HWND hwnd, struct ImportWizData *data, LPCWSTR fileName) { @@ -4181,6 +4202,8 @@ static LRESULT CALLBACK import_finish_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, data = (struct ImportWizData *)page->lParam; SetWindowLongPtrW(hwnd, DWLP_USER, (LPARAM)data); + SendMessageW(GetDlgItem(hwnd, IDC_IMPORT_TITLE), WM_SETFONT, + (WPARAM)data->titleFont, TRUE); GetWindowRect(lv, &rc); column.mask = LVCF_WIDTH; column.cx = (rc.right - rc.left) / 2 - 2; @@ -4269,6 +4292,7 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent, pages[nPages].u.pszTemplate = MAKEINTRESOURCEW(IDD_IMPORT_WELCOME); pages[nPages].pfnDlgProc = import_welcome_dlg_proc; pages[nPages].dwFlags = PSP_HIDEHEADER; + pages[nPages].lParam = (LPARAM)&data; nPages++; if (!pImportSrc || @@ -4326,7 +4350,8 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent, memset(&hdr, 0, sizeof(hdr)); hdr.dwSize = sizeof(hdr); hdr.hwndParent = hwndParent; - hdr.dwFlags = PSH_PROPSHEETPAGE | PSH_WIZARD97_OLD | PSH_HEADER; + hdr.dwFlags = PSH_PROPSHEETPAGE | PSH_WIZARD97_NEW | PSH_HEADER | + PSH_WATERMARK; hdr.hInstance = hInstance; if (pwszWizardTitle) hdr.pszCaption = pwszWizardTitle; @@ -4334,11 +4359,14 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent, hdr.pszCaption = MAKEINTRESOURCEW(IDS_IMPORT_WIZARD); hdr.u3.ppsp = pages; hdr.nPages = nPages; + hdr.u4.pszbmWatermark = MAKEINTRESOURCEW(IDB_CERT_WATERMARK); + hdr.u5.pszbmHeader = MAKEINTRESOURCEW(IDB_CERT_HEADER); PropertySheetW(&hdr); HeapFree(GetProcessHeap(), 0, data.fileName); if (data.freeSource && data.importSrc.dwSubjectChoice == CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_STORE) CertCloseStore(data.importSrc.u.hCertStore, 0); + DeleteObject(data.titleFont); return data.success; } diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 648422532fa..96ce450c1a7 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1113,7 +1113,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_EndStateBlock(LPDIRECT3DDEVICE8 iface EnterCriticalSection(&d3d8_cs); hr = IWineD3DDevice_EndStateBlock(This->WineD3DDevice , &wineD3DStateBlock); if (hr != D3D_OK) { - FIXME("IWineD3DDevice_EndStateBlock returned an error\n"); + WARN("IWineD3DDevice_EndStateBlock returned an error\n"); LeaveCriticalSection(&d3d8_cs); return hr; } diff --git a/dlls/d3d8/tests/Makefile.in b/dlls/d3d8/tests/Makefile.in index 3330b3ae752..9728d97f4ab 100644 --- a/dlls/d3d8/tests/Makefile.in +++ b/dlls/d3d8/tests/Makefile.in @@ -8,6 +8,7 @@ IMPORTS = user32 kernel32 CTESTS = \ d3d8_main.c \ device.c \ + stateblock.c \ surface.c \ texture.c \ visual.c \ diff --git a/dlls/d3d8/tests/stateblock.c b/dlls/d3d8/tests/stateblock.c new file mode 100644 index 00000000000..a6ad66245f0 --- /dev/null +++ b/dlls/d3d8/tests/stateblock.c @@ -0,0 +1,1558 @@ +/* + * Copyright 2006 Ivan Gyurdiev + * Copyright 2005, 2008 Henri Verbeet + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS +#include +#include "wine/test.h" + +static DWORD texture_stages; + +static HWND create_window(void) +{ + WNDCLASS wc = {0}; + wc.lpfnWndProc = DefWindowProc; + wc.lpszClassName = "d3d8_test_wc"; + RegisterClass(&wc); + + return CreateWindow("d3d8_test_wc", "d3d8_test", 0, 0, 0, 0, 0, 0, 0, 0, 0); +} + +static HRESULT init_d3d8(HMODULE d3d8_module, IDirect3DDevice8 **device, D3DPRESENT_PARAMETERS *device_pparams) +{ + IDirect3D8 * (WINAPI *d3d8_create)(UINT SDKVersion) = 0; + D3DDISPLAYMODE d3ddm; + IDirect3D8 *d3d8 = 0; + HWND window; + HRESULT hr; + + d3d8_create = (void *)GetProcAddress(d3d8_module, "Direct3DCreate8"); + if (!d3d8_create) return E_FAIL; + + d3d8 = d3d8_create(D3D_SDK_VERSION); + if (!d3d8) + { + skip("Failed to create D3D8 object.\n"); + return E_FAIL; + } + + window = create_window(); + + IDirect3D8_GetAdapterDisplayMode(d3d8, D3DADAPTER_DEFAULT, &d3ddm); + memset(device_pparams, 0, sizeof(*device_pparams)); + device_pparams->Windowed = TRUE; + device_pparams->SwapEffect = D3DSWAPEFFECT_DISCARD; + device_pparams->BackBufferFormat = d3ddm.Format; + + hr = IDirect3D8_CreateDevice(d3d8, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, window, + D3DCREATE_SOFTWARE_VERTEXPROCESSING, device_pparams, device); + ok(SUCCEEDED(hr) || hr == D3DERR_NOTAVAILABLE || broken(hr == D3DERR_INVALIDCALL), + "IDirect3D8_CreateDevice failed, hr %#x.\n", hr); + + return hr; +} + +static void test_begin_end_state_block(IDirect3DDevice8 *device) +{ + DWORD state_block; + HRESULT hr; + + /* Should succeed */ + hr = IDirect3DDevice8_BeginStateBlock(device); + ok(SUCCEEDED(hr), "BeginStateBlock failed, hr %#x.\n", hr); + if (FAILED(hr)) return; + + /* Calling BeginStateBlock while recording should return D3DERR_INVALIDCALL */ + hr = IDirect3DDevice8_BeginStateBlock(device); + ok(hr == D3DERR_INVALIDCALL, "BeginStateBlock returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + if (hr != D3DERR_INVALIDCALL) return; + + /* Should succeed */ + state_block = 0xdeadbeef; + hr = IDirect3DDevice8_EndStateBlock(device, &state_block); + ok(SUCCEEDED(hr) && state_block && state_block != 0xdeadbeef, + "EndStateBlock returned: hr %#x, state_block %#x. " + "Expected hr %#x, state_block != 0, state_block != 0xdeadbeef.\n", hr, state_block, D3D_OK); + IDirect3DDevice8_DeleteStateBlock(device, state_block); + + /* Calling EndStateBlock while not recording should return D3DERR_INVALIDCALL. + * state_block should not be touched. */ + state_block = 0xdeadbeef; + hr = IDirect3DDevice8_EndStateBlock(device, &state_block); + ok(hr == D3DERR_INVALIDCALL && state_block == 0xdeadbeef, + "EndStateBlock returned: hr %#x, state_block %#x. " + "Expected hr %#x, state_block 0xdeadbeef.\n", hr, state_block, D3DERR_INVALIDCALL); +} + +/* ============================ State Testing Framework ========================== */ + +struct state_test +{ + const char *test_name; + + /* The initial data is usually the same + * as the default data, but a write can have side effects. + * The initial data is tested first, before any writes take place + * The default data can be tested after a write */ + const void *initial_data; + + /* The default data is the standard state to compare + * against, and restore to */ + const void *default_data; + + /* The test data is the experiment data to try + * in - what we want to write + * out - what windows will actually write (not necessarily the same) */ + const void *test_data_in; + const void *test_data_out; + + /* The poison data is the data to preinitialize the return buffer to */ + const void *poison_data; + + /* Return buffer */ + void *return_data; + + /* Size of the data samples above */ + unsigned int data_size; + + /* Test resource management handlers */ + HRESULT (*setup_handler)(struct state_test *test); + void (*teardown_handler)(struct state_test *test); + + /* Test data handlers */ + void (*set_handler)(IDirect3DDevice8 *device, const struct state_test *test, const void *data_in); + void (*get_handler)(IDirect3DDevice8 *device, const struct state_test *test, void *data_out); + void (*print_handler)(const struct state_test *test, const void *data); + + /* Test arguments */ + const void *test_arg; + + /* Test-specific context data */ + void *test_context; +}; + +/* See below for explanation of the flags */ +#define EVENT_OK 0x00 +#define EVENT_CHECK_DEFAULT 0x01 +#define EVENT_CHECK_INITIAL 0x02 +#define EVENT_CHECK_TEST 0x04 +#define EVENT_ERROR 0x08 +#define EVENT_APPLY_DATA 0x10 + +struct event +{ + int (*event_fn)(IDirect3DDevice8 *device, void *arg); + int status; +}; + +/* This is an event-machine, which tests things. + * It tests get and set operations for a batch of states, based on + * results from the event function, which directs what's to be done */ +static void execute_test_chain(IDirect3DDevice8 *device, struct state_test *test, + unsigned int ntests, struct event *event, unsigned int nevents, void *event_arg) +{ + unsigned int i = 0, j; + int outcome; + + /* For each queued event */ + for (j = 0; j < nevents; ++j) + { + /* Execute the next event handler (if available) or just set the supplied status */ + outcome = event[j].status; + if (event[j].event_fn) outcome |= event[j].event_fn(device, event_arg); + + /* Now verify correct outcome depending on what was signaled by the handler. + * An EVENT_CHECK_TEST signal means check the returned data against the test_data (out). + * An EVENT_CHECK_DEFAULT signal means check the returned data against the default_data. + * An EVENT_CHECK_INITIAL signal means check the returned data against the initial_data. + * An EVENT_ERROR signal means the test isn't going to work, exit the event loop. + * An EVENT_APPLY_DATA signal means load the test data (after checks) */ + + if (outcome & EVENT_ERROR) + { + trace("Test %s, Stage %u in error state, aborting\n", test[i].test_name, j); + break; + } + else if (outcome & EVENT_CHECK_TEST || outcome & EVENT_CHECK_DEFAULT || outcome & EVENT_CHECK_INITIAL) + { + for (i = 0; i < ntests; ++i) + { + memcpy(test[i].return_data, test[i].poison_data, test[i].data_size); + test[i].get_handler(device, &test[i], test[i].return_data); + + if (outcome & EVENT_CHECK_TEST) + { + BOOL test_failed = memcmp(test[i].test_data_out, test[i].return_data, test[i].data_size); + ok(!test_failed, "Test %s, Stage %u: returned data does not match test data [csize=%u]\n", + test[i].test_name, j, test[i].data_size); + + if (test_failed && test[i].print_handler) + { + trace("Returned data was:\n"); + test[i].print_handler(&test[i], test[i].return_data); + trace("Test data was:\n"); + test[i].print_handler(&test[i], test[i].test_data_out); + } + } + else if (outcome & EVENT_CHECK_DEFAULT) + { + BOOL test_failed = memcmp(test[i].default_data, test[i].return_data, test[i].data_size); + ok(!test_failed, "Test %s, Stage %u: returned data does not match default data [csize=%u]\n", + test[i].test_name, j, test[i].data_size); + + if (test_failed && test[i].print_handler) + { + trace("Returned data was:\n"); + test[i].print_handler(&test[i], test[i].return_data); + trace("Default data was:\n"); + test[i].print_handler(&test[i], test[i].default_data); + } + } + else if (outcome & EVENT_CHECK_INITIAL) + { + BOOL test_failed = memcmp(test[i].initial_data, test[i].return_data, test[i].data_size); + ok(!test_failed, "Test %s, Stage %u: returned data does not match initial data [csize=%u]\n", + test[i].test_name, j, test[i].data_size); + + if (test_failed && test[i].print_handler) + { + trace("Returned data was:\n"); + test[i].print_handler(&test[i], test[i].return_data); + trace("Initial data was:\n"); + test[i].print_handler(&test[i], test[i].initial_data); + } + } + } + } + + if (outcome & EVENT_APPLY_DATA) + { + for (i = 0; i < ntests; ++i) + { + test[i].set_handler(device, &test[i], test[i].test_data_in); + } + } + } + + /* Attempt to reset any changes made */ + for (i=0; i < ntests; i++) + { + test[i].set_handler(device, &test[i], test[i].default_data); + } +} + +struct event_data +{ + DWORD stateblock; + IDirect3DSurface8 *original_render_target; + IDirect3DSwapChain8 *new_swap_chain; +}; + +static int switch_render_target(IDirect3DDevice8* device, void *data) +{ + D3DPRESENT_PARAMETERS present_parameters; + IDirect3DSwapChain8 *swapchain = NULL; + IDirect3DSurface8 *backbuffer = NULL; + struct event_data *edata = data; + D3DDISPLAYMODE d3ddm; + HRESULT hr; + + /* Parameters for new swapchain */ + IDirect3DDevice8_GetDisplayMode(device, &d3ddm); + memset(&present_parameters, 0, sizeof(present_parameters)); + present_parameters.Windowed = TRUE; + present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD; + present_parameters.BackBufferFormat = d3ddm.Format; + + /* Create new swapchain */ + hr = IDirect3DDevice8_CreateAdditionalSwapChain(device, &present_parameters, &swapchain); + ok(SUCCEEDED(hr), "CreateAdditionalSwapChain returned %#x.\n", hr); + if (FAILED(hr)) goto error; + + /* Get its backbuffer */ + hr = IDirect3DSwapChain8_GetBackBuffer(swapchain, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); + ok(SUCCEEDED(hr), "GetBackBuffer returned %#x.\n", hr); + if (FAILED(hr)) goto error; + + /* Save the current render target */ + hr = IDirect3DDevice8_GetRenderTarget(device, &edata->original_render_target); + ok(SUCCEEDED(hr), "GetRenderTarget returned %#x.\n", hr); + if (FAILED(hr)) goto error; + + /* Set the new swapchain's backbuffer as a render target */ + hr = IDirect3DDevice8_SetRenderTarget(device, backbuffer, NULL); + ok(SUCCEEDED(hr), "SetRenderTarget returned %#x.\n", hr); + if (FAILED(hr)) goto error; + + IDirect3DSurface8_Release(backbuffer); + edata->new_swap_chain = swapchain; + return EVENT_OK; + +error: + if (backbuffer) IDirect3DSurface8_Release(backbuffer); + if (swapchain) IDirect3DSwapChain8_Release(swapchain); + return EVENT_ERROR; +} + +static int revert_render_target(IDirect3DDevice8 *device, void *data) +{ + struct event_data *edata = data; + HRESULT hr; + + /* Reset the old render target */ + hr = IDirect3DDevice8_SetRenderTarget(device, edata->original_render_target, NULL); + ok(SUCCEEDED(hr), "SetRenderTarget returned %#x.\n", hr); + if (FAILED(hr)) + { + IDirect3DSurface8_Release(edata->original_render_target); + return EVENT_ERROR; + } + + IDirect3DSurface8_Release(edata->original_render_target); + IDirect3DSwapChain8_Release(edata->new_swap_chain); + return EVENT_OK; +} + +static int begin_stateblock(IDirect3DDevice8 *device, void *data) +{ + HRESULT hr; + + hr = IDirect3DDevice8_BeginStateBlock(device); + ok(SUCCEEDED(hr), "BeginStateBlock returned %#x.\n", hr); + if (FAILED(hr)) return EVENT_ERROR; + return EVENT_OK; +} + +static int end_stateblock(IDirect3DDevice8 *device, void *data) +{ + struct event_data *edata = data; + HRESULT hr; + + hr = IDirect3DDevice8_EndStateBlock(device, &edata->stateblock); + ok(SUCCEEDED(hr), "EndStateBlock returned %#x.\n", hr); + if (FAILED(hr)) return EVENT_ERROR; + return EVENT_OK; +} + +static int abort_stateblock(IDirect3DDevice8 *device, void *data) +{ + struct event_data *edata = data; + + IDirect3DDevice8_DeleteStateBlock(device, edata->stateblock); + return EVENT_OK; +} + +static int apply_stateblock(IDirect3DDevice8 *device, void *data) +{ + struct event_data *edata = data; + HRESULT hr; + + hr = IDirect3DDevice8_ApplyStateBlock(device, edata->stateblock); + ok(SUCCEEDED(hr), "Apply returned %#x.\n", hr); + + IDirect3DDevice8_DeleteStateBlock(device, edata->stateblock); + if (FAILED(hr)) return EVENT_ERROR; + return EVENT_OK; +} + +static int capture_stateblock(IDirect3DDevice8 *device, void *data) +{ + struct event_data *edata = data; + HRESULT hr; + + hr = IDirect3DDevice8_CaptureStateBlock(device, edata->stateblock); + ok(SUCCEEDED(hr), "Capture returned %#x.\n", hr); + if (FAILED(hr)) return EVENT_ERROR; + + return EVENT_OK; +} + +static void execute_test_chain_all(IDirect3DDevice8 *device, struct state_test *test, unsigned int ntests) +{ + struct event_data arg; + unsigned int i; + HRESULT hr; + + struct event read_events[] = + { + {NULL, EVENT_CHECK_INITIAL}, + }; + + struct event write_read_events[] = + { + {NULL, EVENT_APPLY_DATA}, + {NULL, EVENT_CHECK_TEST}, + }; + + struct event abort_stateblock_events[] = + { + {begin_stateblock, EVENT_APPLY_DATA}, + {end_stateblock, EVENT_OK}, + {abort_stateblock, EVENT_CHECK_DEFAULT}, + }; + + struct event apply_stateblock_events[] = + { + {begin_stateblock, EVENT_APPLY_DATA}, + {end_stateblock, EVENT_OK}, + {apply_stateblock, EVENT_CHECK_TEST}, + }; + + struct event capture_reapply_stateblock_events[] = + { + {begin_stateblock, EVENT_APPLY_DATA}, + {end_stateblock, EVENT_OK}, + {capture_stateblock, EVENT_CHECK_DEFAULT | EVENT_APPLY_DATA}, + {apply_stateblock, EVENT_CHECK_DEFAULT}, + }; + + struct event rendertarget_switch_events[] = + { + {NULL, EVENT_APPLY_DATA}, + {switch_render_target, EVENT_CHECK_TEST}, + {revert_render_target, EVENT_OK}, + }; + + struct event rendertarget_stateblock_events[] = + { + {begin_stateblock, EVENT_APPLY_DATA}, + {switch_render_target, EVENT_CHECK_DEFAULT}, + {end_stateblock, EVENT_OK}, + {revert_render_target, EVENT_OK}, + {apply_stateblock, EVENT_CHECK_TEST}, + }; + + /* Setup each test for execution */ + for (i = 0; i < ntests; ++i) + { + hr = test[i].setup_handler(&test[i]); + ok(SUCCEEDED(hr), "Test \"%s\" failed setup, aborting\n", test[i].test_name); + if (FAILED(hr)) return; + } + + trace("Running initial read state tests\n"); + execute_test_chain(device, test, ntests, read_events, 1, NULL); + + trace("Running write-read state tests\n"); + execute_test_chain(device, test, ntests, write_read_events, 2, NULL); + + trace("Running stateblock abort state tests\n"); + execute_test_chain(device, test, ntests, abort_stateblock_events, 3, &arg); + + trace("Running stateblock apply state tests\n"); + execute_test_chain(device, test, ntests, apply_stateblock_events, 3, &arg); + + trace("Running stateblock capture/reapply state tests\n"); + execute_test_chain(device, test, ntests, capture_reapply_stateblock_events, 4, &arg); + + trace("Running rendertarget switch state tests\n"); + execute_test_chain(device, test, ntests, rendertarget_switch_events, 3, &arg); + + trace("Running stateblock apply over rendertarget switch interrupt tests\n"); + execute_test_chain(device, test, ntests, rendertarget_stateblock_events, 5, &arg); + + /* Cleanup resources */ + for (i = 0; i < ntests; ++i) + { + test[i].teardown_handler(&test[i]); + } +} + +/* =================== State test: Pixel and Vertex Shader constants ============ */ + +struct shader_constant_data +{ + float float_constant[4]; /* 1x4 float constant */ +}; + +struct shader_constant_arg +{ + unsigned int idx; + BOOL pshader; +}; + +struct shader_constant_context +{ + struct shader_constant_data return_data_buffer; +}; + +static void shader_constant_print_handler(const struct state_test *test, const void *data) +{ + const struct shader_constant_data *scdata = data; + + trace("Float constant = { %f, %f, %f, %f }\n", + scdata->float_constant[0], scdata->float_constant[1], + scdata->float_constant[2], scdata->float_constant[3]); +} + +static void shader_constant_set_handler(IDirect3DDevice8* device, const struct state_test *test, const void *data) +{ + const struct shader_constant_data *scdata = data; + const struct shader_constant_arg *scarg = test->test_arg; + unsigned int index = scarg->idx; + HRESULT hr; + + if (!scarg->pshader) + { + hr = IDirect3DDevice8_SetVertexShaderConstant(device, index, scdata->float_constant, 1); + ok(SUCCEEDED(hr), "SetVertexShaderConstant returned %#x.\n", hr); + } + else + { + hr = IDirect3DDevice8_SetPixelShaderConstant(device, index, scdata->float_constant, 1); + ok(SUCCEEDED(hr), "SetPixelShaderConstant returned %#x.\n", hr); + } +} + +static void shader_constant_get_handler(IDirect3DDevice8* device, const struct state_test *test, void *data) +{ + struct shader_constant_data *scdata = data; + const struct shader_constant_arg *scarg = test->test_arg; + unsigned int index = scarg->idx; + HRESULT hr; + + if (!scarg->pshader) + { + hr = IDirect3DDevice8_GetVertexShaderConstant(device, index, scdata->float_constant, 1); + ok(SUCCEEDED(hr), "GetVertexShaderConstant returned %#x.\n", hr); + + } + else + { + hr = IDirect3DDevice8_GetPixelShaderConstant(device, index, scdata->float_constant, 1); + ok(SUCCEEDED(hr), "GetPixelShaderConstant returned %#x.\n", hr); + } +} + +static const struct shader_constant_data shader_constant_poison_data = +{ + {1.0f, 2.0f, 3.0f, 4.0f}, +}; + +static const struct shader_constant_data shader_constant_default_data = +{ + {0.0f, 0.0f, 0.0f, 0.0f}, +}; + +static const struct shader_constant_data shader_constant_test_data = +{ + {5.0f, 6.0f, 7.0f, 8.0f}, +}; + +static HRESULT shader_constant_setup_handler(struct state_test *test) +{ + struct shader_constant_context *ctx = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ctx)); + if (!ctx) return E_FAIL; + test->test_context = ctx; + + test->return_data = &ctx->return_data_buffer; + test->test_data_in = &shader_constant_test_data; + test->test_data_out = &shader_constant_test_data; + test->default_data = &shader_constant_default_data; + test->initial_data = &shader_constant_default_data; + test->poison_data = &shader_constant_poison_data; + + test->data_size = sizeof(struct shader_constant_data); + + return D3D_OK; +} + +static void shader_constant_teardown_handler(struct state_test *test) +{ + HeapFree(GetProcessHeap(), 0, test->test_context); +} + +static void shader_constants_queue_test(struct state_test *test, const struct shader_constant_arg *test_arg) +{ + test->setup_handler = shader_constant_setup_handler; + test->teardown_handler = shader_constant_teardown_handler; + test->set_handler = shader_constant_set_handler; + test->get_handler = shader_constant_get_handler; + test->print_handler = shader_constant_print_handler; + test->test_name = test_arg->pshader ? "set_get_pshader_constants" : "set_get_vshader_constants"; + test->test_arg = test_arg; +} + +/* =================== State test: Lights ===================================== */ + +struct light_data +{ + D3DLIGHT8 light; + BOOL enabled; + HRESULT get_light_result; + HRESULT get_enabled_result; +}; + +struct light_arg +{ + unsigned int idx; +}; + +struct light_context +{ + struct light_data return_data_buffer; +}; + +static void light_print_handler(const struct state_test *test, const void *data) +{ + const struct light_data *ldata = data; + + trace("Get Light return value: %#x\n", ldata->get_light_result); + trace("Get Light enable return value: %#x\n", ldata->get_enabled_result); + + trace("Light Enabled = %u\n", ldata->enabled); + trace("Light Type = %u\n", ldata->light.Type); + trace("Light Diffuse = { %f, %f, %f, %f }\n", + ldata->light.Diffuse.r, ldata->light.Diffuse.g, + ldata->light.Diffuse.b, ldata->light.Diffuse.a); + trace("Light Specular = { %f, %f, %f, %f}\n", + ldata->light.Specular.r, ldata->light.Specular.g, + ldata->light.Specular.b, ldata->light.Specular.a); + trace("Light Ambient = { %f, %f, %f, %f }\n", + ldata->light.Ambient.r, ldata->light.Ambient.g, + ldata->light.Ambient.b, ldata->light.Ambient.a); + trace("Light Position = { %f, %f, %f }\n", + ldata->light.Position.x, ldata->light.Position.y, ldata->light.Position.z); + trace("Light Direction = { %f, %f, %f }\n", + ldata->light.Direction.x, ldata->light.Direction.y, ldata->light.Direction.z); + trace("Light Range = %f\n", ldata->light.Range); + trace("Light Fallof = %f\n", ldata->light.Falloff); + trace("Light Attenuation0 = %f\n", ldata->light.Attenuation0); + trace("Light Attenuation1 = %f\n", ldata->light.Attenuation1); + trace("Light Attenuation2 = %f\n", ldata->light.Attenuation2); + trace("Light Theta = %f\n", ldata->light.Theta); + trace("Light Phi = %f\n", ldata->light.Phi); +} + +static void light_set_handler(IDirect3DDevice8 *device, const struct state_test *test, const void *data) +{ + const struct light_data *ldata = data; + const struct light_arg *larg = test->test_arg; + unsigned int index = larg->idx; + HRESULT hr; + + hr = IDirect3DDevice8_SetLight(device, index, &ldata->light); + ok(SUCCEEDED(hr), "SetLight returned %#x.\n", hr); + + hr = IDirect3DDevice8_LightEnable(device, index, ldata->enabled); + ok(SUCCEEDED(hr), "SetLightEnable returned %#x.\n", hr); +} + +static void light_get_handler(IDirect3DDevice8 *device, const struct state_test *test, void *data) +{ + struct light_data *ldata = data; + const struct light_arg *larg = test->test_arg; + unsigned int index = larg->idx; + HRESULT hr; + + hr = IDirect3DDevice8_GetLightEnable(device, index, &ldata->enabled); + ldata->get_enabled_result = hr; + + hr = IDirect3DDevice8_GetLight(device, index, &ldata->light); + ldata->get_light_result = hr; +} + +static const struct light_data light_poison_data = +{ + { + 0x1337c0de, + {7.0, 4.0, 2.0, 1.0}, + {7.0, 4.0, 2.0, 1.0}, + {7.0, 4.0, 2.0, 1.0}, + {3.3f, 4.4f, 5.5f}, + {6.6f, 7.7f, 8.8f}, + 12.12f, 13.13f, 14.14f, 15.15f, 16.16f, 17.17f, 18.18f, + }, + TRUE, + 0x1337c0de, + 0x1337c0de, +}; + +static const struct light_data light_default_data = +{ + { + D3DLIGHT_DIRECTIONAL, + {1.0, 1.0, 1.0, 0.0}, + {0.0, 0.0, 0.0, 0.0}, + {0.0, 0.0, 0.0, 0.0}, + {0.0, 0.0, 0.0}, + {0.0, 0.0, 1.0}, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + }, + FALSE, + D3D_OK, + D3D_OK, +}; + +/* This is used for the initial read state (before a write causes side effects) + * The proper return status is D3DERR_INVALIDCALL */ +static const struct light_data light_initial_data = +{ + { + 0x1337c0de, + {7.0, 4.0, 2.0, 1.0}, + {7.0, 4.0, 2.0, 1.0}, + {7.0, 4.0, 2.0, 1.0}, + {3.3f, 4.4f, 5.5f}, + {6.6f, 7.7f, 8.8f}, + 12.12f, 13.13f, 14.14f, 15.15f, 16.16f, 17.17f, 18.18f, + }, + TRUE, + D3DERR_INVALIDCALL, + D3DERR_INVALIDCALL, +}; + +static const struct light_data light_test_data_in = +{ + { + 1, + {2.0, 2.0, 2.0, 2.0}, + {3.0, 3.0, 3.0, 3.0}, + {4.0, 4.0, 4.0, 4.0}, + {5.0, 5.0, 5.0}, + {6.0, 6.0, 6.0}, + 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, + }, + TRUE, + D3D_OK, + D3D_OK, +}; + +/* SetLight will use 128 as the "enabled" value */ +static const struct light_data light_test_data_out = +{ + { + 1, + {2.0, 2.0, 2.0, 2.0}, + {3.0, 3.0, 3.0, 3.0}, + {4.0, 4.0, 4.0, 4.0}, + {5.0, 5.0, 5.0}, + {6.0, 6.0, 6.0}, + 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, + }, + 128, + D3D_OK, + D3D_OK, +}; + +static HRESULT light_setup_handler(struct state_test *test) +{ + struct light_context *ctx = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ctx)); + if (!ctx) return E_FAIL; + test->test_context = ctx; + + test->return_data = &ctx->return_data_buffer; + test->test_data_in = &light_test_data_in; + test->test_data_out = &light_test_data_out; + test->default_data = &light_default_data; + test->initial_data = &light_initial_data; + test->poison_data = &light_poison_data; + + test->data_size = sizeof(struct light_data); + + return D3D_OK; +} + +static void light_teardown_handler(struct state_test *test) +{ + HeapFree(GetProcessHeap(), 0, test->test_context); +} + +static void lights_queue_test(struct state_test *test, const struct light_arg *test_arg) +{ + test->setup_handler = light_setup_handler; + test->teardown_handler = light_teardown_handler; + test->set_handler = light_set_handler; + test->get_handler = light_get_handler; + test->print_handler = light_print_handler; + test->test_name = "set_get_light"; + test->test_arg = test_arg; +} + +/* =================== State test: Transforms ===================================== */ + +struct transform_data +{ + D3DMATRIX view; + D3DMATRIX projection; + D3DMATRIX texture0; + D3DMATRIX texture7; + D3DMATRIX world0; + D3DMATRIX world255; +}; + +struct transform_context +{ + struct transform_data return_data_buffer; +}; + +static inline void print_matrix(const char *name, const D3DMATRIX *matrix) +{ + trace("%s Matrix =\n{\n", name); + trace(" %f %f %f %f\n", U(*matrix).m[0][0], U(*matrix).m[1][0], U(*matrix).m[2][0], U(*matrix).m[3][0]); + trace(" %f %f %f %f\n", U(*matrix).m[0][1], U(*matrix).m[1][1], U(*matrix).m[2][1], U(*matrix).m[3][1]); + trace(" %f %f %f %f\n", U(*matrix).m[0][2], U(*matrix).m[1][2], U(*matrix).m[2][2], U(*matrix).m[3][2]); + trace(" %f %f %f %f\n", U(*matrix).m[0][3], U(*matrix).m[1][3], U(*matrix).m[2][3], U(*matrix).m[3][3]); + trace("}\n"); +} + +static void transform_print_handler(const struct state_test *test, const void *data) +{ + const struct transform_data *tdata = data; + + print_matrix("View", &tdata->view); + print_matrix("Projection", &tdata->projection); + print_matrix("Texture0", &tdata->texture0); + print_matrix("Texture7", &tdata->texture7); + print_matrix("World0", &tdata->world0); + print_matrix("World255", &tdata->world255); +} + +static void transform_set_handler(IDirect3DDevice8 *device, const struct state_test *test, const void *data) +{ + const struct transform_data *tdata = data; + HRESULT hr; + + hr = IDirect3DDevice8_SetTransform(device, D3DTS_VIEW, &tdata->view); + ok(SUCCEEDED(hr), "SetTransform returned %#x.\n", hr); + + hr = IDirect3DDevice8_SetTransform(device, D3DTS_PROJECTION, &tdata->projection); + ok(SUCCEEDED(hr), "SetTransform returned %#x.\n", hr); + + hr = IDirect3DDevice8_SetTransform(device, D3DTS_TEXTURE0, &tdata->texture0); + ok(SUCCEEDED(hr), "SetTransform returned %#x.\n", hr); + + hr = IDirect3DDevice8_SetTransform(device, D3DTS_TEXTURE0 + texture_stages - 1, &tdata->texture7); + ok(SUCCEEDED(hr), "SetTransform returned %#x.\n", hr); + + hr = IDirect3DDevice8_SetTransform(device, D3DTS_WORLD, &tdata->world0); + ok(SUCCEEDED(hr), "SetTransform returned %#x.\n", hr); + + hr = IDirect3DDevice8_SetTransform(device, D3DTS_WORLDMATRIX(255), &tdata->world255); + ok(SUCCEEDED(hr), "SetTransform returned %#x.\n", hr); +} + +static void transform_get_handler(IDirect3DDevice8 *device, const struct state_test *test, void *data) +{ + struct transform_data *tdata = data; + HRESULT hr; + + hr = IDirect3DDevice8_GetTransform(device, D3DTS_VIEW, &tdata->view); + ok(SUCCEEDED(hr), "GetTransform returned %#x.\n", hr); + + hr = IDirect3DDevice8_GetTransform(device, D3DTS_PROJECTION, &tdata->projection); + ok(SUCCEEDED(hr), "GetTransform returned %#x.\n", hr); + + hr = IDirect3DDevice8_GetTransform(device, D3DTS_TEXTURE0, &tdata->texture0); + ok(SUCCEEDED(hr), "GetTransform returned %#x.\n", hr); + + hr = IDirect3DDevice8_GetTransform(device, D3DTS_TEXTURE0 + texture_stages - 1, &tdata->texture7); + ok(SUCCEEDED(hr), "GetTransform returned %#x.\n", hr); + + hr = IDirect3DDevice8_GetTransform(device, D3DTS_WORLD, &tdata->world0); + ok(SUCCEEDED(hr), "GetTransform returned %#x.\n", hr); + + hr = IDirect3DDevice8_GetTransform(device, D3DTS_WORLDMATRIX(255), &tdata->world255); + ok(SUCCEEDED(hr), "GetTransform returned %#x.\n", hr); +} + +static const struct transform_data transform_default_data = +{ + {{{ + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, + }}}, + {{{ + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, + }}}, + {{{ + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, + }}}, + {{{ + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, + }}}, + {{{ + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, + }}}, + {{{ + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, + }}}, +}; + +static const struct transform_data transform_poison_data = +{ + {{{ + 1.0f, 2.0f, 3.0f, 4.0f, + 5.0f, 6.0f, 7.0f, 8.0f, + 9.0f, 10.0f, 11.0f, 12.0f, + 13.0f, 14.0f, 15.0f, 16.0f, + }}}, + {{{ + 17.0f, 18.0f, 19.0f, 20.0f, + 21.0f, 22.0f, 23.0f, 24.0f, + 25.0f, 26.0f, 27.0f, 28.0f, + 29.0f, 30.0f, 31.0f, 32.0f, + }}}, + {{{ + 33.0f, 34.0f, 35.0f, 36.0f, + 37.0f, 38.0f, 39.0f, 40.0f, + 41.0f, 42.0f, 43.0f, 44.0f, + 45.0f, 46.0f, 47.0f, 48.0f, + }}}, + {{{ + 49.0f, 50.0f, 51.0f, 52.0f, + 53.0f, 54.0f, 55.0f, 56.0f, + 57.0f, 58.0f, 59.0f, 60.0f, + 61.0f, 62.0f, 63.0f, 64.0f, + }}}, + {{{ + 64.0f, 66.0f, 67.0f, 68.0f, + 69.0f, 70.0f, 71.0f, 72.0f, + 73.0f, 74.0f, 75.0f, 76.0f, + 77.0f, 78.0f, 79.0f, 80.0f, + }}}, + {{{ + 81.0f, 82.0f, 83.0f, 84.0f, + 85.0f, 86.0f, 87.0f, 88.0f, + 89.0f, 90.0f, 91.0f, 92.0f, + 93.0f, 94.0f, 95.0f, 96.0f, + }}}, +}; + +static const struct transform_data transform_test_data = +{ + {{{ + 1.2f, 3.4f, -5.6f, 7.2f, + 10.11f, -12.13f, 14.15f, -1.5f, + 23.56f, 12.89f, 44.56f, -1.0f, + 2.3f, 0.0f, 4.4f, 5.5f, + }}}, + {{{ + 9.2f, 38.7f, -6.6f, 7.2f, + 10.11f, -12.13f, 77.15f, -1.5f, + 23.56f, 12.89f, 14.56f, -1.0f, + 12.3f, 0.0f, 4.4f, 5.5f, + }}}, + {{{ + 10.2f, 3.4f, 0.6f, 7.2f, + 10.11f, -12.13f, 14.15f, -1.5f, + 23.54f, 12.9f, 44.56f, -1.0f, + 2.3f, 0.0f, 4.4f, 5.5f, + }}}, + {{{ + 1.2f, 3.4f, -5.6f, 7.2f, + 10.11f, -12.13f, -14.5f, -1.5f, + 2.56f, 12.89f, 23.56f, -1.0f, + 112.3f, 0.0f, 4.4f, 2.5f, + }}}, + {{{ + 1.2f, 31.41f, 58.6f, 7.2f, + 10.11f, -12.13f, -14.5f, -1.5f, + 2.56f, 12.89f, 11.56f, -1.0f, + 112.3f, 0.0f, 44.4f, 2.5f, + }}}, + + {{{ + 1.20f, 3.4f, -5.6f, 7.0f, + 10.11f, -12.156f, -14.5f, -1.5f, + 2.56f, 1.829f, 23.6f, -1.0f, + 112.3f, 0.0f, 41.4f, 2.5f, + }}}, +}; + +static HRESULT transform_setup_handler(struct state_test *test) +{ + struct transform_context *ctx = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ctx)); + if (!ctx) return E_FAIL; + test->test_context = ctx; + + test->return_data = &ctx->return_data_buffer; + test->test_data_in = &transform_test_data; + test->test_data_out = &transform_test_data; + test->default_data = &transform_default_data; + test->initial_data = &transform_default_data; + test->poison_data = &transform_poison_data; + + test->data_size = sizeof(struct transform_data); + + return D3D_OK; +} + +static void transform_teardown_handler(struct state_test *test) +{ + HeapFree(GetProcessHeap(), 0, test->test_context); +} + +static void transform_queue_test(struct state_test *test) +{ + test->setup_handler = transform_setup_handler; + test->teardown_handler = transform_teardown_handler; + test->set_handler = transform_set_handler; + test->get_handler = transform_get_handler; + test->print_handler = transform_print_handler; + test->test_name = "set_get_transforms"; + test->test_arg = NULL; +} + +/* =================== State test: Render States ===================================== */ + +const D3DRENDERSTATETYPE render_state_indices[] = +{ + D3DRS_ZENABLE, + D3DRS_FILLMODE, + D3DRS_SHADEMODE, + D3DRS_ZWRITEENABLE, + D3DRS_ALPHATESTENABLE, + D3DRS_LASTPIXEL, + D3DRS_SRCBLEND, + D3DRS_DESTBLEND, + D3DRS_CULLMODE, + D3DRS_ZFUNC, + D3DRS_ALPHAREF, + D3DRS_ALPHAFUNC, + D3DRS_DITHERENABLE, + D3DRS_ALPHABLENDENABLE, + D3DRS_FOGENABLE, + D3DRS_SPECULARENABLE, + D3DRS_FOGCOLOR, + D3DRS_FOGTABLEMODE, + D3DRS_FOGSTART, + D3DRS_FOGEND, + D3DRS_FOGDENSITY, + D3DRS_RANGEFOGENABLE, + D3DRS_STENCILENABLE, + D3DRS_STENCILFAIL, + D3DRS_STENCILZFAIL, + D3DRS_STENCILPASS, + D3DRS_STENCILFUNC, + D3DRS_STENCILREF, + D3DRS_STENCILMASK, + D3DRS_STENCILWRITEMASK, + D3DRS_TEXTUREFACTOR, + D3DRS_WRAP0, + D3DRS_WRAP1, + D3DRS_WRAP2, + D3DRS_WRAP3, + D3DRS_WRAP4, + D3DRS_WRAP5, + D3DRS_WRAP6, + D3DRS_WRAP7, + D3DRS_CLIPPING, + D3DRS_LIGHTING, + D3DRS_AMBIENT, + D3DRS_FOGVERTEXMODE, + D3DRS_COLORVERTEX, + D3DRS_LOCALVIEWER, + D3DRS_NORMALIZENORMALS, + D3DRS_DIFFUSEMATERIALSOURCE, + D3DRS_SPECULARMATERIALSOURCE, + D3DRS_AMBIENTMATERIALSOURCE, + D3DRS_EMISSIVEMATERIALSOURCE, + D3DRS_VERTEXBLEND, + D3DRS_CLIPPLANEENABLE, +#if 0 /* Driver dependent, increase array size to enable */ + D3DRS_POINTSIZE, +#endif + D3DRS_POINTSIZE_MIN, + D3DRS_POINTSPRITEENABLE, + D3DRS_POINTSCALEENABLE, + D3DRS_POINTSCALE_A, + D3DRS_POINTSCALE_B, + D3DRS_POINTSCALE_C, + D3DRS_MULTISAMPLEANTIALIAS, + D3DRS_MULTISAMPLEMASK, + D3DRS_PATCHEDGESTYLE, + D3DRS_DEBUGMONITORTOKEN, + D3DRS_POINTSIZE_MAX, + D3DRS_INDEXEDVERTEXBLENDENABLE, + D3DRS_COLORWRITEENABLE, + D3DRS_TWEENFACTOR, + D3DRS_BLENDOP, +}; + +struct render_state_data +{ + DWORD states[sizeof(render_state_indices) / sizeof(*render_state_indices)]; +}; + +struct render_state_arg +{ + D3DPRESENT_PARAMETERS *device_pparams; + float pointsize_max; +}; + +struct render_state_context +{ + struct render_state_data return_data_buffer; + struct render_state_data default_data_buffer; + struct render_state_data test_data_buffer; + struct render_state_data poison_data_buffer; +}; + +static void render_state_set_handler(IDirect3DDevice8 *device, const struct state_test *test, const void *data) +{ + const struct render_state_data *rsdata = data; + unsigned int i; + HRESULT hr; + + for (i = 0; i < sizeof(render_state_indices) / sizeof(*render_state_indices); ++i) + { + hr = IDirect3DDevice8_SetRenderState(device, render_state_indices[i], rsdata->states[i]); + ok(SUCCEEDED(hr), "SetRenderState returned %#x.\n", hr); + } +} + +static void render_state_get_handler(IDirect3DDevice8 *device, const struct state_test *test, void *data) +{ + struct render_state_data* rsdata = data; + unsigned int i; + HRESULT hr; + + for (i = 0; i < sizeof(render_state_indices) / sizeof(*render_state_indices); ++i) + { + hr = IDirect3DDevice8_GetRenderState(device, render_state_indices[i], &rsdata->states[i]); + ok(SUCCEEDED(hr), "GetRenderState returned %#x.\n", hr); + } +} + +static void render_state_print_handler(const struct state_test *test, const void *data) +{ + const struct render_state_data *rsdata = data; + unsigned int i; + + for (i = 0; i < sizeof(render_state_indices) / sizeof(*render_state_indices); ++i) + { + trace("Index = %u, Value = %#x\n", i, rsdata->states[i]); + } +} + +static inline DWORD to_dword(float fl) +{ + union {float f; DWORD d;} ret; + + ret.f = fl; + return ret.d; +} + +static void render_state_default_data_init(const struct render_state_arg *rsarg, struct render_state_data *data) +{ + DWORD zenable = rsarg->device_pparams->EnableAutoDepthStencil ? D3DZB_TRUE : D3DZB_FALSE; + unsigned int idx = 0; + + data->states[idx++] = zenable; /* ZENABLE */ + data->states[idx++] = D3DFILL_SOLID; /* FILLMODE */ + data->states[idx++] = D3DSHADE_GOURAUD; /* SHADEMODE */ + data->states[idx++] = TRUE; /* ZWRITEENABLE */ + data->states[idx++] = FALSE; /* ALPHATESTENABLE */ + data->states[idx++] = TRUE; /* LASTPIXEL */ + data->states[idx++] = D3DBLEND_ONE; /* SRCBLEND */ + data->states[idx++] = D3DBLEND_ZERO; /* DESTBLEND */ + data->states[idx++] = D3DCULL_CCW; /* CULLMODE */ + data->states[idx++] = D3DCMP_LESSEQUAL; /* ZFUNC */ + data->states[idx++] = 0; /* ALPHAREF */ + data->states[idx++] = D3DCMP_ALWAYS; /* ALPHAFUNC */ + data->states[idx++] = FALSE; /* DITHERENABLE */ + data->states[idx++] = FALSE; /* ALPHABLENDENABLE */ + data->states[idx++] = FALSE; /* FOGENABLE */ + data->states[idx++] = FALSE; /* SPECULARENABLE */ + data->states[idx++] = 0; /* FOGCOLOR */ + data->states[idx++] = D3DFOG_NONE; /* FOGTABLEMODE */ + data->states[idx++] = to_dword(0.0f); /* FOGSTART */ + data->states[idx++] = to_dword(1.0f); /* FOGEND */ + data->states[idx++] = to_dword(1.0f); /* FOGDENSITY */ + data->states[idx++] = FALSE; /* RANGEFOGENABLE */ + data->states[idx++] = FALSE; /* STENCILENABLE */ + data->states[idx++] = D3DSTENCILOP_KEEP; /* STENCILFAIL */ + data->states[idx++] = D3DSTENCILOP_KEEP; /* STENCILZFAIL */ + data->states[idx++] = D3DSTENCILOP_KEEP; /* STENCILPASS */ + data->states[idx++] = D3DCMP_ALWAYS; /* STENCILFUNC */ + data->states[idx++] = 0; /* STENCILREF */ + data->states[idx++] = 0xFFFFFFFF; /* STENCILMASK */ + data->states[idx++] = 0xFFFFFFFF; /* STENCILWRITEMASK */ + data->states[idx++] = 0xFFFFFFFF; /* TEXTUREFACTOR */ + data->states[idx++] = 0; /* WRAP 0 */ + data->states[idx++] = 0; /* WRAP 1 */ + data->states[idx++] = 0; /* WRAP 2 */ + data->states[idx++] = 0; /* WRAP 3 */ + data->states[idx++] = 0; /* WRAP 4 */ + data->states[idx++] = 0; /* WRAP 5 */ + data->states[idx++] = 0; /* WRAP 6 */ + data->states[idx++] = 0; /* WRAP 7 */ + data->states[idx++] = TRUE; /* CLIPPING */ + data->states[idx++] = TRUE; /* LIGHTING */ + data->states[idx++] = 0; /* AMBIENT */ + data->states[idx++] = D3DFOG_NONE; /* FOGVERTEXMODE */ + data->states[idx++] = TRUE; /* COLORVERTEX */ + data->states[idx++] = TRUE; /* LOCALVIEWER */ + data->states[idx++] = FALSE; /* NORMALIZENORMALS */ + data->states[idx++] = D3DMCS_COLOR1; /* DIFFUSEMATERIALSOURCE */ + data->states[idx++] = D3DMCS_COLOR2; /* SPECULARMATERIALSOURCE */ + data->states[idx++] = D3DMCS_MATERIAL; /* AMBIENTMATERIALSOURCE */ + data->states[idx++] = D3DMCS_MATERIAL; /* EMISSIVEMATERIALSOURCE */ + data->states[idx++] = D3DVBF_DISABLE; /* VERTEXBLEND */ + data->states[idx++] = 0; /* CLIPPLANEENABLE */ + if (0) data->states[idx++] = to_dword(1.0f); /* POINTSIZE, driver dependent, increase array size to enable */ + data->states[idx++] = to_dword(0.0f); /* POINTSIZEMIN */ + data->states[idx++] = FALSE; /* POINTSPRITEENABLE */ + data->states[idx++] = FALSE; /* POINTSCALEENABLE */ + data->states[idx++] = to_dword(1.0f); /* POINTSCALE_A */ + data->states[idx++] = to_dword(0.0f); /* POINTSCALE_B */ + data->states[idx++] = to_dword(0.0f); /* POINTSCALE_C */ + data->states[idx++] = TRUE; /* MULTISAMPLEANTIALIAS */ + data->states[idx++] = 0xFFFFFFFF; /* MULTISAMPLEMASK */ + data->states[idx++] = D3DPATCHEDGE_DISCRETE; /* PATCHEDGESTYLE */ + data->states[idx++] = 0xbaadcafe; /* DEBUGMONITORTOKEN */ + data->states[idx++] = to_dword(rsarg->pointsize_max); /* POINTSIZE_MAX */ + data->states[idx++] = FALSE; /* INDEXEDVERTEXBLENDENABLE */ + data->states[idx++] = 0x0000000F; /* COLORWRITEENABLE */ + data->states[idx++] = to_dword(0.0f); /* TWEENFACTOR */ + data->states[idx++] = D3DBLENDOP_ADD; /* BLENDOP */ +} + +static void render_state_poison_data_init(struct render_state_data *data) +{ + unsigned int i; + + for (i = 0; i < sizeof(render_state_indices) / sizeof(*render_state_indices); ++i) + { + data->states[i] = 0x1337c0de; + } +} + +static void render_state_test_data_init(struct render_state_data *data) +{ + unsigned int idx = 0; + + data->states[idx++] = D3DZB_USEW; /* ZENABLE */ + data->states[idx++] = D3DFILL_WIREFRAME; /* FILLMODE */ + data->states[idx++] = D3DSHADE_PHONG; /* SHADEMODE */ + data->states[idx++] = FALSE; /* ZWRITEENABLE */ + data->states[idx++] = TRUE; /* ALPHATESTENABLE */ + data->states[idx++] = FALSE; /* LASTPIXEL */ + data->states[idx++] = D3DBLEND_SRCALPHASAT; /* SRCBLEND */ + data->states[idx++] = D3DBLEND_INVDESTALPHA; /* DESTBLEND */ + data->states[idx++] = D3DCULL_CW; /* CULLMODE */ + data->states[idx++] = D3DCMP_NOTEQUAL; /* ZFUNC */ + data->states[idx++] = 10; /* ALPHAREF */ + data->states[idx++] = D3DCMP_GREATER; /* ALPHAFUNC */ + data->states[idx++] = TRUE; /* DITHERENABLE */ + data->states[idx++] = TRUE; /* ALPHABLENDENABLE */ + data->states[idx++] = TRUE; /* FOGENABLE */ + data->states[idx++] = TRUE; /* SPECULARENABLE */ + data->states[idx++] = 255 << 31; /* FOGCOLOR */ + data->states[idx++] = D3DFOG_EXP; /* FOGTABLEMODE */ + data->states[idx++] = to_dword(0.1f); /* FOGSTART */ + data->states[idx++] = to_dword(0.8f); /* FOGEND */ + data->states[idx++] = to_dword(0.5f); /* FOGDENSITY */ + data->states[idx++] = TRUE; /* RANGEFOGENABLE */ + data->states[idx++] = TRUE; /* STENCILENABLE */ + data->states[idx++] = D3DSTENCILOP_INCRSAT; /* STENCILFAIL */ + data->states[idx++] = D3DSTENCILOP_REPLACE; /* STENCILZFAIL */ + data->states[idx++] = D3DSTENCILOP_INVERT; /* STENCILPASS */ + data->states[idx++] = D3DCMP_LESS; /* STENCILFUNC */ + data->states[idx++] = 10; /* STENCILREF */ + data->states[idx++] = 0xFF00FF00; /* STENCILMASK */ + data->states[idx++] = 0x00FF00FF; /* STENCILWRITEMASK */ + data->states[idx++] = 0xF0F0F0F0; /* TEXTUREFACTOR */ + data->states[idx++] = D3DWRAPCOORD_0 | D3DWRAPCOORD_2; /* WRAP 0 */ + data->states[idx++] = D3DWRAPCOORD_1 | D3DWRAPCOORD_3; /* WRAP 1 */ + data->states[idx++] = D3DWRAPCOORD_2 | D3DWRAPCOORD_3; /* WRAP 2 */ + data->states[idx++] = D3DWRAPCOORD_3 | D3DWRAPCOORD_0; /* WRAP 4 */ + data->states[idx++] = D3DWRAPCOORD_0 | D3DWRAPCOORD_1 | D3DWRAPCOORD_2; /* WRAP 5 */ + data->states[idx++] = D3DWRAPCOORD_1 | D3DWRAPCOORD_3 | D3DWRAPCOORD_2; /* WRAP 6 */ + data->states[idx++] = D3DWRAPCOORD_2 | D3DWRAPCOORD_1 | D3DWRAPCOORD_0; /* WRAP 7 */ + data->states[idx++] = D3DWRAPCOORD_1 | D3DWRAPCOORD_0 | D3DWRAPCOORD_2 | D3DWRAPCOORD_3; /* WRAP 8 */ + data->states[idx++] = FALSE; /* CLIPPING */ + data->states[idx++] = FALSE; /* LIGHTING */ + data->states[idx++] = 255 << 16; /* AMBIENT */ + data->states[idx++] = D3DFOG_EXP2; /* FOGVERTEXMODE */ + data->states[idx++] = FALSE; /* COLORVERTEX */ + data->states[idx++] = FALSE; /* LOCALVIEWER */ + data->states[idx++] = TRUE; /* NORMALIZENORMALS */ + data->states[idx++] = D3DMCS_COLOR2; /* DIFFUSEMATERIALSOURCE */ + data->states[idx++] = D3DMCS_MATERIAL; /* SPECULARMATERIALSOURCE */ + data->states[idx++] = D3DMCS_COLOR1; /* AMBIENTMATERIALSOURCE */ + data->states[idx++] = D3DMCS_COLOR2; /* EMISSIVEMATERIALSOURCE */ + data->states[idx++] = D3DVBF_3WEIGHTS; /* VERTEXBLEND */ + data->states[idx++] = 0xf1f1f1f1; /* CLIPPLANEENABLE */ + if (0) data->states[idx++] = to_dword(32.0f);/* POINTSIZE, driver dependent, increase array size to enable */ + data->states[idx++] = to_dword(0.7f); /* POINTSIZEMIN */ + data->states[idx++] = TRUE; /* POINTSPRITEENABLE */ + data->states[idx++] = TRUE; /* POINTSCALEENABLE */ + data->states[idx++] = to_dword(0.7f); /* POINTSCALE_A */ + data->states[idx++] = to_dword(0.5f); /* POINTSCALE_B */ + data->states[idx++] = to_dword(0.4f); /* POINTSCALE_C */ + data->states[idx++] = FALSE; /* MULTISAMPLEANTIALIAS */ + data->states[idx++] = 0xABCDDBCA; /* MULTISAMPLEMASK */ + data->states[idx++] = D3DPATCHEDGE_CONTINUOUS; /* PATCHEDGESTYLE */ + data->states[idx++] = D3DDMT_DISABLE; /* DEBUGMONITORTOKEN */ + data->states[idx++] = to_dword(77.0f); /* POINTSIZE_MAX */ + data->states[idx++] = TRUE; /* INDEXEDVERTEXBLENDENABLE */ + data->states[idx++] = 0x00000009; /* COLORWRITEENABLE */ + data->states[idx++] = to_dword(0.2f); /* TWEENFACTOR */ + data->states[idx++] = D3DBLENDOP_REVSUBTRACT;/* BLENDOP */ +} + +static HRESULT render_state_setup_handler(struct state_test *test) +{ + const struct render_state_arg *rsarg = test->test_arg; + + struct render_state_context *ctx = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ctx)); + if (!ctx) return E_FAIL; + test->test_context = ctx; + + test->return_data = &ctx->return_data_buffer; + test->default_data = &ctx->default_data_buffer; + test->initial_data = &ctx->default_data_buffer; + test->test_data_in = &ctx->test_data_buffer; + test->test_data_out = &ctx->test_data_buffer; + test->poison_data = &ctx->poison_data_buffer; + + render_state_default_data_init(rsarg, &ctx->default_data_buffer); + render_state_test_data_init(&ctx->test_data_buffer); + render_state_poison_data_init(&ctx->poison_data_buffer); + + test->data_size = sizeof(struct render_state_data); + + return D3D_OK; +} + +static void render_state_teardown_handler(struct state_test *test) +{ + HeapFree(GetProcessHeap(), 0, test->test_context); +} + +static void render_states_queue_test(struct state_test *test, const struct render_state_arg *test_arg) +{ + test->setup_handler = render_state_setup_handler; + test->teardown_handler = render_state_teardown_handler; + test->set_handler = render_state_set_handler; + test->get_handler = render_state_get_handler; + test->print_handler = render_state_print_handler; + test->test_name = "set_get_render_states"; + test->test_arg = test_arg; +} + +/* =================== Main state tests function =============================== */ + +static void test_state_management(IDirect3DDevice8 *device, D3DPRESENT_PARAMETERS *device_pparams) +{ + D3DCAPS8 caps; + HRESULT hr; + + /* Test count: 2 for shader constants + * 1 for lights + * 1 for transforms + * 1 for render states + */ + const int max_tests = 5; + struct state_test tests[5]; + unsigned int tcount = 0; + + struct shader_constant_arg pshader_constant_arg; + struct shader_constant_arg vshader_constant_arg; + struct render_state_arg render_state_arg; + struct light_arg light_arg; + + hr = IDirect3DDevice8_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "GetDeviceCaps returned %#x.\n", hr); + if (FAILED(hr)) return; + + texture_stages = caps.MaxTextureBlendStages; + + /* Zero test memory */ + memset(tests, 0, max_tests * sizeof(*tests)); + + if (caps.VertexShaderVersion & 0xffff) + { + vshader_constant_arg.idx = 0; + vshader_constant_arg.pshader = FALSE; + shader_constants_queue_test(&tests[tcount++], &vshader_constant_arg); + } + + if (caps.PixelShaderVersion & 0xffff) + { + pshader_constant_arg.idx = 0; + pshader_constant_arg.pshader = TRUE; + shader_constants_queue_test(&tests[tcount++], &pshader_constant_arg); + } + + light_arg.idx = 0; + lights_queue_test(&tests[tcount++], &light_arg); + + transform_queue_test(&tests[tcount++]); + + render_state_arg.device_pparams = device_pparams; + render_state_arg.pointsize_max = caps.MaxPointSize; + render_states_queue_test(&tests[tcount++], &render_state_arg); + + execute_test_chain_all(device, tests, tcount); +} + +static void test_shader_constant_apply(IDirect3DDevice8 *device) +{ + static const float initial[] = {0.0f, 0.0f, 0.0f, 0.0f}; + static const float vs_const[] = {1.0f, 2.0f, 3.0f, 4.0f}; + static const float ps_const[] = {5.0f, 6.0f, 7.0f, 8.0f}; + DWORD stateblock; + float ret[4]; + HRESULT hr; + + hr = IDirect3DDevice8_SetVertexShaderConstant(device, 0, initial, 1); + ok(SUCCEEDED(hr), "SetVertexShaderConstant returned %#x\n", hr); + hr = IDirect3DDevice8_SetVertexShaderConstant(device, 1, initial, 1); + ok(SUCCEEDED(hr), "SetVertexShaderConstant returned %#x\n", hr); + hr = IDirect3DDevice8_SetPixelShaderConstant(device, 0, initial, 1); + ok(SUCCEEDED(hr), "SetPixelShaderConstant returned %#x\n", hr); + hr = IDirect3DDevice8_SetPixelShaderConstant(device, 1, initial, 1); + ok(SUCCEEDED(hr), "SetPixelShaderConstant returned %#x\n", hr); + + hr = IDirect3DDevice8_GetVertexShaderConstant(device, 0, ret, 1); + ok(SUCCEEDED(hr), "GetVertexShaderConstant returned %#x\n", hr); + ok(!memcmp(ret, initial, sizeof(initial)), + "GetVertexShaderConstant got {%f, %f, %f, %f}, expected {%f, %f, %f, %f}\n", + ret[0], ret[1], ret[2], ret[3], initial[0], initial[1], initial[2], initial[3]); + hr = IDirect3DDevice8_GetVertexShaderConstant(device, 1, ret, 1); + ok(SUCCEEDED(hr), "GetVertexShaderConstant returned %#x\n", hr); + ok(!memcmp(ret, initial, sizeof(initial)), + "GetVertexShaderConstant got {%f, %f, %f, %f}, expected {%f, %f, %f, %f}\n", + ret[0], ret[1], ret[2], ret[3], initial[0], initial[1], initial[2], initial[3]); + hr = IDirect3DDevice8_GetPixelShaderConstant(device, 0, ret, 1); + ok(SUCCEEDED(hr), "GetPixelShaderConstant returned %#x\n", hr); + ok(!memcmp(ret, initial, sizeof(initial)), + "GetpixelShaderConstant got {%f, %f, %f, %f}, expected {%f, %f, %f, %f}\n", + ret[0], ret[1], ret[2], ret[3], initial[0], initial[1], initial[2], initial[3]); + hr = IDirect3DDevice8_GetPixelShaderConstant(device, 1, ret, 1); + ok(SUCCEEDED(hr), "GetPixelShaderConstant returned %#x\n", hr); + ok(!memcmp(ret, initial, sizeof(initial)), + "GetPixelShaderConstant got {%f, %f, %f, %f}, expected {%f, %f, %f, %f}\n", + ret[0], ret[1], ret[2], ret[3], initial[0], initial[1], initial[2], initial[3]); + + hr = IDirect3DDevice8_SetVertexShaderConstant(device, 0, vs_const, 1); + ok(SUCCEEDED(hr), "SetVertexShaderConstant returned %#x\n", hr); + hr = IDirect3DDevice8_SetPixelShaderConstant(device, 0, ps_const, 1); + ok(SUCCEEDED(hr), "SetPixelShaderConstant returned %#x\n", hr); + + hr = IDirect3DDevice8_BeginStateBlock(device); + ok(SUCCEEDED(hr), "BeginStateBlock returned %#x\n", hr); + + hr = IDirect3DDevice8_SetVertexShaderConstant(device, 1, vs_const, 1); + ok(SUCCEEDED(hr), "SetVertexShaderConstant returned %#x\n", hr); + hr = IDirect3DDevice8_SetPixelShaderConstant(device, 1, ps_const, 1); + ok(SUCCEEDED(hr), "SetPixelShaderConstant returned %#x\n", hr); + + hr = IDirect3DDevice8_EndStateBlock(device, &stateblock); + ok(SUCCEEDED(hr), "EndStateBlock returned %#x\n", hr); + + hr = IDirect3DDevice8_GetVertexShaderConstant(device, 0, ret, 1); + ok(SUCCEEDED(hr), "GetVertexShaderConstant returned %#x\n", hr); + ok(!memcmp(ret, vs_const, sizeof(vs_const)), + "GetVertexShaderConstant got {%f, %f, %f, %f}, expected {%f, %f, %f, %f}\n", + ret[0], ret[1], ret[2], ret[3], vs_const[0], vs_const[1], vs_const[2], vs_const[3]); + hr = IDirect3DDevice8_GetVertexShaderConstant(device, 1, ret, 1); + ok(SUCCEEDED(hr), "GetVertexShaderConstant returned %#x\n", hr); + ok(!memcmp(ret, initial, sizeof(initial)), + "GetVertexShaderConstant got {%f, %f, %f, %f}, expected {%f, %f, %f, %f}\n", + ret[0], ret[1], ret[2], ret[3], initial[0], initial[1], initial[2], initial[3]); + hr = IDirect3DDevice8_GetPixelShaderConstant(device, 0, ret, 1); + ok(SUCCEEDED(hr), "GetPixelShaderConstant returned %#x\n", hr); + ok(!memcmp(ret, ps_const, sizeof(ps_const)), + "GetPixelShaderConstant got {%f, %f, %f, %f}, expected {%f, %f, %f, %f}\n", + ret[0], ret[1], ret[2], ret[3], ps_const[0], ps_const[1], ps_const[2], ps_const[3]); + hr = IDirect3DDevice8_GetPixelShaderConstant(device, 1, ret, 1); + ok(SUCCEEDED(hr), "GetPixelShaderConstant returned %#x\n", hr); + ok(!memcmp(ret, initial, sizeof(initial)), + "GetPixelShaderConstant got {%f, %f, %f, %f}, expected {%f, %f, %f, %f}\n", + ret[0], ret[1], ret[2], ret[3], initial[0], initial[1], initial[2], initial[3]); + + hr = IDirect3DDevice8_ApplyStateBlock(device, stateblock); + ok(SUCCEEDED(hr), "Apply returned %#x\n", hr); + + /* Apply doesn't overwrite constants that aren't explicitly set on the source stateblock. */ + hr = IDirect3DDevice8_GetVertexShaderConstant(device, 0, ret, 1); + ok(SUCCEEDED(hr), "GetVertexShaderConstant returned %#x\n", hr); + ok(!memcmp(ret, vs_const, sizeof(vs_const)), + "GetVertexShaderConstant got {%f, %f, %f, %f}, expected {%f, %f, %f, %f}\n", + ret[0], ret[1], ret[2], ret[3], vs_const[0], vs_const[1], vs_const[2], vs_const[3]); + hr = IDirect3DDevice8_GetVertexShaderConstant(device, 1, ret, 1); + ok(SUCCEEDED(hr), "GetVertexShaderConstant returned %#x\n", hr); + ok(!memcmp(ret, vs_const, sizeof(vs_const)), + "GetVertexShaderConstant got {%f, %f, %f, %f}, expected {%f, %f, %f, %f}\n", + ret[0], ret[1], ret[2], ret[3], vs_const[0], vs_const[1], vs_const[2], vs_const[3]); + hr = IDirect3DDevice8_GetPixelShaderConstant(device, 0, ret, 1); + ok(SUCCEEDED(hr), "GetPixelShaderConstant returned %#x\n", hr); + ok(!memcmp(ret, ps_const, sizeof(ps_const)), + "GetPixelShaderConstant got {%f, %f, %f, %f}, expected {%f, %f, %f, %f}\n", + ret[0], ret[1], ret[2], ret[3], ps_const[0], ps_const[1], ps_const[2], ps_const[3]); + hr = IDirect3DDevice8_GetPixelShaderConstant(device, 1, ret, 1); + ok(SUCCEEDED(hr), "GetPixelShaderConstant returned %#x\n", hr); + ok(!memcmp(ret, ps_const, sizeof(ps_const)), + "GetPixelShaderConstant got {%f, %f, %f, %f}, expected {%f, %f, %f, %f}\n", + ret[0], ret[1], ret[2], ret[3], ps_const[0], ps_const[1], ps_const[2], ps_const[3]); + + IDirect3DDevice8_DeleteStateBlock(device, stateblock); +} + +START_TEST(stateblock) +{ + IDirect3DDevice8 *device = NULL; + D3DPRESENT_PARAMETERS device_pparams; + HMODULE d3d8_module; + ULONG refcount; + HRESULT hr; + + d3d8_module = LoadLibraryA("d3d8.dll"); + if (!d3d8_module) + { + skip("Could not load d3d8.dll\n"); + return; + } + + hr = init_d3d8(d3d8_module, &device, &device_pparams); + if (FAILED(hr)) + { + FreeLibrary(d3d8_module); + return; + } + + test_begin_end_state_block(device); + test_state_management(device, &device_pparams); + test_shader_constant_apply(device); + + refcount = IDirect3DDevice8_Release(device); + ok(!refcount, "Device has %u references left\n", refcount); + + FreeLibrary(d3d8_module); +} diff --git a/dlls/d3d8/tests/surface.c b/dlls/d3d8/tests/surface.c index e1e65b0bf05..4cb2350bc5e 100644 --- a/dlls/d3d8/tests/surface.c +++ b/dlls/d3d8/tests/surface.c @@ -324,6 +324,7 @@ START_TEST(surface) { HMODULE d3d8_handle; IDirect3DDevice8 *device_ptr; + ULONG refcount; d3d8_handle = LoadLibraryA("d3d8.dll"); if (!d3d8_handle) @@ -339,4 +340,7 @@ START_TEST(surface) test_surface_get_container(device_ptr); test_lockrect_invalid(device_ptr); test_private_data(device_ptr); + + refcount = IDirect3DDevice8_Release(device_ptr); + ok(!refcount, "Device has %u references left\n", refcount); } diff --git a/dlls/d3d8/tests/texture.c b/dlls/d3d8/tests/texture.c index fd97eac8fb8..1475de14558 100644 --- a/dlls/d3d8/tests/texture.c +++ b/dlls/d3d8/tests/texture.c @@ -135,6 +135,7 @@ START_TEST(texture) D3DCAPS8 caps; HMODULE d3d8_handle; IDirect3DDevice8 *device_ptr; + ULONG refcount; d3d8_handle = LoadLibraryA("d3d8.dll"); if (!d3d8_handle) @@ -150,4 +151,7 @@ START_TEST(texture) test_texture_stage_states(device_ptr, caps.MaxTextureBlendStages); test_cube_textures(device_ptr, caps.TextureCaps); + + refcount = IDirect3DDevice8_Release(device_ptr); + ok(!refcount, "Device has %u references left\n", refcount); } diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index 8f853c179b4..9b2b968c4ac 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -1345,8 +1345,11 @@ START_TEST(visual) cleanup: if(device_ptr) { D3DDEVICE_CREATION_PARAMETERS creation_parameters; + ULONG refcount; + IDirect3DDevice8_GetCreationParameters(device_ptr, &creation_parameters); - IDirect3DDevice8_Release(device_ptr); + refcount = IDirect3DDevice8_Release(device_ptr); + ok(!refcount, "Device has %u references left\n", refcount); DestroyWindow(creation_parameters.hFocusWindow); } } diff --git a/dlls/d3d8/tests/volume.c b/dlls/d3d8/tests/volume.c index ee431401bb1..f2948921bc4 100644 --- a/dlls/d3d8/tests/volume.c +++ b/dlls/d3d8/tests/volume.c @@ -128,6 +128,7 @@ START_TEST(volume) { HMODULE d3d8_handle; IDirect3DDevice8 *device_ptr; + ULONG refcount; D3DCAPS8 caps; d3d8_handle = LoadLibraryA("d3d8.dll"); @@ -147,4 +148,7 @@ START_TEST(volume) } test_volume_get_container(device_ptr); + + refcount = IDirect3DDevice8_Release(device_ptr); + ok(!refcount, "Device has %u references left\n", refcount); } diff --git a/dlls/d3d9/cubetexture.c b/dlls/d3d9/cubetexture.c index bf889954424..aeb88939541 100644 --- a/dlls/d3d9/cubetexture.c +++ b/dlls/d3d9/cubetexture.c @@ -348,7 +348,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9EX ifac object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (NULL == object) { - FIXME("(%p) allocation of CubeTexture failed\n", This); + ERR("(%p) allocation of CubeTexture failed\n", This); return D3DERR_OUTOFVIDEOMEMORY; } object->lpVtbl = &Direct3DCubeTexture9_Vtbl; @@ -362,7 +362,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9EX ifac if (hr != D3D_OK){ /* free up object */ - FIXME("(%p) call to IWineD3DDevice_CreateCubeTexture failed\n", This); + WARN("(%p) call to IWineD3DDevice_CreateCubeTexture failed\n", This); HeapFree(GetProcessHeap(), 0, object); } else { IDirect3DDevice9Ex_AddRef(iface); diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 693b82f7d9e..9133fad47ae 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1333,7 +1333,16 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetFVF(LPDIRECT3DDEVICE9EX iface, DWO return hr; } - *pFVF = ((IDirect3DVertexDeclaration9Impl *)decl)->convFVF; + if (decl) + { + *pFVF = ((IDirect3DVertexDeclaration9Impl *)decl)->convFVF; + IDirect3DVertexDeclaration9_Release(decl); + } + else + { + *pFVF = 0; + } + TRACE("Returning FVF %#x\n", *pFVF); return hr; diff --git a/dlls/d3d9/pixelshader.c b/dlls/d3d9/pixelshader.c index 059116aa808..dddda28e76a 100644 --- a/dlls/d3d9/pixelshader.c +++ b/dlls/d3d9/pixelshader.c @@ -170,11 +170,21 @@ HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(LPDIRECT3DDEVICE9EX iface, ID EnterCriticalSection(&d3d9_cs); hrc = IWineD3DDevice_GetPixelShader(This->WineD3DDevice, &object); - if (hrc == D3D_OK && object != NULL) { - hrc = IWineD3DPixelShader_GetParent(object, (IUnknown **)ppShader); - IWineD3DPixelShader_Release(object); - } else { - *ppShader = NULL; + if (SUCCEEDED(hrc)) + { + if (object) + { + hrc = IWineD3DPixelShader_GetParent(object, (IUnknown **)ppShader); + IWineD3DPixelShader_Release(object); + } + else + { + *ppShader = NULL; + } + } + else + { + WARN("(%p) : Call to IWineD3DDevice_GetPixelShader failed %u (device %p)\n", This, hrc, This->WineD3DDevice); } LeaveCriticalSection(&d3d9_cs); diff --git a/dlls/d3d9/query.c b/dlls/d3d9/query.c index 9a15164af17..6e4b20a41eb 100644 --- a/dlls/d3d9/query.c +++ b/dlls/d3d9/query.c @@ -163,7 +163,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(LPDIRECT3DDEVICE9EX iface, D3DQU /* Allocate the storage for the device */ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DQuery9Impl)); if (NULL == object) { - FIXME("Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY\n"); + ERR("Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY\n"); return D3DERR_OUTOFVIDEOMEMORY; } @@ -176,7 +176,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(LPDIRECT3DDEVICE9EX iface, D3DQU if (FAILED(hr)) { /* free up object */ - FIXME("(%p) call to IWineD3DDevice_CreateQuery failed\n", This); + WARN("(%p) call to IWineD3DDevice_CreateQuery failed\n", This); HeapFree(GetProcessHeap(), 0, object); } else { IDirect3DDevice9Ex_AddRef(iface); diff --git a/dlls/d3d9/stateblock.c b/dlls/d3d9/stateblock.c index 30b42c51adc..bf3f59800c5 100644 --- a/dlls/d3d9/stateblock.c +++ b/dlls/d3d9/stateblock.c @@ -175,7 +175,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(LPDIRECT3DDEVICE9EX iface, I hr=IWineD3DDevice_EndStateBlock(This->WineD3DDevice,&wineD3DStateBlock); LeaveCriticalSection(&d3d9_cs); if(hr!= D3D_OK){ - FIXME("IWineD3DDevice_EndStateBlock returned an error\n"); + WARN("IWineD3DDevice_EndStateBlock returned an error\n"); return hr; } /* allocate a new IDirectD3DStateBlock */ diff --git a/dlls/d3d9/surface.c b/dlls/d3d9/surface.c index bdede777c9b..394d52786af 100644 --- a/dlls/d3d9/surface.c +++ b/dlls/d3d9/surface.c @@ -263,7 +263,10 @@ static HRESULT WINAPI IDirect3DSurface9Impl_ReleaseDC(LPDIRECT3DSURFACE9 iface, EnterCriticalSection(&d3d9_cs); hr = IWineD3DSurface_ReleaseDC(This->wineD3DSurface, hdc); LeaveCriticalSection(&d3d9_cs); - return hr; + switch(hr) { + case WINEDDERR_NODC: return WINED3DERR_INVALIDCALL; + default: return hr; + } } diff --git a/dlls/d3d9/tests/shader.c b/dlls/d3d9/tests/shader.c index 3d808837606..e1ad9bb9666 100644 --- a/dlls/d3d9/tests/shader.c +++ b/dlls/d3d9/tests/shader.c @@ -110,6 +110,9 @@ static void test_get_set_vertex_shader(IDirect3DDevice9 *device_ptr) ok(hret == D3D_OK && shader_refcount == i && current_shader_ptr == shader_ptr, "GetVertexShader returned: hret 0x%x, current_shader_ptr %p refcount %d. " "Expected hret 0x%x, current_shader_ptr %p, refcount %d.\n", hret, current_shader_ptr, shader_refcount, D3D_OK, shader_ptr, i); + IDirect3DVertexShader9_Release(current_shader_ptr); + + IDirect3DVertexShader9_Release(shader_ptr); } static void test_vertex_shader_constant(IDirect3DDevice9 *device_ptr, DWORD consts) @@ -174,6 +177,9 @@ static void test_get_set_pixel_shader(IDirect3DDevice9 *device_ptr) ok(hret == D3D_OK && shader_refcount == i && current_shader_ptr == shader_ptr, "GetPixelShader returned: hret 0x%x, current_shader_ptr %p refcount %d. " "Expected hret 0x%x, current_shader_ptr %p, refcount %d.\n", hret, current_shader_ptr, shader_refcount, D3D_OK, shader_ptr, i); + IDirect3DPixelShader9_Release(current_shader_ptr); + + IDirect3DPixelShader9_Release(shader_ptr); } static void test_pixel_shader_constant(IDirect3DDevice9 *device_ptr) @@ -207,6 +213,7 @@ START_TEST(shader) { D3DCAPS9 caps; IDirect3DDevice9 *device_ptr; + ULONG refcount; d3d9_handle = LoadLibraryA("d3d9.dll"); if (!d3d9_handle) @@ -234,4 +241,7 @@ START_TEST(shader) test_pixel_shader_constant(device_ptr); } else skip("No pixel shader support\n"); + + refcount = IDirect3DDevice9_Release(device_ptr); + ok(!refcount, "Device has %u references left\n", refcount); } diff --git a/dlls/d3d9/tests/stateblock.c b/dlls/d3d9/tests/stateblock.c index f8ee57dfd09..42e3bdf5487 100644 --- a/dlls/d3d9/tests/stateblock.c +++ b/dlls/d3d9/tests/stateblock.c @@ -63,7 +63,7 @@ static HRESULT init_d3d9( device_pparams->hDeviceWindow = window; device_pparams->SwapEffect = D3DSWAPEFFECT_DISCARD; - hres = IDirect3D9_CreateDevice(d3d9_ptr, D3DADAPTER_DEFAULT, D3DDEVTYPE_NULLREF, window, + hres = IDirect3D9_CreateDevice(d3d9_ptr, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, window, D3DCREATE_SOFTWARE_VERTEXPROCESSING, device_pparams, device); ok(hres == D3D_OK || hres == D3DERR_NOTAVAILABLE, "IDirect3D_CreateDevice returned: 0x%x\n", hres); @@ -91,6 +91,7 @@ static void test_begin_end_state_block(IDirect3DDevice9 *device_ptr) ok(hret == D3D_OK && state_block_ptr != 0 && state_block_ptr != (IDirect3DStateBlock9 *)0xdeadbeef, "EndStateBlock returned: hret 0x%x, state_block_ptr %p. " "Expected hret 0x%x, state_block_ptr != %p, state_block_ptr != 0xdeadbeef.\n", hret, state_block_ptr, D3D_OK, NULL); + IDirect3DStateBlock9_Release(state_block_ptr); /* Calling EndStateBlock while not recording should return D3DERR_INVALIDCALL. state_block_ptr should not be touched. */ state_block_ptr = (IDirect3DStateBlock9 *)0xdeadbeef; @@ -1072,6 +1073,7 @@ typedef struct render_state_data { typedef struct render_state_arg { D3DPRESENT_PARAMETERS* device_pparams; + float pointsize_max; } render_state_arg; typedef struct render_state_context { @@ -1122,14 +1124,12 @@ static inline DWORD to_dword(float fl) { return *((DWORD*) &fl); } -static void render_state_default_data_init( - D3DPRESENT_PARAMETERS* device_pparams, - render_state_data* data) { - +static void render_state_default_data_init(const struct render_state_arg *rsarg, struct render_state_data *data) +{ + DWORD zenable = rsarg->device_pparams->EnableAutoDepthStencil ? D3DZB_TRUE : D3DZB_FALSE; unsigned int idx = 0; - data->states[idx++] = device_pparams->EnableAutoDepthStencil? - D3DZB_TRUE : D3DZB_FALSE; /* ZENABLE */ + data->states[idx++] = zenable; /* ZENABLE */ data->states[idx++] = D3DFILL_SOLID; /* FILLMODE */ data->states[idx++] = D3DSHADE_GOURAUD; /* SHADEMODE */ data->states[idx++] = TRUE; /* ZWRITEENABLE */ @@ -1194,7 +1194,7 @@ static void render_state_default_data_init( data->states[idx++] = 0xFFFFFFFF; /* MULTISAMPLEMASK */ data->states[idx++] = D3DPATCHEDGE_DISCRETE; /* PATCHEDGESTYLE */ data->states[idx++] = 0xbaadcafe; /* DEBUGMONITORTOKEN */ - data->states[idx++] = to_dword(64.0f); /* POINTSIZE_MAX */ + data->states[idx++] = to_dword(rsarg->pointsize_max); /* POINTSIZE_MAX */ data->states[idx++] = FALSE; /* INDEXEDVERTEXBLENDENABLE */ data->states[idx++] = 0x0000000F; /* COLORWRITEENABLE */ data->states[idx++] = to_dword(0.0f); /* TWEENFACTOR */ @@ -1371,7 +1371,7 @@ static HRESULT render_state_setup_handler( test->test_data_out = &ctx->test_data_buffer; test->poison_data = &ctx->poison_data_buffer; - render_state_default_data_init(rsarg->device_pparams, &ctx->default_data_buffer); + render_state_default_data_init(rsarg, &ctx->default_data_buffer); render_state_test_data_init(&ctx->test_data_buffer); render_state_poison_data_init(&ctx->poison_data_buffer); @@ -1453,6 +1453,7 @@ static void test_state_management( tcount++; render_state_arg.device_pparams = device_pparams; + render_state_arg.pointsize_max = caps.MaxPointSize; render_states_queue_test(&tests[tcount], &render_state_arg); tcount++; @@ -1583,5 +1584,9 @@ START_TEST(stateblock) test_state_management(device_ptr, &device_pparams); test_shader_constant_apply(device_ptr); - if (device_ptr) IUnknown_Release(device_ptr); + if (device_ptr) + { + ULONG refcount = IDirect3DDevice9_Release(device_ptr); + ok(!refcount, "Device has %u references left\n", refcount); + } } diff --git a/dlls/d3d9/tests/surface.c b/dlls/d3d9/tests/surface.c index eed45c30eae..ea9c0c1d2b6 100644 --- a/dlls/d3d9/tests/surface.c +++ b/dlls/d3d9/tests/surface.c @@ -382,6 +382,7 @@ START_TEST(surface) { HMODULE d3d9_handle; IDirect3DDevice9 *device_ptr; + ULONG refcount; d3d9_handle = LoadLibraryA("d3d9.dll"); if (!d3d9_handle) @@ -398,4 +399,7 @@ START_TEST(surface) test_lockrect_offset(device_ptr); test_lockrect_invalid(device_ptr); test_private_data(device_ptr); + + refcount = IDirect3DDevice9_Release(device_ptr); + ok(!refcount, "Device has %u references left\n", refcount); } diff --git a/dlls/d3d9/tests/texture.c b/dlls/d3d9/tests/texture.c index ede9467d992..86132b70d51 100644 --- a/dlls/d3d9/tests/texture.c +++ b/dlls/d3d9/tests/texture.c @@ -321,6 +321,7 @@ static void test_filter(IDirect3DDevice9 *device) { } hr = IDirect3DDevice9_SetTexture(device, 0, NULL); + IDirect3DTexture9_Release(texture); out: IDirect3D9_Release(d3d9); @@ -342,6 +343,7 @@ START_TEST(texture) D3DCAPS9 caps; HMODULE d3d9_handle; IDirect3DDevice9 *device_ptr; + ULONG refcount; d3d9_handle = LoadLibraryA("d3d9.dll"); if (!d3d9_handle) @@ -360,4 +362,7 @@ START_TEST(texture) test_mipmap_gen(device_ptr); test_filter(device_ptr); test_gettexture(device_ptr); + + refcount = IDirect3DDevice9_Release(device_ptr); + ok(!refcount, "Device has %u references left\n", refcount); } diff --git a/dlls/d3d9/tests/vertexdeclaration.c b/dlls/d3d9/tests/vertexdeclaration.c index 36d22b46bbc..4207cbeecd6 100644 --- a/dlls/d3d9/tests/vertexdeclaration.c +++ b/dlls/d3d9/tests/vertexdeclaration.c @@ -183,6 +183,7 @@ static void test_get_set_vertex_declaration(IDirect3DDevice9 *device_ptr, IDirec ok(hret == D3D_OK && decl_refcount == i && current_decl_ptr == decl_ptr, "GetVertexDeclaration returned: hret 0x%x, current_decl_ptr %p refcount %d. " "Expected hret 0x%x, current_decl_ptr %p, refcount %d.\n", hret, current_decl_ptr, decl_refcount, D3D_OK, decl_ptr, i); + IDirect3DVertexDeclaration9_Release(current_decl_ptr); } static void test_get_declaration(IDirect3DVertexDeclaration9 *decl_ptr, D3DVERTEXELEMENT9 *vertex_decl, UINT expected_num_elements) @@ -454,6 +455,11 @@ static void test_fvf_decl_conversion(IDirect3DDevice9 *pDevice) } { CONST D3DVERTEXELEMENT9 test_buffer[] = + { { 0, 0, D3DDECLTYPE_FLOAT4, 0, D3DDECLUSAGE_POSITION, 0 }, D3DDECL_END() }; + VDECL_CHECK(test_fvf_to_decl(pDevice, default_decl, D3DFVF_XYZW, test_buffer, 1)); + } + { + CONST D3DVERTEXELEMENT9 test_buffer[] = { { 0, 0, D3DDECLTYPE_FLOAT4, 0, D3DDECLUSAGE_POSITIONT, 0 }, D3DDECL_END() }; VDECL_CHECK(test_fvf_to_decl(pDevice, default_decl, D3DFVF_XYZRHW, test_buffer, 1)); } @@ -847,6 +853,7 @@ START_TEST(vertexdeclaration) UINT simple_decl_num_elements = sizeof(simple_decl) / sizeof(*simple_decl); IDirect3DDevice9 *device_ptr = 0; IDirect3DVertexDeclaration9 *decl_ptr = 0; + ULONG refcount; d3d9_handle = LoadLibraryA("d3d9.dll"); if (!d3d9_handle) @@ -875,4 +882,9 @@ START_TEST(vertexdeclaration) test_fvf_decl_management(device_ptr); test_vertex_declaration_alignment(device_ptr); test_unused_type(device_ptr); + + IDirect3DVertexDeclaration9_Release(decl_ptr); + + refcount = IDirect3DDevice9_Release(device_ptr); + ok(!refcount, "Device has %u references left\n", refcount); } diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 9bcb42f6c9b..5574313768b 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -7937,7 +7937,7 @@ static void fixed_function_bumpmap_test(IDirect3DDevice9 *device) * green: 0.5 * (0.25 * 2.0 + 0.1) = 0.5 * 0.6 = 0.3 = 0x4c * green: 0.75 * (0.25 * 2.0 + 0.1) = 0.75 * 0.6 = 0.45 = 0x72 */ - ok(color_match(color, 0x00994c72, 3), "bumpmap failed: Got color 0x%08x, expected 0x00994c72.\n", color); + ok(color_match(color, 0x00994c72, 5), "bumpmap failed: Got color 0x%08x, expected 0x00994c72.\n", color); /* Check a result scale factor > 1.0 */ scale = 10; diff --git a/dlls/d3d9/tests/volume.c b/dlls/d3d9/tests/volume.c index 8b070729ea4..38ea5011c78 100644 --- a/dlls/d3d9/tests/volume.c +++ b/dlls/d3d9/tests/volume.c @@ -125,6 +125,7 @@ START_TEST(volume) { HMODULE d3d9_handle; IDirect3DDevice9 *device_ptr; + ULONG refcount; D3DCAPS9 caps; memset(&caps, 0, sizeof(caps)); @@ -145,4 +146,7 @@ START_TEST(volume) } test_volume_get_container(device_ptr); + + refcount = IDirect3DDevice9_Release(device_ptr); + ok(!refcount, "Device has %u references left\n", refcount); } diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c index 71e1be3ebad..9c507efb030 100644 --- a/dlls/d3d9/texture.c +++ b/dlls/d3d9/texture.c @@ -339,7 +339,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9EX iface, U object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DTexture9Impl)); if (NULL == object) { - FIXME("Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY\n"); + ERR("Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY\n"); return D3DERR_OUTOFVIDEOMEMORY; } @@ -353,7 +353,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9EX iface, U if (FAILED(hrc)) { /* free up object */ - FIXME("(%p) call to IWineD3DDevice_CreateTexture failed\n", This); + WARN("(%p) call to IWineD3DDevice_CreateTexture failed\n", This); HeapFree(GetProcessHeap(), 0, object); } else { IDirect3DDevice9Ex_AddRef(iface); diff --git a/dlls/d3d9/vertexdeclaration.c b/dlls/d3d9/vertexdeclaration.c index 4631248a0f1..86403fd9fc3 100644 --- a/dlls/d3d9/vertexdeclaration.c +++ b/dlls/d3d9/vertexdeclaration.c @@ -96,6 +96,10 @@ HRESULT vdecl_convert_fvf( elements[idx].Type = D3DDECLTYPE_FLOAT4; elements[idx].Usage = D3DDECLUSAGE_POSITIONT; } + else if (!has_blend && (fvf & D3DFVF_XYZW) == D3DFVF_XYZW) { + elements[idx].Type = D3DDECLTYPE_FLOAT4; + elements[idx].Usage = D3DDECLUSAGE_POSITION; + } else { elements[idx].Type = D3DDECLTYPE_FLOAT3; elements[idx].Usage = D3DDECLUSAGE_POSITION; diff --git a/dlls/d3d9/vertexshader.c b/dlls/d3d9/vertexshader.c index 61722255004..6478b68656f 100644 --- a/dlls/d3d9/vertexshader.c +++ b/dlls/d3d9/vertexshader.c @@ -166,11 +166,20 @@ HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(LPDIRECT3DDEVICE9EX iface, I TRACE("(%p) : Relay device@%p\n", This, This->WineD3DDevice); EnterCriticalSection(&d3d9_cs); hrc = IWineD3DDevice_GetVertexShader(This->WineD3DDevice, &pShader); - if(hrc == D3D_OK && pShader != NULL){ - hrc = IWineD3DVertexShader_GetParent(pShader, (IUnknown **)ppShader); - IWineD3DVertexShader_Release(pShader); - } else { - *ppShader = NULL; + if (SUCCEEDED(hrc)) + { + if (pShader) + { + hrc = IWineD3DVertexShader_GetParent(pShader, (IUnknown **)ppShader); + IWineD3DVertexShader_Release(pShader); + } + else + { + *ppShader = NULL; + } + } + else + { WARN("(%p) : Call to IWineD3DDevice_GetVertexShader failed %u (device %p)\n", This, hrc, This->WineD3DDevice); } LeaveCriticalSection(&d3d9_cs); diff --git a/dlls/d3d9/volumetexture.c b/dlls/d3d9/volumetexture.c index 3069771f7fd..303675b96c8 100644 --- a/dlls/d3d9/volumetexture.c +++ b/dlls/d3d9/volumetexture.c @@ -252,7 +252,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9EX if /* Allocate the storage for the device */ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DVolumeTexture9Impl)); if (NULL == object) { - FIXME("(%p) allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY\n", This); + ERR("(%p) allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY\n", This); return D3DERR_OUTOFVIDEOMEMORY; } @@ -266,7 +266,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9EX if if (hrc != D3D_OK) { /* free up object */ - FIXME("(%p) call to IWineD3DDevice_CreateVolumeTexture failed\n", This); + WARN("(%p) call to IWineD3DDevice_CreateVolumeTexture failed\n", This); HeapFree(GetProcessHeap(), 0, object); } else { IDirect3DDevice9Ex_AddRef(iface); diff --git a/dlls/d3dxof/Makefile.in b/dlls/d3dxof/Makefile.in index 4e0d77c1ac8..d3566dda917 100644 --- a/dlls/d3dxof/Makefile.in +++ b/dlls/d3dxof/Makefile.in @@ -9,6 +9,7 @@ IMPORTS = dxguid uuid ole32 advapi32 kernel32 C_SRCS = \ main.c \ d3dxof.c \ + parsing.c \ regsvr.c RC_SRCS = version.rc diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c index 46f3db95a5b..8cf953b9494 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -46,42 +46,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dxof); #define XOFFILE_FORMAT_FLOAT_BITS_32 MAKEFOUR('0','0','3','2') #define XOFFILE_FORMAT_FLOAT_BITS_64 MAKEFOUR('0','0','6','4') -#define TOKEN_NAME 1 -#define TOKEN_STRING 2 -#define TOKEN_INTEGER 3 -#define TOKEN_GUID 5 -#define TOKEN_INTEGER_LIST 6 -#define TOKEN_FLOAT_LIST 7 -#define TOKEN_OBRACE 10 -#define TOKEN_CBRACE 11 -#define TOKEN_OPAREN 12 -#define TOKEN_CPAREN 13 -#define TOKEN_OBRACKET 14 -#define TOKEN_CBRACKET 15 -#define TOKEN_OANGLE 16 -#define TOKEN_CANGLE 17 -#define TOKEN_DOT 18 -#define TOKEN_COMMA 19 -#define TOKEN_SEMICOLON 20 -#define TOKEN_TEMPLATE 31 -#define TOKEN_WORD 40 -#define TOKEN_DWORD 41 -#define TOKEN_FLOAT 42 -#define TOKEN_DOUBLE 43 -#define TOKEN_CHAR 44 -#define TOKEN_UCHAR 45 -#define TOKEN_SWORD 46 -#define TOKEN_SDWORD 47 -#define TOKEN_VOID 48 -#define TOKEN_LPSTR 49 -#define TOKEN_UNICODE 50 -#define TOKEN_CSTRING 51 -#define TOKEN_ARRAY 52 - -#define CLSIDFMT "<%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X>" - #define MAX_INPUT_SIZE 2000000 -#define MAX_DATA_SIZE 400000 static const struct IDirectXFileVtbl IDirectXFile_Vtbl; static const struct IDirectXFileBinaryVtbl IDirectXFileBinary_Vtbl; @@ -91,56 +56,10 @@ static const struct IDirectXFileEnumObjectVtbl IDirectXFileEnumObject_Vtbl; static const struct IDirectXFileObjectVtbl IDirectXFileObject_Vtbl; static const struct IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl; -static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional); -static BOOL parse_object(parse_buffer * buf); -static const char* get_primitive_string(WORD token); -static WORD check_TOKEN(parse_buffer * buf); -static BOOL parse_template(parse_buffer * buf); static HRESULT IDirectXFileDataReferenceImpl_Create(IDirectXFileDataReferenceImpl** ppObj); static HRESULT IDirectXFileEnumObjectImpl_Create(IDirectXFileEnumObjectImpl** ppObj); static HRESULT IDirectXFileSaveObjectImpl_Create(IDirectXFileSaveObjectImpl** ppObj); -static void dump_template(xtemplate* templates_array, xtemplate* ptemplate) -{ - int j, k; - GUID* clsid; - - clsid = &ptemplate->class_id; - - DPRINTF("template %s\n", ptemplate->name); - DPRINTF("{\n"); - DPRINTF(CLSIDFMT "\n", clsid->Data1, clsid->Data2, clsid->Data3, clsid->Data4[0], - clsid->Data4[1], clsid->Data4[2], clsid->Data4[3], clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], clsid->Data4[7]); - for (j = 0; j < ptemplate->nb_members; j++) - { - if (ptemplate->members[j].nb_dims) - DPRINTF("array "); - if (ptemplate->members[j].type == TOKEN_NAME) - DPRINTF("%s ", templates_array[ptemplate->members[j].idx_template].name); - else - DPRINTF("%s ", get_primitive_string(ptemplate->members[j].type)); - DPRINTF("%s", ptemplate->members[j].name); - for (k = 0; k < ptemplate->members[j].nb_dims; k++) - { - if (ptemplate->members[j].dim_fixed[k]) - DPRINTF("[%d]", ptemplate->members[j].dim_value[k]); - else - DPRINTF("[%s]", ptemplate->members[ptemplate->members[j].dim_value[k]].name); - } - DPRINTF(";\n"); - } - if (ptemplate->open) - DPRINTF("[...]\n"); - else if (ptemplate->nb_childs) - { - DPRINTF("[%s", ptemplate->childs[0]); - for (j = 1; j < ptemplate->nb_childs; j++) - DPRINTF(",%s", ptemplate->childs[j]); - DPRINTF("]\n"); - } - DPRINTF("}\n"); -} - HRESULT IDirectXFileImpl_Create(IUnknown* pUnkOuter, LPVOID* ppObj) { IDirectXFileImpl* object; @@ -340,7 +259,7 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV *ppEnumObj = (LPDIRECTXFILEENUMOBJECT)object; - while (object->buf.rem_bytes && (check_TOKEN(&object->buf) == TOKEN_TEMPLATE)) + while (object->buf.rem_bytes && is_template_available(&object->buf)) { if (!parse_template(&object->buf)) { @@ -386,870 +305,6 @@ static HRESULT WINAPI IDirectXFileImpl_CreateSaveObject(IDirectXFile* iface, LPC return IDirectXFileSaveObjectImpl_Create((IDirectXFileSaveObjectImpl**)ppSaveObj); } -static BOOL read_bytes(parse_buffer * buf, LPVOID data, DWORD size) -{ - if (buf->rem_bytes < size) - return FALSE; - memcpy(data, buf->buffer, size); - buf->buffer += size; - buf->rem_bytes -= size; - return TRUE; -} - -static void dump_TOKEN(WORD token) -{ -#define DUMP_TOKEN(t) case t: TRACE(#t "\n"); break - switch(token) - { - DUMP_TOKEN(TOKEN_NAME); - DUMP_TOKEN(TOKEN_STRING); - DUMP_TOKEN(TOKEN_INTEGER); - DUMP_TOKEN(TOKEN_GUID); - DUMP_TOKEN(TOKEN_INTEGER_LIST); - DUMP_TOKEN(TOKEN_FLOAT_LIST); - DUMP_TOKEN(TOKEN_OBRACE); - DUMP_TOKEN(TOKEN_CBRACE); - DUMP_TOKEN(TOKEN_OPAREN); - DUMP_TOKEN(TOKEN_CPAREN); - DUMP_TOKEN(TOKEN_OBRACKET); - DUMP_TOKEN(TOKEN_CBRACKET); - DUMP_TOKEN(TOKEN_OANGLE); - DUMP_TOKEN(TOKEN_CANGLE); - DUMP_TOKEN(TOKEN_DOT); - DUMP_TOKEN(TOKEN_COMMA); - DUMP_TOKEN(TOKEN_SEMICOLON); - DUMP_TOKEN(TOKEN_TEMPLATE); - DUMP_TOKEN(TOKEN_WORD); - DUMP_TOKEN(TOKEN_DWORD); - DUMP_TOKEN(TOKEN_FLOAT); - DUMP_TOKEN(TOKEN_DOUBLE); - DUMP_TOKEN(TOKEN_CHAR); - DUMP_TOKEN(TOKEN_UCHAR); - DUMP_TOKEN(TOKEN_SWORD); - DUMP_TOKEN(TOKEN_SDWORD); - DUMP_TOKEN(TOKEN_VOID); - DUMP_TOKEN(TOKEN_LPSTR); - DUMP_TOKEN(TOKEN_UNICODE); - DUMP_TOKEN(TOKEN_CSTRING); - DUMP_TOKEN(TOKEN_ARRAY); - default: - if (0) - TRACE("Unknown token %d\n", token); - break; - } -#undef DUMP_TOKEN -} - -static BOOL is_space(char c) -{ - switch (c) - { - case 0x00: - case 0x0D: - case 0x0A: - case ' ': - case '\t': - return TRUE; - } - return FALSE; -} - -static BOOL is_operator(char c) -{ - switch(c) - { - case '{': - case '}': - case '[': - case ']': - case '(': - case ')': - case '<': - case '>': - case ',': - case ';': - return TRUE; - } - return FALSE; -} - -static inline BOOL is_separator(char c) -{ - return is_space(c) || is_operator(c); -} - -static WORD get_operator_token(char c) -{ - switch(c) - { - case '{': - return TOKEN_OBRACE; - case '}': - return TOKEN_CBRACE; - case '[': - return TOKEN_OBRACKET; - case ']': - return TOKEN_CBRACKET; - case '(': - return TOKEN_OPAREN; - case ')': - return TOKEN_CPAREN; - case '<': - return TOKEN_OANGLE; - case '>': - return TOKEN_CANGLE; - case ',': - return TOKEN_COMMA; - case ';': - return TOKEN_SEMICOLON; - } - return 0; -} - -static BOOL is_keyword(parse_buffer* buf, const char* keyword) -{ - DWORD len = strlen(keyword); - if (!strncasecmp((char*)buf->buffer, keyword,len) && is_separator(*(buf->buffer+len))) - { - buf->buffer += len; - buf->rem_bytes -= len; - return TRUE; - } - return FALSE; -} - -static WORD get_keyword_token(parse_buffer* buf) -{ - if (is_keyword(buf, "template")) - return TOKEN_TEMPLATE; - if (is_keyword(buf, "WORD")) - return TOKEN_WORD; - if (is_keyword(buf, "DWORD")) - return TOKEN_DWORD; - if (is_keyword(buf, "FLOAT")) - return TOKEN_FLOAT; - if (is_keyword(buf, "DOUBLE")) - return TOKEN_DOUBLE; - if (is_keyword(buf, "CHAR")) - return TOKEN_CHAR; - if (is_keyword(buf, "UCHAR")) - return TOKEN_UCHAR; - if (is_keyword(buf, "SWORD")) - return TOKEN_SWORD; - if (is_keyword(buf, "SDWORD")) - return TOKEN_SDWORD; - if (is_keyword(buf, "VOID")) - return TOKEN_VOID; - if (is_keyword(buf, "STRING")) - return TOKEN_LPSTR; - if (is_keyword(buf, "UNICODE")) - return TOKEN_UNICODE; - if (is_keyword(buf, "CSTRING")) - return TOKEN_CSTRING; - if (is_keyword(buf, "array")) - return TOKEN_ARRAY; - - return 0; -} - -static BOOL is_guid(parse_buffer* buf) -{ - char tmp[50]; - DWORD pos = 1; - GUID class_id; - DWORD tab[10]; - int ret; - - if (*buf->buffer != '<') - return FALSE; - tmp[0] = '<'; - while (*(buf->buffer+pos) != '>') - { - tmp[pos] = *(buf->buffer+pos); - pos++; - } - tmp[pos++] = '>'; - tmp[pos] = 0; - if (pos != 38 /* <+36+> */) - { - TRACE("Wrong guid %s (%d)\n", tmp, pos); - return FALSE; - } - buf->buffer += pos; - buf->rem_bytes -= pos; - - ret = sscanf(tmp, CLSIDFMT, &class_id.Data1, tab, tab+1, tab+2, tab+3, tab+4, tab+5, tab+6, tab+7, tab+8, tab+9); - if (ret != 11) - { - TRACE("Wrong guid %s (%d)\n", tmp, pos); - return FALSE; - } - TRACE("Found guid %s (%d)\n", tmp, pos); - - class_id.Data2 = tab[0]; - class_id.Data3 = tab[1]; - class_id.Data4[0] = tab[2]; - class_id.Data4[1] = tab[3]; - class_id.Data4[2] = tab[4]; - class_id.Data4[3] = tab[5]; - class_id.Data4[4] = tab[6]; - class_id.Data4[5] = tab[7]; - class_id.Data4[6] = tab[8]; - class_id.Data4[7] = tab[9]; - - *(GUID*)buf->value = class_id; - - return TRUE; -} - -static BOOL is_name(parse_buffer* buf) -{ - char tmp[50]; - DWORD pos = 0; - char c; - BOOL error = 0; - while (!is_separator(c = *(buf->buffer+pos))) - { - if (!(((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || ((c >= '0') && (c <= '9')) || (c == '_') || (c == '-'))) - error = 1; - tmp[pos++] = c; - } - tmp[pos] = 0; - - if (error) - { - TRACE("Wrong name %s\n", tmp); - return FALSE; - } - - buf->buffer += pos; - buf->rem_bytes -= pos; - - TRACE("Found name %s\n", tmp); - strcpy((char*)buf->value, tmp); - - return TRUE; -} - -static BOOL is_float(parse_buffer* buf) -{ - char tmp[50]; - DWORD pos = 0; - char c; - float decimal; - BOOL dot = 0; - - while (!is_separator(c = *(buf->buffer+pos))) - { - if (!((!pos && (c == '-')) || ((c >= '0') && (c <= '9')) || (!dot && (c == '.')))) - return FALSE; - if (c == '.') - dot = TRUE; - tmp[pos++] = c; - } - tmp[pos] = 0; - - buf->buffer += pos; - buf->rem_bytes -= pos; - - sscanf(tmp, "%f", &decimal); - - TRACE("Found float %s - %f\n", tmp, decimal); - - *(float*)buf->value = decimal; - - return TRUE; -} - -static BOOL is_integer(parse_buffer* buf) -{ - char tmp[50]; - DWORD pos = 0; - char c; - DWORD integer; - - while (!is_separator(c = *(buf->buffer+pos))) - { - if (!((c >= '0') && (c <= '9'))) - return FALSE; - tmp[pos++] = c; - } - tmp[pos] = 0; - - buf->buffer += pos; - buf->rem_bytes -= pos; - - sscanf(tmp, "%d", &integer); - - TRACE("Found integer %s - %d\n", tmp, integer); - - *(DWORD*)buf->value = integer; - - return TRUE; -} - -static BOOL is_string(parse_buffer* buf) -{ - char tmp[32]; - DWORD pos = 0; - char c; - BOOL ok = 0; - - if (*buf->buffer != '"') - return FALSE; - - while (!is_separator(c = *(buf->buffer+pos+1)) && (pos < 31)) - { - if (c == '"') - { - ok = 1; - break; - } - tmp[pos++] = c; - } - tmp[pos] = 0; - - if (!ok) - { - TRACE("Wrong string %s\n", tmp); - return FALSE; - } - - buf->buffer += pos + 2; - buf->rem_bytes -= pos + 2; - - TRACE("Found string %s\n", tmp); - strcpy((char*)buf->value, tmp); - - return TRUE; -} - -static WORD parse_TOKEN(parse_buffer * buf) -{ - WORD token; - - if (buf->txt) - { - while(1) - { - char c; - if (!read_bytes(buf, &c, 1)) - return 0; - /*TRACE("char = '%c'\n", is_space(c) ? ' ' : c);*/ - if ((c == '#') || (c == '/')) - { - /* Handle comment (# or //) */ - if (c == '/') - { - if (!read_bytes(buf, &c, 1)) - return 0; - if (c != '/') - return 0; - } - c = 0; - while (c != 0x0A) - { - if (!read_bytes(buf, &c, 1)) - return 0; - } - continue; - } - if (is_space(c)) - continue; - if (is_operator(c) && (c != '<')) - { - token = get_operator_token(c); - break; - } - else if (c == '.') - { - token = TOKEN_DOT; - break; - } - else - { - buf->buffer -= 1; - buf->rem_bytes += 1; - - if ((token = get_keyword_token(buf))) - break; - - if (is_guid(buf)) - { - token = TOKEN_GUID; - break; - } - if (is_integer(buf)) - { - token = TOKEN_INTEGER; - break; - } - if (is_float(buf)) - { - token = TOKEN_FLOAT; - break; - } - if (is_string(buf)) - { - token = TOKEN_LPSTR; - break; - } - if (is_name(buf)) - { - token = TOKEN_NAME; - break; - } - - FIXME("Unrecognize element\n"); - return 0; - } - } - } - else - { - static int nb_elem; - static int is_float; - - if (!nb_elem) - { - if (!read_bytes(buf, &token, 2)) - return 0; - - /* Convert integer and float list into separate elements */ - if (token == TOKEN_INTEGER_LIST) - { - if (!read_bytes(buf, &nb_elem, 4)) - return 0; - token = TOKEN_INTEGER; - is_float = FALSE; - TRACE("Integer list (TOKEN_INTEGER_LIST) of size %d\n", nb_elem); - } - else if (token == TOKEN_FLOAT_LIST) - { - if (!read_bytes(buf, &nb_elem, 4)) - return 0; - token = TOKEN_FLOAT; - is_float = TRUE; - TRACE("Float list (TOKEN_FLOAT_LIST) of size %d\n", nb_elem); - } - } - - if (nb_elem) - { - token = is_float ? TOKEN_FLOAT : TOKEN_INTEGER; - nb_elem--; - { - DWORD integer; - - if (!read_bytes(buf, &integer, 4)) - return 0; - - *(DWORD*)buf->value = integer; - } - dump_TOKEN(token); - return token; - } - - switch (token) - { - case TOKEN_NAME: - { - DWORD count; - char strname[100]; - - if (!read_bytes(buf, &count, 4)) - return 0; - if (!read_bytes(buf, strname, count)) - return 0; - strname[count] = 0; - /*TRACE("name = %s\n", strname);*/ - - strcpy((char*)buf->value, strname); - } - break; - case TOKEN_INTEGER: - { - DWORD integer; - - if (!read_bytes(buf, &integer, 4)) - return 0; - /*TRACE("integer = %ld\n", integer);*/ - - *(DWORD*)buf->value = integer; - } - break; - case TOKEN_GUID: - { - char strguid[39]; - GUID class_id; - - if (!read_bytes(buf, &class_id, 16)) - return 0; - sprintf(strguid, CLSIDFMT, class_id.Data1, class_id.Data2, class_id.Data3, class_id.Data4[0], - class_id.Data4[1], class_id.Data4[2], class_id.Data4[3], class_id.Data4[4], class_id.Data4[5], - class_id.Data4[6], class_id.Data4[7]); - /*TRACE("guid = {%s}\n", strguid);*/ - - *(GUID*)buf->value = class_id; - } - break; - case TOKEN_STRING: - { - DWORD count; - WORD tmp_token; - char strname[100]; - if (!read_bytes(buf, &count, 4)) - return 0; - if (!read_bytes(buf, strname, count)) - return 0; - strname[count] = 0; - if (!read_bytes(buf, &tmp_token, 2)) - return 0; - if ((tmp_token != TOKEN_COMMA) && (tmp_token != TOKEN_SEMICOLON)) - ERR("No comma or semicolon (got %d)\n", tmp_token); - /*TRACE("name = %s\n", strname);*/ - - strcpy((char*)buf->value, strname); - token = TOKEN_LPSTR; - } - break; - case TOKEN_OBRACE: - case TOKEN_CBRACE: - case TOKEN_OPAREN: - case TOKEN_CPAREN: - case TOKEN_OBRACKET: - case TOKEN_CBRACKET: - case TOKEN_OANGLE: - case TOKEN_CANGLE: - case TOKEN_DOT: - case TOKEN_COMMA: - case TOKEN_SEMICOLON: - case TOKEN_TEMPLATE: - case TOKEN_WORD: - case TOKEN_DWORD: - case TOKEN_FLOAT: - case TOKEN_DOUBLE: - case TOKEN_CHAR: - case TOKEN_UCHAR: - case TOKEN_SWORD: - case TOKEN_SDWORD: - case TOKEN_VOID: - case TOKEN_LPSTR: - case TOKEN_UNICODE: - case TOKEN_CSTRING: - case TOKEN_ARRAY: - break; - default: - return 0; - } - } - - dump_TOKEN(token); - - return token; -} - -static const char* get_primitive_string(WORD token) -{ - switch(token) - { - case TOKEN_WORD: - return "WORD"; - case TOKEN_DWORD: - return "DWORD"; - case TOKEN_FLOAT: - return "FLOAT"; - case TOKEN_DOUBLE: - return "DOUBLE"; - case TOKEN_CHAR: - return "CHAR"; - case TOKEN_UCHAR: - return "UCHAR"; - case TOKEN_SWORD: - return "SWORD"; - case TOKEN_SDWORD: - return "SDWORD"; - case TOKEN_VOID: - return "VOID"; - case TOKEN_LPSTR: - return "STRING"; - case TOKEN_UNICODE: - return "UNICODE"; - case TOKEN_CSTRING: - return "CSTRING "; - default: - break; - } - return NULL; -} - -static WORD get_TOKEN(parse_buffer * buf) -{ - if (buf->token_present) - { - buf->token_present = FALSE; - return buf->current_token; - } - - buf->current_token = parse_TOKEN(buf); - - return buf->current_token; -} - -static WORD check_TOKEN(parse_buffer * buf) -{ - if (buf->token_present) - return buf->current_token; - - buf->current_token = parse_TOKEN(buf); - buf->token_present = TRUE; - - return buf->current_token; -} - -static inline BOOL is_primitive_type(WORD token) -{ - BOOL ret; - switch(token) - { - case TOKEN_WORD: - case TOKEN_DWORD: - case TOKEN_FLOAT: - case TOKEN_DOUBLE: - case TOKEN_CHAR: - case TOKEN_UCHAR: - case TOKEN_SWORD: - case TOKEN_SDWORD: - case TOKEN_LPSTR: - case TOKEN_UNICODE: - case TOKEN_CSTRING: - ret = 1; - break; - default: - ret = 0; - break; - } - return ret; -} - -static BOOL parse_template_option_info(parse_buffer * buf) -{ - xtemplate* cur_template = &buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates]; - - if (check_TOKEN(buf) == TOKEN_DOT) - { - get_TOKEN(buf); - if (get_TOKEN(buf) != TOKEN_DOT) - return FALSE; - if (get_TOKEN(buf) != TOKEN_DOT) - return FALSE; - cur_template->open = TRUE; - } - else - { - while (1) - { - if (get_TOKEN(buf) != TOKEN_NAME) - return FALSE; - strcpy(cur_template->childs[cur_template->nb_childs], (char*)buf->value); - if (check_TOKEN(buf) == TOKEN_GUID) - get_TOKEN(buf); - cur_template->nb_childs++; - if (check_TOKEN(buf) != TOKEN_COMMA) - break; - get_TOKEN(buf); - } - cur_template->open = FALSE; - } - - return TRUE; -} - -static BOOL parse_template_members_list(parse_buffer * buf) -{ - int idx_member = 0; - member* cur_member; - - while (1) - { - BOOL array = 0; - int nb_dims = 0; - cur_member = &buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[idx_member]; - - if (check_TOKEN(buf) == TOKEN_ARRAY) - { - get_TOKEN(buf); - array = 1; - } - - if (check_TOKEN(buf) == TOKEN_NAME) - { - cur_member->type = get_TOKEN(buf); - cur_member->idx_template = 0; - while (cur_member->idx_template < buf->pdxf->nb_xtemplates) - { - if (!strcmp((char*)buf->value, buf->pdxf->xtemplates[cur_member->idx_template].name)) - break; - cur_member->idx_template++; - } - if (cur_member->idx_template == buf->pdxf->nb_xtemplates) - { - TRACE("Reference to a nonexistent template '%s'\n", (char*)buf->value); - return FALSE; - } - } - else if (is_primitive_type(check_TOKEN(buf))) - cur_member->type = get_TOKEN(buf); - else - break; - - if (get_TOKEN(buf) != TOKEN_NAME) - return FALSE; - strcpy(cur_member->name, (char*)buf->value); - - if (array) - { - while (check_TOKEN(buf) == TOKEN_OBRACKET) - { - if (nb_dims >= MAX_ARRAY_DIM) - { - FIXME("Too many dimensions (%d) for multi-dimensional array\n", nb_dims + 1); - return FALSE; - } - get_TOKEN(buf); - if (check_TOKEN(buf) == TOKEN_INTEGER) - { - get_TOKEN(buf); - cur_member->dim_fixed[nb_dims] = TRUE; - cur_member->dim_value[nb_dims] = *(DWORD*)buf->value; - } - else - { - int i; - if (get_TOKEN(buf) != TOKEN_NAME) - return FALSE; - for (i = 0; i < idx_member; i++) - { - if (!strcmp((char*)buf->value, buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[i].name)) - { - if (buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[i].nb_dims) - { - ERR("Array cannot be used to specify variable array size\n"); - return FALSE; - } - if (buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[i].type != TOKEN_DWORD) - { - FIXME("Only DWORD supported to specify variable array size\n"); - return FALSE; - } - break; - } - } - if (i == idx_member) - { - ERR("Reference to unknown member %s\n", (char*)buf->value); - return FALSE; - } - cur_member->dim_fixed[nb_dims] = FALSE; - cur_member->dim_value[nb_dims] = i; - } - if (get_TOKEN(buf) != TOKEN_CBRACKET) - return FALSE; - nb_dims++; - } - if (!nb_dims) - return FALSE; - cur_member->nb_dims = nb_dims; - } - if (get_TOKEN(buf) != TOKEN_SEMICOLON) - return FALSE; - - idx_member++; - } - - buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].nb_members = idx_member; - - return TRUE; -} - -static BOOL parse_template_parts(parse_buffer * buf) -{ - if (!parse_template_members_list(buf)) - return FALSE; - if (check_TOKEN(buf) == TOKEN_OBRACKET) - { - get_TOKEN(buf); - if (!parse_template_option_info(buf)) - return FALSE; - if (get_TOKEN(buf) != TOKEN_CBRACKET) - return FALSE; - } - - return TRUE; -} - -static void go_to_next_definition(parse_buffer * buf) -{ - while (buf->rem_bytes) - { - char c = *buf->buffer; - if ((c == '#') || (c == '/')) - { - read_bytes(buf, &c, 1); - /* Handle comment (# or //) */ - if (c == '/') - { - if (!read_bytes(buf, &c, 1)) - return; - if (c != '/') - return; - } - c = 0; - while (c != 0x0A) - { - if (!read_bytes(buf, &c, 1)) - return; - } - continue; - } - else if (is_space(*buf->buffer)) - { - buf->buffer++; - buf->rem_bytes--; - } - else - break; - } -} - -static BOOL parse_template(parse_buffer * buf) -{ - if (get_TOKEN(buf) != TOKEN_TEMPLATE) - return FALSE; - if (get_TOKEN(buf) != TOKEN_NAME) - return FALSE; - strcpy(buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].name, (char*)buf->value); - if (get_TOKEN(buf) != TOKEN_OBRACE) - return FALSE; - if (get_TOKEN(buf) != TOKEN_GUID) - return FALSE; - buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].class_id = *(GUID*)buf->value; - if (!parse_template_parts(buf)) - return FALSE; - if (get_TOKEN(buf) != TOKEN_CBRACE) - return FALSE; - if (buf->txt) - { - /* Go to the next template */ - go_to_next_definition(buf); - } - - TRACE("%d - %s - %s\n", buf->pdxf->nb_xtemplates, buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].name, debugstr_guid(&buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].class_id)); - buf->pdxf->nb_xtemplates++; - - return TRUE; -} - static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LPVOID pvData, DWORD cbSize) { IDirectXFileImpl *This = (IDirectXFileImpl *)iface; @@ -1911,321 +966,21 @@ static ULONG WINAPI IDirectXFileEnumObjectImpl_Release(IDirectXFileEnumObject* i { int i; for (i = 0; i < This->nb_xobjects; i++) + { IDirectXFileData_Release(This->pRefObjects[i]); + HeapFree(GetProcessHeap(), 0, This->xobjects[i]); + } if (This->source == DXFILELOAD_FROMFILE) + { HeapFree(GetProcessHeap(), 0, This->buf.buffer); - if (This->hFile != INVALID_HANDLE_VALUE) CloseHandle(This->hFile); + } HeapFree(GetProcessHeap(), 0, This); } return ref; } -static BOOL parse_object_members_list(parse_buffer * buf) -{ - DWORD token; - int i; - xtemplate* pt = buf->pxt[buf->level]; - DWORD last_dword = 0; - - for (i = 0; i < pt->nb_members; i++) - { - int k; - int nb_elems = 1; - - buf->pxo->members[i].start = buf->cur_pdata; - - for (k = 0; k < pt->members[i].nb_dims; k++) - { - if (pt->members[i].dim_fixed[k]) - nb_elems *= pt->members[i].dim_value[k]; - else - nb_elems *= *(DWORD*)buf->pxo->members[pt->members[i].dim_value[k]].start; - } - - TRACE("Elements to consider: %d\n", nb_elems); - - for (k = 0; k < nb_elems; k++) - { - if (buf->txt && k) - { - token = check_TOKEN(buf); - if (token == TOKEN_COMMA) - { - get_TOKEN(buf); - } - else - { - /* Allow comma omission */ - if (!((token == TOKEN_FLOAT) || (token == TOKEN_INTEGER))) - return FALSE; - } - } - - if (pt->members[i].type == TOKEN_NAME) - { - int j; - - TRACE("Found sub-object %s\n", buf->pdxf->xtemplates[pt->members[i].idx_template].name); - buf->level++; - /* To do template lookup */ - for (j = 0; j < buf->pdxf->nb_xtemplates; j++) - { - if (!strcmp(buf->pdxf->xtemplates[pt->members[i].idx_template].name, buf->pdxf->xtemplates[j].name)) - { - buf->pxt[buf->level] = &buf->pdxf->xtemplates[j]; - break; - } - } - if (j == buf->pdxf->nb_xtemplates) - { - FIXME("Unknown template %s\n", (char*)buf->value); - buf->level--; - return FALSE; - } - TRACE("Enter %s\n", buf->pdxf->xtemplates[pt->members[i].idx_template].name); - if (!parse_object_parts(buf, FALSE)) - { - buf->level--; - return FALSE; - } - buf->level--; - } - else - { - token = check_TOKEN(buf); - if (token == TOKEN_INTEGER) - { - get_TOKEN(buf); - last_dword = *(DWORD*)buf->value; - TRACE("%s = %d\n", pt->members[i].name, *(DWORD*)buf->value); - /* Assume larger size */ - if ((buf->cur_pdata - buf->pdata + 4) > MAX_DATA_SIZE) - { - FIXME("Buffer too small\n"); - return FALSE; - } - if (pt->members[i].type == TOKEN_WORD) - { - *(((WORD*)(buf->cur_pdata))) = (WORD)(*(DWORD*)buf->value); - buf->cur_pdata += 2; - } - else if (pt->members[i].type == TOKEN_DWORD) - { - *(((DWORD*)(buf->cur_pdata))) = (DWORD)(*(DWORD*)buf->value); - buf->cur_pdata += 4; - } - else - { - FIXME("Token %d not supported\n", pt->members[i].type); - return FALSE; - } - } - else if (token == TOKEN_FLOAT) - { - get_TOKEN(buf); - TRACE("%s = %f\n", pt->members[i].name, *(float*)buf->value); - /* Assume larger size */ - if ((buf->cur_pdata - buf->pdata + 4) > MAX_DATA_SIZE) - { - FIXME("Buffer too small\n"); - return FALSE; - } - if (pt->members[i].type == TOKEN_FLOAT) - { - *(((float*)(buf->cur_pdata))) = (float)(*(float*)buf->value); - buf->cur_pdata += 4; - } - else - { - FIXME("Token %d not supported\n", pt->members[i].type); - return FALSE; - } - } - else if (token == TOKEN_LPSTR) - { - get_TOKEN(buf); - TRACE("%s = %s\n", pt->members[i].name, (char*)buf->value); - /* Assume larger size */ - if ((buf->cur_pdata - buf->pdata + 4) > MAX_DATA_SIZE) - { - FIXME("Buffer too small\n"); - return FALSE; - } - if (pt->members[i].type == TOKEN_LPSTR) - { - int len = strlen((char*)buf->value) + 1; - if ((buf->cur_pstrings - buf->pstrings + len) > MAX_STRINGS_BUFFER) - { - FIXME("Buffer too small %p %p %d\n", buf->cur_pstrings, buf->pstrings, len); - return FALSE; - } - strcpy((char*)buf->cur_pstrings, (char*)buf->value); - *(((LPCSTR*)(buf->cur_pdata))) = (char*)buf->cur_pstrings; - buf->cur_pstrings += len; - buf->cur_pdata += 4; - } - else - { - FIXME("Token %d not supported\n", pt->members[i].type); - return FALSE; - } - } - else - { - FIXME("Unexpected token %d\n", token); - return FALSE; - } - } - } - - if (buf->txt && (check_TOKEN(buf) != TOKEN_CBRACE)) - { - token = get_TOKEN(buf); - if ((token != TOKEN_SEMICOLON) && (token != TOKEN_COMMA)) - { - /* Allow comma instead of semicolon in some specific cases */ - if (!((token == TOKEN_COMMA) && ((i+1) < pt->nb_members) && (pt->members[i].type == pt->members[i+1].type) - && (!pt->members[i].nb_dims) && (!pt->members[i+1].nb_dims))) - return FALSE; - } - } - } - - return TRUE; -} - -static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional) -{ - if (!parse_object_members_list(buf)) - return FALSE; - - if (allow_optional) - { - buf->pxo->size = buf->cur_pdata - buf->pxo->pdata; - - /* Skip trailing semicolon */ - while (check_TOKEN(buf) == TOKEN_SEMICOLON) - get_TOKEN(buf); - - while (1) - { - if (check_TOKEN(buf) == TOKEN_OBRACE) - { - int i, j; - get_TOKEN(buf); - if (get_TOKEN(buf) != TOKEN_NAME) - return FALSE; - if (get_TOKEN(buf) != TOKEN_CBRACE) - return FALSE; - TRACE("Found optional reference %s\n", (char*)buf->value); - for (i = 0; i < buf->nb_pxo_globals; i++) - { - for (j = 0; j < (buf->pxo_globals[i])[0].nb_subobjects; j++) - { - if (!strcmp((buf->pxo_globals[i])[j].name, (char*)buf->value)) - goto _exit; - } - } -_exit: - if (i == buf->nb_pxo_globals) - { - ERR("Reference to unknown object %s\n", (char*)buf->value); - return FALSE; - } - buf->pxo->childs[buf->pxo->nb_childs] = &buf->pxo_tab[buf->cur_subobject++]; - buf->pxo->childs[buf->pxo->nb_childs]->ptarget = &(buf->pxo_globals[i])[j]; - buf->pxo->nb_childs++; - } - else if (check_TOKEN(buf) == TOKEN_NAME) - { - xobject* pxo = buf->pxo; - buf->pxo = buf->pxo->childs[buf->pxo->nb_childs] = &buf->pxo_tab[buf->cur_subobject++]; - - TRACE("Enter optional %s\n", (char*)buf->value); - buf->level++; - if (!parse_object(buf)) - { - buf->level--; - return FALSE; - } - buf->level--; - buf->pxo = pxo; - buf->pxo->nb_childs++; - } - else - break; - } - } - - if (buf->pxo->nb_childs > MAX_CHILDS) - { - FIXME("Too many childs %d\n", buf->pxo->nb_childs); - return FALSE; - } - - return TRUE; -} - -static BOOL parse_object(parse_buffer * buf) -{ - int i; - - buf->pxo->pdata = buf->cur_pdata; - buf->pxo->ptarget = NULL; - - if (get_TOKEN(buf) != TOKEN_NAME) - return FALSE; - - /* To do template lookup */ - for (i = 0; i < buf->pdxf->nb_xtemplates; i++) - { - if (!strcmp((char*)buf->value, buf->pdxf->xtemplates[i].name)) - { - buf->pxt[buf->level] = &buf->pdxf->xtemplates[i]; - memcpy(&buf->pxo->type, &buf->pdxf->xtemplates[i].class_id, 16); - break; - } - } - if (i == buf->pdxf->nb_xtemplates) - { - FIXME("Unknown template %s\n", (char*)buf->value); - return FALSE; - } - - if (check_TOKEN(buf) == TOKEN_NAME) - { - get_TOKEN(buf); - strcpy(buf->pxo->name, (char*)buf->value); - } - else - buf->pxo->name[0] = 0; - - if (get_TOKEN(buf) != TOKEN_OBRACE) - return FALSE; - if (check_TOKEN(buf) == TOKEN_GUID) - { - get_TOKEN(buf); - memcpy(&buf->pxo->class_id, buf->value, 16); - } - else - memset(&buf->pxo->class_id, 0, 16); - - if (!parse_object_parts(buf, TRUE)) - return FALSE; - if (get_TOKEN(buf) != TOKEN_CBRACE) - return FALSE; - - if (buf->txt) - { - /* Go to the next object */ - go_to_next_definition(buf); - } - - return TRUE; -} - /*** IDirectXFileEnumObject methods ***/ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileEnumObject* iface, LPDIRECTXFILEDATA* ppDataObj) { diff --git a/dlls/d3dxof/d3dxof_private.h b/dlls/d3dxof/d3dxof_private.h index bc78bc05186..585f9d5ab03 100644 --- a/dlls/d3dxof/d3dxof_private.h +++ b/dlls/d3dxof/d3dxof_private.h @@ -42,6 +42,8 @@ #define MAX_SUBOBJECTS 500 #define MAX_STRINGS_BUFFER 10000 +#define MAX_DATA_SIZE 400000 + typedef struct { DWORD type; LONG idx_template; @@ -63,7 +65,7 @@ typedef struct { } xtemplate; typedef struct { - char name[MAX_NAME_LEN]; + char* name; LPBYTE start; ULONG size; } xobject_member; @@ -163,4 +165,10 @@ HRESULT IDirectXFileImpl_Create(IUnknown *pUnkOuter, LPVOID *ppObj); HRESULT IDirectXFileFileObjectImpl_Create(IDirectXFileObjectImpl** ppObj); HRESULT IDirectXFileFileSaveObjectImpl_Create(IDirectXFileSaveObjectImpl** ppObj); +BOOL read_bytes(parse_buffer * buf, LPVOID data, DWORD size); +BOOL parse_template(parse_buffer * buf); +void dump_template(xtemplate* templates_array, xtemplate* ptemplate); +BOOL is_template_available(parse_buffer * buf); +BOOL parse_object(parse_buffer * buf); + #endif /* __D3DXOF_PRIVATE_INCLUDED__ */ diff --git a/dlls/d3dxof/parsing.c b/dlls/d3dxof/parsing.c new file mode 100644 index 00000000000..06a1385bf06 --- /dev/null +++ b/dlls/d3dxof/parsing.c @@ -0,0 +1,1290 @@ +/* + * X Files parsing + * + * Copyright 2008 Christian Costa + * + * This file contains the (internal) driver registration functions, + * driver enumeration APIs and DirectDraw creation functions. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" +#include "wine/debug.h" + +#define COBJMACROS + +#include "winbase.h" +#include "wingdi.h" + +#include "d3dxof_private.h" +#include "dxfile.h" + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(d3dxof); + +static const char* get_primitive_string(WORD token); +static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional); +static WORD check_TOKEN(parse_buffer * buf); + +#define TOKEN_NAME 1 +#define TOKEN_STRING 2 +#define TOKEN_INTEGER 3 +#define TOKEN_GUID 5 +#define TOKEN_INTEGER_LIST 6 +#define TOKEN_FLOAT_LIST 7 +#define TOKEN_OBRACE 10 +#define TOKEN_CBRACE 11 +#define TOKEN_OPAREN 12 +#define TOKEN_CPAREN 13 +#define TOKEN_OBRACKET 14 +#define TOKEN_CBRACKET 15 +#define TOKEN_OANGLE 16 +#define TOKEN_CANGLE 17 +#define TOKEN_DOT 18 +#define TOKEN_COMMA 19 +#define TOKEN_SEMICOLON 20 +#define TOKEN_TEMPLATE 31 +#define TOKEN_WORD 40 +#define TOKEN_DWORD 41 +#define TOKEN_FLOAT 42 +#define TOKEN_DOUBLE 43 +#define TOKEN_CHAR 44 +#define TOKEN_UCHAR 45 +#define TOKEN_SWORD 46 +#define TOKEN_SDWORD 47 +#define TOKEN_VOID 48 +#define TOKEN_LPSTR 49 +#define TOKEN_UNICODE 50 +#define TOKEN_CSTRING 51 +#define TOKEN_ARRAY 52 + +#define CLSIDFMT "<%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X>" + +void dump_template(xtemplate* templates_array, xtemplate* ptemplate) +{ + int j, k; + GUID* clsid; + + clsid = &ptemplate->class_id; + + DPRINTF("template %s\n", ptemplate->name); + DPRINTF("{\n"); + DPRINTF(CLSIDFMT "\n", clsid->Data1, clsid->Data2, clsid->Data3, clsid->Data4[0], + clsid->Data4[1], clsid->Data4[2], clsid->Data4[3], clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], clsid->Data4[7]); + for (j = 0; j < ptemplate->nb_members; j++) + { + if (ptemplate->members[j].nb_dims) + DPRINTF("array "); + if (ptemplate->members[j].type == TOKEN_NAME) + DPRINTF("%s ", templates_array[ptemplate->members[j].idx_template].name); + else + DPRINTF("%s ", get_primitive_string(ptemplate->members[j].type)); + DPRINTF("%s", ptemplate->members[j].name); + for (k = 0; k < ptemplate->members[j].nb_dims; k++) + { + if (ptemplate->members[j].dim_fixed[k]) + DPRINTF("[%d]", ptemplate->members[j].dim_value[k]); + else + DPRINTF("[%s]", ptemplate->members[ptemplate->members[j].dim_value[k]].name); + } + DPRINTF(";\n"); + } + if (ptemplate->open) + DPRINTF("[...]\n"); + else if (ptemplate->nb_childs) + { + DPRINTF("[%s", ptemplate->childs[0]); + for (j = 1; j < ptemplate->nb_childs; j++) + DPRINTF(",%s", ptemplate->childs[j]); + DPRINTF("]\n"); + } + DPRINTF("}\n"); +} + +BOOL is_template_available(parse_buffer * buf) +{ + return check_TOKEN(buf) == TOKEN_TEMPLATE; +} + +BOOL read_bytes(parse_buffer * buf, LPVOID data, DWORD size) +{ + if (buf->rem_bytes < size) + return FALSE; + memcpy(data, buf->buffer, size); + buf->buffer += size; + buf->rem_bytes -= size; + return TRUE; +} + +static void dump_TOKEN(WORD token) +{ +#define DUMP_TOKEN(t) case t: TRACE(#t "\n"); break + switch(token) + { + DUMP_TOKEN(TOKEN_NAME); + DUMP_TOKEN(TOKEN_STRING); + DUMP_TOKEN(TOKEN_INTEGER); + DUMP_TOKEN(TOKEN_GUID); + DUMP_TOKEN(TOKEN_INTEGER_LIST); + DUMP_TOKEN(TOKEN_FLOAT_LIST); + DUMP_TOKEN(TOKEN_OBRACE); + DUMP_TOKEN(TOKEN_CBRACE); + DUMP_TOKEN(TOKEN_OPAREN); + DUMP_TOKEN(TOKEN_CPAREN); + DUMP_TOKEN(TOKEN_OBRACKET); + DUMP_TOKEN(TOKEN_CBRACKET); + DUMP_TOKEN(TOKEN_OANGLE); + DUMP_TOKEN(TOKEN_CANGLE); + DUMP_TOKEN(TOKEN_DOT); + DUMP_TOKEN(TOKEN_COMMA); + DUMP_TOKEN(TOKEN_SEMICOLON); + DUMP_TOKEN(TOKEN_TEMPLATE); + DUMP_TOKEN(TOKEN_WORD); + DUMP_TOKEN(TOKEN_DWORD); + DUMP_TOKEN(TOKEN_FLOAT); + DUMP_TOKEN(TOKEN_DOUBLE); + DUMP_TOKEN(TOKEN_CHAR); + DUMP_TOKEN(TOKEN_UCHAR); + DUMP_TOKEN(TOKEN_SWORD); + DUMP_TOKEN(TOKEN_SDWORD); + DUMP_TOKEN(TOKEN_VOID); + DUMP_TOKEN(TOKEN_LPSTR); + DUMP_TOKEN(TOKEN_UNICODE); + DUMP_TOKEN(TOKEN_CSTRING); + DUMP_TOKEN(TOKEN_ARRAY); + default: + if (0) + TRACE("Unknown token %d\n", token); + break; + } +#undef DUMP_TOKEN +} + +static BOOL is_space(char c) +{ + switch (c) + { + case 0x00: + case 0x0D: + case 0x0A: + case ' ': + case '\t': + return TRUE; + } + return FALSE; +} + +static BOOL is_operator(char c) +{ + switch(c) + { + case '{': + case '}': + case '[': + case ']': + case '(': + case ')': + case '<': + case '>': + case ',': + case ';': + return TRUE; + } + return FALSE; +} + +static inline BOOL is_separator(char c) +{ + return is_space(c) || is_operator(c); +} + +static WORD get_operator_token(char c) +{ + switch(c) + { + case '{': + return TOKEN_OBRACE; + case '}': + return TOKEN_CBRACE; + case '[': + return TOKEN_OBRACKET; + case ']': + return TOKEN_CBRACKET; + case '(': + return TOKEN_OPAREN; + case ')': + return TOKEN_CPAREN; + case '<': + return TOKEN_OANGLE; + case '>': + return TOKEN_CANGLE; + case ',': + return TOKEN_COMMA; + case ';': + return TOKEN_SEMICOLON; + } + return 0; +} + +static BOOL is_keyword(parse_buffer* buf, const char* keyword) +{ + DWORD len = strlen(keyword); + if (!strncasecmp((char*)buf->buffer, keyword,len) && is_separator(*(buf->buffer+len))) + { + buf->buffer += len; + buf->rem_bytes -= len; + return TRUE; + } + return FALSE; +} + +static WORD get_keyword_token(parse_buffer* buf) +{ + if (is_keyword(buf, "template")) + return TOKEN_TEMPLATE; + if (is_keyword(buf, "WORD")) + return TOKEN_WORD; + if (is_keyword(buf, "DWORD")) + return TOKEN_DWORD; + if (is_keyword(buf, "FLOAT")) + return TOKEN_FLOAT; + if (is_keyword(buf, "DOUBLE")) + return TOKEN_DOUBLE; + if (is_keyword(buf, "CHAR")) + return TOKEN_CHAR; + if (is_keyword(buf, "UCHAR")) + return TOKEN_UCHAR; + if (is_keyword(buf, "SWORD")) + return TOKEN_SWORD; + if (is_keyword(buf, "SDWORD")) + return TOKEN_SDWORD; + if (is_keyword(buf, "VOID")) + return TOKEN_VOID; + if (is_keyword(buf, "STRING")) + return TOKEN_LPSTR; + if (is_keyword(buf, "UNICODE")) + return TOKEN_UNICODE; + if (is_keyword(buf, "CSTRING")) + return TOKEN_CSTRING; + if (is_keyword(buf, "array")) + return TOKEN_ARRAY; + + return 0; +} + +static BOOL is_guid(parse_buffer* buf) +{ + char tmp[50]; + DWORD pos = 1; + GUID class_id; + DWORD tab[10]; + int ret; + + if (*buf->buffer != '<') + return FALSE; + tmp[0] = '<'; + while (*(buf->buffer+pos) != '>') + { + tmp[pos] = *(buf->buffer+pos); + pos++; + } + tmp[pos++] = '>'; + tmp[pos] = 0; + if (pos != 38 /* <+36+> */) + { + TRACE("Wrong guid %s (%d)\n", tmp, pos); + return FALSE; + } + buf->buffer += pos; + buf->rem_bytes -= pos; + + ret = sscanf(tmp, CLSIDFMT, &class_id.Data1, tab, tab+1, tab+2, tab+3, tab+4, tab+5, tab+6, tab+7, tab+8, tab+9); + if (ret != 11) + { + TRACE("Wrong guid %s (%d)\n", tmp, pos); + return FALSE; + } + TRACE("Found guid %s (%d)\n", tmp, pos); + + class_id.Data2 = tab[0]; + class_id.Data3 = tab[1]; + class_id.Data4[0] = tab[2]; + class_id.Data4[1] = tab[3]; + class_id.Data4[2] = tab[4]; + class_id.Data4[3] = tab[5]; + class_id.Data4[4] = tab[6]; + class_id.Data4[5] = tab[7]; + class_id.Data4[6] = tab[8]; + class_id.Data4[7] = tab[9]; + + *(GUID*)buf->value = class_id; + + return TRUE; +} + +static BOOL is_name(parse_buffer* buf) +{ + char tmp[50]; + DWORD pos = 0; + char c; + BOOL error = 0; + while (!is_separator(c = *(buf->buffer+pos))) + { + if (!(((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || ((c >= '0') && (c <= '9')) || (c == '_') || (c == '-'))) + error = 1; + tmp[pos++] = c; + } + tmp[pos] = 0; + + if (error) + { + TRACE("Wrong name %s\n", tmp); + return FALSE; + } + + buf->buffer += pos; + buf->rem_bytes -= pos; + + TRACE("Found name %s\n", tmp); + strcpy((char*)buf->value, tmp); + + return TRUE; +} + +static BOOL is_float(parse_buffer* buf) +{ + char tmp[50]; + DWORD pos = 0; + char c; + float decimal; + BOOL dot = 0; + + while (!is_separator(c = *(buf->buffer+pos))) + { + if (!((!pos && (c == '-')) || ((c >= '0') && (c <= '9')) || (!dot && (c == '.')))) + return FALSE; + if (c == '.') + dot = TRUE; + tmp[pos++] = c; + } + tmp[pos] = 0; + + buf->buffer += pos; + buf->rem_bytes -= pos; + + sscanf(tmp, "%f", &decimal); + + TRACE("Found float %s - %f\n", tmp, decimal); + + *(float*)buf->value = decimal; + + return TRUE; +} + +static BOOL is_integer(parse_buffer* buf) +{ + char tmp[50]; + DWORD pos = 0; + char c; + DWORD integer; + + while (!is_separator(c = *(buf->buffer+pos))) + { + if (!((c >= '0') && (c <= '9'))) + return FALSE; + tmp[pos++] = c; + } + tmp[pos] = 0; + + buf->buffer += pos; + buf->rem_bytes -= pos; + + sscanf(tmp, "%d", &integer); + + TRACE("Found integer %s - %d\n", tmp, integer); + + *(DWORD*)buf->value = integer; + + return TRUE; +} + +static BOOL is_string(parse_buffer* buf) +{ + char tmp[32]; + DWORD pos = 0; + char c; + BOOL ok = 0; + + if (*buf->buffer != '"') + return FALSE; + + while (!is_separator(c = *(buf->buffer+pos+1)) && (pos < 31)) + { + if (c == '"') + { + ok = 1; + break; + } + tmp[pos++] = c; + } + tmp[pos] = 0; + + if (!ok) + { + TRACE("Wrong string %s\n", tmp); + return FALSE; + } + + buf->buffer += pos + 2; + buf->rem_bytes -= pos + 2; + + TRACE("Found string %s\n", tmp); + strcpy((char*)buf->value, tmp); + + return TRUE; +} + +static WORD parse_TOKEN(parse_buffer * buf) +{ + WORD token; + + if (buf->txt) + { + while(1) + { + char c; + if (!read_bytes(buf, &c, 1)) + return 0; + /*TRACE("char = '%c'\n", is_space(c) ? ' ' : c);*/ + if ((c == '#') || (c == '/')) + { + /* Handle comment (# or //) */ + if (c == '/') + { + if (!read_bytes(buf, &c, 1)) + return 0; + if (c != '/') + return 0; + } + c = 0; + while (c != 0x0A) + { + if (!read_bytes(buf, &c, 1)) + return 0; + } + continue; + } + if (is_space(c)) + continue; + if (is_operator(c) && (c != '<')) + { + token = get_operator_token(c); + break; + } + else if (c == '.') + { + token = TOKEN_DOT; + break; + } + else + { + buf->buffer -= 1; + buf->rem_bytes += 1; + + if ((token = get_keyword_token(buf))) + break; + + if (is_guid(buf)) + { + token = TOKEN_GUID; + break; + } + if (is_integer(buf)) + { + token = TOKEN_INTEGER; + break; + } + if (is_float(buf)) + { + token = TOKEN_FLOAT; + break; + } + if (is_string(buf)) + { + token = TOKEN_LPSTR; + break; + } + if (is_name(buf)) + { + token = TOKEN_NAME; + break; + } + + FIXME("Unrecognize element\n"); + return 0; + } + } + } + else + { + static int nb_elem; + static int is_float; + + if (!nb_elem) + { + if (!read_bytes(buf, &token, 2)) + return 0; + + /* Convert integer and float list into separate elements */ + if (token == TOKEN_INTEGER_LIST) + { + if (!read_bytes(buf, &nb_elem, 4)) + return 0; + token = TOKEN_INTEGER; + is_float = FALSE; + TRACE("Integer list (TOKEN_INTEGER_LIST) of size %d\n", nb_elem); + } + else if (token == TOKEN_FLOAT_LIST) + { + if (!read_bytes(buf, &nb_elem, 4)) + return 0; + token = TOKEN_FLOAT; + is_float = TRUE; + TRACE("Float list (TOKEN_FLOAT_LIST) of size %d\n", nb_elem); + } + } + + if (nb_elem) + { + token = is_float ? TOKEN_FLOAT : TOKEN_INTEGER; + nb_elem--; + { + DWORD integer; + + if (!read_bytes(buf, &integer, 4)) + return 0; + + *(DWORD*)buf->value = integer; + } + dump_TOKEN(token); + return token; + } + + switch (token) + { + case TOKEN_NAME: + { + DWORD count; + char strname[100]; + + if (!read_bytes(buf, &count, 4)) + return 0; + if (!read_bytes(buf, strname, count)) + return 0; + strname[count] = 0; + /*TRACE("name = %s\n", strname);*/ + + strcpy((char*)buf->value, strname); + } + break; + case TOKEN_INTEGER: + { + DWORD integer; + + if (!read_bytes(buf, &integer, 4)) + return 0; + /*TRACE("integer = %ld\n", integer);*/ + + *(DWORD*)buf->value = integer; + } + break; + case TOKEN_GUID: + { + char strguid[39]; + GUID class_id; + + if (!read_bytes(buf, &class_id, 16)) + return 0; + sprintf(strguid, CLSIDFMT, class_id.Data1, class_id.Data2, class_id.Data3, class_id.Data4[0], + class_id.Data4[1], class_id.Data4[2], class_id.Data4[3], class_id.Data4[4], class_id.Data4[5], + class_id.Data4[6], class_id.Data4[7]); + /*TRACE("guid = {%s}\n", strguid);*/ + + *(GUID*)buf->value = class_id; + } + break; + case TOKEN_STRING: + { + DWORD count; + WORD tmp_token; + char strname[100]; + if (!read_bytes(buf, &count, 4)) + return 0; + if (!read_bytes(buf, strname, count)) + return 0; + strname[count] = 0; + if (!read_bytes(buf, &tmp_token, 2)) + return 0; + if ((tmp_token != TOKEN_COMMA) && (tmp_token != TOKEN_SEMICOLON)) + ERR("No comma or semicolon (got %d)\n", tmp_token); + /*TRACE("name = %s\n", strname);*/ + + strcpy((char*)buf->value, strname); + token = TOKEN_LPSTR; + } + break; + case TOKEN_OBRACE: + case TOKEN_CBRACE: + case TOKEN_OPAREN: + case TOKEN_CPAREN: + case TOKEN_OBRACKET: + case TOKEN_CBRACKET: + case TOKEN_OANGLE: + case TOKEN_CANGLE: + case TOKEN_DOT: + case TOKEN_COMMA: + case TOKEN_SEMICOLON: + case TOKEN_TEMPLATE: + case TOKEN_WORD: + case TOKEN_DWORD: + case TOKEN_FLOAT: + case TOKEN_DOUBLE: + case TOKEN_CHAR: + case TOKEN_UCHAR: + case TOKEN_SWORD: + case TOKEN_SDWORD: + case TOKEN_VOID: + case TOKEN_LPSTR: + case TOKEN_UNICODE: + case TOKEN_CSTRING: + case TOKEN_ARRAY: + break; + default: + return 0; + } + } + + dump_TOKEN(token); + + return token; +} + +static const char* get_primitive_string(WORD token) +{ + switch(token) + { + case TOKEN_WORD: + return "WORD"; + case TOKEN_DWORD: + return "DWORD"; + case TOKEN_FLOAT: + return "FLOAT"; + case TOKEN_DOUBLE: + return "DOUBLE"; + case TOKEN_CHAR: + return "CHAR"; + case TOKEN_UCHAR: + return "UCHAR"; + case TOKEN_SWORD: + return "SWORD"; + case TOKEN_SDWORD: + return "SDWORD"; + case TOKEN_VOID: + return "VOID"; + case TOKEN_LPSTR: + return "STRING"; + case TOKEN_UNICODE: + return "UNICODE"; + case TOKEN_CSTRING: + return "CSTRING "; + default: + break; + } + return NULL; +} + +static WORD get_TOKEN(parse_buffer * buf) +{ + if (buf->token_present) + { + buf->token_present = FALSE; + return buf->current_token; + } + + buf->current_token = parse_TOKEN(buf); + + return buf->current_token; +} + +static WORD check_TOKEN(parse_buffer * buf) +{ + if (buf->token_present) + return buf->current_token; + + buf->current_token = parse_TOKEN(buf); + buf->token_present = TRUE; + + return buf->current_token; +} + +static inline BOOL is_primitive_type(WORD token) +{ + BOOL ret; + switch(token) + { + case TOKEN_WORD: + case TOKEN_DWORD: + case TOKEN_FLOAT: + case TOKEN_DOUBLE: + case TOKEN_CHAR: + case TOKEN_UCHAR: + case TOKEN_SWORD: + case TOKEN_SDWORD: + case TOKEN_LPSTR: + case TOKEN_UNICODE: + case TOKEN_CSTRING: + ret = 1; + break; + default: + ret = 0; + break; + } + return ret; +} + +BOOL parse_template_option_info(parse_buffer * buf) +{ + xtemplate* cur_template = &buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates]; + + if (check_TOKEN(buf) == TOKEN_DOT) + { + get_TOKEN(buf); + if (get_TOKEN(buf) != TOKEN_DOT) + return FALSE; + if (get_TOKEN(buf) != TOKEN_DOT) + return FALSE; + cur_template->open = TRUE; + } + else + { + while (1) + { + if (get_TOKEN(buf) != TOKEN_NAME) + return FALSE; + strcpy(cur_template->childs[cur_template->nb_childs], (char*)buf->value); + if (check_TOKEN(buf) == TOKEN_GUID) + get_TOKEN(buf); + cur_template->nb_childs++; + if (check_TOKEN(buf) != TOKEN_COMMA) + break; + get_TOKEN(buf); + } + cur_template->open = FALSE; + } + + return TRUE; +} + +static BOOL parse_template_members_list(parse_buffer * buf) +{ + int idx_member = 0; + member* cur_member; + + while (1) + { + BOOL array = 0; + int nb_dims = 0; + cur_member = &buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[idx_member]; + + if (check_TOKEN(buf) == TOKEN_ARRAY) + { + get_TOKEN(buf); + array = 1; + } + + if (check_TOKEN(buf) == TOKEN_NAME) + { + cur_member->type = get_TOKEN(buf); + cur_member->idx_template = 0; + while (cur_member->idx_template < buf->pdxf->nb_xtemplates) + { + if (!strcasecmp((char*)buf->value, buf->pdxf->xtemplates[cur_member->idx_template].name)) + break; + cur_member->idx_template++; + } + if (cur_member->idx_template == buf->pdxf->nb_xtemplates) + { + ERR("Reference to a nonexistent template '%s'\n", (char*)buf->value); + return FALSE; + } + } + else if (is_primitive_type(check_TOKEN(buf))) + cur_member->type = get_TOKEN(buf); + else + break; + + if (get_TOKEN(buf) != TOKEN_NAME) + return FALSE; + strcpy(cur_member->name, (char*)buf->value); + + if (array) + { + while (check_TOKEN(buf) == TOKEN_OBRACKET) + { + if (nb_dims >= MAX_ARRAY_DIM) + { + FIXME("Too many dimensions (%d) for multi-dimensional array\n", nb_dims + 1); + return FALSE; + } + get_TOKEN(buf); + if (check_TOKEN(buf) == TOKEN_INTEGER) + { + get_TOKEN(buf); + cur_member->dim_fixed[nb_dims] = TRUE; + cur_member->dim_value[nb_dims] = *(DWORD*)buf->value; + } + else + { + int i; + if (get_TOKEN(buf) != TOKEN_NAME) + return FALSE; + for (i = 0; i < idx_member; i++) + { + if (!strcmp((char*)buf->value, buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[i].name)) + { + if (buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[i].nb_dims) + { + ERR("Array cannot be used to specify variable array size\n"); + return FALSE; + } + if (buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[i].type != TOKEN_DWORD) + { + FIXME("Only DWORD supported to specify variable array size\n"); + return FALSE; + } + break; + } + } + if (i == idx_member) + { + ERR("Reference to unknown member %s\n", (char*)buf->value); + return FALSE; + } + cur_member->dim_fixed[nb_dims] = FALSE; + cur_member->dim_value[nb_dims] = i; + } + if (get_TOKEN(buf) != TOKEN_CBRACKET) + return FALSE; + nb_dims++; + } + if (!nb_dims) + return FALSE; + cur_member->nb_dims = nb_dims; + } + if (get_TOKEN(buf) != TOKEN_SEMICOLON) + return FALSE; + + idx_member++; + } + + buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].nb_members = idx_member; + + return TRUE; +} + +static BOOL parse_template_parts(parse_buffer * buf) +{ + if (!parse_template_members_list(buf)) + return FALSE; + if (check_TOKEN(buf) == TOKEN_OBRACKET) + { + get_TOKEN(buf); + if (!parse_template_option_info(buf)) + return FALSE; + if (get_TOKEN(buf) != TOKEN_CBRACKET) + return FALSE; + } + + return TRUE; +} + +static void go_to_next_definition(parse_buffer * buf) +{ + while (buf->rem_bytes) + { + char c = *buf->buffer; + if ((c == '#') || (c == '/')) + { + read_bytes(buf, &c, 1); + /* Handle comment (# or //) */ + if (c == '/') + { + if (!read_bytes(buf, &c, 1)) + return; + if (c != '/') + return; + } + c = 0; + while (c != 0x0A) + { + if (!read_bytes(buf, &c, 1)) + return; + } + continue; + } + else if (is_space(*buf->buffer)) + { + buf->buffer++; + buf->rem_bytes--; + } + else + break; + } +} + +BOOL parse_template(parse_buffer * buf) +{ + if (get_TOKEN(buf) != TOKEN_TEMPLATE) + return FALSE; + if (get_TOKEN(buf) != TOKEN_NAME) + return FALSE; + strcpy(buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].name, (char*)buf->value); + if (get_TOKEN(buf) != TOKEN_OBRACE) + return FALSE; + if (get_TOKEN(buf) != TOKEN_GUID) + return FALSE; + buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].class_id = *(GUID*)buf->value; + if (!parse_template_parts(buf)) + return FALSE; + if (get_TOKEN(buf) != TOKEN_CBRACE) + return FALSE; + if (buf->txt) + { + /* Go to the next template */ + go_to_next_definition(buf); + } + + TRACE("%d - %s - %s\n", buf->pdxf->nb_xtemplates, buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].name, debugstr_guid(&buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].class_id)); + buf->pdxf->nb_xtemplates++; + + return TRUE; +} + +static BOOL parse_object_members_list(parse_buffer * buf) +{ + DWORD token; + int i; + xtemplate* pt = buf->pxt[buf->level]; + DWORD last_dword = 0; + + for (i = 0; i < pt->nb_members; i++) + { + int k; + int nb_elems = 1; + + buf->pxo->members[i].name = pt->members[i].name; + buf->pxo->members[i].start = buf->cur_pdata; + + for (k = 0; k < pt->members[i].nb_dims; k++) + { + if (pt->members[i].dim_fixed[k]) + nb_elems *= pt->members[i].dim_value[k]; + else + nb_elems *= *(DWORD*)buf->pxo->members[pt->members[i].dim_value[k]].start; + } + + TRACE("Elements to consider: %d\n", nb_elems); + + for (k = 0; k < nb_elems; k++) + { + if (buf->txt && k) + { + token = check_TOKEN(buf); + if (token == TOKEN_COMMA) + { + get_TOKEN(buf); + } + else + { + /* Allow comma omission */ + if (!((token == TOKEN_FLOAT) || (token == TOKEN_INTEGER))) + return FALSE; + } + } + + if (pt->members[i].type == TOKEN_NAME) + { + int j; + + TRACE("Found sub-object %s\n", buf->pdxf->xtemplates[pt->members[i].idx_template].name); + buf->level++; + /* To do template lookup */ + for (j = 0; j < buf->pdxf->nb_xtemplates; j++) + { + if (!strcasecmp(buf->pdxf->xtemplates[pt->members[i].idx_template].name, buf->pdxf->xtemplates[j].name)) + { + buf->pxt[buf->level] = &buf->pdxf->xtemplates[j]; + break; + } + } + if (j == buf->pdxf->nb_xtemplates) + { + ERR("Unknown template %s\n", (char*)buf->value); + buf->level--; + return FALSE; + } + TRACE("Enter %s\n", buf->pdxf->xtemplates[pt->members[i].idx_template].name); + if (!parse_object_parts(buf, FALSE)) + { + buf->level--; + return FALSE; + } + buf->level--; + } + else + { + token = check_TOKEN(buf); + if (token == TOKEN_INTEGER) + { + get_TOKEN(buf); + last_dword = *(DWORD*)buf->value; + TRACE("%s = %d\n", pt->members[i].name, *(DWORD*)buf->value); + /* Assume larger size */ + if ((buf->cur_pdata - buf->pdata + 4) > MAX_DATA_SIZE) + { + FIXME("Buffer too small\n"); + return FALSE; + } + if (pt->members[i].type == TOKEN_WORD) + { + *(((WORD*)(buf->cur_pdata))) = (WORD)(*(DWORD*)buf->value); + buf->cur_pdata += 2; + } + else if (pt->members[i].type == TOKEN_DWORD) + { + *(((DWORD*)(buf->cur_pdata))) = (DWORD)(*(DWORD*)buf->value); + buf->cur_pdata += 4; + } + else + { + FIXME("Token %d not supported\n", pt->members[i].type); + return FALSE; + } + } + else if (token == TOKEN_FLOAT) + { + get_TOKEN(buf); + TRACE("%s = %f\n", pt->members[i].name, *(float*)buf->value); + /* Assume larger size */ + if ((buf->cur_pdata - buf->pdata + 4) > MAX_DATA_SIZE) + { + FIXME("Buffer too small\n"); + return FALSE; + } + if (pt->members[i].type == TOKEN_FLOAT) + { + *(((float*)(buf->cur_pdata))) = (float)(*(float*)buf->value); + buf->cur_pdata += 4; + } + else + { + FIXME("Token %d not supported\n", pt->members[i].type); + return FALSE; + } + } + else if (token == TOKEN_LPSTR) + { + get_TOKEN(buf); + TRACE("%s = %s\n", pt->members[i].name, (char*)buf->value); + /* Assume larger size */ + if ((buf->cur_pdata - buf->pdata + 4) > MAX_DATA_SIZE) + { + FIXME("Buffer too small\n"); + return FALSE; + } + if (pt->members[i].type == TOKEN_LPSTR) + { + int len = strlen((char*)buf->value) + 1; + if ((buf->cur_pstrings - buf->pstrings + len) > MAX_STRINGS_BUFFER) + { + FIXME("Buffer too small %p %p %d\n", buf->cur_pstrings, buf->pstrings, len); + return FALSE; + } + strcpy((char*)buf->cur_pstrings, (char*)buf->value); + *(((LPCSTR*)(buf->cur_pdata))) = (char*)buf->cur_pstrings; + buf->cur_pstrings += len; + buf->cur_pdata += 4; + } + else + { + FIXME("Token %d not supported\n", pt->members[i].type); + return FALSE; + } + } + else + { + FIXME("Unexpected token %d\n", token); + return FALSE; + } + } + } + + if (buf->txt && (check_TOKEN(buf) != TOKEN_CBRACE)) + { + token = get_TOKEN(buf); + if ((token != TOKEN_SEMICOLON) && (token != TOKEN_COMMA)) + { + /* Allow comma instead of semicolon in some specific cases */ + if (!((token == TOKEN_COMMA) && ((i+1) < pt->nb_members) && (pt->members[i].type == pt->members[i+1].type) + && (!pt->members[i].nb_dims) && (!pt->members[i+1].nb_dims))) + return FALSE; + } + } + } + + return TRUE; +} + +static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional) +{ + if (!parse_object_members_list(buf)) + return FALSE; + + if (allow_optional) + { + buf->pxo->size = buf->cur_pdata - buf->pxo->pdata; + + /* Skip trailing semicolon */ + while (check_TOKEN(buf) == TOKEN_SEMICOLON) + get_TOKEN(buf); + + while (1) + { + if (check_TOKEN(buf) == TOKEN_OBRACE) + { + int i, j; + get_TOKEN(buf); + if (get_TOKEN(buf) != TOKEN_NAME) + return FALSE; + if (get_TOKEN(buf) != TOKEN_CBRACE) + return FALSE; + TRACE("Found optional reference %s\n", (char*)buf->value); + for (i = 0; i < buf->nb_pxo_globals; i++) + { + for (j = 0; j < (buf->pxo_globals[i])[0].nb_subobjects; j++) + { + if (!strcmp((buf->pxo_globals[i])[j].name, (char*)buf->value)) + goto _exit; + } + } +_exit: + if (i == buf->nb_pxo_globals) + { + ERR("Reference to unknown object %s\n", (char*)buf->value); + return FALSE; + } + buf->pxo->childs[buf->pxo->nb_childs] = &buf->pxo_tab[buf->cur_subobject++]; + buf->pxo->childs[buf->pxo->nb_childs]->ptarget = &(buf->pxo_globals[i])[j]; + buf->pxo->nb_childs++; + } + else if (check_TOKEN(buf) == TOKEN_NAME) + { + xobject* pxo = buf->pxo; + buf->pxo = buf->pxo->childs[buf->pxo->nb_childs] = &buf->pxo_tab[buf->cur_subobject++]; + + TRACE("Enter optional %s\n", (char*)buf->value); + buf->level++; + if (!parse_object(buf)) + { + buf->level--; + return FALSE; + } + buf->level--; + buf->pxo = pxo; + buf->pxo->nb_childs++; + } + else + break; + } + } + + if (buf->pxo->nb_childs > MAX_CHILDS) + { + FIXME("Too many childs %d\n", buf->pxo->nb_childs); + return FALSE; + } + + return TRUE; +} + +BOOL parse_object(parse_buffer * buf) +{ + int i; + + buf->pxo->pdata = buf->cur_pdata; + buf->pxo->ptarget = NULL; + + if (get_TOKEN(buf) != TOKEN_NAME) + return FALSE; + + /* To do template lookup */ + for (i = 0; i < buf->pdxf->nb_xtemplates; i++) + { + if (!strcasecmp((char*)buf->value, buf->pdxf->xtemplates[i].name)) + { + buf->pxt[buf->level] = &buf->pdxf->xtemplates[i]; + memcpy(&buf->pxo->type, &buf->pdxf->xtemplates[i].class_id, 16); + break; + } + } + if (i == buf->pdxf->nb_xtemplates) + { + ERR("Unknown template %s\n", (char*)buf->value); + return FALSE; + } + + if (check_TOKEN(buf) == TOKEN_NAME) + { + get_TOKEN(buf); + strcpy(buf->pxo->name, (char*)buf->value); + } + else + buf->pxo->name[0] = 0; + + if (get_TOKEN(buf) != TOKEN_OBRACE) + return FALSE; + if (check_TOKEN(buf) == TOKEN_GUID) + { + get_TOKEN(buf); + memcpy(&buf->pxo->class_id, buf->value, 16); + } + else + memset(&buf->pxo->class_id, 0, 16); + + if (!parse_object_parts(buf, TRUE)) + return FALSE; + if (get_TOKEN(buf) != TOKEN_CBRACE) + return FALSE; + + if (buf->txt) + { + /* Go to the next object */ + go_to_next_definition(buf); + } + + return TRUE; +} diff --git a/dlls/d3dxof/tests/d3dxof.c b/dlls/d3dxof/tests/d3dxof.c index 12df0c673f0..4e74f1afc9e 100644 --- a/dlls/d3dxof/tests/d3dxof.c +++ b/dlls/d3dxof/tests/d3dxof.c @@ -137,7 +137,7 @@ static void test_refcount(void) ok(ref == 0, "Got refcount %ld, expected 0\n", ref); } -/* Set it to 1 to expand the string when dumping the object. This is usefull when there is +/* Set it to 1 to expand the string when dumping the object. This is useful when there is * only one string in a sub-object (very common). Use with care, this may lead to a crash. */ #define EXPAND_STRING 0 diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index 3eb420e75c2..880aed9a86b 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -91,7 +91,6 @@ void hash_table_init(struct pool* pool, struct hash_table* ht, void hash_table_destroy(struct hash_table* ht); void hash_table_add(struct hash_table* ht, struct hash_table_elt* elt); void* hash_table_find(const struct hash_table* ht, const char* name); -unsigned hash_table_hash(const char* name, unsigned num_buckets); struct hash_table_iter { @@ -439,9 +438,6 @@ extern struct module* module_find_by_addr(const struct process* pcs, unsigned long addr, enum module_type type); extern struct module* - module_find_by_name(const struct process* pcs, - const WCHAR* name); -extern struct module* module_find_by_nameA(const struct process* pcs, const char* name); extern struct module* @@ -454,9 +450,6 @@ extern struct module* unsigned long addr, unsigned long size, unsigned long stamp, unsigned long checksum); extern struct module* - module_get_container(const struct process* pcs, - const struct module* inner); -extern struct module* module_get_containee(const struct process* pcs, const struct module* inner); extern enum module_type diff --git a/dlls/dbghelp/minidump.c b/dlls/dbghelp/minidump.c index cc124157544..0419bc87b96 100644 --- a/dlls/dbghelp/minidump.c +++ b/dlls/dbghelp/minidump.c @@ -98,10 +98,9 @@ static BOOL fetch_processes_info(struct dump_context* dc) dc->spi = dc->pcs_buffer; for (;;) { - if (dc->spi->dwProcessID == dc->pid) return TRUE; - if (!dc->spi->dwOffset) break; - dc->spi = (SYSTEM_PROCESS_INFORMATION*) - ((char*)dc->spi + dc->spi->dwOffset); + if (HandleToUlong(dc->spi->UniqueProcessId) == dc->pid) return TRUE; + if (!dc->spi->NextEntryOffset) break; + dc->spi = (SYSTEM_PROCESS_INFORMATION*)((char*)dc->spi + dc->spi->NextEntryOffset); } } HeapFree(GetProcessHeap(), 0, dc->pcs_buffer); @@ -179,13 +178,13 @@ static BOOL fetch_thread_info(struct dump_context* dc, int thd_idx, const MINIDUMP_EXCEPTION_INFORMATION* except, MINIDUMP_THREAD* mdThd, CONTEXT* ctx) { - DWORD tid = dc->spi->ti[thd_idx].dwThreadID; + DWORD tid = HandleToUlong(dc->spi->ti[thd_idx].ClientId.UniqueThread); HANDLE hThread; THREAD_BASIC_INFORMATION tbi; memset(ctx, 0, sizeof(*ctx)); - mdThd->ThreadId = dc->spi->ti[thd_idx].dwThreadID; + mdThd->ThreadId = tid; mdThd->SuspendCount = 0; mdThd->Teb = 0; mdThd->Stack.StartOfMemoryRange = 0; @@ -198,8 +197,7 @@ static BOOL fetch_thread_info(struct dump_context* dc, int thd_idx, if ((hThread = OpenThread(THREAD_ALL_ACCESS, FALSE, tid)) == NULL) { - FIXME("Couldn't open thread %u (%u)\n", - dc->spi->ti[thd_idx].dwThreadID, GetLastError()); + FIXME("Couldn't open thread %u (%u)\n", tid, GetLastError()); return FALSE; } @@ -713,7 +711,7 @@ static unsigned dump_threads(struct dump_context* dc, cbin.ProcessId = dc->pid; cbin.ProcessHandle = dc->hProcess; cbin.CallbackType = ThreadCallback; - cbin.u.Thread.ThreadId = dc->spi->ti[i].dwThreadID; + cbin.u.Thread.ThreadId = HandleToUlong(dc->spi->ti[i].ClientId.UniqueThread); cbin.u.Thread.ThreadHandle = 0; /* FIXME */ cbin.u.Thread.Context = ctx; cbin.u.Thread.SizeOfContext = sizeof(CONTEXT); diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index ddc6d3d89bd..49b774262ce 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -188,7 +188,7 @@ struct module* module_new(struct process* pcs, const WCHAR* name, * module_find_by_name * */ -struct module* module_find_by_name(const struct process* pcs, const WCHAR* name) +static struct module* module_find_by_name(const struct process* pcs, const WCHAR* name) { struct module* module; @@ -238,7 +238,7 @@ struct module* module_is_already_loaded(const struct process* pcs, const WCHAR* * module_get_container * */ -struct module* module_get_container(const struct process* pcs, +static struct module* module_get_container(const struct process* pcs, const struct module* inner) { struct module* module; diff --git a/dlls/dbghelp/storage.c b/dlls/dbghelp/storage.c index 04ea378855e..ec8a37d7f3e 100644 --- a/dlls/dbghelp/storage.c +++ b/dlls/dbghelp/storage.c @@ -298,7 +298,7 @@ unsigned sparse_array_length(const struct sparse_array* sa) return sa->elements.num_elts; } -unsigned hash_table_hash(const char* name, unsigned num_buckets) +static unsigned hash_table_hash(const char* name, unsigned num_buckets) { unsigned hash = 0; while (*name) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 0589648db87..286e4b32f07 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -121,8 +121,11 @@ IDirectDrawImpl_QueryInterface(IDirectDraw7 *iface, } else if ( IsEqualGUID( &IID_IDirectDraw3, refiid ) ) { - *obj = ICOM_INTERFACE(This, IDirectDraw3); - TRACE("(%p) Returning IDirectDraw3 interface at %p\n", This, *obj); + /* This Interface exists in ddrawex.dll, it is implemented in a wrapper */ + WARN("IDirectDraw3 is not valid in ddraw.dll\n"); + *obj = NULL; + LeaveCriticalSection(&ddraw_cs); + return E_NOINTERFACE; } else if ( IsEqualGUID( &IID_IDirectDraw2, refiid ) ) { @@ -590,7 +593,7 @@ IDirectDrawImpl_SetDisplayModeNoOverride(IDirectDraw7 *iface, { case WINED3DERR_NOTAVAILABLE: return DDERR_UNSUPPORTED; default: return hr; - }; + } } /***************************************************************************** @@ -1107,7 +1110,14 @@ IDirectDrawImpl_WaitForVerticalBlank(IDirectDraw7 *iface, HANDLE h) { ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, iface); - FIXME("(%p)->(%x,%p): Stub\n", This, Flags, h); + static BOOL hide = FALSE; + + /* This function is called often, so print the fixme only once */ + if(!hide) + { + FIXME("(%p)->(%x,%p): Stub\n", This, Flags, h); + hide = TRUE; + } /* MSDN says DDWAITVB_BLOCKBEGINEVENT is not supported */ if(Flags & DDWAITVB_BLOCKBEGINEVENT) @@ -2084,6 +2094,7 @@ IDirectDrawImpl_CreateNewSurface(IDirectDrawImpl *This, ICOM_INIT_INTERFACE(*ppSurf, IDirect3DTexture, IDirect3DTexture1_Vtbl); (*ppSurf)->ref = 1; (*ppSurf)->version = 7; + TRACE("%p->version = %d\n", (*ppSurf), (*ppSurf)->version); (*ppSurf)->ddraw = This; (*ppSurf)->surface_desc.dwSize = sizeof(DDSURFACEDESC2); (*ppSurf)->surface_desc.u4.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT); diff --git a/dlls/ddraw/ddraw_thunks.c b/dlls/ddraw/ddraw_thunks.c index b748ad47985..da61e1feb7d 100644 --- a/dlls/ddraw/ddraw_thunks.c +++ b/dlls/ddraw/ddraw_thunks.c @@ -377,6 +377,23 @@ IDirectDraw4Impl_CreatePalette(LPDIRECTDRAW4 This, DWORD dwFlags, return hr; } +/* Must set all attached surfaces (e.g. mipmaps) versions as well */ +static void set_surf_version(IDirectDrawSurfaceImpl *surf, int version) +{ + int i; + TRACE("%p->version(%d) = %d\n", surf, surf->version, version); + surf->version = version; + for(i = 0; i < MAX_COMPLEX_ATTACHED; i++) + { + if(!surf->complex_array[i]) break; + set_surf_version(surf->complex_array[i], version); + } + while( (surf = surf->next_attached) ) + { + set_surf_version(surf, version); + } +} + static HRESULT WINAPI IDirectDrawImpl_CreateSurface(LPDIRECTDRAW This, LPDDSURFACEDESC pSDesc, LPDIRECTDRAWSURFACE *ppSurface, @@ -407,7 +424,7 @@ IDirectDrawImpl_CreateSurface(LPDIRECTDRAW This, LPDDSURFACEDESC pSDesc, impl = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, pSurface7); if(SUCCEEDED(hr) && impl) { - impl->version = 1; + set_surf_version(impl, 1); IDirectDraw7_Release(COM_INTERFACE_CAST(IDirectDrawImpl, IDirectDraw, IDirectDraw7, @@ -442,7 +459,7 @@ IDirectDraw2Impl_CreateSurface(LPDIRECTDRAW2 This, LPDDSURFACEDESC pSDesc, impl = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, pSurface7); if(SUCCEEDED(hr) && impl) { - impl->version = 2; + set_surf_version(impl, 2); IDirectDraw7_Release(COM_INTERFACE_CAST(IDirectDrawImpl, IDirectDraw2, IDirectDraw7, @@ -477,7 +494,7 @@ IDirectDraw3Impl_CreateSurface(LPDIRECTDRAW3 This, LPDDSURFACEDESC pSDesc, impl = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, pSurface7); if(SUCCEEDED(hr) && impl) { - impl->version = 3; + set_surf_version(impl, 3); IDirectDraw7_Release(COM_INTERFACE_CAST(IDirectDrawImpl, IDirectDraw3, IDirectDraw7, @@ -507,7 +524,7 @@ IDirectDraw4Impl_CreateSurface(LPDIRECTDRAW4 This, LPDDSURFACEDESC2 pSDesc, impl = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, *ppSurface); if(SUCCEEDED(hr) && impl) { - impl->version = 4; + set_surf_version(impl, 4); IDirectDraw7_Release(COM_INTERFACE_CAST(IDirectDrawImpl, IDirectDraw4, IDirectDraw7, diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index d263f67852a..f1841110b02 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -475,15 +475,18 @@ IDirectDrawSurfaceImpl_GetAttachedSurface(IDirectDrawSurface7 *iface, TRACE("(%p)->(%p,%p)\n", This, Caps, Surface); EnterCriticalSection(&ddraw_cs); - our_caps = *Caps; - if(This->version < 7) { /* Earlier dx apps put garbage into these members, clear them */ + our_caps.dwCaps = Caps->dwCaps; our_caps.dwCaps2 = 0; our_caps.dwCaps3 = 0; our_caps.dwCaps4 = 0; } + else + { + our_caps = *Caps; + } TRACE("(%p): Looking for caps: %x,%x,%x,%x\n", This, our_caps.dwCaps, our_caps.dwCaps2, our_caps.dwCaps3, our_caps.dwCaps4); /* FIXME: Better debugging */ diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index 94a0dfecc5c..3a2cd2b36c6 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -843,7 +843,7 @@ static HRESULT WINAPI enumDevicesCallback(GUID *Guid,LPSTR DeviceDescription,LPS static HRESULT WINAPI enumDevicesCallbackTest7(LPSTR DeviceDescription, LPSTR DeviceName, LPD3DDEVICEDESC7 lpdd7, LPVOID Context) { - D3D7ETest *d3d7et = (D3D7ETest*)Context; + D3D7ETest *d3d7et = Context; if(IsEqualGUID(&lpdd7->deviceGUID, &IID_IDirect3DRGBDevice)) d3d7et->rgb++; else if(IsEqualGUID(&lpdd7->deviceGUID, &IID_IDirect3DHALDevice)) @@ -871,7 +871,7 @@ static void D3D7EnumTest(void) } memset(&d3d7et, 0, sizeof(d3d7et)); - IDirect3D7_EnumDevices(lpD3D, enumDevicesCallbackTest7, (LPVOID) &d3d7et); + IDirect3D7_EnumDevices(lpD3D, enumDevicesCallbackTest7, &d3d7et); /* A couple of games (Delta Force LW and TFD) rely on this behaviour */ @@ -1118,7 +1118,7 @@ static void Direct3D1Test(void) instr->bOpcode = D3DOP_TRIANGLE; instr->bSize = sizeof(D3DOP_TRIANGLE); instr->wCount = 0; - instr = ((D3DINSTRUCTION*)(instr))+1; + instr++; instr->bOpcode = D3DOP_EXIT; instr->bSize = 0; instr->wCount = 0; @@ -1130,7 +1130,7 @@ static void Direct3D1Test(void) memset(&transformdata, 0, sizeof(transformdata)); transformdata.dwSize = sizeof(transformdata); - transformdata.lpIn = (void *) testverts; + transformdata.lpIn = testverts; transformdata.dwInSize = sizeof(testverts[0]); transformdata.lpOut = out; transformdata.dwOutSize = sizeof(out[0]); @@ -1252,7 +1252,7 @@ static void Direct3D1Test(void) "Regular output DWORD %d remained untouched\n", i); } - transformdata.lpIn = (void *) cliptest; + transformdata.lpIn = cliptest; transformdata.dwInSize = sizeof(cliptest[0]); hr = IDirect3DViewport_TransformVertices(Viewport, sizeof(cliptest) / sizeof(cliptest[0]), &transformdata, D3DTRANSFORM_CLIPPED, @@ -1356,7 +1356,7 @@ static void Direct3D1Test(void) ok(hr == D3D_OK, "IDirect3DViewport_TransformVertices returned %08x\n", hr); ok(i == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %d\n", i); - transformdata.lpIn = (void *) offscreentest; + transformdata.lpIn = offscreentest; transformdata.dwInSize = sizeof(offscreentest[0]); SET_VP_DATA(vp_data); vp_data.dwWidth = 257; diff --git a/dlls/ddraw/tests/ddrawmodes.c b/dlls/ddraw/tests/ddrawmodes.c index d21c3b4f350..67dd9d4cbf4 100644 --- a/dlls/ddraw/tests/ddrawmodes.c +++ b/dlls/ddraw/tests/ddrawmodes.c @@ -385,6 +385,21 @@ static void testcooperativelevels_exclusive(void) /* All done */ } +static void testddraw3(void) +{ + const GUID My_IID_IDirectDraw3 = { + 0x618f8ad4, + 0x8b7a, + 0x11d0, + { 0x8f,0xcc,0x0,0xc0,0x4f,0xd9,0x18,0x9d } + }; + IDirectDraw3 *dd3; + HRESULT hr; + hr = IDirectDraw_QueryInterface(lpDD, &My_IID_IDirectDraw3, (void **) &dd3); + ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectDraw3 returned 0x%08x, expected E_NOINTERFACE\n", hr); + if(SUCCEEDED(hr) && dd3) IDirectDraw3_Release(dd3); +} + START_TEST(ddrawmodes) { createwindow(); @@ -394,6 +409,7 @@ START_TEST(ddrawmodes) if (winetest_interactive) testdisplaymodes(); flushdisplaymodes(); + testddraw3(); releasedirectdraw(); createdirectdraw(); diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index 1ad07ec073c..68a51cdd55f 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -248,7 +248,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; lpData[0] = 0xCCCCCCCC; lpData[1] = 0xCCCCCCCC; lpData[2] = 0xCCCCCCCC; @@ -274,7 +274,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpSrc, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; lpData[0] = 0x77010203; lpData[1] = 0x00010203; lpData[2] = 0x77FF00FF; @@ -287,7 +287,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; /* Different behavior on some drivers / windows versions. Some versions ignore the X channel when * color keying, but copy it to the destination surface. Others apply it for color keying, but * do not copy it into the destination surface. @@ -388,7 +388,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpSrc, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; lpData[0] = 0x000000FF; /* Applies to src blt key in src surface */ lpData[1] = 0x00000000; /* Applies to dst blt key in src surface */ lpData[2] = 0x00FF0000; /* Dst color key in dst surface */ @@ -401,7 +401,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; lpData[0] = 0x55555555; lpData[1] = 0x55555555; lpData[2] = 0x55555555; @@ -418,7 +418,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; /* Should have copied src data unmodified to dst */ ok(lpData[0] == 0x000000FF && lpData[1] == 0x00000000 && @@ -443,7 +443,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; ok(lpData[0] == 0x55555555 && /* Here the src key applied */ lpData[1] == 0x00000000 && @@ -468,7 +468,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; ok(lpData[0] == 0x000000FF && lpData[1] == 0x00000000 && @@ -495,7 +495,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; ok(lpData[0] == 0x55555555 && lpData[1] == 0x55555555 && @@ -521,7 +521,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; /* DirectDraw uses the dest blit key from the SOURCE surface ! */ ok(lpData[0] == 0x00ff0000 && @@ -548,7 +548,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; ok(lpData[0] == 0x00FF0000 && lpData[1] == 0x00FF0000 && @@ -575,7 +575,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; ok(lpData[0] == 0x00FF0000 && lpData[1] == 0x00FF0000 && @@ -598,7 +598,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpSrc, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; lpData[5] = 0x000000FF; /* Applies to src blt key in src surface */ rc = IDirectDrawSurface_Unlock(lpSrc, NULL); ok(rc==DD_OK,"Unlock returned: %x\n",rc); @@ -610,7 +610,7 @@ static void SrcColorKey32BlitTest(void) rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); - lpData = (LPDWORD)ddsd2.lpSurface; + lpData = ddsd2.lpSurface; ok(lpData[0] == 0x00FF0000 && /* Masked by Destination key */ lpData[1] == 0x00FF0000 && /* Masked by Destination key */ @@ -1016,7 +1016,7 @@ static void EnumTest(void) ok(!ctx.expected[3], "expected NULL pointer\n"); ctx.count = 0; - rc = IDirectDraw_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, &ddsd, (void *) &ctx, enumCB); + rc = IDirectDraw_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, &ddsd, &ctx, enumCB); ok(rc == DD_OK, "IDirectDraw_EnumSurfaces returned %08x\n", rc); ok(ctx.count == 3, "%d surfaces enumerated, expected 3\n", ctx.count); @@ -1433,7 +1433,7 @@ static HRESULT WINAPI CubeTestLvl2Enum(IDirectDrawSurface7 *surface, DDSURFACEDE static HRESULT WINAPI CubeTestLvl1Enum(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *desc, void *context) { UINT mips = 0; - UINT *num = (UINT *) context; + UINT *num = context; static const struct compare expected[] = { { @@ -2764,6 +2764,101 @@ static BOOL can_create_primary_surface(void) return TRUE; } +static void dctest_surf(IDirectDrawSurface *surf, int ddsdver) { + HRESULT hr; + HDC dc, dc2 = (HDC) 0x1234; + DDSURFACEDESC ddsd; + DDSURFACEDESC2 ddsd2; + + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = sizeof(ddsd); + memset(&ddsd2, 0, sizeof(ddsd2)); + ddsd2.dwSize = sizeof(ddsd2); + + hr = IDirectDrawSurface_GetDC(surf, &dc); + ok(hr == DD_OK, "IDirectDrawSurface_GetDC failed: 0x%08x\n", hr); + + hr = IDirectDrawSurface_GetDC(surf, &dc2); + ok(hr == DDERR_DCALREADYCREATED, "IDirectDrawSurface_GetDC failed: 0x%08x\n", hr); + ok(dc2 == (HDC) 0x1234, "The failed GetDC call changed the dc: %p\n", dc2); + + hr = IDirectDrawSurface_Lock(surf, NULL, ddsdver == 1 ? &ddsd : ((DDSURFACEDESC *) &ddsd2), 0, NULL); + ok(hr == DDERR_SURFACEBUSY, "IDirectDrawSurface_Lock returned 0x%08x, expected DDERR_ALREADYLOCKED\n", hr); + + hr = IDirectDrawSurface_ReleaseDC(surf, dc); + ok(hr == DD_OK, "IDirectDrawSurface_ReleaseDC failed: 0x%08x\n", hr); + hr = IDirectDrawSurface_ReleaseDC(surf, dc); + ok(hr == DDERR_NODC, "IDirectDrawSurface_ReleaseDC returned 0x%08x, expected DDERR_NODC\n", hr); +} + +static void GetDCTest(void) +{ + DDSURFACEDESC ddsd; + DDSURFACEDESC2 ddsd2; + IDirectDrawSurface *surf; + IDirectDrawSurface2 *surf2; + IDirectDrawSurface4 *surf4; + IDirectDrawSurface7 *surf7; + HRESULT hr; + IDirectDraw2 *dd2; + IDirectDraw4 *dd4; + IDirectDraw7 *dd7; + + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = sizeof(ddsd); + ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; + ddsd.dwWidth = 64; + ddsd.dwHeight = 64; + ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + memset(&ddsd2, 0, sizeof(ddsd2)); + ddsd2.dwSize = sizeof(ddsd2); + ddsd2.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; + ddsd2.dwWidth = 64; + ddsd2.dwHeight = 64; + ddsd2.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + + hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surf, NULL); + ok(hr == DD_OK, "IDirectDraw_CreateSurface failed: 0x%08x\n", hr); + dctest_surf(surf, 1); + IDirectDrawSurface_Release(surf); + + hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw2, (void **) &dd2); + ok(hr == DD_OK, "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + + hr = IDirectDraw2_CreateSurface(dd2, &ddsd, &surf, NULL); + ok(hr == DD_OK, "IDirectDraw2_CreateSurface failed: 0x%08x\n", hr); + dctest_surf(surf, 1); + + hr = IDirectDrawSurface_QueryInterface(surf, &IID_IDirectDrawSurface2, (void **) &surf2); + ok(hr == DD_OK, "IDirectDrawSurface_QueryInterface failed: 0x%08x\n", hr); + dctest_surf((IDirectDrawSurface *) surf2, 1); + + IDirectDrawSurface2_Release(surf2); + IDirectDrawSurface_Release(surf); + IDirectDraw2_Release(dd2); + + hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw4, (void **) &dd4); + ok(hr == DD_OK, "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + + surf = NULL; + hr = IDirectDraw4_CreateSurface(dd4, &ddsd2, &surf4, NULL); + ok(hr == DD_OK, "IDirectDraw4_CreateSurface failed: 0x%08x\n", hr); + dctest_surf((IDirectDrawSurface *) surf4, 2); + + IDirectDrawSurface4_Release(surf4); + IDirectDraw4_Release(dd4); + + hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7); + ok(hr == DD_OK, "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + surf = NULL; + hr = IDirectDraw7_CreateSurface(dd7, &ddsd2, &surf7, NULL); + ok(hr == DD_OK, "IDirectDraw7_CreateSurface failed: 0x%08x\n", hr); + dctest_surf((IDirectDrawSurface *) surf7, 2); + + IDirectDrawSurface7_Release(surf7); + IDirectDraw7_Release(dd7); +} + START_TEST(dsurface) { HRESULT ret; @@ -2806,5 +2901,6 @@ START_TEST(dsurface) StructSizeTest(); PaletteTest(); SurfaceCapsTest(); + GetDCTest(); ReleaseDirectDraw(); } diff --git a/dlls/ddraw/vertexbuffer.c b/dlls/ddraw/vertexbuffer.c index caac15f71be..9b2694a6fe4 100644 --- a/dlls/ddraw/vertexbuffer.c +++ b/dlls/ddraw/vertexbuffer.c @@ -509,7 +509,13 @@ IDirect3DVertexBufferImpl_Optimize(IDirect3DVertexBuffer7 *iface, { ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface); IDirect3DDeviceImpl *D3D = ICOM_OBJECT(IDirect3DDeviceImpl, IDirect3DDevice7, D3DDevice); - FIXME("(%p)->(%p,%08x): stub!\n", This, D3D, Flags); + static BOOL hide = FALSE; + + if (!hide) + { + FIXME("(%p)->(%p,%08x): stub!\n", This, D3D, Flags); + hide = TRUE; + } /* We could forward this call to WineD3D and take advantage * of it once we use OpenGL vertex buffers diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index ebc87ebddda..91449f8f846 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -432,11 +432,8 @@ static HRESULT create_DataFormat(LPCDIDATAFORMAT asked_format, DataFormat *forma break; } } - - if (j == asked_format->dwNumObjs) - same = 0; } - + TRACE("Setting to default value :\n"); for (j = 0; j < asked_format->dwNumObjs; j++) { if (done[j] == 0) { @@ -879,7 +876,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty( switch (LOWORD(rguid)) { - case (DWORD) DIPROP_BUFFERSIZE: + case (DWORD_PTR) DIPROP_BUFFERSIZE: { LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph; @@ -913,7 +910,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty( switch (LOWORD(rguid)) { - case (DWORD) DIPROP_AXISMODE: + case (DWORD_PTR) DIPROP_AXISMODE: { LPCDIPROPDWORD pd = (LPCDIPROPDWORD)pdiph; @@ -933,7 +930,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty( LeaveCriticalSection(&This->crit); break; } - case (DWORD) DIPROP_BUFFERSIZE: + case (DWORD_PTR) DIPROP_BUFFERSIZE: { LPCDIPROPDWORD pd = (LPCDIPROPDWORD)pdiph; diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index 00bc3bd7da8..faef24f8d8f 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -795,7 +795,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty( if (!HIWORD(rguid)) { switch (LOWORD(rguid)) { - case (DWORD)DIPROP_RANGE: { + case (DWORD_PTR)DIPROP_RANGE: { LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph; if (ph->dwHow == DIPH_DEVICE) { TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax); @@ -815,7 +815,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty( } break; } - case (DWORD)DIPROP_DEADZONE: { + case (DWORD_PTR)DIPROP_DEADZONE: { LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; if (ph->dwHow == DIPH_DEVICE) { TRACE("deadzone(%d) all\n", pd->dwData); @@ -832,7 +832,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty( } break; } - case (DWORD)DIPROP_SATURATION: { + case (DWORD_PTR)DIPROP_SATURATION: { LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; if (ph->dwHow == DIPH_DEVICE) { TRACE("saturation(%d) all\n", pd->dwData); @@ -919,7 +919,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty( if (!HIWORD(rguid)) { switch (LOWORD(rguid)) { - case (DWORD) DIPROP_RANGE: { + case (DWORD_PTR) DIPROP_RANGE: { LPDIPROPRANGE pr = (LPDIPROPRANGE)pdiph; int obj = find_property(&This->base.data_format, pdiph); @@ -933,7 +933,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty( } break; } - case (DWORD) DIPROP_DEADZONE: { + case (DWORD_PTR) DIPROP_DEADZONE: { LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph; int obj = find_property(&This->base.data_format, pdiph); @@ -944,7 +944,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty( } break; } - case (DWORD) DIPROP_SATURATION: { + case (DWORD_PTR) DIPROP_SATURATION: { LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph; int obj = find_property(&This->base.data_format, pdiph); diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 4dcd61e6168..6f5b362b701 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -215,67 +215,78 @@ static struct JoyDev *joydevs = NULL; static void find_joydevs(void) { - int i; + int i; - if (have_joydevs!=-1) { - return; - } + if (InterlockedCompareExchange(&have_joydevs, 0, -1) != -1) + /* Someone beat us to it */ + return; - have_joydevs = 0; + for (i = 0; i < MAX_JOYDEV; i++) + { + char buf[MAX_PATH]; + struct JoyDev joydev = {0}; + int fd; + int no_ff_check = 0; + int j; + struct JoyDev *new_joydevs; - for (i=0;ijoyfd=open(This->joydev->device,O_RDWR))) { - if (-1==(This->joyfd=open(This->joydev->device,O_RDONLY))) { - /* Couldn't open the device at all */ - perror(This->joydev->device); - IDirectInputDevice2AImpl_Unacquire(iface); - return DIERR_NOTFOUND; - } else { - /* Couldn't open in r/w but opened in read-only. */ - WARN("Could not open %s in read-write mode. Force feedback will be disabled.\n", This->joydev->device); + if ((res = IDirectInputDevice2AImpl_Acquire(iface)) != DI_OK) + { + WARN("Failed to acquire: %x\n", res); + return res; + } + + if ((This->joyfd = open(This->joydev->device, O_RDWR)) == -1) + { + if ((This->joyfd = open(This->joydev->device, O_RDONLY)) == -1) + { + /* Couldn't open the device at all */ + ERR("Failed to open device %s: %d %s\n", This->joydev->device, errno, strerror(errno)); + IDirectInputDevice2AImpl_Unacquire(iface); + return DIERR_NOTFOUND; } - } } else - WARN("Failed to acquire: %x\n", res); + { + /* Couldn't open in r/w but opened in read-only. */ + WARN("Could not open %s in read-write mode. Force feedback will be disabled.\n", This->joydev->device); + } - return res; + return DI_OK; } /****************************************************************************** @@ -831,7 +852,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, if (!HIWORD(rguid)) { switch (LOWORD(rguid)) { - case (DWORD)DIPROP_RANGE: { + case (DWORD_PTR)DIPROP_RANGE: { LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph; if (ph->dwHow == DIPH_DEVICE) { @@ -859,7 +880,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, fake_current_js_state(This); break; } - case (DWORD)DIPROP_DEADZONE: { + case (DWORD_PTR)DIPROP_DEADZONE: { LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; if (ph->dwHow == DIPH_DEVICE) { DWORD i; @@ -878,18 +899,18 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, fake_current_js_state(This); break; } - case (DWORD)DIPROP_CALIBRATIONMODE: { + case (DWORD_PTR)DIPROP_CALIBRATIONMODE: { LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; FIXME("DIPROP_CALIBRATIONMODE(%d)\n", pd->dwData); break; } - case (DWORD)DIPROP_AUTOCENTER: { + case (DWORD_PTR)DIPROP_AUTOCENTER: { LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; FIXME("DIPROP_AUTOCENTER(%d)\n", pd->dwData); break; } - case (DWORD)DIPROP_SATURATION: { + case (DWORD_PTR)DIPROP_SATURATION: { LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; if (ph->dwHow == DIPH_DEVICE) { @@ -978,7 +999,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, if (HIWORD(rguid)) return DI_OK; switch (LOWORD(rguid)) { - case (DWORD) DIPROP_RANGE: + case (DWORD_PTR) DIPROP_RANGE: { LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph; int obj = find_property(&This->base.data_format, pdiph); @@ -990,7 +1011,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, TRACE("range(%d, %d) obj=%d\n", pr->lMin, pr->lMax, obj); break; } - case (DWORD) DIPROP_DEADZONE: + case (DWORD_PTR) DIPROP_DEADZONE: { LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph; int obj = find_property(&This->base.data_format, pdiph); @@ -1001,7 +1022,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, TRACE("deadzone(%d) obj=%d\n", pd->dwData, obj); break; } - case (DWORD) DIPROP_SATURATION: + case (DWORD_PTR) DIPROP_SATURATION: { LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph; int obj = find_property(&This->base.data_format, pdiph); diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index 46d82fcba5b..47536f7f68e 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -443,7 +443,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, switch (LOWORD(rguid)) { - case (DWORD)DIPROP_KEYNAME: + case (DWORD_PTR)DIPROP_KEYNAME: { HRESULT hr; LPDIPROPSTRING ps = (LPDIPROPSTRING)pdiph; diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index 15727844f03..178b8fb4842 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -585,7 +585,7 @@ static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, if (!HIWORD(rguid)) { switch (LOWORD(rguid)) { - case (DWORD) DIPROP_GRANULARITY: { + case (DWORD_PTR) DIPROP_GRANULARITY: { LPDIPROPDWORD pr = (LPDIPROPDWORD) pdiph; /* We'll just assume that the app asks about the Z axis */ @@ -594,7 +594,7 @@ static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, break; } - case (DWORD) DIPROP_RANGE: { + case (DWORD_PTR) DIPROP_RANGE: { LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph; if ((pdiph->dwHow == DIPH_BYID) && diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c index 059760a18f0..8a31b62e7ef 100644 --- a/dlls/dmloader/loader.c +++ b/dlls/dmloader/loader.c @@ -212,10 +212,10 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_GetObject (LPDIR else we use info we were given */ if (pObjectEntry) { TRACE(": found alias entry for requested object... using stored info\n"); - /* I think in certain cases it can happen that entry's descriptor lacks info + /* I think in certain cases it can happen that entry's descriptor lacks info about where to load from (e.g.: if we loaded from stream and then released object - from cache; then only it's CLSID, GUID and perhaps name are left); so just - overwrite info entry has (since it ought to be 100% correct) */ + from cache; then only its CLSID, GUID and perhaps name are left); so just + overwrite whatever info the entry has (since it ought to be 100% correct) */ DMUSIC_CopyDescriptor (pDesc, &pObjectEntry->Desc); /*pDesc = &pObjectEntry->Desc; */ /* FIXME: is this OK? */ } else { @@ -476,7 +476,7 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_SetObject (LPDIR LIST_FOR_EACH (pEntry, This->pObjects) { pObjectEntry = LIST_ENTRY (pEntry, WINE_LOADER_ENTRY, entry); if (!memcmp (&pObjectEntry->Desc, pDesc, sizeof(DMUS_OBJECTDESC))) { - TRACE(": exacly same entry already exists\n"); + TRACE(": exactly same entry already exists\n"); return S_OK; } } diff --git a/dlls/dnsapi/tests/record.c b/dlls/dnsapi/tests/record.c index 8ce0f3dd179..4e97d85d756 100644 --- a/dlls/dnsapi/tests/record.c +++ b/dlls/dnsapi/tests/record.c @@ -37,25 +37,25 @@ static DNS_RECORDA r3 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 12 static void test_DnsRecordCompare( void ) { - ok( DnsRecordCompare( (PDNS_RECORD)&r1, (PDNS_RECORD)&r1 ) == TRUE, "failed unexpectedly\n" ); + ok( DnsRecordCompare( &r1, &r1 ) == TRUE, "failed unexpectedly\n" ); r2.pName = name2; - ok( DnsRecordCompare( (PDNS_RECORD)&r1, (PDNS_RECORD)&r2 ) == TRUE, "failed unexpectedly\n" ); + ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n" ); r2.Flags.S.CharSet = DnsCharSetUnicode; - ok( DnsRecordCompare( (PDNS_RECORD)&r1, (PDNS_RECORD)&r2 ) == FALSE, "succeeded unexpectedly\n" ); + ok( DnsRecordCompare( &r1, &r2 ) == FALSE, "succeeded unexpectedly\n" ); r2.Flags.S.CharSet = DnsCharSetAnsi; - ok( DnsRecordCompare( (PDNS_RECORD)&r1, (PDNS_RECORD)&r2 ) == FALSE, "succeeded unexpectedly\n" ); + ok( DnsRecordCompare( &r1, &r2 ) == FALSE, "succeeded unexpectedly\n" ); r1.Flags.S.CharSet = DnsCharSetAnsi; - ok( DnsRecordCompare( (PDNS_RECORD)&r1, (PDNS_RECORD)&r2 ) == TRUE, "failed unexpectedly\n" ); + ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n" ); r1.dwTtl = 0; - ok( DnsRecordCompare( (PDNS_RECORD)&r1, (PDNS_RECORD)&r2 ) == TRUE, "failed unexpectedly\n" ); + ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n" ); r2.Data.A.IpAddress = 0; - ok( DnsRecordCompare( (PDNS_RECORD)&r1, (PDNS_RECORD)&r2 ) == FALSE, "succeeded unexpectedly\n" ); + ok( DnsRecordCompare( &r1, &r2 ) == FALSE, "succeeded unexpectedly\n" ); } static void test_DnsRecordSetCompare( void ) diff --git a/dlls/dplayx/tests/dplayx.c b/dlls/dplayx/tests/dplayx.c index 7a0c657f7ce..00224bd35c7 100644 --- a/dlls/dplayx/tests/dplayx.c +++ b/dlls/dplayx/tests/dplayx.c @@ -783,7 +783,7 @@ static BOOL CALLBACK EnumAddress_cb2( REFGUID guidDataType, } else if ( IsEqualGUID( types[1], guidDataType ) ) { - todo_wine checkGuid( sps[ callbackData->dwCounter1 ], (LPGUID) lpData ); + todo_wine checkGuid( sps[ callbackData->dwCounter1 ], lpData ); } callbackData->dwCounter2++; @@ -815,10 +815,8 @@ static BOOL CALLBACK EnumConnections_cb( LPCGUID lpguidSP, &IID_IDirectPlayLobby3A, (LPVOID*) &pDPL ); callbackData->dwCounter2 = 0; - IDirectPlayLobby_EnumAddress( pDPL, EnumAddress_cb2, - (LPCVOID) lpConnection, - dwConnectionSize, - (LPVOID) callbackData ); + IDirectPlayLobby_EnumAddress( pDPL, EnumAddress_cb2, lpConnection, + dwConnectionSize, callbackData ); todo_wine check( 3, callbackData->dwCounter2 ); callbackData->dwCounter1++; @@ -841,24 +839,21 @@ static void test_EnumConnections(void) callbackData.dwCounter1 = 0; callbackData.dwFlags = 0; hr = IDirectPlayX_EnumConnections( pDP, &appGuid, EnumConnections_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); callbackData.dwCounter1 = 0; callbackData.dwFlags = 0; hr = IDirectPlayX_EnumConnections( pDP, NULL, EnumConnections_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); callbackData.dwCounter1 = 0; callbackData.dwFlags = 0; hr = IDirectPlayX_EnumConnections( pDP, &appGuid, NULL, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); checkHR( DPERR_INVALIDPARAMS, hr ); check( 0, callbackData.dwCounter1 ); @@ -867,16 +862,14 @@ static void test_EnumConnections(void) callbackData.dwCounter1 = 0; callbackData.dwFlags = DPCONNECTION_DIRECTPLAY; hr = IDirectPlayX_EnumConnections( pDP, &appGuid, EnumConnections_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); callbackData.dwCounter1 = 0; callbackData.dwFlags = DPCONNECTION_DIRECTPLAYLOBBY; hr = IDirectPlayX_EnumConnections( pDP, &appGuid, EnumConnections_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); checkHR( DP_OK, hr ); check( 0, callbackData.dwCounter1 ); @@ -884,8 +877,7 @@ static void test_EnumConnections(void) callbackData.dwFlags = ( DPCONNECTION_DIRECTPLAY | DPCONNECTION_DIRECTPLAYLOBBY ); hr = IDirectPlayX_EnumConnections( pDP, &appGuid, EnumConnections_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); @@ -893,8 +885,7 @@ static void test_EnumConnections(void) callbackData.dwFlags = ~( DPCONNECTION_DIRECTPLAY | DPCONNECTION_DIRECTPLAYLOBBY ); hr = IDirectPlayX_EnumConnections( pDP, &appGuid, EnumConnections_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); checkHR( DPERR_INVALIDFLAGS, hr ); check( 0, callbackData.dwCounter1 ); @@ -942,8 +933,7 @@ static void test_InitializeConnection(void) CoCreateInstance( &CLSID_DirectPlay, NULL, CLSCTX_ALL, &IID_IDirectPlay4A, (LPVOID*) &pDP ); - IDirectPlayX_EnumConnections( pDP, &appGuid, EnumConnections_cb2, - (LPVOID) pDP, 0 ); + IDirectPlayX_EnumConnections( pDP, &appGuid, EnumConnections_cb2, pDP, 0 ); IDirectPlayX_Release( pDP ); } @@ -1270,7 +1260,7 @@ static void test_EnumSessions(void) /* Service provider not initialized */ hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DPERR_UNINITIALIZED, hr ); @@ -1279,7 +1269,7 @@ static void test_EnumSessions(void) /* Session with no size */ hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); todo_wine checkHR( DPERR_INVALIDPARAMS, hr ); if ( hr == DPERR_UNINITIALIZED ) @@ -1294,7 +1284,7 @@ static void test_EnumSessions(void) /* No sessions */ callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 0, callbackData.dwCounter1 ); @@ -1353,11 +1343,11 @@ static void test_EnumSessions(void) /* Invalid params */ callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, -1 ); + &callbackData, -1 ); checkHR( DPERR_INVALIDPARAMS, hr ); hr = IDirectPlayX_EnumSessions( pDP, NULL, 0, EnumSessions_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DPERR_INVALIDPARAMS, hr ); check( -1, callbackData.dwCounter1 ); @@ -1368,8 +1358,7 @@ static void test_EnumSessions(void) protected */ callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( N_SESSIONS-2, callbackData.dwCounter1 ); /* Doesn't list private */ @@ -1377,32 +1366,28 @@ static void test_EnumSessions(void) DPENUMSESSIONS_PASSWORDREQUIRED ); callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( N_SESSIONS-1, callbackData.dwCounter1 ); /* Doesn't list full, no new, no join, private, protected */ callbackData.dwFlags = DPENUMSESSIONS_AVAILABLE; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( N_SESSIONS-5, callbackData.dwCounter1 ); /* Like with DPENUMSESSIONS_AVAILABLE */ callbackData.dwFlags = 0; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( N_SESSIONS-5, callbackData.dwCounter1 ); /* Doesn't list full, no new, no join, private */ callbackData.dwFlags = DPENUMSESSIONS_PASSWORDREQUIRED; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( N_SESSIONS-4, callbackData.dwCounter1 ); @@ -1410,23 +1395,20 @@ static void test_EnumSessions(void) callbackData.dwFlags = DPENUMSESSIONS_ASYNC; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( N_SESSIONS-4, callbackData.dwCounter1 ); /* Read cache of last sync enumeration */ callbackData.dwFlags = DPENUMSESSIONS_STOPASYNC; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 0, callbackData.dwCounter1 ); /* Stop enumeration */ callbackData.dwFlags = DPENUMSESSIONS_ASYNC; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 0, callbackData.dwCounter1 ); /* Start enumeration */ Sleep(500); /* Give time to fill the cache */ @@ -1434,15 +1416,13 @@ static void test_EnumSessions(void) callbackData.dwFlags = DPENUMSESSIONS_ASYNC; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( N_SESSIONS-5, callbackData.dwCounter1 ); /* Retrieve results */ callbackData.dwFlags = DPENUMSESSIONS_STOPASYNC; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 0, callbackData.dwCounter1 ); /* Stop enumeration */ @@ -1464,15 +1444,13 @@ static void test_EnumSessions(void) callbackData.dwFlags = 0; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 0, callbackData.dwCounter1 ); callbackData.dwFlags = DPENUMSESSIONS_PASSWORDREQUIRED; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 2, callbackData.dwCounter1 ); /* Both sessions automatically set DPSESSION_PASSWORDREQUIRED */ @@ -1492,8 +1470,7 @@ static void test_EnumSessions(void) callbackData.dwFlags = 0; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 2, callbackData.dwCounter1 ); /* Without password, the flag is ignored */ @@ -1513,15 +1490,13 @@ static void test_EnumSessions(void) /* - Listing without password */ callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 0, callbackData.dwCounter1 ); callbackData.dwFlags = DPENUMSESSIONS_PASSWORDREQUIRED; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 1, callbackData.dwCounter1 ); /* - Listing with incorrect password */ @@ -1529,23 +1504,20 @@ static void test_EnumSessions(void) callbackData.dwFlags = 0; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 0, callbackData.dwCounter1 ); callbackData.dwFlags = DPENUMSESSIONS_PASSWORDREQUIRED; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 1, callbackData.dwCounter1 ); /* - Listing with correct password */ U2(dpsd).lpszPasswordA = (LPSTR) "password"; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 2, callbackData.dwCounter1 ); @@ -1553,8 +1525,7 @@ static void test_EnumSessions(void) callbackData.dwFlags = DPENUMSESSIONS_ASYNC; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 2, callbackData.dwCounter1 ); /* Read cache of last sync enumeration, even private sessions */ @@ -1584,15 +1555,13 @@ static void test_EnumSessions(void) dpsd.guidApplication = appGuid2; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 1, callbackData.dwCounter1 ); /* Only one of the sessions */ dpsd.guidApplication = appGuid; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 1, callbackData.dwCounter1 ); /* The other session */ /* FIXME: For some reason, if we enum 1st with appGuid and 2nd with appGuid2, @@ -1601,8 +1570,7 @@ static void test_EnumSessions(void) dpsd.guidApplication = GUID_NULL; callbackData.dwCounter1 = -1; hr = IDirectPlayX_EnumSessions( pDP, &dpsd, 0, EnumSessions_cb, - (LPVOID) &callbackData, - callbackData.dwFlags ); + &callbackData, callbackData.dwFlags ); check( 2, callbackData.dwCounter1 ); /* Both sessions */ for (i=4; i<=5; i++) @@ -1672,7 +1640,7 @@ static void test_SessionDesc(void) IDirectPlayX_Open( pDP[0], &dpsd, DPOPEN_CREATE ); /* Peer */ IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID)pDP[1], 0 ); + pDP[1], 0 ); for (i=0; i<2; i++) { @@ -1930,7 +1898,7 @@ static void test_CreatePlayer(void) hr = IDirectPlayX_Open( pDP[0], &dpsd, DPOPEN_CREATE ); checkHR( DP_OK, hr ); hr = IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); checkHR( DP_OK, hr ); @@ -2023,7 +1991,7 @@ static void test_GetPlayerCaps(void) hr = IDirectPlayX_Open( pDP[0], &dpsd, DPOPEN_CREATE ); checkHR( DP_OK, hr ); hr = IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); checkHR( DP_OK, hr ); for (i=0; i<2; i++) @@ -2150,8 +2118,7 @@ static void test_PlayerData(void) dwDataSize, 0 ); checkHR( DPERR_UNINITIALIZED, hr ); - hr = IDirectPlayX_GetPlayerData( pDP, 0, (LPVOID) lpDataGet, - &dwDataSizeGet, 0 ); + hr = IDirectPlayX_GetPlayerData( pDP, 0, lpDataGet, &dwDataSizeGet, 0 ); checkHR( DPERR_UNINITIALIZED, hr ); @@ -2168,8 +2135,7 @@ static void test_PlayerData(void) dwDataSize, 0 ); todo_wine checkHR( DPERR_INVALIDPLAYER, hr ); - hr = IDirectPlayX_GetPlayerData( pDP, 0, (LPVOID) lpDataGet, - &dwDataSizeGet, 0 ); + hr = IDirectPlayX_GetPlayerData( pDP, 0, lpDataGet, &dwDataSizeGet, 0 ); todo_wine checkHR( DPERR_INVALIDPLAYER, hr ); if ( hr == DPERR_UNINITIALIZED ) @@ -2185,15 +2151,12 @@ static void test_PlayerData(void) checkHR( DP_OK, hr ); /* Invalid parameters */ - hr = IDirectPlayX_SetPlayerData( pDP, dpid, NULL, - dwDataSize, 0 ); + hr = IDirectPlayX_SetPlayerData( pDP, dpid, NULL, dwDataSize, 0 ); checkHR( DPERR_INVALIDPARAMS, hr ); - hr = IDirectPlayX_SetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - -1, 0 ); + hr = IDirectPlayX_SetPlayerData( pDP, dpid, lpDataGet, -1, 0 ); checkHR( DPERR_INVALIDPARAMS, hr ); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - NULL, 0 ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, NULL, 0 ); checkHR( DPERR_INVALIDPARAMS, hr ); @@ -2213,14 +2176,12 @@ static void test_PlayerData(void) dwDataSizeGet = 2; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, 0 ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, 0 ); check( DPERR_BUFFERTOOSMALL, hr ); check( dwDataSize, dwDataSizeGet ); strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, 0 ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, 0 ); checkHR( DP_OK, hr ); check( dwDataSize, dwDataSizeGet ); checkStr( lpData, lpDataGet ); @@ -2228,8 +2189,7 @@ static void test_PlayerData(void) /* Normal operation */ dwDataSizeGet = dwDataSizeFake; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, 0 ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, 0 ); checkHR( DP_OK, hr ); check( dwDataSize, dwDataSizeGet ); checkStr( lpData, lpDataGet ); @@ -2237,32 +2197,30 @@ static void test_PlayerData(void) /* Flag tests */ dwDataSizeGet = dwDataSizeFake; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, 0 ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, 0 ); checkHR( DP_OK, hr ); check( dwDataSize, dwDataSizeGet ); /* Remote: works as expected */ checkStr( lpData, lpDataGet ); dwDataSizeGet = dwDataSizeFake; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, DPGET_REMOTE ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, + DPGET_REMOTE ); checkHR( DP_OK, hr ); check( dwDataSize, dwDataSizeGet ); /* Same behaviour as in previous test */ checkStr( lpData, lpDataGet ); dwDataSizeGet = dwDataSizeFake; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, DPGET_LOCAL ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, + DPGET_LOCAL ); checkHR( DP_OK, hr ); check( 0, dwDataSizeGet ); /* Sets size to 0 (as local data doesn't exist) */ checkStr( lpDataFake, lpDataGet ); dwDataSizeGet = dwDataSizeFake; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, DPGET_LOCAL | DPGET_REMOTE ); checkHR( DP_OK, hr ); check( 0, dwDataSizeGet ); /* Same behaviour as in previous test */ @@ -2271,16 +2229,16 @@ static void test_PlayerData(void) /* Getting local data (which doesn't exist), buffer size is ignored */ dwDataSizeGet = 0; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, DPGET_LOCAL ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, + DPGET_LOCAL ); checkHR( DP_OK, hr ); check( 0, dwDataSizeGet ); /* Sets size to 0 */ checkStr( lpDataFake, lpDataGet ); dwDataSizeGet = dwDataSizeFake; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, NULL, - &dwDataSizeGet, DPGET_LOCAL ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, NULL, &dwDataSizeGet, + DPGET_LOCAL ); checkHR( DP_OK, hr ); check( 0, dwDataSizeGet ); /* Sets size to 0 */ checkStr( lpDataFake, lpDataGet ); @@ -2305,32 +2263,30 @@ static void test_PlayerData(void) /* Flag tests (again) */ dwDataSizeGet = dwDataSizeFake; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, 0 ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, 0 ); checkHR( DP_OK, hr ); check( dwDataSize, dwDataSizeGet ); /* Remote: works as expected */ checkStr( lpData, lpDataGet ); dwDataSizeGet = dwDataSizeFake; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, DPGET_REMOTE ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, + DPGET_REMOTE ); checkHR( DP_OK, hr ); check( dwDataSize, dwDataSizeGet ); /* Like in previous test */ checkStr( lpData, lpDataGet ); dwDataSizeGet = dwDataSizeFake; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, DPGET_LOCAL ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, + DPGET_LOCAL ); checkHR( DP_OK, hr ); check( dwDataSizeLocal, dwDataSizeGet ); /* Local: works as expected */ checkStr( lpDataLocal, lpDataGet ); dwDataSizeGet = dwDataSizeFake; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, DPGET_LOCAL | DPGET_REMOTE ); checkHR( DP_OK, hr ); check( dwDataSizeLocal, dwDataSizeGet ); /* Like in previous test */ @@ -2339,8 +2295,8 @@ static void test_PlayerData(void) /* Small buffer works as expected again */ dwDataSizeGet = 0; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, DPGET_LOCAL ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, + DPGET_LOCAL ); checkHR( DPERR_BUFFERTOOSMALL, hr ); check( dwDataSizeLocal, dwDataSizeGet ); checkStr( lpDataFake, lpDataGet ); @@ -2370,8 +2326,7 @@ static void test_PlayerData(void) dwDataSizeGet = dwDataSizeFake; strcpy(lpDataGet, lpDataFake); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, 0 ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, 0 ); checkHR( DP_OK, hr ); check( dwDataSizeLocal, dwDataSizeGet ); checkStr( lpDataLocal, lpDataGet ); @@ -2383,8 +2338,7 @@ static void test_PlayerData(void) dwDataSizeGet = dwDataSizeFake + 1; strcpy(lpDataGet, lpData); - hr = IDirectPlayX_GetPlayerData( pDP, dpid, (LPVOID) lpDataGet, - &dwDataSizeGet, 0 ); + hr = IDirectPlayX_GetPlayerData( pDP, dpid, lpDataGet, &dwDataSizeGet, 0 ); checkHR( DP_OK, hr ); check( dwDataSizeFake, dwDataSizeGet ); checkStr( lpDataFake, lpDataGet ); @@ -2456,7 +2410,7 @@ static void test_PlayerName(void) dpsd.dwMaxPlayers = 10; IDirectPlayX_Open( pDP[0], &dpsd, DPOPEN_CREATE ); IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); IDirectPlayX_CreatePlayer( pDP[0], &dpid[0], NULL, NULL, NULL, 0, 0 ); IDirectPlayX_CreatePlayer( pDP[1], &dpid[1], NULL, NULL, NULL, 0, 0 ); @@ -2713,7 +2667,7 @@ static void test_GetPlayerAccount(void) IDirectPlayX_Open( pDP[0], &dpsd, DPOPEN_CREATE ); IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); for (i=0; i<2; i++) { @@ -2747,8 +2701,7 @@ static void test_GetPlayerAccount(void) checkHR( DP_OK, hr ); hr = IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, - EnumSessions_cb_join_secure, - (LPVOID) pDP[1], 0 ); + EnumSessions_cb_join_secure, pDP[1], 0 ); checkHR( DP_OK, hr ); hr = IDirectPlayX_CreatePlayer( pDP[1], &dpid[1], @@ -2837,7 +2790,7 @@ static BOOL CALLBACK EnumAddress_cb( REFGUID guidDataType, break; case 1: case 5: - checkGuid( &DPSPGUID_TCPIP, (LPGUID) lpData ); + checkGuid( &DPSPGUID_TCPIP, lpData ); break; case 6: checkStr( "127.0.0.1", (LPSTR) lpData ); @@ -2907,7 +2860,7 @@ static void test_GetPlayerAddress(void) dpsd.dwMaxPlayers = 10; IDirectPlayX_Open( pDP[0], &dpsd, DPOPEN_CREATE ); IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); for (i=0; i<2; i++) { @@ -2958,9 +2911,8 @@ static void test_GetPlayerAddress(void) checkHR( DP_OK, hr ); check( 136, dwDataSize ); - hr = IDirectPlayLobby_EnumAddress( pDPL, EnumAddress_cb, - (LPCVOID) lpData, dwDataSize, - (LPVOID) &callbackData ); + hr = IDirectPlayLobby_EnumAddress( pDPL, EnumAddress_cb, lpData, dwDataSize, + &callbackData ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); @@ -2972,9 +2924,8 @@ static void test_GetPlayerAddress(void) checkHR( DP_OK, hr ); check( 130, dwDataSize ); - hr = IDirectPlayLobby_EnumAddress( pDPL, EnumAddress_cb, - (LPCVOID) lpData, dwDataSize, - (LPVOID) &callbackData ); + hr = IDirectPlayLobby_EnumAddress( pDPL, EnumAddress_cb, lpData, dwDataSize, + &callbackData ); checkHR( DP_OK, hr ); check( 8, callbackData.dwCounter1 ); @@ -3034,7 +2985,7 @@ static void test_GetPlayerFlags(void) IDirectPlayX_Open( pDP[0], &dpsd, DPOPEN_CREATE ); IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); for (i=0; i<2; i++) { @@ -3196,8 +3147,8 @@ static void test_CreateGroup(void) for (i=0; i<6; i++) { dwDataSizeGet = 1024; - hr = IDirectPlayX_Receive( pDP, &idFrom, &idTo, 0, - (LPVOID) lpDataGet, &dwDataSizeGet ); + hr = IDirectPlayX_Receive( pDP, &idFrom, &idTo, 0, lpDataGet, + &dwDataSizeGet ); checkHR( DP_OK, hr ); if ( NULL == U1(lpDataGet->dpnName).lpszShortNameA ) { @@ -3261,8 +3212,8 @@ static void test_CreateGroup(void) for (i=0; i<5; i++) { dwDataSizeGet = 1024; - hr = IDirectPlayX_Receive( pDP, &idFrom, &idTo, 0, - (LPVOID) lpDataGet, &dwDataSizeGet ); + hr = IDirectPlayX_Receive( pDP, &idFrom, &idTo, 0, lpDataGet, + &dwDataSizeGet ); checkHR( DP_OK, hr ); check( 48 + lpDataGet->dwDataSize, dwDataSizeGet ); check( DPID_SYSMSG, idFrom ); @@ -3316,8 +3267,8 @@ static void test_CreateGroup(void) for (i=0; i<8; i++) { dwDataSizeGet = 1024; - hr = IDirectPlayX_Receive( pDP, &idFrom, &idTo, 0, - (LPVOID) lpDataGet, &dwDataSizeGet ); + hr = IDirectPlayX_Receive( pDP, &idFrom, &idTo, 0, lpDataGet, + &dwDataSizeGet ); checkHR( DP_OK, hr ); check( 48, dwDataSizeGet ); check( DPID_SYSMSG, idFrom ); @@ -3441,7 +3392,7 @@ static void test_GroupOwner(void) hr = IDirectPlayX_Open( pDP[0], &dpsd, DPOPEN_CREATE ); checkHR( DP_OK, hr ); hr = IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); checkHR( DP_OK, hr ); for (i=0; i<2; i++) @@ -3529,24 +3480,21 @@ static BOOL CALLBACK EnumSessions_cb_EnumPlayers( LPCDPSESSIONDESC2 lpThisSD, /* guid = NULL */ callbackData->dwCounter1 = 0; - hr = IDirectPlayX_EnumPlayers( callbackData->pDP, NULL, - EnumPlayers_cb, - (LPVOID) &callbackData, 0 ); + hr = IDirectPlayX_EnumPlayers( callbackData->pDP, NULL, EnumPlayers_cb, + &callbackData, 0 ); checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData->dwCounter1 ); /* guid = appGuid */ callbackData->dwCounter1 = 0; hr = IDirectPlayX_EnumPlayers( callbackData->pDP, (LPGUID) &appGuid, - EnumPlayers_cb, - (LPVOID) &callbackData, 0 ); + EnumPlayers_cb, &callbackData, 0 ); checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData->dwCounter1 ); callbackData->dwCounter1 = 0; hr = IDirectPlayX_EnumPlayers( callbackData->pDP, (LPGUID) &appGuid, - EnumPlayers_cb, - (LPVOID) &callbackData, + EnumPlayers_cb, &callbackData, DPENUMPLAYERS_SESSION ); checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData->dwCounter1 ); @@ -3555,16 +3503,14 @@ static BOOL CALLBACK EnumSessions_cb_EnumPlayers( LPCDPSESSIONDESC2 lpThisSD, callbackData->dwCounter1 = 0; hr = IDirectPlayX_EnumPlayers( callbackData->pDP, (LPGUID) &lpThisSD->guidInstance, - EnumPlayers_cb, - (LPVOID) &callbackData, 0 ); + EnumPlayers_cb, &callbackData, 0 ); checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData->dwCounter1 ); callbackData->dwCounter1 = 0; hr = IDirectPlayX_EnumPlayers( callbackData->pDP, (LPGUID) &lpThisSD->guidInstance, - EnumPlayers_cb, - (LPVOID) &callbackData, + EnumPlayers_cb, &callbackData, DPENUMPLAYERS_SESSION ); checkHR( DPERR_GENERIC, hr ); /* Why? */ check( 0, callbackData->dwCounter1 ); @@ -3603,7 +3549,7 @@ static void test_EnumPlayers(void) /* Uninitialized service provider */ callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumPlayers( pDP[0], (LPGUID) &appGuid, NULL, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DPERR_UNINITIALIZED, hr ); check( 0, callbackData.dwCounter1 ); @@ -3616,7 +3562,7 @@ static void test_EnumPlayers(void) /* No session */ callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumPlayers( pDP[0], NULL, EnumPlayers_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); todo_wine checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData.dwCounter1 ); @@ -3628,14 +3574,13 @@ static void test_EnumPlayers(void) callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumPlayers( pDP[0], (LPGUID) &appGuid, EnumPlayers_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData.dwCounter1 ); callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumPlayers( pDP[0], (LPGUID) &appGuid, EnumPlayers_cb, - (LPVOID) &callbackData, - DPENUMPLAYERS_SESSION ); + &callbackData, DPENUMPLAYERS_SESSION ); checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData.dwCounter1 ); @@ -3649,7 +3594,7 @@ static void test_EnumPlayers(void) /* No players */ callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumPlayers( pDP[0], NULL, EnumPlayers_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 0, callbackData.dwCounter1 ); @@ -3676,14 +3621,13 @@ static void test_EnumPlayers(void) /* Invalid parameters */ callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumPlayers( pDP[0], (LPGUID) &appGuid, NULL, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DPERR_INVALIDPARAMS, hr ); check( 0, callbackData.dwCounter1 ); callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumPlayers( pDP[0], NULL, EnumPlayers_cb, - (LPVOID) &callbackData, - DPENUMPLAYERS_SESSION ); + &callbackData, DPENUMPLAYERS_SESSION ); checkHR( DPERR_INVALIDPARAMS, hr ); check( 0, callbackData.dwCounter1 ); @@ -3692,7 +3636,7 @@ static void test_EnumPlayers(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumPlayers( pDP[0], NULL, EnumPlayers_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 2, callbackData.dwCounter1 ); checkStr( "20", callbackData.szTrace1 ); @@ -3701,7 +3645,7 @@ static void test_EnumPlayers(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumPlayers( pDP[1], NULL, EnumPlayers_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 1, callbackData.dwCounter1 ); checkStr( "1", callbackData.szTrace1 ); @@ -3710,7 +3654,7 @@ static void test_EnumPlayers(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumPlayers( pDP[0], (LPGUID) &appGuid, EnumPlayers_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 2, callbackData.dwCounter1 ); /* Guid is ignored */ checkStr( "20", callbackData.szTrace1 ); @@ -3722,14 +3666,14 @@ static void test_EnumPlayers(void) callbackData.pDP = pDP[2]; hr = IDirectPlayX_EnumSessions( pDP[2], &dpsd[2], 0, EnumSessions_cb_EnumPlayers, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); /* - Open session */ callbackData.pDP = pDP[2]; hr = IDirectPlayX_EnumSessions( pDP[2], &dpsd[0], 0, EnumSessions_cb_join, - (LPVOID) pDP[2], 0 ); + pDP[2], 0 ); checkHR( DP_OK, hr ); hr = IDirectPlayX_CreatePlayer( pDP[2], &dpid[3], NULL, NULL, NULL, 0, @@ -3746,7 +3690,7 @@ static void test_EnumPlayers(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumPlayers( pDP[2], NULL, EnumPlayers_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); checkStr( "4302", callbackData.szTrace1 ); @@ -3758,8 +3702,7 @@ static void test_EnumPlayers(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumPlayers( pDP[2], NULL, EnumPlayers_cb, - (LPVOID) &callbackData, - DPENUMPLAYERS_ALL ); + &callbackData, DPENUMPLAYERS_ALL ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); checkStr( "4302", callbackData.szTrace1 ); @@ -3768,8 +3711,7 @@ static void test_EnumPlayers(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumPlayers( pDP[2], NULL, EnumPlayers_cb, - (LPVOID) &callbackData, - DPENUMPLAYERS_GROUP ); + &callbackData, DPENUMPLAYERS_GROUP ); checkHR( DP_OK, hr ); check( 6, callbackData.dwCounter1 ); checkStr( "430256", callbackData.szTrace1 ); @@ -3781,8 +3723,7 @@ static void test_EnumPlayers(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumPlayers( pDP[2], NULL, EnumPlayers_cb, - (LPVOID) &callbackData, - DPENUMPLAYERS_LOCAL ); + &callbackData, DPENUMPLAYERS_LOCAL ); checkHR( DP_OK, hr ); check( 2, callbackData.dwCounter1 ); checkStr( "43", callbackData.szTrace1 ); @@ -3792,8 +3733,7 @@ static void test_EnumPlayers(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumPlayers( pDP[2], NULL, EnumPlayers_cb, - (LPVOID) &callbackData, - DPENUMPLAYERS_SERVERPLAYER ); + &callbackData, DPENUMPLAYERS_SERVERPLAYER ); checkHR( DP_OK, hr ); check( 1, callbackData.dwCounter1 ); checkStr( "0", callbackData.szTrace1 ); @@ -3802,8 +3742,7 @@ static void test_EnumPlayers(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumPlayers( pDP[2], NULL, EnumPlayers_cb, - (LPVOID) &callbackData, - DPENUMPLAYERS_SPECTATOR ); + &callbackData, DPENUMPLAYERS_SPECTATOR ); checkHR( DP_OK, hr ); check( 1, callbackData.dwCounter1 ); checkStr( "3", callbackData.szTrace1 ); @@ -3863,23 +3802,20 @@ static BOOL CALLBACK EnumSessions_cb_EnumGroups( LPCDPSESSIONDESC2 lpThisSD, /* guid = NULL */ callbackData->dwCounter1 = 0; hr = IDirectPlayX_EnumGroups( callbackData->pDP, NULL, - EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + EnumGroups_cb, &callbackData, 0 ); checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData->dwCounter1 ); /* guid = appGuid */ callbackData->dwCounter1 = 0; hr = IDirectPlayX_EnumGroups( callbackData->pDP, (LPGUID) &appGuid, - EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + EnumGroups_cb, &callbackData, 0 ); checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData->dwCounter1 ); callbackData->dwCounter1 = 0; hr = IDirectPlayX_EnumGroups( callbackData->pDP, (LPGUID) &appGuid, - EnumGroups_cb, - (LPVOID) &callbackData, + EnumGroups_cb, &callbackData, DPENUMGROUPS_SESSION ); checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData->dwCounter1 ); @@ -3888,16 +3824,14 @@ static BOOL CALLBACK EnumSessions_cb_EnumGroups( LPCDPSESSIONDESC2 lpThisSD, callbackData->dwCounter1 = 0; hr = IDirectPlayX_EnumGroups( callbackData->pDP, (LPGUID) &lpThisSD->guidInstance, - EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + EnumGroups_cb, &callbackData, 0 ); checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData->dwCounter1 ); callbackData->dwCounter1 = 0; hr = IDirectPlayX_EnumGroups( callbackData->pDP, (LPGUID) &lpThisSD->guidInstance, - EnumGroups_cb, - (LPVOID) &callbackData, + EnumGroups_cb, &callbackData, DPENUMGROUPS_SESSION ); checkHR( DPERR_GENERIC, hr ); /* Why? */ check( 0, callbackData->dwCounter1 ); @@ -3936,7 +3870,7 @@ static void test_EnumGroups(void) /* Uninitialized service provider */ callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroups( pDP[0], NULL, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DPERR_UNINITIALIZED, hr ); check( 0, callbackData.dwCounter1 ); @@ -3949,7 +3883,7 @@ static void test_EnumGroups(void) /* No session */ callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroups( pDP[0], NULL, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); todo_wine checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData.dwCounter1 ); @@ -3961,14 +3895,13 @@ static void test_EnumGroups(void) callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroups( pDP[0], (LPGUID) &appGuid, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData.dwCounter1 ); callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroups( pDP[0], (LPGUID) &appGuid, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_SESSION ); + &callbackData, DPENUMGROUPS_SESSION ); checkHR( DPERR_NOSESSIONS, hr ); check( 0, callbackData.dwCounter1 ); @@ -3982,7 +3915,7 @@ static void test_EnumGroups(void) /* No groups */ callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroups( pDP[0], NULL, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 0, callbackData.dwCounter1 ); @@ -4006,14 +3939,13 @@ static void test_EnumGroups(void) /* Invalid parameters */ callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroups( pDP[0], (LPGUID) &appGuid, NULL, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DPERR_INVALIDPARAMS, hr ); check( 0, callbackData.dwCounter1 ); callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroups( pDP[0], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_SESSION ); + &callbackData, DPENUMGROUPS_SESSION ); checkHR( DPERR_INVALIDPARAMS, hr ); check( 0, callbackData.dwCounter1 ); @@ -4022,7 +3954,7 @@ static void test_EnumGroups(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroups( pDP[0], NULL, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 2, callbackData.dwCounter1 ); checkStr( "02", callbackData.szTrace1 ); @@ -4031,7 +3963,7 @@ static void test_EnumGroups(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroups( pDP[1], NULL, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 1, callbackData.dwCounter1 ); checkStr( "1", callbackData.szTrace1 ); @@ -4040,7 +3972,7 @@ static void test_EnumGroups(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroups( pDP[0], (LPGUID) &appGuid, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 2, callbackData.dwCounter1 ); /* Guid is ignored */ checkStr( "02", callbackData.szTrace1 ); @@ -4052,13 +3984,13 @@ static void test_EnumGroups(void) callbackData.pDP = pDP[2]; hr = IDirectPlayX_EnumSessions( pDP[2], &dpsd[2], 0, EnumSessions_cb_EnumGroups, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); /* - Open session */ callbackData.pDP = pDP[2]; hr = IDirectPlayX_EnumSessions( pDP[2], &dpsd[0], 0, EnumSessions_cb_join, - (LPVOID) pDP[2], 0 ); + pDP[2], 0 ); checkHR( DP_OK, hr ); hr = IDirectPlayX_CreateGroup( pDP[2], &dpid[3], @@ -4072,7 +4004,7 @@ static void test_EnumGroups(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroups( pDP[2], NULL, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); checkStr( "0234", callbackData.szTrace1 ); @@ -4082,8 +4014,7 @@ static void test_EnumGroups(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroups( pDP[2], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_ALL ); + &callbackData, DPENUMGROUPS_ALL ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); checkStr( "0234", callbackData.szTrace1 ); @@ -4092,8 +4023,7 @@ static void test_EnumGroups(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroups( pDP[2], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_HIDDEN ); + &callbackData, DPENUMGROUPS_HIDDEN ); checkHR( DP_OK, hr ); check( 1, callbackData.dwCounter1 ); checkStr( "2", callbackData.szTrace1 ); @@ -4102,8 +4032,7 @@ static void test_EnumGroups(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroups( pDP[2], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_LOCAL ); + &callbackData, DPENUMGROUPS_LOCAL ); checkHR( DP_OK, hr ); check( 2, callbackData.dwCounter1 ); checkStr( "34", callbackData.szTrace1 ); @@ -4113,8 +4042,7 @@ static void test_EnumGroups(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroups( pDP[2], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_REMOTE ); + &callbackData, DPENUMGROUPS_REMOTE ); checkHR( DP_OK, hr ); check( 2, callbackData.dwCounter1 ); checkStr( "02", callbackData.szTrace1 ); @@ -4124,8 +4052,7 @@ static void test_EnumGroups(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroups( pDP[2], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_STAGINGAREA ); + &callbackData, DPENUMGROUPS_STAGINGAREA ); checkHR( DP_OK, hr ); check( 1, callbackData.dwCounter1 ); checkStr( "4", callbackData.szTrace1 ); @@ -4167,7 +4094,7 @@ static void test_EnumGroupsInGroup(void) /* Uninitialized service provider */ callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], 0, NULL, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DPERR_UNINITIALIZED, hr ); check( 0, callbackData.dwCounter1 ); @@ -4220,26 +4147,25 @@ static void test_EnumGroupsInGroup(void) /* Invalid parameters */ callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], 0, NULL, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DPERR_INVALIDGROUP, hr ); check( 0, callbackData.dwCounter1 ); callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], 10, NULL, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DPERR_INVALIDGROUP, hr ); check( 0, callbackData.dwCounter1 ); callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], dpid[1], (LPGUID) &appGuid, - NULL, (LPVOID) &callbackData, 0 ); + NULL, &callbackData, 0 ); checkHR( DPERR_INVALIDPARAMS, hr ); check( 0, callbackData.dwCounter1 ); callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], dpid[1], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_SESSION ); + &callbackData, DPENUMGROUPS_SESSION ); checkHR( DPERR_INVALIDPARAMS, hr ); check( 0, callbackData.dwCounter1 ); @@ -4247,14 +4173,14 @@ static void test_EnumGroupsInGroup(void) /* Regular operation */ callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], dpid[0], NULL, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 0, callbackData.dwCounter1 ); callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], dpid[1], NULL, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); checkStr( "5432", callbackData.szTrace1 ); @@ -4263,8 +4189,7 @@ static void test_EnumGroupsInGroup(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], dpid[1], (LPGUID) &appGuid, - EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + EnumGroups_cb, &callbackData, 0 ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); /* Guid is ignored */ checkStr( "5432", callbackData.szTrace1 ); @@ -4276,19 +4201,19 @@ static void test_EnumGroupsInGroup(void) callbackData.pDP = pDP[1]; hr = IDirectPlayX_EnumSessions( pDP[1], &dpsd[1], 0, EnumSessions_cb_EnumGroups, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); /* - Open session */ hr = IDirectPlayX_EnumSessions( pDP[1], &dpsd[0], 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); checkHR( DP_OK, hr ); callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[1], dpid[1], NULL, EnumGroups_cb, - (LPVOID) &callbackData, 0 ); + &callbackData, 0 ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); checkStr( "5432", callbackData.szTrace1 ); @@ -4298,8 +4223,7 @@ static void test_EnumGroupsInGroup(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], dpid[1], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_ALL ); + &callbackData, DPENUMGROUPS_ALL ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); checkStr( "5432", callbackData.szTrace1 ); @@ -4308,8 +4232,7 @@ static void test_EnumGroupsInGroup(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], dpid[1], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_HIDDEN ); + &callbackData, DPENUMGROUPS_HIDDEN ); checkHR( DP_OK, hr ); check( 1, callbackData.dwCounter1 ); checkStr( "3", callbackData.szTrace1 ); @@ -4318,8 +4241,7 @@ static void test_EnumGroupsInGroup(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], dpid[1], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_LOCAL ); + &callbackData, DPENUMGROUPS_LOCAL ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); checkStr( "5432", callbackData.szTrace1 ); @@ -4329,23 +4251,20 @@ static void test_EnumGroupsInGroup(void) callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], dpid[1], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_REMOTE ); + &callbackData, DPENUMGROUPS_REMOTE ); checkHR( DP_OK, hr ); check( 0, callbackData.dwCounter1 ); callbackData.dwCounter1 = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[1], dpid[1], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_LOCAL ); + &callbackData, DPENUMGROUPS_LOCAL ); checkHR( DP_OK, hr ); check( 0, callbackData.dwCounter1 ); callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[1], dpid[1], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_REMOTE ); + &callbackData, DPENUMGROUPS_REMOTE ); checkHR( DP_OK, hr ); check( 4, callbackData.dwCounter1 ); checkStr( "5432", callbackData.szTrace1 ); @@ -4356,8 +4275,7 @@ static void test_EnumGroupsInGroup(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], dpid[1], NULL, EnumGroups_cb, - (LPVOID) &callbackData, - DPENUMGROUPS_SHORTCUT ); + &callbackData, DPENUMGROUPS_SHORTCUT ); checkHR( DP_OK, hr ); check( 1, callbackData.dwCounter1 ); checkStr( "5", callbackData.szTrace1 ); @@ -4366,7 +4284,7 @@ static void test_EnumGroupsInGroup(void) callbackData.dwCounter1 = 0; callbackData.szTrace2[0] = 0; hr = IDirectPlayX_EnumGroupsInGroup( pDP[0], dpid[1], NULL, EnumGroups_cb, - (LPVOID) &callbackData, + &callbackData, DPENUMGROUPS_STAGINGAREA ); checkHR( DP_OK, hr ); check( 1, callbackData.dwCounter1 ); @@ -4410,7 +4328,7 @@ static void test_groups_p2p(void) hr = IDirectPlayX_Open( pDP[0], &dpsd, DPOPEN_CREATE ); todo_wine checkHR( DP_OK, hr ); hr = IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); todo_wine checkHR( DP_OK, hr ); if ( hr == DPERR_UNINITIALIZED ) @@ -4645,7 +4563,7 @@ static void test_groups_cs(void) todo_wine checkHR( DP_OK, hr ); dpsd.dwFlags = 0; hr = IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); todo_wine checkHR( DP_OK, hr ); if ( hr == DPERR_UNINITIALIZED ) @@ -4885,7 +4803,7 @@ static void test_Send(void) dpsd.dwMaxPlayers = 10; IDirectPlayX_Open( pDP[0], &dpsd, DPOPEN_CREATE ); IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); IDirectPlayX_Open( pDP[0], &dpsd, DPOPEN_CREATE ); @@ -4950,7 +4868,7 @@ static void test_Send(void) hr = IDirectPlayX_Receive( pDP[0], &dpid[0], &dpid[1], DPRECEIVE_FROMPLAYER | DPRECEIVE_TOPLAYER, - (LPVOID) lpData, &dwDataSize ); + lpData, &dwDataSize ); checkHR( DP_OK, hr ); checkStr( message, (LPSTR) lpData ); check( strlen(message)+1, dwDataSize ); @@ -4968,11 +4886,11 @@ static void test_Send(void) hr = IDirectPlayX_Receive( pDP[0], &dpid[0], &dpid[3], DPRECEIVE_FROMPLAYER | DPRECEIVE_TOPLAYER, - (LPVOID) lpData, &dwDataSize ); + lpData, &dwDataSize ); checkHR( DPERR_NOMESSAGES, hr ); hr = IDirectPlayX_Receive( pDP[1], &dpid[0], &dpid[3], DPRECEIVE_FROMPLAYER | DPRECEIVE_TOPLAYER, - (LPVOID) lpData, &dwDataSize ); + lpData, &dwDataSize ); checkHR( DP_OK, hr ); checkStr( message, (LPSTR) lpData ); check( strlen(message)+1, dwDataSize ); @@ -4993,13 +4911,13 @@ static void test_Send(void) { hr = IDirectPlayX_Receive( pDP[0], &dpid[0], &dpid[i], DPRECEIVE_FROMPLAYER | DPRECEIVE_TOPLAYER, - (LPVOID) lpData, &dwDataSize ); + lpData, &dwDataSize ); checkHR( DP_OK, hr ); checkStr( message, (LPSTR) lpData ); } hr = IDirectPlayX_Receive( pDP[1], &dpid[0], &dpid[3], DPRECEIVE_FROMPLAYER | DPRECEIVE_TOPLAYER, - (LPVOID) lpData, &dwDataSize ); + lpData, &dwDataSize ); checkHR( DP_OK, hr ); checkStr( message, (LPSTR) lpData ); @@ -5120,8 +5038,8 @@ static void test_Send(void) for (i=0; i<3; i++) { dwDataSize = 1024; - hr = IDirectPlayX_Receive( pDP[0], &idFrom, &idTo, 0, - (LPVOID) lpData, &dwDataSize ); + hr = IDirectPlayX_Receive( pDP[0], &idFrom, &idTo, 0, lpData, + &dwDataSize ); lpDataSecure = (LPDPMSG_SECUREMESSAGE) lpData; @@ -5511,7 +5429,7 @@ static void test_GetMessageCount(void) dpsd.dwMaxPlayers = 10; IDirectPlayX_Open( pDP[0], &dpsd, DPOPEN_CREATE ); IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); IDirectPlayX_CreatePlayer( pDP[0], &dpid[0], NULL, NULL, NULL, 0, 0 ); IDirectPlayX_CreatePlayer( pDP[0], &dpid[1], NULL, NULL, NULL, 0, 0 ); @@ -5737,7 +5655,7 @@ static void test_GetMessageQueue(void) dpsd.dwMaxPlayers = 10; IDirectPlayX_Open( pDP[0], &dpsd, DPOPEN_CREATE ); IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); IDirectPlayX_CreatePlayer( pDP[0], &dpid[0], NULL, NULL, NULL, 0, 0 ); IDirectPlayX_CreatePlayer( pDP[0], &dpid[1], NULL, NULL, NULL, 0, 0 ); @@ -6042,7 +5960,7 @@ static void test_remote_data_replication(void) /* Peer */ hr = IDirectPlayX_EnumSessions( pDP[1], &dpsd, 0, EnumSessions_cb_join, - (LPVOID) pDP[1], 0 ); + pDP[1], 0 ); checkHR( DP_OK, hr ); hr = IDirectPlayX_CreatePlayer( pDP[1], &dpid[1], @@ -6139,8 +6057,7 @@ static void test_remote_data_replication(void) /* Purge "new player" messages from queue */ - hr = IDirectPlayX_Receive( pDP[0], &idFrom, &idTo, 0, - (LPVOID) lpData, &dwDataSize ); + hr = IDirectPlayX_Receive( pDP[0], &idFrom, &idTo, 0, lpData, &dwDataSize ); checkHR( DP_OK, hr ); checkConv( DPSYS_CREATEPLAYERORGROUP, lpData->dwType, dpMsgType2str ); @@ -6158,8 +6075,8 @@ static void test_remote_data_replication(void) { for (j=0; j<2; j++) { - hr = IDirectPlayX_Receive( pDP[i], &idFrom, &idTo, 0, - (LPVOID) lpData, &dwDataSize ); + hr = IDirectPlayX_Receive( pDP[i], &idFrom, &idTo, 0, lpData, + &dwDataSize ); checkHR( DP_OK, hr ); check( 29, dwDataSize ); check( DPID_SYSMSG, idFrom ); @@ -6220,7 +6137,7 @@ START_TEST(dplayx) { if (!winetest_interactive) { - skip("Run in interacive mode to run dplayx tests.\n"); + skip("Run in interactive mode to run dplayx tests.\n"); return; } diff --git a/dlls/dpnet/address.c b/dlls/dpnet/address.c index f39cf447bfa..d3f34982b2b 100644 --- a/dlls/dpnet/address.c +++ b/dlls/dpnet/address.c @@ -73,6 +73,27 @@ static ULONG WINAPI IDirectPlay8AddressImpl_Release(PDIRECTPLAY8ADDRESS iface) { return refCount; } +/* returns name of given GUID */ +static const char *debugstr_SP(const GUID *id) { + static const guid_info guids[] = { + /* CLSIDs */ + GE(CLSID_DP8SP_IPX), + GE(CLSID_DP8SP_TCPIP), + GE(CLSID_DP8SP_SERIAL), + GE(CLSID_DP8SP_MODEM) + }; + unsigned int i; + + if (!id) return "(null)"; + + for (i = 0; i < sizeof(guids)/sizeof(guids[0]); i++) { + if (IsEqualGUID(id, guids[i].guid)) + return guids[i].name; + } + /* if we didn't find it, act like standard debugstr_guid */ + return debugstr_guid(id); +} + /* IDirectPlay8Address Interface follow: */ static HRESULT WINAPI IDirectPlay8AddressImpl_BuildFromURLW(PDIRECTPLAY8ADDRESS iface, WCHAR* pwszSourceURL) { @@ -181,7 +202,7 @@ static HRESULT WINAPI IDirectPlay8AddressImpl_AddComponent(PDIRECTPLAY8ADDRESS i break; case DPNA_DATATYPE_GUID: if (sizeof(GUID) != dwDataSize) return DPNERR_INVALIDPARAM; - TRACE("(%p, %u): GUID Type -> %s\n", lpvData, dwDataSize, debugstr_guid((const GUID*) lpvData)); + TRACE("(%p, %u): GUID Type -> %s\n", lpvData, dwDataSize, debugstr_guid(lpvData)); break; case DPNA_DATATYPE_STRING: TRACE("(%p, %u): STRING Type -> %s\n", lpvData, dwDataSize, (const CHAR*) lpvData); @@ -252,24 +273,3 @@ HRESULT DPNET_CreateDirectPlay8Address(LPCLASSFACTORY iface, LPUNKNOWN punkOuter client->ref = 0; /* will be inited with QueryInterface */ return IDirectPlay8AddressImpl_QueryInterface ((PDIRECTPLAY8ADDRESS)client, riid, ppobj); } - -/* returns name of given GUID */ -const char *debugstr_SP(const GUID *id) { - static const guid_info guids[] = { - /* CLSIDs */ - GE(CLSID_DP8SP_IPX), - GE(CLSID_DP8SP_TCPIP), - GE(CLSID_DP8SP_SERIAL), - GE(CLSID_DP8SP_MODEM) - }; - unsigned int i; - - if (!id) return "(null)"; - - for (i = 0; i < sizeof(guids)/sizeof(guids[0]); i++) { - if (IsEqualGUID(id, guids[i].guid)) - return guids[i].name; - } - /* if we didn't find it, act like standard debugstr_guid */ - return debugstr_guid(id); -} diff --git a/dlls/dpnet/dpnet_main.c b/dlls/dpnet/dpnet_main.c index 3c8e2c515eb..34429ac08e9 100644 --- a/dlls/dpnet/dpnet_main.c +++ b/dlls/dpnet/dpnet_main.c @@ -114,7 +114,7 @@ static IClassFactoryImpl DPNET_CFS[] = { { &DICF_Vtbl, 1, &CLSID_DirectPlay8Server, DPNET_CreateDirectPlay8Server }, { &DICF_Vtbl, 1, &CLSID_DirectPlay8Peer, DPNET_CreateDirectPlay8Peer }, { &DICF_Vtbl, 1, &CLSID_DirectPlay8Address, DPNET_CreateDirectPlay8Address }, - { &DICF_Vtbl, 1, &CLSID_DirectPlay8LobbiedApplication, (void *)DPNET_CreateDirectPlay8LobbiedApp }, + { &DICF_Vtbl, 1, &CLSID_DirectPlay8LobbiedApplication, DPNET_CreateDirectPlay8LobbiedApp }, { &DICF_Vtbl, 1, &CLSID_DirectPlay8ThreadPool, DPNET_CreateDirectPlay8ThreadPool}, { NULL, 0, NULL, NULL } }; diff --git a/dlls/dpnet/dpnet_private.h b/dlls/dpnet/dpnet_private.h index f75326a884c..bdd3f9d8b77 100644 --- a/dlls/dpnet/dpnet_private.h +++ b/dlls/dpnet/dpnet_private.h @@ -111,11 +111,6 @@ extern HRESULT DPNET_CreateDirectPlay8Address(LPCLASSFACTORY iface, LPUNKNOWN pu extern HRESULT DPNET_CreateDirectPlay8LobbiedApp(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj); extern HRESULT DPNET_CreateDirectPlay8ThreadPool(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj); -/** - * debug - */ -extern const char *debugstr_SP(const GUID *id); - /* used for generic dumping (copied from ddraw) */ typedef struct { DWORD val; diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c index 6659a47dcc1..038a90ec0a9 100644 --- a/dlls/dsound/buffer.c +++ b/dlls/dsound/buffer.c @@ -532,6 +532,9 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Lock( GetTickCount() ); + if (!audiobytes1) + return DSERR_INVALIDPARAM; + /* when this flag is set, writecursor is meaningless and must be calculated */ if (flags & DSBLOCK_FROMWRITECURSOR) { /* GetCurrentPosition does too much magic to duplicate here */ diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c index d84a8fe1593..cd051b62992 100644 --- a/dlls/dsound/capture.c +++ b/dlls/dsound/capture.c @@ -1140,7 +1140,7 @@ IDirectSoundCaptureBufferImpl_Start( if (device->buffer) { int c; - DWORD blocksize = 4 * DSOUND_fraglen(device->pwfx->nSamplesPerSec, device->pwfx->nBlockAlign); + DWORD blocksize = DSOUND_fraglen(device->pwfx->nSamplesPerSec, device->pwfx->nBlockAlign); device->nrofpwaves = device->buflen / blocksize + !!(device->buflen % blocksize); TRACE("nrofpwaves=%d\n", device->nrofpwaves); diff --git a/dlls/dsound/dsound_convert.c b/dlls/dsound/dsound_convert.c index d149b7d8ffd..95a9995ac37 100644 --- a/dlls/dsound/dsound_convert.c +++ b/dlls/dsound/dsound_convert.c @@ -159,7 +159,7 @@ static void convert_32_to_16 (const void *src, void *dst) static void convert_32_to_24 (const void *src, void *dst) { - DWORD dest = le32(*(DWORD*)dst); + DWORD dest = le32(*(DWORD*)src); BYTE *dest24 = dst; dest24[0] = dest / 256; diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c index dddcf284a76..82f6a8cbddc 100644 --- a/dlls/dsound/dsound_main.c +++ b/dlls/dsound/dsound_main.c @@ -91,14 +91,14 @@ HRESULT mmErr(UINT err) /* All default settings, you most likely don't want to touch these, see wiki on UsefulRegistryKeys */ int ds_emuldriver = 0; int ds_hel_buflen = 32768 * 2; -int ds_snd_queue_max = 20; -int ds_snd_queue_min = 14; +int ds_snd_queue_max = 10; +int ds_snd_queue_min = 6; int ds_snd_shadow_maxsize = 2; int ds_hw_accel = DS_HW_ACCEL_FULL; -int ds_default_playback = 0; -int ds_default_capture = 0; int ds_default_sample_rate = 44100; int ds_default_bits_per_sample = 16; +static int ds_default_playback; +static int ds_default_capture; /* * Get a config key from either the app-specific or the default config diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h index c16f1c1535c..b23e2421f3c 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h @@ -37,8 +37,6 @@ extern int ds_snd_queue_max; extern int ds_snd_queue_min; extern int ds_snd_shadow_maxsize; extern int ds_hw_accel; -extern int ds_default_playback; -extern int ds_default_capture; extern int ds_default_sample_rate; extern int ds_default_bits_per_sample; diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index 5812f0086f0..288466ad103 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -837,6 +837,9 @@ static HRESULT WINAPI PrimaryBufferImpl_Lock( GetTickCount() ); + if (!audiobytes1) + return DSERR_INVALIDPARAM; + if (device->priolevel != DSSCL_WRITEPRIMARY) { WARN("failed priority check!\n"); return DSERR_PRIOLEVELNEEDED; @@ -999,8 +1002,12 @@ static HRESULT WINAPI PrimaryBufferImpl_Unlock( if (!(device->drvdesc.dwFlags & DSDDESC_DONTNEEDPRIMARYLOCK) && device->hwbuf) { HRESULT hres; - - hres = IDsDriverBuffer_Unlock(device->hwbuf, p1, x1, p2, x2); + + if ((char *)p1 - (char *)device->buffer + x1 > device->buflen) + hres = DSERR_INVALIDPARAM; + else + hres = IDsDriverBuffer_Unlock(device->hwbuf, p1, x1, p2, x2); + if (hres != DS_OK) { WARN("IDsDriverBuffer_Unlock failed\n"); return hres; diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c index c3fa0ed7aa3..db662c04081 100644 --- a/dlls/dsound/tests/ds3d.c +++ b/dlls/dsound/tests/ds3d.c @@ -184,6 +184,10 @@ static int buffer_refill(play_state_t* state, DWORD size) if (size>state->wave_len-state->written) size=state->wave_len-state->written; + /* some broken apps like Navyfield mistakenly pass NULL for a ppValue */ + rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, + &ptr1,NULL,&ptr2,&len2,0); + ok(rc==DSERR_INVALIDPARAM,"expected %08x got %08x\n",DSERR_INVALIDPARAM, rc); rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, &ptr1,&len1,&ptr2,&len2,0); ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %08x\n", rc); diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index bc4d1a69fc7..a55bbb44f06 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -32,6 +32,7 @@ #include "vfw.h" #include "mmddk.h" #include "ddraw.h" +#include "d3d9.h" #include "wine/debug.h" @@ -188,6 +189,37 @@ static inline HRESULT add_prop_ull_as_str( IDxDiagContainer* cont, LPCWSTR prop, return hr; } +static void get_display_device_id(WCHAR *szIdentifierBuffer) +{ + static const WCHAR szNA[] = {'n','/','a',0}; + + HRESULT hr = E_FAIL; + + HMODULE d3d9_handle; + IDirect3D9 *(WINAPI *pDirect3DCreate9)(UINT) = NULL; + IDirect3D9 *pD3d = NULL; + D3DADAPTER_IDENTIFIER9 adapter_ident; + + /* Retrieves the display device identifier from the d3d9 implementation. */ + d3d9_handle = LoadLibraryA("d3d9.dll"); + if(d3d9_handle) + pDirect3DCreate9 = (void *)GetProcAddress(d3d9_handle, "Direct3DCreate9"); + if(pDirect3DCreate9) + pD3d = pDirect3DCreate9(D3D_SDK_VERSION); + if(pD3d) + hr = IDirect3D9_GetAdapterIdentifier(pD3d, D3DADAPTER_DEFAULT, 0, &adapter_ident); + if(SUCCEEDED(hr)) { + StringFromGUID2(&adapter_ident.DeviceIdentifier, szIdentifierBuffer, 39); + } else { + memcpy(szIdentifierBuffer, szNA, sizeof(szNA)); + } + + if (pD3d) + IDirect3D9_Release(pD3d); + if (d3d9_handle) + FreeLibrary(d3d9_handle); +} + /** * @param szFilePath: usually GetSystemDirectoryW * @param szFileName: name of the dll without path @@ -377,54 +409,57 @@ static HRESULT DXDiag_InitDXDiagLogicalDisksContainer(IDxDiagContainer* pSubCont */ return hr; } -static HRESULT DXDiag_InitDXDiagDirectXFilesContainer(IDxDiagContainer* pSubCont) { - HRESULT hr = S_OK; - /**/ - static const WCHAR ddraw_dll[] = {'d','d','r','a','w','.','d','l','l',0}; - static const WCHAR dplayx_dll[] = {'d','p','l','a','y','x','.','d','l','l',0}; - static const WCHAR dpnet_dll[] = {'d','p','n','e','t','.','d','l','l',0}; - static const WCHAR dinput_dll[] = {'d','i','n','p','u','t','.','d','l','l',0}; - static const WCHAR dinput8_dll[] = {'d','i','n','p','u','t','8','.','d','l','l',0}; - static const WCHAR dsound_dll[] = {'d','s','o','u','n','d','.','d','l','l',0}; - static const WCHAR dswave_dll[] = {'d','s','w','a','v','e','.','d','l','l',0}; - static const WCHAR d3d8_dll[] = {'d','3','d','8','.','d','l','l',0}; - static const WCHAR d3d9_dll[] = {'d','3','d','9','.','d','l','l',0}; - static const WCHAR dmband_dll[] = {'d','m','b','a','n','d','.','d','l','l',0}; - static const WCHAR dmcompos_dll[] = {'d','m','c','o','m','p','o','s','.','d','l','l',0}; - static const WCHAR dmime_dll[] = {'d','m','i','m','e','.','d','l','l',0}; - static const WCHAR dmloader_dll[] = {'d','m','l','o','a','d','e','r','.','d','l','l',0}; - static const WCHAR dmscript_dll[] = {'d','m','s','c','r','i','p','t','.','d','l','l',0}; - static const WCHAR dmstyle_dll[] = {'d','m','s','t','y','l','e','.','d','l','l',0}; - static const WCHAR dmsynth_dll[] = {'d','m','s','y','n','t','h','.','d','l','l',0}; - static const WCHAR dmusic_dll[] = {'d','m','u','s','i','c','.','d','l','l',0}; - static const WCHAR devenum_dll[] = {'d','e','v','e','n','u','m','.','d','l','l',0}; - static const WCHAR quartz_dll[] = {'q','u','a','r','t','z','.','d','l','l',0}; - WCHAR szFilePath[512]; - - hr = GetSystemDirectoryW(szFilePath, MAX_PATH); - if (FAILED(hr)) { return hr; } - szFilePath[MAX_PATH-1]=0; - - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, ddraw_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dplayx_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dpnet_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dinput_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dinput8_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dsound_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dswave_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, d3d8_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, d3d9_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dmband_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dmcompos_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dmime_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dmloader_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dmscript_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dmstyle_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dmsynth_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, dmusic_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, devenum_dll); - hr = DXDiag_AddFileDescContainer(pSubCont, szFilePath, quartz_dll); - return hr; + +static HRESULT DXDiag_InitDXDiagDirectXFilesContainer(IDxDiagContainer* pSubCont) +{ + HRESULT hr = S_OK; + static const WCHAR dlls[][15] = + { + {'d','3','d','8','.','d','l','l',0}, + {'d','3','d','9','.','d','l','l',0}, + {'d','d','r','a','w','.','d','l','l',0}, + {'d','e','v','e','n','u','m','.','d','l','l',0}, + {'d','i','n','p','u','t','8','.','d','l','l',0}, + {'d','i','n','p','u','t','.','d','l','l',0}, + {'d','m','b','a','n','d','.','d','l','l',0}, + {'d','m','c','o','m','p','o','s','.','d','l','l',0}, + {'d','m','i','m','e','.','d','l','l',0}, + {'d','m','l','o','a','d','e','r','.','d','l','l',0}, + {'d','m','s','c','r','i','p','t','.','d','l','l',0}, + {'d','m','s','t','y','l','e','.','d','l','l',0}, + {'d','m','s','y','n','t','h','.','d','l','l',0}, + {'d','m','u','s','i','c','.','d','l','l',0}, + {'d','p','l','a','y','x','.','d','l','l',0}, + {'d','p','n','e','t','.','d','l','l',0}, + {'d','s','o','u','n','d','.','d','l','l',0}, + {'d','s','w','a','v','e','.','d','l','l',0}, + {'d','x','d','i','a','g','n','.','d','l','l',0}, + {'q','u','a','r','t','z','.','d','l','l',0} + }; + WCHAR szFilePath[MAX_PATH]; + INT i; + + GetSystemDirectoryW(szFilePath, MAX_PATH); + + for (i = 0; i < sizeof(dlls) / sizeof(dlls[0]); i++) + { + static const WCHAR szFormat[] = {'%','d',0}; + WCHAR szFileID[5]; + IDxDiagContainer *pDXFileSubCont; + + snprintfW(szFileID, sizeof(szFileID)/sizeof(szFileID[0]), szFormat, i); + + hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, (void**) &pDXFileSubCont); + if (FAILED(hr)) continue; + + if (FAILED(DXDiag_AddFileDescContainer(pDXFileSubCont, szFilePath, dlls[i])) || + FAILED(IDxDiagContainerImpl_AddChildContainer(pSubCont, szFileID, pDXFileSubCont))) + { + IUnknown_Release(pDXFileSubCont); + continue; + } + } + return hr; } static HRESULT DXDiag_InitDXDiagDisplayContainer(IDxDiagContainer* pSubCont) @@ -435,6 +470,7 @@ static HRESULT DXDiag_InitDXDiagDisplayContainer(IDxDiagContainer* pSubCont) static const WCHAR szKeyDeviceKey[] = {'s','z','K','e','y','D','e','v','i','c','e','K','e','y',0}; static const WCHAR szVendorId[] = {'s','z','V','e','n','d','o','r','I','d',0}; static const WCHAR szDeviceId[] = {'s','z','D','e','v','i','c','e','I','d',0}; + static const WCHAR szDeviceIdentifier[] = {'s','z','D','e','v','i','c','e','I','d','e','n','t','i','f','i','e','r',0}; static const WCHAR dwWidth[] = {'d','w','W','i','d','t','h',0}; static const WCHAR dwHeight[] = {'d','w','H','e','i','g','h','t',0}; static const WCHAR dwBpp[] = {'d','w','B','p','p',0}; @@ -492,6 +528,9 @@ static HRESULT DXDiag_InitDXDiagDisplayContainer(IDxDiagContainer* pSubCont) add_prop_ui4( pDisplayAdapterSubCont, dwBpp, surface_descr.u4.ddpfPixelFormat.u1.dwRGBBitCount ); } + get_display_device_id( buffer ); + add_prop_str( pDisplayAdapterSubCont, szDeviceIdentifier, buffer ); + add_prop_str( pDisplayAdapterSubCont, szVendorId, szEmpty ); add_prop_str( pDisplayAdapterSubCont, szDeviceId, szEmpty ); add_prop_str( pDisplayAdapterSubCont, szKeyDeviceKey, szEmpty ); diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 9eb1d13c9ad..61ae475cf4c 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -4578,9 +4578,7 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format, wine_dbgstr_point(&lpgm->gmptGlyphOrigin), lpgm->gmCellIncX, lpgm->gmCellIncY); - if ((format == GGO_METRICS || format == GGO_BITMAP || format == WINE_GGO_GRAY16_BITMAP || - format == WINE_GGO_HRGB_BITMAP || format == WINE_GGO_HBGR_BITMAP || - format == WINE_GGO_VRGB_BITMAP || format == WINE_GGO_VBGR_BITMAP ) && + if ((format == GGO_METRICS || format == GGO_BITMAP || format == WINE_GGO_GRAY16_BITMAP) && (!lpmat || is_identity_MAT2(lpmat))) /* don't cache custom transforms */ { FONT_GM(font,original_index)->gm = *lpgm; @@ -4741,22 +4739,24 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format, case WINE_GGO_VBGR_BITMAP: #ifdef HAVE_FREETYPE_FTLCDFIL_H { - width = lpgm->gmBlackBoxX; - height = lpgm->gmBlackBoxY; - pitch = width * 4; - needed = pitch * height; - - if (!buf || !buflen) break; - - memset(buf, 0, buflen); - switch (ft_face->glyph->format) { case FT_GLYPH_FORMAT_BITMAP: { - BYTE *src = ft_face->glyph->bitmap.buffer, *dst = buf; - INT src_pitch = ft_face->glyph->bitmap.pitch; - INT x; + BYTE *src, *dst; + INT src_pitch, x; + + width = lpgm->gmBlackBoxX; + height = lpgm->gmBlackBoxY; + pitch = width * 4; + needed = pitch * height; + + if (!buf || !buflen) break; + + memset(buf, 0, buflen); + dst = buf; + src = ft_face->glyph->bitmap.buffer; + src_pitch = ft_face->glyph->bitmap.pitch; while ( height-- ) { @@ -4774,24 +4774,53 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format, case FT_GLYPH_FORMAT_OUTLINE: { - unsigned int *dst = (unsigned int *) buf; + unsigned int *dst; BYTE *src; - INT x, src_pitch, rgb_interval, hmul, vmul; - BOOL rgb = (format == WINE_GGO_HRGB_BITMAP || format == WINE_GGO_VRGB_BITMAP); + INT x, src_pitch, src_width, src_height, rgb_interval, hmul, vmul; + INT x_shift, y_shift; + BOOL rgb; FT_LcdFilter lcdfilter = FT_LCD_FILTER_DEFAULT; FT_Render_Mode render_mode = (format == WINE_GGO_HRGB_BITMAP || format == WINE_GGO_HBGR_BITMAP)? FT_RENDER_MODE_LCD: FT_RENDER_MODE_LCD_V; + if ( lcdfilter == FT_LCD_FILTER_DEFAULT || lcdfilter == FT_LCD_FILTER_LIGHT ) + { + if ( render_mode == FT_RENDER_MODE_LCD) + { + lpgm->gmBlackBoxX += 2; + lpgm->gmptGlyphOrigin.x -= 1; + } + else + { + lpgm->gmBlackBoxY += 2; + lpgm->gmptGlyphOrigin.y += 1; + } + } + + width = lpgm->gmBlackBoxX; + height = lpgm->gmBlackBoxY; + pitch = width * 4; + needed = pitch * height; + + if (!buf || !buflen) break; + + memset(buf, 0, buflen); + dst = (unsigned int *)buf; + rgb = (format == WINE_GGO_HRGB_BITMAP || format == WINE_GGO_VRGB_BITMAP); + if ( needsTransform ) pFT_Outline_Transform (&ft_face->glyph->outline, &transMat); - pFT_Outline_Translate (&ft_face->glyph->outline, -left, -bottom ); + if ( pFT_Library_SetLcdFilter ) pFT_Library_SetLcdFilter( library, lcdfilter ); pFT_Render_Glyph (ft_face->glyph, render_mode); src = ft_face->glyph->bitmap.buffer; src_pitch = ft_face->glyph->bitmap.pitch; + src_width = ft_face->glyph->bitmap.width; + src_height = ft_face->glyph->bitmap.rows; + if ( render_mode == FT_RENDER_MODE_LCD) { rgb_interval = 1; @@ -4805,11 +4834,20 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format, vmul = 3; } - if ( lcdfilter == FT_LCD_FILTER_DEFAULT || lcdfilter == FT_LCD_FILTER_LIGHT ) - src += rgb_interval * 3; - while ( height-- ) + x_shift = ft_face->glyph->bitmap_left - lpgm->gmptGlyphOrigin.x; + if ( x_shift < 0 ) x_shift = 0; + if ( x_shift + (src_width / hmul) > width ) + x_shift = width - (src_width / hmul); + + y_shift = lpgm->gmptGlyphOrigin.y - ft_face->glyph->bitmap_top; + if ( y_shift < 0 ) y_shift = 0; + if ( y_shift + (src_height / vmul) > height ) + y_shift = height - (src_height / vmul); + + dst += x_shift + y_shift * ( pitch / 4 ); + while ( src_height ) { - for ( x = 0; x < width; x++ ) + for ( x = 0; x < src_width / hmul; x++ ) { if ( rgb ) { @@ -4828,6 +4866,7 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format, } src += src_pitch * vmul; dst += pitch / 4; + src_height -= vmul; } break; diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index f2fde192b9a..0624de01180 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -1435,7 +1435,7 @@ static BOOL get_glyph_indices(INT charset, UINT code_page, WORD *idx, UINT count ok(!(fs.fsCsb[0] & (1 << 31)), "symbol encoding should NOT be available\n"); } - if (!TranslateCharsetInfo((DWORD *)cs, &csi, TCI_SRCCHARSET)) + if (!TranslateCharsetInfo((DWORD *)(INT_PTR)cs, &csi, TCI_SRCCHARSET)) { trace("Can't find codepage for charset %d\n", cs); ReleaseDC(0, hdc); diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index a24f54ebe2f..9a513e122dd 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -1331,3 +1331,17 @@ GpStatus WINGDIPAPI GdipGetLineRectI(GpLineGradient *brush, GpRect *rect) return ret; } + +GpStatus WINGDIPAPI GdipRotateLineTransform(GpLineGradient* brush, + REAL angle, GpMatrixOrder order) +{ + static int calls; + + if(!brush) + return InvalidParameter; + + if(!(calls++)) + FIXME("(%p, %.2f, %d) stub\n", brush, angle, order); + + return NotImplemented; +} diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index d380d74c4c8..12a23167017 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -480,12 +480,12 @@ @ stub GdipResetPageTransform @ stdcall GdipResetPath(ptr) @ stub GdipResetPathGradientTransform -@ stub GdipResetPenTransform +@ stdcall GdipResetPenTransform(ptr) @ stdcall GdipResetTextureTransform(ptr) @ stdcall GdipResetWorldTransform(ptr) @ stdcall GdipRestoreGraphics(ptr long) @ stdcall GdipReversePath(ptr) -@ stub GdipRotateLineTransform +@ stdcall GdipRotateLineTransform(ptr long long) @ stdcall GdipRotateMatrix(ptr long long) @ stub GdipRotatePathGradientTransform @ stub GdipRotatePenTransform @@ -499,7 +499,7 @@ @ stub GdipScaleLineTransform @ stdcall GdipScaleMatrix(ptr long long long) @ stub GdipScalePathGradientTransform -@ stub GdipScalePenTransform +@ stdcall GdipScalePenTransform(ptr long long long) @ stdcall GdipScaleTextureTransform(ptr long long long) @ stdcall GdipScaleWorldTransform(ptr long long long) @ stdcall GdipSetAdjustableArrowCapFillState(ptr long) diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c index b2d6dab1dea..4a68a27c541 100644 --- a/dlls/gdiplus/pen.c +++ b/dlls/gdiplus/pen.c @@ -385,6 +385,32 @@ GpStatus WINGDIPAPI GdipGetPenWidth(GpPen *pen, REAL *width) return Ok; } +GpStatus WINGDIPAPI GdipResetPenTransform(GpPen *pen) +{ + static int calls; + + if(!pen) + return InvalidParameter; + + if(!(calls++)) + FIXME("(%p) stub\n", pen); + + return NotImplemented; +} + +GpStatus WINGDIPAPI GdipScalePenTransform(GpPen *pen, REAL sx, REAL sy, GpMatrixOrder order) +{ + static int calls; + + if(!pen) + return InvalidParameter; + + if(!(calls++)) + FIXME("(%p, %.2f, %.2f, %d) stub\n", pen, sx, sy, order); + + return NotImplemented; +} + GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen *pen, GpBrush *brush) { TRACE("(%p, %p)\n", pen, brush); diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index 27393b82a83..23f85ece3f0 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -322,7 +322,8 @@ static void testGetIpNetTable(void) PMIB_IPNETTABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize); apiReturn = gGetIpNetTable(buf, &dwSize, FALSE); - ok(apiReturn == NO_ERROR, + ok(apiReturn == NO_ERROR || + apiReturn == ERROR_NO_DATA, /* empty ARP table's okay */ "GetIpNetTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n", apiReturn); HeapFree(GetProcessHeap(), 0, buf); diff --git a/dlls/itircl/itircl_main.c b/dlls/itircl/itircl_main.c index 8cd4fa0fa97..b8d57517a35 100644 --- a/dlls/itircl/itircl_main.c +++ b/dlls/itircl/itircl_main.c @@ -58,7 +58,7 @@ HRESULT WINAPI DllRegisterServer(void) } /*********************************************************************** - * DllRegisterServer (ITIRCL.@) + * DllUnregisterServer (ITIRCL.@) */ HRESULT WINAPI DllUnregisterServer(void) { diff --git a/dlls/jscript/tests/jscript.c b/dlls/jscript/tests/jscript.c index 4cc01c96abb..ac6505833d4 100644 --- a/dlls/jscript/tests/jscript.c +++ b/dlls/jscript/tests/jscript.c @@ -295,6 +295,11 @@ static void test_jscript(void) hres = IUnknown_QueryInterface(unk, &IID_IActiveScriptParse, (void**)&parse); ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + if (FAILED(hres)) + { + IActiveScript_Release(script); + return; + } test_state(script, SCRIPTSTATE_UNINITIALIZED); test_safety(unk); @@ -366,6 +371,11 @@ static void test_jscript2(void) hres = IUnknown_QueryInterface(unk, &IID_IActiveScriptParse, (void**)&parse); ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + if (FAILED(hres)) + { + IActiveScript_Release(script); + return; + } test_state(script, SCRIPTSTATE_UNINITIALIZED); diff --git a/dlls/jscript/tests/run.c b/dlls/jscript/tests/run.c index 81de5795209..66c312ebfe9 100644 --- a/dlls/jscript/tests/run.c +++ b/dlls/jscript/tests/run.c @@ -574,6 +574,11 @@ static void parse_script(BSTR script_str) hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + if (FAILED(hres)) + { + IActiveScript_Release(engine); + return; + } hres = IActiveScriptParse_InitNew(parser); ok(hres == S_OK, "InitNew failed: %08x\n", hres); @@ -696,6 +701,11 @@ static void test_isvisible(BOOL global_members) hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + if (FAILED(hres)) + { + IActiveScript_Release(engine); + return; + } hres = IActiveScriptParse_InitNew(parser); ok(hres == S_OK, "InitNew failed: %08x\n", hres); diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c index 63ca2774e96..bd3d74add8e 100644 --- a/dlls/kernel32/cpu.c +++ b/dlls/kernel32/cpu.c @@ -681,7 +681,7 @@ VOID WINAPI GetSystemInfo( valSize = sizeof(int); if (sysctlbyname ("hw.activecpu", &value, &valSize, NULL, 0) == 0) - cachedsi.dwActiveProcessorMask = (1 << value) - 1; + cachedsi.dwActiveProcessorMask = ((ULONG_PTR)1 << value) - 1; valSize = sizeof(int); if (sysctlbyname ("hw.cputype", &cputype, &valSize, NULL, 0) == 0) @@ -780,12 +780,12 @@ VOID WINAPI GetSystemInfo( FIXME("not yet supported on this system\n"); #endif if (!cachedsi.dwActiveProcessorMask) - cachedsi.dwActiveProcessorMask = (1 << cachedsi.dwNumberOfProcessors) - 1; + cachedsi.dwActiveProcessorMask = ((ULONG_PTR)1 << cachedsi.dwNumberOfProcessors) - 1; *si = cachedsi; TRACE("<- CPU arch %d, res'd %d, pagesize %d, minappaddr %p, maxappaddr %p," - " act.cpumask %08x, numcpus %d, CPU type %d, allocgran. %d, CPU level %d, CPU rev %d\n", + " act.cpumask %lx, numcpus %d, CPU type %d, allocgran. %d, CPU level %d, CPU rev %d\n", si->u.s.wProcessorArchitecture, si->u.s.wReserved, si->dwPageSize, si->lpMinimumApplicationAddress, si->lpMaximumApplicationAddress, si->dwActiveProcessorMask, si->dwNumberOfProcessors, si->dwProcessorType, diff --git a/dlls/kernel32/debugger.c b/dlls/kernel32/debugger.c index 91b2cf43ba9..6e7b4b1a4db 100644 --- a/dlls/kernel32/debugger.c +++ b/dlls/kernel32/debugger.c @@ -50,7 +50,7 @@ BOOL WINAPI WaitForDebugEvent( DWORD timeout) { BOOL ret; - DWORD res; + DWORD i, res; for (;;) { @@ -74,51 +74,57 @@ BOOL WINAPI WaitForDebugEvent( switch(data.code) { case EXCEPTION_DEBUG_EVENT: - event->u.Exception.ExceptionRecord = data.info.exception.record; - event->u.Exception.dwFirstChance = data.info.exception.first; + event->u.Exception.dwFirstChance = data.exception.first; + event->u.Exception.ExceptionRecord.ExceptionCode = data.exception.exc_code; + event->u.Exception.ExceptionRecord.ExceptionFlags = data.exception.flags; + event->u.Exception.ExceptionRecord.ExceptionRecord = wine_server_get_ptr( data.exception.record ); + event->u.Exception.ExceptionRecord.ExceptionAddress = wine_server_get_ptr( data.exception.address ); + event->u.Exception.ExceptionRecord.NumberParameters = data.exception.nb_params; + for (i = 0; i < data.exception.nb_params; i++) + event->u.Exception.ExceptionRecord.ExceptionInformation[i] = data.exception.params[i]; break; case CREATE_THREAD_DEBUG_EVENT: - event->u.CreateThread.hThread = wine_server_ptr_handle( data.info.create_thread.handle ); - event->u.CreateThread.lpThreadLocalBase = data.info.create_thread.teb; - event->u.CreateThread.lpStartAddress = data.info.create_thread.start; + event->u.CreateThread.hThread = wine_server_ptr_handle( data.create_thread.handle ); + event->u.CreateThread.lpThreadLocalBase = wine_server_get_ptr( data.create_thread.teb ); + event->u.CreateThread.lpStartAddress = wine_server_get_ptr( data.create_thread.start ); break; case CREATE_PROCESS_DEBUG_EVENT: - event->u.CreateProcessInfo.hFile = wine_server_ptr_handle( data.info.create_process.file ); - event->u.CreateProcessInfo.hProcess = wine_server_ptr_handle( data.info.create_process.process ); - event->u.CreateProcessInfo.hThread = wine_server_ptr_handle( data.info.create_process.thread ); - event->u.CreateProcessInfo.lpBaseOfImage = data.info.create_process.base; - event->u.CreateProcessInfo.dwDebugInfoFileOffset = data.info.create_process.dbg_offset; - event->u.CreateProcessInfo.nDebugInfoSize = data.info.create_process.dbg_size; - event->u.CreateProcessInfo.lpThreadLocalBase = data.info.create_process.teb; - event->u.CreateProcessInfo.lpStartAddress = data.info.create_process.start; - event->u.CreateProcessInfo.lpImageName = data.info.create_process.name; - event->u.CreateProcessInfo.fUnicode = data.info.create_process.unicode; + event->u.CreateProcessInfo.hFile = wine_server_ptr_handle( data.create_process.file ); + event->u.CreateProcessInfo.hProcess = wine_server_ptr_handle( data.create_process.process ); + event->u.CreateProcessInfo.hThread = wine_server_ptr_handle( data.create_process.thread ); + event->u.CreateProcessInfo.lpBaseOfImage = wine_server_get_ptr( data.create_process.base ); + event->u.CreateProcessInfo.dwDebugInfoFileOffset = data.create_process.dbg_offset; + event->u.CreateProcessInfo.nDebugInfoSize = data.create_process.dbg_size; + event->u.CreateProcessInfo.lpThreadLocalBase = wine_server_get_ptr( data.create_process.teb ); + event->u.CreateProcessInfo.lpStartAddress = wine_server_get_ptr( data.create_process.start ); + event->u.CreateProcessInfo.lpImageName = wine_server_get_ptr( data.create_process.name ); + event->u.CreateProcessInfo.fUnicode = data.create_process.unicode; break; case EXIT_THREAD_DEBUG_EVENT: - event->u.ExitThread.dwExitCode = data.info.exit.exit_code; + event->u.ExitThread.dwExitCode = data.exit.exit_code; break; case EXIT_PROCESS_DEBUG_EVENT: - event->u.ExitProcess.dwExitCode = data.info.exit.exit_code; + event->u.ExitProcess.dwExitCode = data.exit.exit_code; break; case LOAD_DLL_DEBUG_EVENT: - event->u.LoadDll.hFile = wine_server_ptr_handle( data.info.load_dll.handle ); - event->u.LoadDll.lpBaseOfDll = data.info.load_dll.base; - event->u.LoadDll.dwDebugInfoFileOffset = data.info.load_dll.dbg_offset; - event->u.LoadDll.nDebugInfoSize = data.info.load_dll.dbg_size; - event->u.LoadDll.lpImageName = data.info.load_dll.name; - event->u.LoadDll.fUnicode = data.info.load_dll.unicode; + event->u.LoadDll.hFile = wine_server_ptr_handle( data.load_dll.handle ); + event->u.LoadDll.lpBaseOfDll = wine_server_get_ptr( data.load_dll.base ); + event->u.LoadDll.dwDebugInfoFileOffset = data.load_dll.dbg_offset; + event->u.LoadDll.nDebugInfoSize = data.load_dll.dbg_size; + event->u.LoadDll.lpImageName = wine_server_get_ptr( data.load_dll.name ); + event->u.LoadDll.fUnicode = data.load_dll.unicode; break; case UNLOAD_DLL_DEBUG_EVENT: - event->u.UnloadDll.lpBaseOfDll = data.info.unload_dll.base; + event->u.UnloadDll.lpBaseOfDll = wine_server_get_ptr( data.unload_dll.base ); break; case OUTPUT_DEBUG_STRING_EVENT: - event->u.DebugString.lpDebugStringData = data.info.output_string.string; - event->u.DebugString.fUnicode = data.info.output_string.unicode; - event->u.DebugString.nDebugStringLength = data.info.output_string.length; + event->u.DebugString.lpDebugStringData = wine_server_get_ptr( data.output_string.string ); + event->u.DebugString.fUnicode = data.output_string.unicode; + event->u.DebugString.nDebugStringLength = data.output_string.length; break; case RIP_EVENT: - event->u.RipInfo.dwError = data.info.rip_info.error; - event->u.RipInfo.dwType = data.info.rip_info.type; + event->u.RipInfo.dwError = data.rip_info.error; + event->u.RipInfo.dwType = data.rip_info.type; break; } done: @@ -237,7 +243,7 @@ void WINAPI OutputDebugStringA( LPCSTR str ) { SERVER_START_REQ( output_debug_string ) { - req->string = (void *)str; + req->string = wine_server_client_ptr( str ); req->unicode = 0; req->length = strlen(str) + 1; wine_server_call( req ); @@ -264,7 +270,7 @@ void WINAPI OutputDebugStringW( LPCWSTR str ) { SERVER_START_REQ( output_debug_string ) { - req->string = (void *)str; + req->string = wine_server_client_ptr( str ); req->unicode = 1; req->length = (lstrlenW(str) + 1) * sizeof(WCHAR); wine_server_call( req ); diff --git a/dlls/kernel32/format_msg.c b/dlls/kernel32/format_msg.c index 0920d66c949..41a2317f214 100644 --- a/dlls/kernel32/format_msg.c +++ b/dlls/kernel32/format_msg.c @@ -135,7 +135,7 @@ DWORD WINAPI FormatMessageA( DWORD dwLanguageId, LPSTR lpBuffer, DWORD nSize, - va_list* _args ) + __ms_va_list* _args ) { LPDWORD args=(LPDWORD)_args; DWORD ret = 0; @@ -356,7 +356,7 @@ DWORD WINAPI FormatMessageW( DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, - va_list* _args ) + __ms_va_list* _args ) { LPDWORD args=(LPDWORD)_args; #if defined(__i386__) || defined(__sparc__) diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c index 12401042caf..41987a5530f 100644 --- a/dlls/kernel32/heap.c +++ b/dlls/kernel32/heap.c @@ -1119,79 +1119,6 @@ BOOL WINAPI LocalUnlock( } -/********************************************************************** - * AllocMappedBuffer (KERNEL32.38) - * - * This is an undocumented KERNEL32 function that - * SMapLS's a GlobalAlloc'ed buffer. - * - * RETURNS - * EDI register: pointer to buffer - * - * NOTES - * The buffer is preceded by 8 bytes: - * ... - * edi+0 buffer - * edi-4 SEGPTR to buffer - * edi-8 some magic Win95 needs for SUnMapLS - * (we use it for the memory handle) - * - * The SEGPTR is used by the caller! - */ -void WINAPI __regs_AllocMappedBuffer( - CONTEXT86 *context /* [in] EDI register: size of buffer to allocate */ -) { - HGLOBAL handle = GlobalAlloc(0, context->Edi + 8); - DWORD *buffer = GlobalLock(handle); - DWORD ptr = 0; - - if (buffer) - if (!(ptr = MapLS(buffer + 2))) - { - GlobalUnlock(handle); - GlobalFree(handle); - } - - if (!ptr) - context->Eax = context->Edi = 0; - else - { - buffer[0] = (DWORD)handle; - buffer[1] = ptr; - - context->Eax = ptr; - context->Edi = (DWORD)(buffer + 2); - } -} -#ifdef DEFINE_REGS_ENTRYPOINT -DEFINE_REGS_ENTRYPOINT( AllocMappedBuffer, 0, 0 ) -#endif - -/********************************************************************** - * FreeMappedBuffer (KERNEL32.39) - * - * Free a buffer allocated by AllocMappedBuffer - * - * RETURNS - * Nothing. - */ -void WINAPI __regs_FreeMappedBuffer( - CONTEXT86 *context /* [in] EDI register: pointer to buffer */ -) { - if (context->Edi) - { - DWORD *buffer = (DWORD *)context->Edi - 2; - - UnMapLS(buffer[1]); - - GlobalUnlock((HGLOBAL)buffer[0]); - GlobalFree((HGLOBAL)buffer[0]); - } -} -#ifdef DEFINE_REGS_ENTRYPOINT -DEFINE_REGS_ENTRYPOINT( FreeMappedBuffer, 0, 0 ) -#endif - /*********************************************************************** * GlobalMemoryStatusEx (KERNEL32.@) * A version of GlobalMemoryStatus that can deal with memory over 4GB @@ -1206,7 +1133,7 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex ) SYSTEM_INFO si; #ifdef linux FILE *f; -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) unsigned long val; int mib[2]; size_t size_sys; @@ -1278,7 +1205,7 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex ) } fclose( f ); } -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__APPLE__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) mib[0] = CTL_HW; mib[1] = HW_PHYSMEM; size_sys = sizeof(val); diff --git a/dlls/kernel32/kernel_private.h b/dlls/kernel32/kernel_private.h index f83b6c38546..18d71b59ee6 100644 --- a/dlls/kernel32/kernel_private.h +++ b/dlls/kernel32/kernel_private.h @@ -143,4 +143,15 @@ extern struct winedos_exports /* returns directory handle for named objects */ extern HANDLE get_BaseNamedObjects_handle(void); +/* Register functions */ + +#ifdef __i386__ +#define DEFINE_REGS_ENTRYPOINT( name, args, pop_args ) \ + __ASM_GLOBAL_FUNC( name, \ + "pushl %eax\n\t" \ + "call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \ + ".long " __ASM_NAME("__regs_") #name "-.\n\t" \ + ".byte " #args "," #pop_args ) +#endif + #endif diff --git a/dlls/kernel32/local16.c b/dlls/kernel32/local16.c index 48bc6c3588f..a5b2fc72dc1 100644 --- a/dlls/kernel32/local16.c +++ b/dlls/kernel32/local16.c @@ -412,7 +412,7 @@ BOOL16 WINAPI LocalInit16( HANDLE16 selector, WORD start, WORD end ) if (TRACE_ON(local)) { - /* If TRACE_ON(heap) is set, the global heap blocks are */ + /* If TRACE_ON(local) is set, the global heap blocks are */ /* cleared before use, so we can test for double initialization. */ if (LOCAL_GetHeap(selector)) { diff --git a/dlls/kernel32/string.c b/dlls/kernel32/string.c index ecac281f133..1f606fd7f6c 100644 --- a/dlls/kernel32/string.c +++ b/dlls/kernel32/string.c @@ -36,7 +36,7 @@ static INT (WINAPI *pLoadStringA)(HINSTANCE, UINT, LPSTR, INT); -static INT (WINAPI *pwvsprintfA)(LPSTR, LPCSTR, va_list); +static INT (WINAPI *pwvsprintfA)(LPSTR, LPCSTR, __ms_va_list); /*********************************************************************** @@ -118,7 +118,7 @@ INT WINAPI k32LoadStringA(HINSTANCE instance, UINT resource_id, /*********************************************************************** * k32wvsprintfA (KERNEL32.16) */ -INT WINAPI k32wvsprintfA(LPSTR buffer, LPCSTR spec, va_list args) +INT WINAPI k32wvsprintfA(LPSTR buffer, LPCSTR spec, __ms_va_list args) { if(!pwvsprintfA) pwvsprintfA = user32_proc_address("wvsprintfA"); return (*pwvsprintfA)(buffer, spec, args); @@ -130,12 +130,12 @@ INT WINAPI k32wvsprintfA(LPSTR buffer, LPCSTR spec, va_list args) */ INT WINAPIV k32wsprintfA(LPSTR buffer, LPCSTR spec, ...) { - va_list args; + __ms_va_list args; INT res; - va_start(args, spec); + __ms_va_start(args, spec); res = k32wvsprintfA(buffer, spec, args); - va_end(args); + __ms_va_end(args); return res; } diff --git a/dlls/kernel32/tests/atom.c b/dlls/kernel32/tests/atom.c index 9601fd616c9..cae36011984 100644 --- a/dlls/kernel32/tests/atom.c +++ b/dlls/kernel32/tests/atom.c @@ -77,7 +77,7 @@ static BOOL unicode_OS; static void test_add_atom(void) { ATOM atom, w_atom; - int i; + INT_PTR i; SetLastError( 0xdeadbeef ); atom = GlobalAddAtomA( "foobar" ); @@ -129,20 +129,20 @@ static void test_add_atom(void) { SetLastError( 0xdeadbeef ); ok( GlobalAddAtomA((LPCSTR)i) == i && GetLastError() == 0xdeadbeef, - "failed to add atom %x\n", i ); + "failed to add atom %lx\n", i ); if (unicode_OS) { SetLastError( 0xdeadbeef ); ok( GlobalAddAtomW((LPCWSTR)i) == i && GetLastError() == 0xdeadbeef, - "failed to add atom %x\n", i ); + "failed to add atom %lx\n", i ); } } for (i = 0xc000; i <= 0xffff; i++) { - ok( !GlobalAddAtomA((LPCSTR)i), "succeeded adding %x\n", i ); + ok( !GlobalAddAtomA((LPCSTR)i), "succeeded adding %lx\n", i ); if (unicode_OS) - ok( !GlobalAddAtomW((LPCWSTR)i), "succeeded adding %x\n", i ); + ok( !GlobalAddAtomW((LPCWSTR)i), "succeeded adding %lx\n", i ); } } @@ -349,7 +349,7 @@ static void test_error_handling(void) static void test_local_add_atom(void) { ATOM atom, w_atom; - int i; + INT_PTR i; SetLastError( 0xdeadbeef ); atom = AddAtomA( "foobar" ); @@ -401,20 +401,20 @@ static void test_local_add_atom(void) { SetLastError( 0xdeadbeef ); ok( AddAtomA((LPCSTR)i) == i && GetLastError() == 0xdeadbeef, - "failed to add atom %x\n", i ); + "failed to add atom %lx\n", i ); if (unicode_OS) { SetLastError( 0xdeadbeef ); ok( AddAtomW((LPCWSTR)i) == i && GetLastError() == 0xdeadbeef, - "failed to add atom %x\n", i ); + "failed to add atom %lx\n", i ); } } for (i = 0xc000; i <= 0xffff; i++) { - ok( !AddAtomA((LPCSTR)i), "succeeded adding %x\n", i ); + ok( !AddAtomA((LPCSTR)i), "succeeded adding %lx\n", i ); if (unicode_OS) - ok( !AddAtomW((LPCWSTR)i), "succeeded adding %x\n", i ); + ok( !AddAtomW((LPCWSTR)i), "succeeded adding %lx\n", i ); } } diff --git a/dlls/kernel32/tests/comm.c b/dlls/kernel32/tests/comm.c index 3c73eb54355..8da29dffac0 100644 --- a/dlls/kernel32/tests/comm.c +++ b/dlls/kernel32/tests/comm.c @@ -1161,15 +1161,14 @@ static void test_WaitRx(HANDLE hcom) */ static DWORD CALLBACK toggle_ctlLine(LPVOID arg) { - DWORD *args = (DWORD *) arg; + DWORD_PTR *args = (DWORD_PTR *) arg; DWORD timeout = args[0]; DWORD ctl = args[1]; HANDLE hcom = (HANDLE) args[2]; HANDLE hComPortEvent = (HANDLE) args[3]; DWORD success, err; - trace("toggle_ctlLine timeout %d clt 0x%08x handle 0x%08x\n", - args[0], args[1], args[2]); + trace("toggle_ctlLine timeout %d ctl 0x%08x handle %p\n", timeout, ctl, hcom ); Sleep(timeout); ok(EscapeCommFunction(hcom, ctl),"EscapeCommFunction 0x%08x failed\n", ctl); trace("toggle_ctline done\n"); @@ -1190,8 +1189,8 @@ static void test_WaitCts(HANDLE hcom) OVERLAPPED overlapped; HANDLE hComPortEvent; HANDLE alarmThread; - DWORD args[4], defaultStat = 0; - DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0; + DWORD_PTR args[4]; + DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0, defaultStat = 0; ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); dcb.fRtsControl=RTS_CONTROL_ENABLE; @@ -1208,15 +1207,15 @@ static void test_WaitCts(HANDLE hcom) args[1] = CLRRTS; else args[1] = SETRTS; - args[2]=(DWORD) hcom; + args[2]=(DWORD_PTR)hcom; - trace("test_WaitCts timeout %d clt 0x%08x handle 0x%08x\n",args[0], args[1], args[2]); + trace("test_WaitCts timeout %ld clt 0x%08lx handle %p\n",args[0], args[1], hcom); ok(SetCommMask(hcom, EV_CTS), "SetCommMask failed\n"); hComPortEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); ok(hComPortEvent != 0, "CreateEvent failed\n"); - args[3] = (DWORD) hComPortEvent; - alarmThread = CreateThread(NULL, 0, toggle_ctlLine, (void *) &args, 0, &alarmThreadId); + args[3] = (DWORD_PTR)hComPortEvent; + alarmThread = CreateThread(NULL, 0, toggle_ctlLine, args, 0, &alarmThreadId); /* Wait a minimum to let the thread start up */ Sleep(10); trace("Thread created\n"); @@ -1265,7 +1264,7 @@ static void test_WaitCts(HANDLE hcom) */ static DWORD CALLBACK reset_CommMask(LPVOID arg) { - DWORD *args = (DWORD *) arg; + DWORD_PTR *args = (DWORD_PTR *) arg; DWORD timeout = args[0]; HANDLE hcom = (HANDLE) args[1]; @@ -1287,7 +1286,7 @@ static void test_AbortWaitCts(HANDLE hcom) OVERLAPPED overlapped; HANDLE hComPortEvent; HANDLE alarmThread; - DWORD args[2]; + DWORD_PTR args[2]; DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0; ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); @@ -1297,14 +1296,14 @@ static void test_AbortWaitCts(HANDLE hcom) return; } args[0]= TIMEOUT >>1; - args[1]=(DWORD) hcom; + args[1]= (DWORD_PTR)hcom; - trace("test_AbortWaitCts timeout %d handle 0x%08x\n",args[0], args[1]); + trace("test_AbortWaitCts timeout %ld handle %p\n",args[0], hcom); ok(SetCommMask(hcom, EV_CTS), "SetCommMask failed\n"); hComPortEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); ok(hComPortEvent != 0, "CreateEvent failed\n"); - alarmThread = CreateThread(NULL, 0, reset_CommMask, (void *) &args, 0, &alarmThreadId); + alarmThread = CreateThread(NULL, 0, reset_CommMask, args, 0, &alarmThreadId); /* Wait a minimum to let the thread start up */ Sleep(10); trace("Thread created\n"); @@ -1348,8 +1347,8 @@ static void test_WaitDsr(HANDLE hcom) OVERLAPPED overlapped; HANDLE hComPortEvent; HANDLE alarmThread; - DWORD args[3], defaultStat = 0; - DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0; + DWORD_PTR args[3]; + DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0, defaultStat = 0; ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); if (dcb.fDtrControl == DTR_CONTROL_DISABLE) @@ -1363,14 +1362,14 @@ static void test_WaitDsr(HANDLE hcom) args[1] = CLRDTR; else args[1] = SETDTR; - args[2]=(DWORD) hcom; + args[2]= (DWORD_PTR)hcom; - trace("test_WaitDsr timeout %d clt 0x%08x handle 0x%08x\n",args[0], args[1], args[2]); + trace("test_WaitDsr timeout %ld clt 0x%08lx handle %p\n",args[0], args[1], hcom); ok(SetCommMask(hcom, EV_DSR), "SetCommMask failed\n"); hComPortEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); ok(hComPortEvent != 0, "CreateEvent failed\n"); - alarmThread = CreateThread(NULL, 0, toggle_ctlLine, (void *) &args, 0, &alarmThreadId); + alarmThread = CreateThread(NULL, 0, toggle_ctlLine, args, 0, &alarmThreadId); ok(alarmThread !=0 , "CreateThread Failed\n"); ZeroMemory( &overlapped, sizeof(overlapped)); @@ -1421,8 +1420,8 @@ static void test_WaitRing(HANDLE hcom) OVERLAPPED overlapped; HANDLE hComPortEvent; HANDLE alarmThread; - DWORD args[3], defaultStat; - DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0; + DWORD_PTR args[3]; + DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0, defaultStat; BOOL ret; ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); @@ -1441,14 +1440,14 @@ static void test_WaitRing(HANDLE hcom) args[1] = CLRDTR; else args[1] = SETDTR; - args[2]=(DWORD) hcom; + args[2]=(DWORD_PTR) hcom; - trace("test_WaitRing timeout %d clt 0x%08x handle 0x%08x\n",args[0], args[1], args[2]); + trace("test_WaitRing timeout %ld clt 0x%08lx handle %p\n",args[0], args[1], hcom); ok(SetCommMask(hcom, EV_RING), "SetCommMask failed\n"); hComPortEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); ok(hComPortEvent != 0, "CreateEvent failed\n"); - alarmThread = CreateThread(NULL, 0, toggle_ctlLine, (void *) &args, 0, &alarmThreadId); + alarmThread = CreateThread(NULL, 0, toggle_ctlLine, args, 0, &alarmThreadId); ok(alarmThread !=0 , "CreateThread Failed\n"); ZeroMemory( &overlapped, sizeof(overlapped)); @@ -1498,8 +1497,8 @@ static void test_WaitDcd(HANDLE hcom) OVERLAPPED overlapped; HANDLE hComPortEvent; HANDLE alarmThread; - DWORD args[3], defaultStat = 0; - DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0; + DWORD_PTR args[3]; + DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0, defaultStat = 0; ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); if (dcb.fDtrControl == DTR_CONTROL_DISABLE) @@ -1513,14 +1512,14 @@ static void test_WaitDcd(HANDLE hcom) args[1] = CLRDTR; else args[1] = SETDTR; - args[2]=(DWORD) hcom; + args[2]= (DWORD_PTR)hcom; - trace("test_WaitDcd timeout %d clt 0x%08x handle 0x%08x\n",args[0], args[1], args[2]); + trace("test_WaitDcd timeout %ld clt 0x%08lx handle %p\n",args[0], args[1], hcom); ok(SetCommMask(hcom, EV_RLSD), "SetCommMask failed\n"); hComPortEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); ok(hComPortEvent != 0, "CreateEvent failed\n"); - alarmThread = CreateThread(NULL, 0, toggle_ctlLine, (void *) &args, 0, &alarmThreadId); + alarmThread = CreateThread(NULL, 0, toggle_ctlLine, args, 0, &alarmThreadId); ok(alarmThread !=0 , "CreateThread Failed\n"); ZeroMemory( &overlapped, sizeof(overlapped)); @@ -1566,7 +1565,7 @@ static void test_WaitDcd(HANDLE hcom) */ static DWORD CALLBACK set_CommBreak(LPVOID arg) { - DWORD *args = (DWORD *) arg; + DWORD_PTR *args = (DWORD_PTR *) arg; DWORD timeout = args[0]; HANDLE hcom = (HANDLE) args[1]; @@ -1587,7 +1586,7 @@ static void test_WaitBreak(HANDLE hcom) OVERLAPPED overlapped; HANDLE hComPortEvent; HANDLE alarmThread; - DWORD args[2]; + DWORD_PTR args[2]; DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0; ok(SetCommMask(hcom, EV_BREAK), "SetCommMask failed\n"); @@ -1596,8 +1595,8 @@ static void test_WaitBreak(HANDLE hcom) trace("test_WaitBreak\n"); args[0]= TIMEOUT >>1; - args[1]=(DWORD) hcom; - alarmThread = CreateThread(NULL, 0, set_CommBreak, (void *) &args, 0, &alarmThreadId); + args[1]= (DWORD_PTR)hcom; + alarmThread = CreateThread(NULL, 0, set_CommBreak, args, 0, &alarmThreadId); /* Wait a minimum to let the thread start up */ Sleep(10); trace("Thread created\n"); diff --git a/dlls/kernel32/tests/debugger.c b/dlls/kernel32/tests/debugger.c index 014f390be99..2672e444450 100644 --- a/dlls/kernel32/tests/debugger.c +++ b/dlls/kernel32/tests/debugger.c @@ -147,7 +147,7 @@ static void doDebugger(int argc, char** argv) else blackbox.attach_rc=TRUE; - debug_event=(argc >= 6 ? (HANDLE)atol(argv[5]) : NULL); + debug_event=(argc >= 6 ? (HANDLE)(INT_PTR)atol(argv[5]) : NULL); blackbox.debug_err=0; if (debug_event && strstr(myARGV[2], "event")) { diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 338ba464ec5..b4a0b98164a 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -35,6 +35,7 @@ static HANDLE (WINAPI *pFindFirstFileExA)(LPCSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD); static BOOL (WINAPI *pReplaceFileA)(LPCSTR, LPCSTR, LPCSTR, DWORD, LPVOID, LPVOID); static BOOL (WINAPI *pReplaceFileW)(LPCWSTR, LPCWSTR, LPCWSTR, DWORD, LPVOID, LPVOID); +static UINT (WINAPI *pGetSystemWindowsDirectoryA)(LPSTR, UINT); /* keep filename and filenameW the same */ static const char filename[] = "testfile.xxx"; @@ -58,6 +59,7 @@ static void InitFunctionPointers(void) pFindFirstFileExA=(void*)GetProcAddress(hkernel32, "FindFirstFileExA"); pReplaceFileA=(void*)GetProcAddress(hkernel32, "ReplaceFileA"); pReplaceFileW=(void*)GetProcAddress(hkernel32, "ReplaceFileW"); + pGetSystemWindowsDirectoryA=(void*)GetProcAddress(hkernel32, "GetSystemWindowsDirectoryA"); } static void test__hread( void ) @@ -354,20 +356,20 @@ static void test__llseek( void ) for (i = 0; i < 400; i++) { - ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite complains\n" ); + ok( _hwrite( filehandle, sillytext, strlen( sillytext ) ) != -1, "_hwrite complains\n" ); } - ok( HFILE_ERROR != _llseek( filehandle, 400 * strlen( sillytext ), FILE_CURRENT ), "should be able to seek\n" ); - ok( HFILE_ERROR != _llseek( filehandle, 27 + 35 * strlen( sillytext ), FILE_BEGIN ), "should be able to seek\n" ); + ok( _llseek( filehandle, 400 * strlen( sillytext ), FILE_CURRENT ) != -1, "should be able to seek\n" ); + ok( _llseek( filehandle, 27 + 35 * strlen( sillytext ), FILE_BEGIN ) != -1, "should be able to seek\n" ); bytes_read = _hread( filehandle, buffer, 1); ok( 1 == bytes_read, "file read size error\n" ); ok( buffer[0] == sillytext[27], "_llseek error, it got lost seeking\n" ); - ok( HFILE_ERROR != _llseek( filehandle, -400 * strlen( sillytext ), FILE_END ), "should be able to seek\n" ); + ok( _llseek( filehandle, -400 * strlen( sillytext ), FILE_END ) != -1, "should be able to seek\n" ); bytes_read = _hread( filehandle, buffer, 1); ok( 1 == bytes_read, "file read size error\n" ); ok( buffer[0] == sillytext[0], "_llseek error, it got lost seeking\n" ); - ok( HFILE_ERROR != _llseek( filehandle, 1000000, FILE_END ), "should be able to seek past file; poor, poor Windows programmers\n" ); + ok( _llseek( filehandle, 1000000, FILE_END ) != -1, "should be able to seek past file; poor, poor Windows programmers\n" ); ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); ret = DeleteFileA( filename ); @@ -1752,7 +1754,10 @@ static void test_OpenFile(void) UINT length; /* Check for existing file */ - length = GetWindowsDirectoryA(buff, MAX_PATH); + if (!pGetSystemWindowsDirectoryA) + length = GetWindowsDirectoryA(buff, MAX_PATH); + else + length = pGetSystemWindowsDirectoryA(buff, MAX_PATH); if (length + sizeof(file) < MAX_PATH) { diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c index c196c23e3cd..39efde9811d 100644 --- a/dlls/kernel32/tests/heap.c +++ b/dlls/kernel32/tests/heap.c @@ -64,13 +64,13 @@ START_TEST(heap) /* test some border cases of HeapAlloc and HeapReAlloc */ mem = HeapAlloc(GetProcessHeap(), 0, 0); ok(mem != NULL, "memory not allocated for size 0\n"); - msecond = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, ~0UL - 7); - ok(msecond == NULL, "HeapReAlloc(0xfffffff8) should have failed\n"); - msecond = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, ~0UL); - ok(msecond == NULL, "HeapReAlloc(0xffffffff) should have failed\n"); + msecond = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, ~(SIZE_T)0 - 7); + ok(msecond == NULL, "HeapReAlloc(~0 - 7) should have failed\n"); + msecond = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, ~(SIZE_T)0); + ok(msecond == NULL, "HeapReAlloc(~0) should have failed\n"); HeapFree(GetProcessHeap(), 0, mem); - mem = HeapAlloc(GetProcessHeap(), 0, ~0UL); - ok(mem == NULL, "memory allocated for size ~0UL\n"); + mem = HeapAlloc(GetProcessHeap(), 0, ~(SIZE_T)0); + ok(mem == NULL, "memory allocated for size ~0\n"); /* large blocks must be 16-byte aligned */ mem = HeapAlloc(GetProcessHeap(), 0, 512 * 1024); @@ -190,13 +190,16 @@ START_TEST(heap) ok(mem == NULL, "Expected NULL, got %p\n", mem); /* invalid free */ - SetLastError(MAGIC_DEAD); - mem = GlobalFree(gbl); - ok(mem == gbl || broken(mem == NULL) /* nt4 */, "Expected gbl, got %p\n", mem); - if (mem == gbl) - ok(GetLastError() == ERROR_INVALID_HANDLE || - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + if (sizeof(void *) != 8) /* crashes on 64-bit Vista */ + { + SetLastError(MAGIC_DEAD); + mem = GlobalFree(gbl); + ok(mem == gbl || broken(mem == NULL) /* nt4 */, "Expected gbl, got %p\n", mem); + if (mem == gbl) + ok(GetLastError() == ERROR_INVALID_HANDLE || + GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ + "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } gbl = GlobalAlloc(GMEM_DDESHARE, 100); @@ -211,12 +214,15 @@ START_TEST(heap) "Expected 1 or 0, got %d\n", res); /* GlobalSize on an invalid handle */ - SetLastError(MAGIC_DEAD); - size = GlobalSize((HGLOBAL)0xc042); - ok(size == 0, "Expected 0, got %ld\n", size); - ok(GetLastError() == ERROR_INVALID_HANDLE || - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + if (sizeof(void *) != 8) /* crashes on 64-bit Vista */ + { + SetLastError(MAGIC_DEAD); + size = GlobalSize((HGLOBAL)0xc042); + ok(size == 0, "Expected 0, got %ld\n", size); + ok(GetLastError() == ERROR_INVALID_HANDLE || + GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ + "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } /* ####################################### */ /* Local*() functions */ diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c index 5187d882a45..45cdcf6a1e4 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -52,6 +52,8 @@ static IMAGE_NT_HEADERS nt_header = IMAGE_FILE_MACHINE_I386, /* Machine */ #elif defined __x86_64__ IMAGE_FILE_MACHINE_AMD64, /* Machine */ +#elif defined __powerpc__ + IMAGE_FILE_MACHINE_POWERPC, /* Machine */ #else # error You must specify the machine type #endif @@ -70,7 +72,9 @@ static IMAGE_NT_HEADERS nt_header = 0, /* SizeOfUninitializedData */ 0, /* AddressOfEntryPoint */ 0x10, /* BaseOfCode, also serves as e_lfanew in the truncated MZ header */ +#ifndef _WIN64 0, /* BaseOfData */ +#endif 0x10000000, /* ImageBase */ 0, /* SectionAlignment */ 0, /* FileAlignment */ diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c index a4b6853317a..41ec1ab3157 100644 --- a/dlls/kernel32/tests/pipe.c +++ b/dlls/kernel32/tests/pipe.c @@ -389,7 +389,7 @@ static void test_CreateNamedPipe_instances_must_match(void) /** implementation of alarm() */ static DWORD CALLBACK alarmThreadMain(LPVOID arg) { - DWORD timeout = (DWORD) arg; + DWORD_PTR timeout = (DWORD_PTR) arg; trace("alarmThreadMain\n"); if (WaitForSingleObject( alarm_event, timeout ) == WAIT_TIMEOUT) { diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c index bb9afe35823..62be4c72090 100644 --- a/dlls/kernel32/tests/sync.c +++ b/dlls/kernel32/tests/sync.c @@ -597,7 +597,7 @@ static void CALLBACK timer_queue_cb4(PVOID p, BOOLEAN timedOut) static void CALLBACK timer_queue_cb5(PVOID p, BOOLEAN timedOut) { - DWORD delay = (DWORD) p; + DWORD_PTR delay = (DWORD_PTR) p; ok(timedOut, "Timer callbacks should always time out\n"); if (delay) Sleep(delay); diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index b3580a182be..b3916cdefc4 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -187,7 +187,7 @@ static DWORD WINAPI threadFunc1(LPVOID p) int i; /* write our thread # into shared memory */ tstruct->threadmem[tstruct->threadnum]=GetCurrentThreadId(); - ok(TlsSetValue(tlsIndex,(LPVOID)(tstruct->threadnum+1))!=0, + ok(TlsSetValue(tlsIndex,(LPVOID)(INT_PTR)(tstruct->threadnum+1))!=0, "TlsSetValue failed\n"); /* The threads synchronize before terminating. This is done by Signaling an event, and waiting for all events to occur @@ -205,7 +205,7 @@ static DWORD WINAPI threadFunc1(LPVOID p) ok( lstrlenA( (char *)0xdeadbeef ) == 0, "lstrlenA: unexpected success\n" ); /* Check that no one changed our tls memory */ - ok((int)TlsGetValue(tlsIndex)-1==tstruct->threadnum, + ok((INT_PTR)TlsGetValue(tlsIndex)-1==tstruct->threadnum, "TlsGetValue failed\n"); return NUM_THREADS+tstruct->threadnum; } @@ -929,7 +929,7 @@ static DWORD CALLBACK work_function(void *p) static void test_QueueUserWorkItem(void) { - int i; + INT_PTR i; DWORD wait_result; DWORD before, after; @@ -1046,7 +1046,7 @@ static DWORD WINAPI TLS_InheritanceProc(LPVOID p) inheritance with TLS_InheritanceProc. */ static DWORD WINAPI TLS_ThreadProc(LPVOID p) { - LONG id = (LONG) p; + LONG_PTR id = (LONG_PTR) p; LPVOID val; BOOL ret; @@ -1166,7 +1166,7 @@ static DWORD WINAPI TLS_ThreadProc(LPVOID p) static void test_TLS(void) { HANDLE threads[2]; - LONG i; + LONG_PTR i; DWORD ret; BOOL suc; diff --git a/dlls/kernel32/tests/toolhelp.c b/dlls/kernel32/tests/toolhelp.c index 804d266294c..529df8890ce 100644 --- a/dlls/kernel32/tests/toolhelp.c +++ b/dlls/kernel32/tests/toolhelp.c @@ -73,8 +73,8 @@ static int init(void) case 2: /* the test program */ return 0; case 4: /* the sub-process */ - ev1 = (HANDLE)atoi(argv[2]); - ev2 = (HANDLE)atoi(argv[3]); + ev1 = (HANDLE)(INT_PTR)atoi(argv[2]); + ev2 = (HANDLE)(INT_PTR)atoi(argv[3]); ev3 = CreateEvent(NULL, FALSE, FALSE, NULL); if (ev3 == NULL) ExitProcess(WAIT_ABANDONED); @@ -204,14 +204,14 @@ static void test_thread(DWORD curr_pid, DWORD sub_pcs_pid) static const char* curr_expected_modules[] = { - "kernel32.dll", "kernel32_test.exe" + "kernel32.dll", /* FIXME: could test for ntdll on NT and Wine */ }; static const char* sub_expected_modules[] = { - "kernel32.dll", "kernel32_test.exe", + "kernel32.dll", "shell32.dll" /* FIXME: could test for ntdll on NT and Wine */ }; @@ -283,6 +283,7 @@ START_TEST(toolhelp) { DWORD pid = GetCurrentProcessId(); int r; + char *p, module[MAX_PATH]; char buffer[MAX_PATH]; SECURITY_ATTRIBUTES sa; PROCESS_INFORMATION info; @@ -324,12 +325,18 @@ START_TEST(toolhelp) startup.dwFlags = STARTF_USESHOWWINDOW; startup.wShowWindow = SW_SHOWNORMAL; - sprintf(buffer, "%s tests/toolhelp.c %u %u", selfname, (DWORD)ev1, (DWORD)ev2); + sprintf(buffer, "%s tests/toolhelp.c %lu %lu", selfname, (DWORD_PTR)ev1, (DWORD_PTR)ev2); ok(CreateProcessA(NULL, buffer, NULL, NULL, TRUE, 0, NULL, NULL, &startup, &info), "CreateProcess\n"); /* wait for child to be initialized */ w = WaitForSingleObject(ev1, WAIT_TIME); ok(w == WAIT_OBJECT_0, "Failed to wait on sub-process startup\n"); + GetModuleFileNameA( 0, module, sizeof(module) ); + if (!(p = strrchr( module, '\\' ))) p = module; + else p++; + curr_expected_modules[0] = p; + sub_expected_modules[0] = p; + test_process(pid, info.dwProcessId); test_thread(pid, info.dwProcessId); test_module(pid, curr_expected_modules, NUM_OF(curr_expected_modules)); diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index 0fdd69e9c14..69905431cf1 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -57,7 +57,7 @@ static void test_VirtualAllocEx(void) { const unsigned int alloc_size = 1<<15; char *src, *dst; - unsigned long bytes_written = 0, bytes_read = 0, i; + SIZE_T bytes_written = 0, bytes_read = 0, i; void *addr1, *addr2; BOOL b; DWORD old_prot; diff --git a/dlls/kernel32/thunk.c b/dlls/kernel32/thunk.c index 3533051c7cb..29093dec307 100644 --- a/dlls/kernel32/thunk.c +++ b/dlls/kernel32/thunk.c @@ -1185,6 +1185,78 @@ FreeSLCallback( FIXME("(0x%08x): stub\n",x); } +/********************************************************************** + * AllocMappedBuffer (KERNEL32.38) + * + * This is an undocumented KERNEL32 function that + * SMapLS's a GlobalAlloc'ed buffer. + * + * RETURNS + * EDI register: pointer to buffer + * + * NOTES + * The buffer is preceded by 8 bytes: + * ... + * edi+0 buffer + * edi-4 SEGPTR to buffer + * edi-8 some magic Win95 needs for SUnMapLS + * (we use it for the memory handle) + * + * The SEGPTR is used by the caller! + */ +void WINAPI __regs_AllocMappedBuffer( + CONTEXT86 *context /* [in] EDI register: size of buffer to allocate */ +) { + HGLOBAL handle = GlobalAlloc(0, context->Edi + 8); + DWORD *buffer = GlobalLock(handle); + DWORD ptr = 0; + + if (buffer) + if (!(ptr = MapLS(buffer + 2))) + { + GlobalUnlock(handle); + GlobalFree(handle); + } + + if (!ptr) + context->Eax = context->Edi = 0; + else + { + buffer[0] = (DWORD)handle; + buffer[1] = ptr; + + context->Eax = ptr; + context->Edi = (DWORD)(buffer + 2); + } +} +#ifdef DEFINE_REGS_ENTRYPOINT +DEFINE_REGS_ENTRYPOINT( AllocMappedBuffer, 0, 0 ) +#endif + +/********************************************************************** + * FreeMappedBuffer (KERNEL32.39) + * + * Free a buffer allocated by AllocMappedBuffer + * + * RETURNS + * Nothing. + */ +void WINAPI __regs_FreeMappedBuffer( + CONTEXT86 *context /* [in] EDI register: pointer to buffer */ +) { + if (context->Edi) + { + DWORD *buffer = (DWORD *)context->Edi - 2; + + UnMapLS(buffer[1]); + + GlobalUnlock((HGLOBAL)buffer[0]); + GlobalFree((HGLOBAL)buffer[0]); + } +} +#ifdef DEFINE_REGS_ENTRYPOINT +DEFINE_REGS_ENTRYPOINT( FreeMappedBuffer, 0, 0 ) +#endif /********************************************************************** * GetTEBSelectorFS (KERNEL.475) diff --git a/dlls/kernel32/toolhelp.c b/dlls/kernel32/toolhelp.c index 5cd8d90ca45..77a0cd7ba9c 100644 --- a/dlls/kernel32/toolhelp.c +++ b/dlls/kernel32/toolhelp.c @@ -202,7 +202,7 @@ static BOOL fetch_process_thread( DWORD flags, SYSTEM_PROCESS_INFORMATION** pspi spi = (SYSTEM_PROCESS_INFORMATION*)((char*)spi + offset); if (flags & TH32CS_SNAPPROCESS) (*num_pcs)++; if (flags & TH32CS_SNAPTHREAD) *num_thd += spi->dwThreadCount; - } while ((offset = spi->dwOffset)); + } while ((offset = spi->NextEntryOffset)); return TRUE; case STATUS_INFO_LENGTH_MISMATCH: *pspi = HeapReAlloc( GetProcessHeap(), 0, *pspi, size *= 2 ); @@ -234,18 +234,18 @@ static void fill_process( struct snapshot* snap, ULONG* offset, pcs_entry->dwSize = sizeof(PROCESSENTRY32W); pcs_entry->cntUsage = 0; /* MSDN says no longer used, always 0 */ - pcs_entry->th32ProcessID = spi->dwProcessID; + pcs_entry->th32ProcessID = HandleToUlong(spi->UniqueProcessId); pcs_entry->th32DefaultHeapID = 0; /* MSDN says no longer used, always 0 */ pcs_entry->th32ModuleID = 0; /* MSDN says no longer used, always 0 */ pcs_entry->cntThreads = spi->dwThreadCount; - pcs_entry->th32ParentProcessID = spi->dwParentProcessID; + pcs_entry->th32ParentProcessID = HandleToUlong(spi->ParentProcessId); pcs_entry->pcPriClassBase = spi->dwBasePriority; pcs_entry->dwFlags = 0; /* MSDN says no longer used, always 0 */ l = min(spi->ProcessName.Length, sizeof(pcs_entry->szExeFile) - sizeof(WCHAR)); memcpy(pcs_entry->szExeFile, spi->ProcessName.Buffer, l); pcs_entry->szExeFile[l / sizeof(WCHAR)] = '\0'; pcs_entry++; - } while ((poff = spi->dwOffset)); + } while ((poff = spi->NextEntryOffset)); *offset += num * sizeof(PROCESSENTRY32W); } @@ -274,8 +274,8 @@ static void fill_thread( struct snapshot* snap, ULONG* offset, LPVOID info, ULON { thd_entry->dwSize = sizeof(THREADENTRY32); thd_entry->cntUsage = 0; /* MSDN says no longer used, always 0 */ - thd_entry->th32ThreadID = sti->dwThreadID; - thd_entry->th32OwnerProcessID = sti->dwOwningPID; + thd_entry->th32ThreadID = HandleToUlong(sti->ClientId.UniqueThread); + thd_entry->th32OwnerProcessID = HandleToUlong(sti->ClientId.UniqueProcess); thd_entry->tpBasePri = sti->dwBasePriority; thd_entry->tpDeltaPri = 0; /* MSDN says no longer used, always 0 */ thd_entry->dwFlags = 0; /* MSDN says no longer used, always 0" */ @@ -283,7 +283,7 @@ static void fill_thread( struct snapshot* snap, ULONG* offset, LPVOID info, ULON sti++; thd_entry++; } - } while ((poff = spi->dwOffset)); + } while ((poff = spi->NextEntryOffset)); *offset += num * sizeof(THREADENTRY32); } diff --git a/dlls/kernel32/wowthunk.c b/dlls/kernel32/wowthunk.c index e86c582f4b9..e7560ecc87f 100644 --- a/dlls/kernel32/wowthunk.c +++ b/dlls/kernel32/wowthunk.c @@ -38,8 +38,6 @@ #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(thunk); -WINE_DECLARE_DEBUG_CHANNEL(relay); -WINE_DECLARE_DEBUG_CHANNEL(snoop); /* * These are the 16-bit side WOW routines. They reside in wownt16.h @@ -59,6 +57,9 @@ DWORD WINAPI FreeLibrary32W16(DWORD); #ifdef __i386__ +WINE_DECLARE_DEBUG_CHANNEL(relay); +WINE_DECLARE_DEBUG_CHANNEL(snoop); + /* symbols exported from relay16.s */ extern DWORD WINAPI wine_call_to_16( FARPROC16 target, DWORD cbArgs, PEXCEPTION_HANDLER handler ); extern void WINAPI wine_call_to_16_regs( CONTEXT86 *context, DWORD cbArgs, PEXCEPTION_HANDLER handler ); diff --git a/dlls/mciavi32/wnd.c b/dlls/mciavi32/wnd.c index f447798177e..682a3118b38 100644 --- a/dlls/mciavi32/wnd.c +++ b/dlls/mciavi32/wnd.c @@ -187,9 +187,8 @@ DWORD MCIAVI_mciPut(UINT wDevID, DWORD dwFlags, LPMCI_DGV_PUT_PARMS lpParms) return MCIERR_UNRECOGNIZED_COMMAND; } if (dwFlags & MCI_DGV_PUT_WINDOW) { - FIXME("PUT_WINDOW %s\n", wine_dbgstr_rect(&rc)); - LeaveCriticalSection(&wma->cs); - return MCIERR_UNRECOGNIZED_COMMAND; + TRACE("PUT_WINDOW %s\n", wine_dbgstr_rect(&rc)); + SetWindowPos(wma->hWndPaint, NULL, rc.left, rc.top, rc.right, rc.bottom, SWP_NOZORDER); } LeaveCriticalSection(&wma->cs); return 0; diff --git a/dlls/mlang/tests/mlang.c b/dlls/mlang/tests/mlang.c index 37b62242242..1506963bddc 100644 --- a/dlls/mlang/tests/mlang.c +++ b/dlls/mlang/tests/mlang.c @@ -379,7 +379,7 @@ static void test_EnumCodePages(IMultiLanguage2 *iML2, DWORD flags) #endif ok(cpinfo[i].dwFlags & flags, "enumerated flags %08x do not include requested %08x\n", cpinfo[i].dwFlags, flags); - if (TranslateCharsetInfo((DWORD *)cpinfo[i].uiFamilyCodePage, &csi, TCI_SRCCODEPAGE)) + if (TranslateCharsetInfo((DWORD *)(INT_PTR)cpinfo[i].uiFamilyCodePage, &csi, TCI_SRCCODEPAGE)) ok(cpinfo[i].bGDICharset == csi.ciCharset, "%d != %d\n", cpinfo[i].bGDICharset, csi.ciCharset); else trace("TranslateCharsetInfo failed for cp %u\n", cpinfo[i].uiFamilyCodePage); diff --git a/dlls/mpr/pwcache.c b/dlls/mpr/pwcache.c index 8e3c1911f1f..0ed65b66ac4 100644 --- a/dlls/mpr/pwcache.c +++ b/dlls/mpr/pwcache.c @@ -39,7 +39,7 @@ static inline BYTE hex( BYTE x ) return x + 'A' - 10; } -static inline CHAR ctox( CHAR x ) +static inline signed char ctox( CHAR x ) { if( ( x >= '0' ) && ( x <= '9' ) ) return x - '0'; @@ -282,7 +282,7 @@ UINT WINAPI WNetEnumCachedPasswords( /* decode the value */ for(j=5; j(%p)\n", This, p); - nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); + nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem); if(NS_SUCCEEDED(nsres)) { - nsIDOMNSHTMLElement_GetClientHeight(nselem, &height); - nsIDOMNSHTMLElement_Release(nselem); + nsIDOMNSElement_GetClientHeight(nselem, &height); + nsIDOMNSElement_Release(nselem); }else { - ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres); + ERR("Could not get nsIDOMNSElement: %08x\n", nsres); } *p = height; @@ -569,18 +569,18 @@ static HRESULT WINAPI HTMLElement2_get_clientHeight(IHTMLElement2 *iface, long * static HRESULT WINAPI HTMLElement2_get_clientWidth(IHTMLElement2 *iface, long *p) { HTMLElement *This = HTMLELEM2_THIS(iface); - nsIDOMNSHTMLElement *nselem; + nsIDOMNSElement *nselem; PRInt32 width=0; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); - nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); + nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem); if(NS_SUCCEEDED(nsres)) { - nsIDOMNSHTMLElement_GetClientWidth(nselem, &width); - nsIDOMNSHTMLElement_Release(nselem); + nsIDOMNSElement_GetClientWidth(nselem, &width); + nsIDOMNSElement_Release(nselem); }else { - ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres); + ERR("Could not get nsIDOMNSElement: %08x\n", nsres); } *p = width; @@ -727,7 +727,7 @@ static HRESULT WINAPI HTMLElement2_createControlRange(IHTMLElement2 *iface, IDis static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, long *p) { HTMLElement *This = HTMLELEM2_THIS(iface); - nsIDOMNSHTMLElement *nselem; + nsIDOMNSElement *nselem; PRInt32 height = 0; nsresult nsres; @@ -735,15 +735,15 @@ static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, long * nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); if(NS_SUCCEEDED(nsres)) { - nsres = nsIDOMNSHTMLElement_GetScrollHeight(nselem, &height); - nsIDOMNSHTMLElement_Release(nselem); + nsres = nsIDOMNSElement_GetScrollHeight(nselem, &height); + nsIDOMNSElement_Release(nselem); if(NS_FAILED(nsres)) ERR("GetScrollHeight failed: %08x\n", nsres); }else { - ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres); + ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres); } - *p = height; + *p = height == -1 ? 0 : height; TRACE("*p = %ld\n", *p); return S_OK; @@ -752,20 +752,20 @@ static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, long * static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, long *p) { HTMLElement *This = HTMLELEM2_THIS(iface); - nsIDOMNSHTMLElement *nselem; + nsIDOMNSElement *nselem; PRInt32 width = 0; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); - nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); + nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem); if(NS_SUCCEEDED(nsres)) { - nsres = nsIDOMNSHTMLElement_GetScrollWidth(nselem, &width); - nsIDOMNSHTMLElement_Release(nselem); + nsres = nsIDOMNSElement_GetScrollWidth(nselem, &width); + nsIDOMNSElement_Release(nselem); if(NS_FAILED(nsres)) ERR("GetScrollWidth failed: %08x\n", nsres); }else { - ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres); + ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres); } *p = width; @@ -777,7 +777,7 @@ static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, long *p static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v) { HTMLElement *This = HTMLELEM2_THIS(iface); - nsIDOMNSHTMLElement *nselem; + nsIDOMNSElement *nselem; nsresult nsres; TRACE("(%p)->(%ld)\n", This, v); @@ -787,12 +787,12 @@ static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v) return E_NOTIMPL; } - nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); + nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem); if(NS_SUCCEEDED(nsres)) { - nsIDOMNSHTMLElement_SetScrollTop(nselem, v); - nsIDOMNSHTMLElement_Release(nselem); + nsIDOMNSElement_SetScrollTop(nselem, v); + nsIDOMNSElement_Release(nselem); }else { - ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres); + ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres); } return S_OK; @@ -801,20 +801,20 @@ static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v) static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, long *p) { HTMLElement *This = HTMLELEM2_THIS(iface); - nsIDOMNSHTMLElement *nselem; + nsIDOMNSElement *nselem; PRInt32 top = 0; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); - nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); + nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem); if(NS_SUCCEEDED(nsres)) { - nsres = nsIDOMNSHTMLElement_GetScrollTop(nselem, &top); - nsIDOMNSHTMLElement_Release(nselem); + nsres = nsIDOMNSElement_GetScrollTop(nselem, &top); + nsIDOMNSElement_Release(nselem); if(NS_FAILED(nsres)) ERR("GetScrollTop failed: %08x\n", nsres); }else { - ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres); + ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres); } *p = top; @@ -826,7 +826,7 @@ static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, long *p) static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v) { HTMLElement *This = HTMLELEM2_THIS(iface); - nsIDOMNSHTMLElement *nselem; + nsIDOMNSElement *nselem; nsresult nsres; TRACE("(%p)->(%ld)\n", This, v); @@ -836,12 +836,12 @@ static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v) return E_NOTIMPL; } - nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); + nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem); if(NS_SUCCEEDED(nsres)) { - nsIDOMNSHTMLElement_SetScrollLeft(nselem, v); - nsIDOMNSHTMLElement_Release(nselem); + nsIDOMNSElement_SetScrollLeft(nselem, v); + nsIDOMNSElement_Release(nselem); }else { - ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres); + ERR("Could not get nsIDOMNSElement interface: %08x\n", nsres); } return S_OK; @@ -850,7 +850,7 @@ static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v) static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, long *p) { HTMLElement *This = HTMLELEM2_THIS(iface); - nsIDOMNSHTMLElement *nselem; + nsIDOMNSElement *nselem; PRInt32 left = 0; nsresult nsres; @@ -865,11 +865,11 @@ static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, long *p) return E_NOTIMPL; } - nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); + nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSElement, (void**)&nselem); if(NS_SUCCEEDED(nsres)) { - nsres = nsIDOMNSHTMLElement_GetScrollLeft(nselem, &left); - nsIDOMNSHTMLElement_Release(nselem); + nsres = nsIDOMNSElement_GetScrollLeft(nselem, &left); + nsIDOMNSElement_Release(nselem); if(NS_FAILED(nsres)) left = 0; } diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 5fe1f248499..2dedb03dc71 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -typedef struct { +struct HTMLStyle { DispatchEx dispex; const IHTMLStyleVtbl *lpHTMLStyleVtbl; const IHTMLStyle2Vtbl *lpHTMLStyle2Vtbl; @@ -24,7 +24,7 @@ typedef struct { LONG ref; nsIDOMCSSStyleDeclaration *nsstyle; -} HTMLStyle; +}; #define HTMLSTYLE(x) ((IHTMLStyle*) &(x)->lpHTMLStyleVtbl) #define HTMLSTYLE2(x) ((IHTMLStyle2*) &(x)->lpHTMLStyle2Vtbl) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index b73811a9ecb..979ed53e3ee 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -248,8 +248,15 @@ static HRESULT WINAPI HTMLWindow2_get_Image(IHTMLWindow2 *iface, IHTMLImageEleme static HRESULT WINAPI HTMLWindow2_get_location(IHTMLWindow2 *iface, IHTMLLocation **p) { HTMLWindow *This = HTMLWINDOW2_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + if(!This->doc) { + FIXME("This->doc is NULL\n"); + return E_FAIL; + } + + return IHTMLDocument2_get_location(HTMLDOC(This->doc), p); } static HRESULT WINAPI HTMLWindow2_get_history(IHTMLWindow2 *iface, IOmHistory **p) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 6cb41bdde3d..58f662a75c8 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -296,6 +296,13 @@ typedef struct { NSContainer *This; } nsEventListener; +typedef struct _mutation_queue_t { + DWORD type; + nsISupports *nsiface; + + struct _mutation_queue_t *next; +} mutation_queue_t; + struct NSContainer { const nsIWebBrowserChromeVtbl *lpWebBrowserChromeVtbl; const nsIContextMenuListenerVtbl *lpContextMenuListenerVtbl; @@ -306,11 +313,14 @@ struct NSContainer { const nsIWeakReferenceVtbl *lpWeakReferenceVtbl; const nsISupportsWeakReferenceVtbl *lpSupportsWeakReferenceVtbl; + const nsIDocumentObserverVtbl *lpDocumentObserverVtbl; + + const nsIRunnableVtbl *lpRunnableVtbl; + nsEventListener blur_listener; nsEventListener focus_listener; nsEventListener keypress_listener; nsEventListener load_listener; - nsEventListener node_insert_listener; nsEventListener htmlevent_listener; nsIWebBrowser *webbrowser; @@ -330,6 +340,9 @@ struct NSContainer { HWND hwnd; + mutation_queue_t *mutation_queue; + mutation_queue_t *mutation_queue_tail; + nsChannelBSC *bscallback; /* hack */ HWND reset_focus; /* hack */ @@ -434,6 +447,10 @@ typedef struct { #define NSWEAKREF(x) ((nsIWeakReference*) &(x)->lpWeakReferenceVtbl) #define NSSUPWEAKREF(x) ((nsISupportsWeakReference*) &(x)->lpSupportsWeakReferenceVtbl) +#define NSDOCOBS(x) ((nsIDocumentObserver*) &(x)->lpDocumentObserverVtbl) + +#define NSRUNNABLE(x) ((nsIRunnable*) &(x)->lpRunnableVtbl) + #define NSCHANNEL(x) ((nsIChannel*) &(x)->lpHttpChannelVtbl) #define NSHTTPCHANNEL(x) ((nsIHttpChannel*) &(x)->lpHttpChannelVtbl) #define NSUPCHANNEL(x) ((nsIUploadChannel*) &(x)->lpUploadChannelVtbl) @@ -487,6 +504,9 @@ void ConnectionPointContainer_Destroy(ConnectionPointContainer*); NSContainer *NSContainer_Create(HTMLDocument*,NSContainer*); void NSContainer_Release(NSContainer*); +void init_mutation(NSContainer*); +void set_mutation_observer(NSContainer*,nsIDOMHTMLDocument*); + void HTMLDocument_LockContainer(HTMLDocument*,BOOL); void show_context_menu(HTMLDocument*,DWORD,POINT*,IDispatch*); void notif_focus(HTMLDocument*); diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c new file mode 100644 index 00000000000..39948885c04 --- /dev/null +++ b/dlls/mshtml/mutation.c @@ -0,0 +1,576 @@ +/* + * Copyright 2008 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" + +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" +#include "ole2.h" + +#include "mshtml_private.h" +#include "htmlevent.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(mshtml); + +enum { + MUTATION_COMMENT, + MUTATION_SCRIPT +}; + +void set_mutation_observer(NSContainer *nscontainer, nsIDOMHTMLDocument *nshtmldoc) +{ + nsIDOMNSDocument *nsdoc; + nsresult nsres; + + nsres = nsIDOMHTMLDocument_QueryInterface(nshtmldoc, &IID_nsIDOMNSDocument, (void**)&nsdoc); + if(NS_FAILED(nsres)) { + ERR("Could not get nsIDOMNSDocument: %08x\n", nsres); + return; + } + + nsIDOMNSDocument_WineAddObserver(nsdoc, NSDOCOBS(nscontainer)); + nsIDOMNSDocument_Release(nsdoc); +} + +#define IE_MAJOR_VERSION 7 +#define IE_MINOR_VERSION 0 + +static BOOL handle_insert_comment(HTMLDocument *doc, const PRUnichar *comment) +{ + DWORD len; + int majorv = 0, minorv = 0; + const PRUnichar *ptr, *end; + nsAString nsstr; + PRUnichar *buf; + nsresult nsres; + + enum { + CMP_EQ, + CMP_LT, + CMP_LTE, + CMP_GT, + CMP_GTE + } cmpt = CMP_EQ; + + static const PRUnichar endifW[] = {'<','!','[','e','n','d','i','f',']'}; + + if(comment[0] != '[' || comment[1] != 'i' || comment[2] != 'f') + return FALSE; + + ptr = comment+3; + while(isspaceW(*ptr)) + ptr++; + + if(ptr[0] == 'l' && ptr[1] == 't') { + ptr += 2; + if(*ptr == 'e') { + cmpt = CMP_LTE; + ptr++; + }else { + cmpt = CMP_LT; + } + }else if(ptr[0] == 'g' && ptr[1] == 't') { + ptr += 2; + if(*ptr == 'e') { + cmpt = CMP_GTE; + ptr++; + }else { + cmpt = CMP_GT; + } + } + + if(!isspaceW(*ptr++)) + return FALSE; + while(isspaceW(*ptr)) + ptr++; + + if(ptr[0] != 'I' || ptr[1] != 'E') + return FALSE; + + ptr +=2; + if(!isspaceW(*ptr++)) + return FALSE; + while(isspaceW(*ptr)) + ptr++; + + if(!isdigitW(*ptr)) + return FALSE; + while(isdigitW(*ptr)) + majorv = majorv*10 + (*ptr++ - '0'); + + if(*ptr == '.') { + ptr++; + if(!isdigitW(*ptr)) + return FALSE; + while(isdigitW(*ptr)) + minorv = minorv*10 + (*ptr++ - '0'); + } + + while(isspaceW(*ptr)) + ptr++; + if(ptr[0] != ']' || ptr[1] != '>') + return FALSE; + ptr += 2; + + len = strlenW(ptr); + if(len < sizeof(endifW)/sizeof(WCHAR)) + return FALSE; + + end = ptr + len-sizeof(endifW)/sizeof(WCHAR); + if(memcmp(end, endifW, sizeof(endifW))) + return FALSE; + + switch(cmpt) { + case CMP_EQ: + if(majorv == IE_MAJOR_VERSION && minorv == IE_MINOR_VERSION) + break; + return FALSE; + case CMP_LT: + if(majorv > IE_MAJOR_VERSION) + break; + if(majorv == IE_MAJOR_VERSION && minorv > IE_MINOR_VERSION) + break; + return FALSE; + case CMP_LTE: + if(majorv > IE_MAJOR_VERSION) + break; + if(majorv == IE_MAJOR_VERSION && minorv >= IE_MINOR_VERSION) + break; + return FALSE; + case CMP_GT: + if(majorv < IE_MAJOR_VERSION) + break; + if(majorv == IE_MAJOR_VERSION && minorv < IE_MINOR_VERSION) + break; + return FALSE; + case CMP_GTE: + if(majorv < IE_MAJOR_VERSION) + break; + if(majorv == IE_MAJOR_VERSION && minorv <= IE_MINOR_VERSION) + break; + return FALSE; + } + + buf = heap_alloc((end-ptr+1)*sizeof(WCHAR)); + if(!buf) + return FALSE; + + memcpy(buf, ptr, (end-ptr)*sizeof(WCHAR)); + buf[end-ptr] = 0; + nsAString_Init(&nsstr, buf); + heap_free(buf); + + /* FIXME: Find better way to insert HTML to document. */ + nsres = nsIDOMHTMLDocument_Write(doc->nsdoc, &nsstr); + nsAString_Finish(&nsstr); + if(NS_FAILED(nsres)) { + ERR("Write failed: %08x\n", nsres); + return FALSE; + } + + return TRUE; +} + +static void add_script_runner(NSContainer *This) +{ + nsIDOMNSDocument *nsdoc; + nsresult nsres; + + nsres = nsIDOMHTMLDocument_QueryInterface(This->doc->nsdoc, &IID_nsIDOMNSDocument, (void**)&nsdoc); + if(NS_FAILED(nsres)) { + ERR("Could not get nsIDOMNSDocument: %08x\n", nsres); + return; + } + + nsIDOMNSDocument_WineAddScriptRunner(nsdoc, NSRUNNABLE(This)); + nsIDOMNSDocument_Release(nsdoc); +} + +#define NSRUNNABLE_THIS(iface) DEFINE_THIS(NSContainer, Runnable, iface) + +static nsresult NSAPI nsRunnable_QueryInterface(nsIRunnable *iface, + nsIIDRef riid, nsQIResult result) +{ + NSContainer *This = NSRUNNABLE_THIS(iface); + + if(IsEqualGUID(riid, &IID_nsISupports)) { + TRACE("(%p)->(IID_nsISupports %p)\n", This, result); + *result = NSRUNNABLE(This); + }else if(IsEqualGUID(riid, &IID_nsIRunnable)) { + TRACE("(%p)->(IID_nsIRunnable %p)\n", This, result); + *result = NSRUNNABLE(This); + }else { + *result = NULL; + WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), result); + return NS_NOINTERFACE; + } + + nsISupports_AddRef((nsISupports*)*result); + return NS_OK; +} + +static nsrefcnt NSAPI nsRunnable_AddRef(nsIRunnable *iface) +{ + NSContainer *This = NSRUNNABLE_THIS(iface); + return nsIWebBrowserChrome_AddRef(NSWBCHROME(This)); +} + +static nsrefcnt NSAPI nsRunnable_Release(nsIRunnable *iface) +{ + NSContainer *This = NSRUNNABLE_THIS(iface); + return nsIWebBrowserChrome_Release(NSWBCHROME(This)); +} + +static void pop_mutation_queue(NSContainer *nscontainer) +{ + mutation_queue_t *tmp = nscontainer->mutation_queue; + + if(!tmp) + return; + + nscontainer->mutation_queue = tmp->next; + if(!tmp->next) + nscontainer->mutation_queue_tail = NULL; + + nsISupports_Release(tmp->nsiface); + heap_free(tmp); +} + +static nsresult NSAPI nsRunnable_Run(nsIRunnable *iface) +{ + NSContainer *This = NSRUNNABLE_THIS(iface); + nsresult nsres; + + TRACE("(%p)\n", This); + + while(This->mutation_queue) { + switch(This->mutation_queue->type) { + case MUTATION_COMMENT: { + nsIDOMComment *nscomment; + nsAString comment_str; + BOOL remove_comment = FALSE; + + nsres = nsISupports_QueryInterface(This->mutation_queue->nsiface, &IID_nsIDOMComment, (void**)&nscomment); + if(NS_FAILED(nsres)) { + ERR("Could not get nsIDOMComment iface:%08x\n", nsres); + return NS_OK; + } + + nsAString_Init(&comment_str, NULL); + nsres = nsIDOMComment_GetData(nscomment, &comment_str); + if(NS_SUCCEEDED(nsres)) { + const PRUnichar *comment; + + nsAString_GetData(&comment_str, &comment); + remove_comment = handle_insert_comment(This->doc, comment); + } + + nsAString_Finish(&comment_str); + + if(remove_comment) { + nsIDOMNode *nsparent, *tmp; + nsAString magic_str; + + static const PRUnichar remove_comment_magicW[] = + {'#','!','w','i','n','e', 'r','e','m','o','v','e','!','#',0}; + + nsAString_Init(&magic_str, remove_comment_magicW); + nsres = nsIDOMComment_SetData(nscomment, &magic_str); + nsAString_Finish(&magic_str); + if(NS_FAILED(nsres)) + ERR("SetData failed: %08x\n", nsres); + + nsIDOMComment_GetParentNode(nscomment, &nsparent); + if(nsparent) { + nsIDOMNode_RemoveChild(nsparent, (nsIDOMNode*)nscomment, &tmp); + nsIDOMNode_Release(nsparent); + nsIDOMNode_Release(tmp); + } + } + + nsIDOMComment_Release(nscomment); + break; + } + + case MUTATION_SCRIPT: { + nsIDOMHTMLScriptElement *nsscript; + + nsres = nsISupports_QueryInterface(This->mutation_queue->nsiface, &IID_nsIDOMHTMLScriptElement, + (void**)&nsscript); + if(NS_FAILED(nsres)) { + ERR("Could not get nsIDOMHTMLScriptElement: %08x\n", nsres); + break; + } + + doc_insert_script(This->doc, nsscript); + nsIDOMHTMLScriptElement_Release(nsscript); + break; + } + + default: + ERR("invalid type %d\n", This->mutation_queue->type); + } + + pop_mutation_queue(This); + } + + return S_OK; +} + +#undef NSRUNNABLE_THIS + +static const nsIRunnableVtbl nsRunnableVtbl = { + nsRunnable_QueryInterface, + nsRunnable_AddRef, + nsRunnable_Release, + nsRunnable_Run +}; + +#define NSDOCOBS_THIS(iface) DEFINE_THIS(NSContainer, DocumentObserver, iface) + +static nsresult NSAPI nsDocumentObserver_QueryInterface(nsIDocumentObserver *iface, + nsIIDRef riid, nsQIResult result) +{ + NSContainer *This = NSDOCOBS_THIS(iface); + + if(IsEqualGUID(&IID_nsISupports, riid)) { + TRACE("(%p)->(IID_nsISupports, %p)\n", This, result); + *result = NSWBCHROME(This); + }else if(IsEqualGUID(&IID_nsIMutationObserver, riid)) { + TRACE("(%p)->(IID_nsIMutationObserver %p)\n", This, result); + *result = NSDOCOBS(This); + }else if(IsEqualGUID(&IID_nsIDocumentObserver, riid)) { + TRACE("(%p)->(IID_nsIDocumentObserver %p)\n", This, result); + *result = NSDOCOBS(This); + }else { + *result = NULL; + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), result); + return NS_NOINTERFACE; + } + + nsIWebBrowserChrome_AddRef(NSWBCHROME(This)); + return NS_OK; +} + +static nsrefcnt NSAPI nsDocumentObserver_AddRef(nsIDocumentObserver *iface) +{ + NSContainer *This = NSDOCOBS_THIS(iface); + return nsIWebBrowserChrome_AddRef(NSWBCHROME(This)); +} + +static nsrefcnt NSAPI nsDocumentObserver_Release(nsIDocumentObserver *iface) +{ + NSContainer *This = NSDOCOBS_THIS(iface); + return nsIWebBrowserChrome_Release(NSWBCHROME(This)); +} + +static void NSAPI nsDocumentObserver_CharacterDataWillChange(nsIDocumentObserver *iface, + nsIDocument *aDocument, nsIContent *aContent, void /*CharacterDataChangeInfo*/ *aInfo) +{ +} + +static void NSAPI nsDocumentObserver_CharacterDataChanged(nsIDocumentObserver *iface, + nsIDocument *aDocument, nsIContent *aContent, void /*CharacterDataChangeInfo*/ *aInfo) +{ +} + +static void NSAPI nsDocumentObserver_AttributeChanged(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsIContent *aContent, PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRInt32 aModType, PRUint32 aStateMask) +{ +} + +static void NSAPI nsDocumentObserver_ContentAppended(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsIContent *aContainer, PRInt32 aNewIndexInContainer) +{ +} + +static void NSAPI nsDocumentObserver_ContentInserted(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsIContent *aContainer, nsIContent *aChild, PRInt32 aIndexInContainer) +{ +} + +static void NSAPI nsDocumentObserver_ContentRemoved(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsIContent *aContainer, nsIContent *aChild, PRInt32 aIndexInContainer) +{ +} + +static void NSAPI nsDocumentObserver_NodeWillBeDestroyed(nsIDocumentObserver *iface, const nsINode *aNode) +{ +} + +static void NSAPI nsDocumentObserver_ParentChainChanged(nsIDocumentObserver *iface, nsIContent *aContent) +{ +} + +static void NSAPI nsDocumentObserver_BeginUpdate(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsUpdateType aUpdateType) +{ +} + +static void NSAPI nsDocumentObserver_EndUpdate(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsUpdateType aUpdateType) +{ +} + +static void NSAPI nsDocumentObserver_BeginLoad(nsIDocumentObserver *iface, nsIDocument *aDocument) +{ +} + +static void NSAPI nsDocumentObserver_EndLoad(nsIDocumentObserver *iface, nsIDocument *aDocument) +{ +} + +static void NSAPI nsDocumentObserver_ContentStatesChanged(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsIContent *aContent1, nsIContent *aContent2, PRInt32 aStateMask) +{ +} + +static void NSAPI nsDocumentObserver_StyleSheetAdded(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet) +{ +} + +static void NSAPI nsDocumentObserver_StyleSheetRemoved(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet) +{ +} + +static void NSAPI nsDocumentObserver_StyleSheetApplicableStateChanged(nsIDocumentObserver *iface, + nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aApplicable) +{ +} + +static void NSAPI nsDocumentObserver_StyleRuleChanged(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsIStyleSheet *aStyleSheet, nsIStyleRule *aOldStyleRule, nsIStyleSheet *aNewStyleRule) +{ +} + +static void NSAPI nsDocumentObserver_StyleRuleAdded(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule) +{ +} + +static void NSAPI nsDocumentObserver_StyleRuleRemoved(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule) +{ +} + +static void push_mutation_queue(NSContainer *nscontainer, DWORD type, nsISupports *nsiface) +{ + mutation_queue_t *elem; + + elem = heap_alloc(sizeof(mutation_queue_t)); + if(!elem) + return; + + elem->next = NULL; + elem->type = type; + elem->nsiface = nsiface; + nsISupports_AddRef(nsiface); + + if(nscontainer->mutation_queue_tail) + nscontainer->mutation_queue_tail = nscontainer->mutation_queue_tail->next = elem; + else + nscontainer->mutation_queue = nscontainer->mutation_queue_tail = elem; +} + +static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface, nsIDocument *aDocument, + nsIContent *aContent) +{ + NSContainer *This = NSDOCOBS_THIS(iface); + nsIDOMComment *nscomment; + nsIDOMElement *nselem; + nsresult nsres; + + TRACE("(%p)\n", This); + + nsres = nsISupports_QueryInterface(aContent, &IID_nsIDOMElement, (void**)&nselem); + if(NS_SUCCEEDED(nsres)) { + check_event_attr(This->doc, nselem); + nsIDOMElement_Release(nselem); + } + + nsres = nsISupports_QueryInterface(aContent, &IID_nsIDOMComment, (void**)&nscomment); + if(NS_SUCCEEDED(nsres)) { + TRACE("comment node\n"); + + push_mutation_queue(This, MUTATION_COMMENT, (nsISupports*)nscomment); + nsIDOMComment_Release(nscomment); + add_script_runner(This); + } +} + +static void NSAPI nsDocumentObserver_DoneAddingChildren(nsIDocumentObserver *iface, nsIContent *aContent, + PRBool aHaveNotified) +{ + NSContainer *This = NSDOCOBS_THIS(iface); + nsIDOMHTMLScriptElement *nsscript; + nsresult nsres; + + TRACE("(%p)->(%p %x)\n", This, aContent, aHaveNotified); + + nsres = nsISupports_QueryInterface(aContent, &IID_nsIDOMHTMLScriptElement, (void**)&nsscript); + if(NS_SUCCEEDED(nsres)) { + push_mutation_queue(This, MUTATION_SCRIPT, (nsISupports*)nsscript); + nsIDOMHTMLScriptElement_Release(nsscript); + add_script_runner(This); + } +} + +#undef NSMUTATIONOBS_THIS + +static const nsIDocumentObserverVtbl nsDocumentObserverVtbl = { + nsDocumentObserver_QueryInterface, + nsDocumentObserver_AddRef, + nsDocumentObserver_Release, + nsDocumentObserver_CharacterDataWillChange, + nsDocumentObserver_CharacterDataChanged, + nsDocumentObserver_AttributeChanged, + nsDocumentObserver_ContentAppended, + nsDocumentObserver_ContentInserted, + nsDocumentObserver_ContentRemoved, + nsDocumentObserver_NodeWillBeDestroyed, + nsDocumentObserver_ParentChainChanged, + nsDocumentObserver_BeginUpdate, + nsDocumentObserver_EndUpdate, + nsDocumentObserver_BeginLoad, + nsDocumentObserver_EndLoad, + nsDocumentObserver_ContentStatesChanged, + nsDocumentObserver_StyleSheetAdded, + nsDocumentObserver_StyleSheetRemoved, + nsDocumentObserver_StyleSheetApplicableStateChanged, + nsDocumentObserver_StyleRuleChanged, + nsDocumentObserver_StyleRuleAdded, + nsDocumentObserver_StyleRuleRemoved, + nsDocumentObserver_BindToDocument, + nsDocumentObserver_DoneAddingChildren +}; + +void init_mutation(NSContainer *nscontainer) +{ + nscontainer->lpDocumentObserverVtbl = &nsDocumentObserverVtbl; + nscontainer->lpRunnableVtbl = &nsRunnableVtbl; +} diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index a653e245a4a..ee386accb7c 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -34,6 +34,7 @@ #include "mshtml_private.h" WINE_DEFAULT_DEBUG_CHANNEL(mshtml); +WINE_DECLARE_DEBUG_CHANNEL(gecko); #define NS_APPSTARTUPNOTIFIER_CONTRACTID "@mozilla.org/embedcomp/appstartup-notifier;1" #define NS_WEBBROWSER_CONTRACTID "@mozilla.org/embedding/browser/nsWebBrowser;1" @@ -142,22 +143,46 @@ static void register_nscontainer_class(void) nscontainer_class = RegisterClassExW(&wndclass); } -static BOOL load_xpcom(const PRUnichar *gre_path) +static void set_environment(LPCWSTR gre_path) { - WCHAR path_env[MAX_PATH]; - int len; - - static const WCHAR wszPATH[] = {'P','A','T','H',0}; - static const WCHAR strXPCOM[] = {'x','p','c','o','m','.','d','l','l',0}; + WCHAR path_env[MAX_PATH], buf[20]; + int len, debug_level = 0; - TRACE("(%s)\n", debugstr_w(gre_path)); + static const WCHAR pathW[] = {'P','A','T','H',0}; + static const WCHAR warnW[] = {'w','a','r','n',0}; + static const WCHAR xpcom_debug_breakW[] = + {'X','P','C','O','M','_','D','E','B','U','G','_','B','R','E','A','K',0}; + static const WCHAR nspr_log_modulesW[] = + {'N','S','P','R','_','L','O','G','_','M','O','D','U','L','E','S',0}; + static const WCHAR debug_formatW[] = {'a','l','l',':','%','d',0}; /* We have to modify PATH as XPCOM loads other DLLs from this directory. */ - GetEnvironmentVariableW(wszPATH, path_env, sizeof(path_env)/sizeof(WCHAR)); + GetEnvironmentVariableW(pathW, path_env, sizeof(path_env)/sizeof(WCHAR)); len = strlenW(path_env); path_env[len++] = ';'; strcpyW(path_env+len, gre_path); - SetEnvironmentVariableW(wszPATH, path_env); + SetEnvironmentVariableW(pathW, path_env); + + SetEnvironmentVariableW(xpcom_debug_breakW, warnW); + + if(TRACE_ON(gecko)) + debug_level = 5; + else if(WARN_ON(gecko)) + debug_level = 3; + else if(ERR_ON(gecko)) + debug_level = 2; + + sprintfW(buf, debug_formatW, debug_level); + SetEnvironmentVariableW(nspr_log_modulesW, buf); +} + +static BOOL load_xpcom(const PRUnichar *gre_path) +{ + static const WCHAR strXPCOM[] = {'x','p','c','o','m','.','d','l','l',0}; + + TRACE("(%s)\n", debugstr_w(gre_path)); + + set_environment(gre_path); hXPCOM = LoadLibraryW(strXPCOM); if(!hXPCOM) { @@ -369,35 +394,6 @@ static void set_bool_pref(nsIPrefBranch *pref, const char *pref_name, BOOL val) ERR("Could not set pref %s\n", debugstr_a(pref_name)); } -static void set_profile(void) -{ - nsIProfile *profile; - PRBool exists = FALSE; - nsresult nsres; - - static const WCHAR wszMSHTML[] = {'M','S','H','T','M','L',0}; - - nsres = nsIServiceManager_GetServiceByContractID(pServMgr, NS_PROFILE_CONTRACTID, - &IID_nsIProfile, (void**)&profile); - if(NS_FAILED(nsres)) { - ERR("Could not get profile service: %08x\n", nsres); - return; - } - - nsres = nsIProfile_ProfileExists(profile, wszMSHTML, &exists); - if(!exists) { - nsres = nsIProfile_CreateNewProfile(profile, wszMSHTML, NULL, NULL, FALSE); - if(NS_FAILED(nsres)) - ERR("CreateNewProfile failed: %08x\n", nsres); - } - - nsres = nsIProfile_SetCurrentProfile(profile, wszMSHTML); - if(NS_FAILED(nsres)) - ERR("SetCurrentProfile failed: %08x\n", nsres); - - nsIProfile_Release(profile); -} - static void set_preferences(void) { nsIPrefBranch *pref; @@ -473,7 +469,6 @@ static BOOL init_xpcom(const PRUnichar *gre_path) ERR("could not get appstartup-notifier: %08x\n", nsres); } - set_profile(); set_preferences(); nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr, NS_MEMORY_CONTRACTID, @@ -661,7 +656,7 @@ static void nsnode_to_nsstring_rec(nsIContentSerializer *serializer, nsIDOMNode case ELEMENT_NODE: { nsIDOMElement *nselem; nsIDOMNode_QueryInterface(nsnode, &IID_nsIDOMElement, (void**)&nselem); - nsIContentSerializer_AppendElementStart(serializer, nselem, has_children, str); + nsIContentSerializer_AppendElementStart(serializer, nselem, nselem, str); nsIDOMElement_Release(nselem); break; } @@ -733,7 +728,7 @@ void nsnode_to_nsstring(nsIDOMNode *nsdoc, nsAString *str) return; } - nsres = nsIContentSerializer_Init(serializer, 0, 100, NULL, FALSE); + nsres = nsIContentSerializer_Init(serializer, 0, 100, NULL, FALSE, FALSE /* FIXME */); if(NS_FAILED(nsres)) ERR("Init failed: %08x\n", nsres); @@ -816,7 +811,8 @@ void set_ns_editmode(NSContainer *This) return; } - nsres = nsIEditingSession_MakeWindowEditable(editing_session, dom_window, NULL, FALSE); + nsres = nsIEditingSession_MakeWindowEditable(editing_session, dom_window, + NULL, FALSE, TRUE, TRUE); nsIEditingSession_Release(editing_session); nsIDOMWindow_Release(dom_window); if(NS_FAILED(nsres)) { @@ -865,6 +861,9 @@ void update_nsdocument(HTMLDocument *doc) nsIDOMHTMLDocument_Release(doc->nsdoc); doc->nsdoc = nsdoc; + + if(nsdoc) + set_mutation_observer(doc->nscontainer, nsdoc); } void close_gecko(void) @@ -1496,7 +1495,8 @@ static nsresult NSAPI nsTooltipListener_OnShowTooltip(nsITooltipListener *iface, { NSContainer *This = NSTOOLTIP_THIS(iface); - show_tooltip(This->doc, aXCoord, aYCoord, aTipText); + if (This->doc) + show_tooltip(This->doc, aXCoord, aYCoord, aTipText); return NS_OK; } @@ -1505,7 +1505,8 @@ static nsresult NSAPI nsTooltipListener_OnHideTooltip(nsITooltipListener *iface) { NSContainer *This = NSTOOLTIP_THIS(iface); - hide_tooltip(This->doc); + if (This->doc) + hide_tooltip(This->doc); return NS_OK; } @@ -1666,6 +1667,7 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent) ret->doc = doc; ret->ref = 1; + init_mutation(ret); nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr, NS_WEBBROWSER_CONTRACTID, NULL, &IID_nsIWebBrowser, (void**)&ret->webbrowser); diff --git a/dlls/mshtml/nsevents.c b/dlls/mshtml/nsevents.c index 806e9eb6d4b..1933c5788cd 100644 --- a/dlls/mshtml/nsevents.c +++ b/dlls/mshtml/nsevents.c @@ -175,208 +175,6 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event return NS_OK; } -#define IE_MAJOR_VERSION 7 -#define IE_MINOR_VERSION 0 - -static BOOL handle_insert_comment(HTMLDocument *doc, const PRUnichar *comment) -{ - DWORD len; - int majorv = 0, minorv = 0; - const PRUnichar *ptr, *end; - nsAString nsstr; - PRUnichar *buf; - nsresult nsres; - - enum { - CMP_EQ, - CMP_LT, - CMP_LTE, - CMP_GT, - CMP_GTE - } cmpt = CMP_EQ; - - static const PRUnichar endifW[] = {'<','!','[','e','n','d','i','f',']'}; - - if(comment[0] != '[' || comment[1] != 'i' || comment[2] != 'f') - return FALSE; - - ptr = comment+3; - while(isspaceW(*ptr)) - ptr++; - - if(ptr[0] == 'l' && ptr[1] == 't') { - ptr += 2; - if(*ptr == 'e') { - cmpt = CMP_LTE; - ptr++; - }else { - cmpt = CMP_LT; - } - }else if(ptr[0] == 'g' && ptr[1] == 't') { - ptr += 2; - if(*ptr == 'e') { - cmpt = CMP_GTE; - ptr++; - }else { - cmpt = CMP_GT; - } - } - - if(!isspaceW(*ptr++)) - return FALSE; - while(isspaceW(*ptr)) - ptr++; - - if(ptr[0] != 'I' || ptr[1] != 'E') - return FALSE; - - ptr +=2; - if(!isspaceW(*ptr++)) - return FALSE; - while(isspaceW(*ptr)) - ptr++; - - if(!isdigitW(*ptr)) - return FALSE; - while(isdigitW(*ptr)) - majorv = majorv*10 + (*ptr++ - '0'); - - if(*ptr == '.') { - if(!isdigitW(*ptr)) - return FALSE; - while(isdigitW(*ptr)) - minorv = minorv*10 + (*ptr++ - '0'); - } - - while(isspaceW(*ptr)) - ptr++; - if(ptr[0] != ']' || ptr[1] != '>') - return FALSE; - ptr += 2; - - len = strlenW(ptr); - if(len < sizeof(endifW)/sizeof(WCHAR)) - return FALSE; - - end = ptr + len-sizeof(endifW)/sizeof(WCHAR); - if(memcmp(end, endifW, sizeof(endifW))) - return FALSE; - - switch(cmpt) { - case CMP_EQ: - if(majorv == IE_MAJOR_VERSION && minorv == IE_MINOR_VERSION) - break; - return FALSE; - case CMP_LT: - if(majorv > IE_MAJOR_VERSION) - break; - if(majorv == IE_MAJOR_VERSION && minorv > IE_MINOR_VERSION) - break; - return FALSE; - case CMP_LTE: - if(majorv > IE_MAJOR_VERSION) - break; - if(majorv == IE_MAJOR_VERSION && minorv >= IE_MINOR_VERSION) - break; - return FALSE; - case CMP_GT: - if(majorv < IE_MAJOR_VERSION) - break; - if(majorv == IE_MAJOR_VERSION && minorv < IE_MINOR_VERSION) - break; - return FALSE; - case CMP_GTE: - if(majorv < IE_MAJOR_VERSION) - break; - if(majorv == IE_MAJOR_VERSION && minorv <= IE_MINOR_VERSION) - break; - return FALSE; - } - - buf = heap_alloc((end-ptr+1)*sizeof(WCHAR)); - if(!buf) - return FALSE; - - memcpy(buf, ptr, (end-ptr)*sizeof(WCHAR)); - buf[end-ptr] = 0; - nsAString_Init(&nsstr, buf); - heap_free(buf); - - /* FIXME: Find better way to insert HTML to document. */ - nsres = nsIDOMHTMLDocument_Write(doc->nsdoc, &nsstr); - nsAString_Finish(&nsstr); - if(NS_FAILED(nsres)) { - ERR("Write failed: %08x\n", nsres); - return FALSE; - } - - return TRUE; -} - -static nsresult NSAPI handle_node_insert(nsIDOMEventListener *iface, nsIDOMEvent *event) -{ - NSContainer *This = NSEVENTLIST_THIS(iface)->This; - nsIDOMEventTarget *target; - nsIDOMComment *nscomment; - nsIDOMElement *elem; - nsresult nsres; - - TRACE("(%p %p)\n", This, event); - - nsres = nsIDOMEvent_GetTarget(event, &target); - if(NS_FAILED(nsres)) { - ERR("GetTarget failed: %08x\n", nsres); - return NS_OK; - } - - nsres = nsIDOMEventTarget_QueryInterface(target, &IID_nsIDOMElement, (void**)&elem); - if(NS_SUCCEEDED(nsres)) { - nsIDOMHTMLScriptElement *script; - - nsres = nsIDOMElement_QueryInterface(elem, &IID_nsIDOMHTMLScriptElement, (void**)&script); - if(NS_SUCCEEDED(nsres)) { - doc_insert_script(This->doc, script); - nsIDOMHTMLScriptElement_Release(script); - } - - check_event_attr(This->doc, elem); - - nsIDOMEventTarget_Release(target); - nsIDOMNode_Release(elem); - return NS_OK; - } - - nsres = nsIDOMEventTarget_QueryInterface(target, &IID_nsIDOMComment, (void**)&nscomment); - if(NS_SUCCEEDED(nsres)) { - nsAString comment_str; - BOOL remove_comment = FALSE; - - nsAString_Init(&comment_str, NULL); - nsres = nsIDOMComment_GetData(nscomment, &comment_str); - if(NS_SUCCEEDED(nsres)) { - const PRUnichar *comment; - - nsAString_GetData(&comment_str, &comment); - remove_comment = handle_insert_comment(This->doc, comment); - } - - nsAString_Finish(&comment_str); - - if(remove_comment) { - nsIDOMNode *nsparent, *tmp; - - nsIDOMComment_GetParentNode(nscomment, &nsparent); - nsIDOMNode_RemoveChild(nsparent, (nsIDOMNode*)nscomment, &tmp); - nsIDOMNode_Release(nsparent); - nsIDOMNode_Release(tmp); - } - - nsIDOMComment_Release(nscomment); - } - - return NS_OK; -} - static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent *event) { NSContainer *This = NSEVENTLIST_THIS(iface)->This; @@ -427,7 +225,6 @@ static const nsIDOMEventListenerVtbl blur_vtbl = EVENTLISTENER_VTBL(handle_ static const nsIDOMEventListenerVtbl focus_vtbl = EVENTLISTENER_VTBL(handle_focus); static const nsIDOMEventListenerVtbl keypress_vtbl = EVENTLISTENER_VTBL(handle_keypress); static const nsIDOMEventListenerVtbl load_vtbl = EVENTLISTENER_VTBL(handle_load); -static const nsIDOMEventListenerVtbl node_insert_vtbl = EVENTLISTENER_VTBL(handle_node_insert); static const nsIDOMEventListenerVtbl htmlevent_vtbl = EVENTLISTENER_VTBL(handle_htmlevent); static void init_event(nsIDOMEventTarget *target, const PRUnichar *type, @@ -484,14 +281,11 @@ void init_nsevents(NSContainer *This) static const PRUnichar wsz_focus[] = {'f','o','c','u','s',0}; static const PRUnichar wsz_keypress[] = {'k','e','y','p','r','e','s','s',0}; static const PRUnichar wsz_load[] = {'l','o','a','d',0}; - static const PRUnichar DOMNodeInsertedW[] = - {'D','O','M','N','o','d','e','I','n','s','e','r','t','e','d',0}; init_listener(&This->blur_listener, This, &blur_vtbl); init_listener(&This->focus_listener, This, &focus_vtbl); init_listener(&This->keypress_listener, This, &keypress_vtbl); init_listener(&This->load_listener, This, &load_vtbl); - init_listener(&This->node_insert_listener, This, &node_insert_vtbl); init_listener(&This->htmlevent_listener, This, &htmlevent_vtbl); nsres = nsIWebBrowser_GetContentDOMWindow(This->webbrowser, &dom_window); @@ -511,7 +305,6 @@ void init_nsevents(NSContainer *This) init_event(target, wsz_focus, NSEVENTLIST(&This->focus_listener), TRUE); init_event(target, wsz_keypress, NSEVENTLIST(&This->keypress_listener), FALSE); init_event(target, wsz_load, NSEVENTLIST(&This->load_listener), TRUE); - init_event(target, DOMNodeInsertedW,NSEVENTLIST(&This->node_insert_listener),TRUE); nsIDOMEventTarget_Release(target); } diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index 5953143fa90..219ac0c1800 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -23,7 +23,7 @@ * compatible with XPCOM, usable in C code. */ -cpp_quote("#define GECKO_VERSION \"0.1.0\"") +cpp_quote("#define GECKO_VERSION \"0.9.0\"") cpp_quote("#define GECKO_VERSION_STRING \"Wine Gecko \" GECKO_VERSION") import "wtypes.idl"; @@ -83,6 +83,7 @@ interface nsIEditActionListener; interface nsIDocumentStateListener; interface nsIDOMCSSStyleSheet; interface nsIDOMDocumentView; +interface nsIDocumentObserver; interface IMoniker; @@ -126,6 +127,15 @@ typedef nsISupports nsIContentFilter; typedef nsISupports nsIDOMMediaList; typedef nsISupports nsIDOMHTMLTableCaptionElement; typedef nsISupports nsIDOMHTMLTableSectionElement; +typedef nsISupports nsIDOMClientRectList; +typedef nsISupports nsIDOMClientRect; +typedef nsISupports nsIDOMLocation; +typedef nsISupports nsIBoxObject; +typedef nsISupports nsIDocument; +typedef nsISupports nsIContent; +typedef nsISupports nsINode; +typedef nsISupports nsIStyleSheet; +typedef nsISupports nsIStyleRule; [ object, @@ -230,6 +240,17 @@ interface nsIInterfaceRequestor : nsISupports [ object, + uuid(4a2abaf0-6886-11d3-9382-00104ba0fd40), + local + /* NOT_FROZEN */ +] +interface nsIRunnable : nsISupports +{ + nsresult Run(); +} + +[ + object, uuid(d1899240-f9d2-11d2-bdd6-000064657374), local /* FROZEN */ @@ -635,6 +656,35 @@ interface nsIDOMElementCSSInlineStyle : nsISupports nsresult GetStyle(nsIDOMCSSStyleDeclaration **aStyle); } +[ + object, + uuid(f0aef489-18c5-4de6-99d5-58b3758b098c), + local + /* NOT_FROZEN */ +] +interface nsIDOMNSElement : nsISupports +{ + nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval); + nsresult GetClientRects(nsIDOMClientRectList **_retval); + nsresult GetBoundingClientRect(nsIDOMClientRect **_retval); + nsresult GetScrollTop(PRInt32 *aScrollTop); + nsresult SetScrollTop(PRInt32 aScrollTop); + nsresult GetScrollLeft(PRInt32 *aScrollLeft); + nsresult SetScrollLeft(PRInt32 aScrollLeft); + nsresult GetScrollHeight(PRInt32 *aScrollHeight); + nsresult GetScrollWidth(PRInt32 *aScrollWidth); + nsresult GetClientTop(PRInt32 *aClientTop); + nsresult GetClientLeft(PRInt32 *aClientLeft); + nsresult GetClientHeight(PRInt32 *aClientHeight); + nsresult GetClientWidth(PRInt32 *aClientWidth); + nsresult GetFirstElementChild(nsIDOMElement **aFirstElementChild); + nsresult GetLastElementChild(nsIDOMElement **aLastElementChild); + nsresult GetPreviousElementSibling(nsIDOMElement **aPreviousElementSibling); + nsresult GetNextElementSibling(nsIDOMElement **aNextElementSibling); + nsresult GetChildElementCount(PRUint32 *aChildElementCount); + nsresult GetChildren(nsIDOMNodeList **aChildren); +} + cpp_quote("#undef GetClassName") [ @@ -659,7 +709,7 @@ interface nsIDOMHTMLElement : nsIDOMElement [ object, - uuid(da83b2ec-8264-4410-8496-ada3acd2ae42), + uuid(7f142f9a-fba7-4949-93d6-cf08a974ac51), local /* NOT_FROZEN */ ] @@ -672,19 +722,15 @@ interface nsIDOMNSHTMLElement : nsISupports nsresult GetOffsetParent(nsIDOMElement **aOffsetParent); nsresult GetInnerHTML(nsAString *aInnerHTML); nsresult SetInnerHTML(const nsAString *aInnerHTML); - nsresult GetScrollTop(PRInt32 *aScrollTop); - nsresult SetScrollTop(PRInt32 aScrollTop); - nsresult GetScrollLeft(PRInt32 *aScrollLeft); - nsresult SetScrollLeft(PRInt32 aScrollLeft); - nsresult GetScrollHeight(PRInt32 *aScrollHeight); - nsresult GetScrollWidth(PRInt32 *aScrollWidth); - nsresult GetClientHeight(PRInt32 *aClientHeight); - nsresult GetClientWidth(PRInt32 *aClientWidth); nsresult GetTabIndex(PRInt32 *aTabIndex); nsresult SetTabIndex(PRInt32 aTabIndex); + nsresult GetContentEditable(nsAString *aContentEditable); + nsresult SetContentEditable(const nsAString *aContentEditable); nsresult blur(); nsresult focus(); nsresult ScrollIntoView(PRBool top); + nsresult GetSpellcheck(PRBool *aSpellcheck); + nsresult SetSpellcheck(PRBool aSpellcheck); } [ @@ -804,6 +850,34 @@ interface nsIDOMDocument : nsIDOMNode [ object, + uuid(533a8131-8d0c-4ebf-990b-7fad7cd51466), + local + /* NOT_FROZEN */ +] +interface nsIDOMNSDocument : nsISupports +{ + nsresult GetCharacterSet(nsAString *aCharacterSet); + nsresult GetDir(nsAString *aDir); + nsresult SetDir(const nsAString *aDir); + nsresult GetLocation(nsIDOMLocation **aLocation); + nsresult GetTitle(nsAString *aTitle); + nsresult SetTitle(const nsAString *aTitle); + nsresult GetContentType(nsAString *aContentType); + nsresult GetLastModified(nsAString *aLastModified); + nsresult GetReferrer(nsAString *aReferrer); + nsresult GetBoxObjectFor(nsIDOMElement *elt, nsIBoxObject **_retval); + nsresult HasFocus(PRBool *_retval); + nsresult GetActiveElement(nsIDOMElement **aActiveElement); + nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval); + nsresult ElementFromPoint(PRInt32 x, PRInt32 y, nsIDOMElement **_retval); + + /* Wine extensions */ + nsresult WineAddObserver(nsIDocumentObserver *aObserver); + nsresult WineAddScriptRunner(nsIRunnable *aRunnable); +} + +[ + object, uuid(a6cf9084-15b3-11d2-932e-00805f8add32), local /* FROZEN */ @@ -855,7 +929,7 @@ interface nsIDOMNSHTMLDocument : nsISupports nsresult SetDomain(const nsAString *aDomain); nsresult GetEmbeds(nsIDOMHTMLCollection **aEmbeds); nsresult GetSelection(nsAString *_retval); - nsresult Open(nsIDOMDocument **_retval); + nsresult Open(nsACString *aContentType, PRBool aReplace, nsIDOMDocument **_retval); nsresult Write(); nsresult Writeln(); nsresult Clear(); @@ -941,17 +1015,15 @@ interface nsIDOMRange : nsISupports [ object, - uuid(a6cf90f2-15b3-11d2-932e-00805f8add32), + uuid(59188642-23b4-41d6-bde1-302c3906d1f0), local + /* NOT_FROZEN */ ] interface nsIDOMNSRange : nsISupports { nsresult CreateContextualFragment([in] const nsAString *fragment, [out] nsIDOMDocumentFragment **_retval); nsresult IsPointInRange([in] nsIDOMNode *parent, [in] PRInt32 offset, [out] PRBool *_retval); nsresult ComparePoint([in] nsIDOMNode *parent, [in] PRInt32 offset, [out] PRInt16 *_retval); - nsresult IntersectsNode([in] nsIDOMNode *n, [out] PRBool *_retval); - nsresult CompareNode([in] nsIDOMNode *n, [out] PRUint16 *_retval); - nsresult nSDetach(); } @@ -1468,7 +1540,7 @@ interface nsIWebNavigation : nsISupports [ object, - uuid(f1094df6-ce0e-42c9-9847-2f663172c38d), + uuid(5af07661-6477-4235-8814-4a45215855b8), local /* NOT_FROZEN */ ] @@ -1479,7 +1551,7 @@ interface nsIPrintSettings : nsISupports nsresult SetPrintOptions(PRInt32 aType, PRBool aTurnOnOff); nsresult GetPrintOptions(PRInt32 aType, PRBool *_retval); nsresult GetPrintOptionsBits(PRInt32 *_retval); - nsresult GetPageSizeInTwips(PRInt32 *aWidth, PRInt32 *aHeight); + nsresult GetEffectivePageSize(double *aWidth, double *aHeight); nsresult Clone(nsIPrintSettings **_retval); nsresult Assign(nsIPrintSettings *aPS); nsresult GetPrintSession(nsIPrintSession **aPrintSession); @@ -1488,6 +1560,14 @@ interface nsIPrintSettings : nsISupports nsresult SetStartPageRange(PRInt32 aStartPageRange); nsresult GetEndPageRange(PRInt32 *aEndPageRange); nsresult SetEndPageRange(PRInt32 aEndPageRange); + nsresult GetEdgeTop(double *aEdgeTop); + nsresult SetEdgeTop(double aEdgeTop); + nsresult GetEdgeLeft(double *aEdgeLeft); + nsresult SetEdgeLeft(double aEdgeLeft); + nsresult GetEdgeBottom(double *aEdgeBottom); + nsresult SetEdgeBottom(double aEdgeBottom); + nsresult GetEdgeRight(double *aEdgeRight); + nsresult SetEdgeRight(double aEdgeRight); nsresult GetMarginTop(double *aMarginTop); nsresult SetMarginTop(double aMarginTop); nsresult GetMarginLeft(double *aMarginLeft); @@ -1496,6 +1576,14 @@ interface nsIPrintSettings : nsISupports nsresult SetMarginBottom(double aMarginBottom); nsresult GetMarginRight(double *aMarginRight); nsresult SetMarginRight(double aMarginRight); + nsresult GetUnwriteableMarginTop(double *aUnwriteableMarginTop); + nsresult SetUnwriteableMarginTop(double aUnwriteableMarginTop); + nsresult GetUnwriteableMarginLeft(double *aUnwriteableMarginLeft); + nsresult SetUnwriteableMarginLeft(double aUnwriteableMarginLeft); + nsresult GetUnwriteableMarginBottom(double *aUnwriteableMarginBottom); + nsresult SetUnwriteableMarginBottom(double aUnwriteableMarginBottom); + nsresult GetUnwriteableMarginRight(double *aUnwriteableMarginRight); + nsresult SetUnwriteableMarginRight(double aUnwriteableMarginRight); nsresult GetScaling(double *aScaling); nsresult SetScaling(double aScaling); nsresult GetPrintBGColors(PRBool *aPrintBGColors); @@ -1558,8 +1646,6 @@ interface nsIPrintSettings : nsISupports nsresult SetPrintReversed(PRBool aPrintReversed); nsresult GetPrintInColor(PRBool *aPrintInColor); nsresult SetPrintInColor(PRBool aPrintInColor); - nsresult GetPaperSize(PRInt32 *aPaperSize); - nsresult SetPaperSize(PRInt32 aPaperSize); nsresult GetOrientation(PRInt32 *aOrientation); nsresult SetOrientation(PRInt32 aOrientation); nsresult GetPrintCommand(PRUnichar **aPrintCommand); @@ -1572,6 +1658,8 @@ interface nsIPrintSettings : nsISupports nsresult SetPrintToFile(PRBool aPrintToFile); nsresult GetToFileName(PRUnichar **aToFileName); nsresult SetToFileName(const PRUnichar *aToFileName); + nsresult GetOutputFormat(PRInt16 *aOutputFormat); + nsresult SetOutputFormat(PRInt16 aOutputFormat); nsresult GetPrintPageDelay(PRInt32 *aPrintPageDelay); nsresult SetPrintPageDelay(PRInt32 aPrintPageDelay); nsresult GetIsInitializedFromPrinter(PRBool *aIsInitializedFromPrinter); @@ -1579,7 +1667,12 @@ interface nsIPrintSettings : nsISupports nsresult GetIsInitializedFromPrefs(PRBool *aIsInitializedFromPrefs); nsresult SetIsInitializedFromPrefs(PRBool aIsInitializedFromPrefs); nsresult SetMarginInTwips(nsMargin *aMargin); + nsresult SetEdgeInTwips(nsMargin *aEdge); nsresult GetMarginInTwips(nsMargin *aMargin); + nsresult GetEdgeInTwips(nsMargin *aEdge); + nsresult SetupSilentPrinting(); + nsresult SetUnwriteableMarginInTwips(nsMargin *aEdge); + nsresult GetUnwriteableMarginInTwips(nsMargin *aEdge); } [ @@ -1773,14 +1866,22 @@ interface nsIIOService : nsISupports [ object, - uuid(f0c5dddb-4713-4603-af2d-bf671838996b), + uuid(57322c6f-f4ec-4e46-8253-b74be220de16), local, /* NOT_FROZEN */ ] interface nsINetUtil : nsISupports { nsresult ParseContentType(const nsACString *aTypeHeader, nsACString *aCharset, - PRBool *aHadCharset, nsACString *aContentType); + PRBool *aHadCharset, nsACString *_retval); + nsresult ProtocolHasFlags(nsIURI *aURI, PRUint32 aFlag, PRBool *_retval); + nsresult URIChainHasFlags(nsIURI *aURI, PRUint32 aFlags, PRBool *_retval); + nsresult ToImmutableURI(nsIURI *aURI, nsIURI **_retval); + nsresult EscapeString(const nsACString *aString, PRUint32 aEscapeType, nsACString *_retval); + nsresult EscapeURL(const nsACString *aStr, PRUint32 aFlags, nsACString *_retval); + nsresult UnescapeString(const nsACString *aStr, PRUint32 aFlags, nsACString *_retval); + nsresult ExtractCharsetFromContentType(const nsACString *aTypeHeader, nsACString *aCharset, + PRInt32 *aCharsetStart, PRInt32 *aCharsetEnd, PRBool *_retval); } [ @@ -2104,7 +2205,7 @@ interface nsIWindowWatcher : nsISupports [ object, - uuid(d39fd2b4-3978-45d2-a4be-ba448171b61b), + uuid(274cd32e-3675-47e1-9d8a-fc6504ded9ce), local /* NOT_FROZEN */ ] @@ -2112,12 +2213,16 @@ interface nsIEditingSession : nsISupports { nsresult GetEditorStatus(PRUint32 *aEditorStatus); nsresult MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType, - PRBool doAfterUriLoad); + PRBool doAfterUriLoad, PRBool aMakeWholeDocumentEditable, PRBool aInteractive); nsresult WindowIsEditable(nsIDOMWindow *window, PRBool *_retval); nsresult GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval); nsresult SetupEditorOnWindow(nsIDOMWindow *window); nsresult TearDownEditorOnWindow(nsIDOMWindow *window); nsresult SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor); + nsresult DisableJSAndPlugins(nsIDOMWindow *aWindow); + nsresult RestoreJSAndPlugins(nsIDOMWindow *aWindow); + nsresult DetachFromWindow(nsIDOMWindow *aWindow); + nsresult ReattachToWindow(nsIDOMWindow *aWindow); } [ @@ -2193,13 +2298,14 @@ interface nsIController : nsISupports [ object, - uuid(d650439a-ca29-410d-a906-b0557fb62fcd), + uuid(34769de0-30d0-4cef-894a-fcd8bb27c4b4), local /* NOT_FROZEN */ ] interface nsIContentSerializer : nsISupports { - nsresult Init(PRUint32 flags, PRUint32 aWrapColumn, const char* aCharSet, PRBool aIsCopying); + nsresult Init(PRUint32 flags, PRUint32 aWrapColumn, const char* aCharSet, PRBool aIsCopying, + PRBool aIsWholeDocument); nsresult AppendText(nsIDOMText *aText, PRInt32 aStartOffset, PRInt32 aEndOffset, nsAString *aStr); nsresult AppendCDATASection(nsIDOMCDATASection *aCDATASection, PRInt32 aStartOffset, PRInt32 aEndOffset, nsAString *aStr); @@ -2208,7 +2314,8 @@ interface nsIContentSerializer : nsISupports nsresult AppendComment(nsIDOMComment *aComment, PRInt32 aStartOffset, PRInt32 aEndOffset, nsAString *aStr); nsresult AppendDoctype(nsIDOMDocumentType *aDoctype, nsAString *aStr); - nsresult AppendElementStart(nsIDOMElement *aElement, PRBool aHasChildren, nsAString *aStr); + nsresult AppendElementStart(nsIDOMElement *aElement, nsIDOMElement *aOriginalElement, + nsAString *aStr); nsresult AppendElementEnd(nsIDOMElement *aElement, nsAString *aStr); nsresult Flush(nsAString *aStr); nsresult AppendDocumentStart(nsIDOMDocument *aDocument, nsAString *aStr); @@ -2216,7 +2323,7 @@ interface nsIContentSerializer : nsISupports [ object, - uuid(D4882FFB-E927-408b-96BE-D4391B456FA9), + uuid(96b60ba0-634a-41e4-928e-78ab0b3c4b46), local /* NOT_FROZEN */ ] @@ -2246,8 +2353,9 @@ interface nsIEditor : nsISupports nsresult SetDocumentCharacterSet([in] const nsACString *val); nsresult ResetModificationCount(); nsresult GetModificationCount([out] PRInt32 *_retval); - nsresult IncrementModificationCount([in] long aModCount); + nsresult IncrementModificationCount([in] PRInt32 aModCount); nsresult GetTransactionManager([out] nsITransactionManager **_retval); + nsresult SetTransactionManager(nsITransactionManager *aTransactionManager); nsresult DoTransaction([in] nsITransaction *txn); nsresult EnableUndo([in] PRBool enable); nsresult Undo([in] PRUint32 count); @@ -2261,6 +2369,8 @@ interface nsIEditor : nsISupports nsresult ShouldTxnSetSelection([out] PRBool *_retval); nsresult SetShouldTxnSetSelection([in] PRBool should); nsresult GetInlineSpellChecker([out] nsIInlineSpellChecker **_retval); + nsresult SyncRealTimeSpell(); + nsresult SetSpellcheckUserOverride(PRBool enable); nsresult Cut(); nsresult CanCut([out] PRBool *_retval); nsresult Copy(); @@ -2296,6 +2406,7 @@ interface nsIEditor : nsISupports nsresult DumpContentTree(); nsresult DebugDumpContent(); nsresult DebugUnitTests([out] PRInt32 *outNumTests, [out] PRInt32 *outNumTestsFailed); + PRBool IsModifiableNode(nsIDOMNode *aNode); } [ @@ -2366,6 +2477,57 @@ interface nsIHTMLEditor : nsISupports nsresult SetReturnInParagraphCreatesNewParagraph([in] PRBool prb); } +[ + object, + uuid(32e68316-67d4-44a5-8d35-0d390fa9df11), + local + /* NOT_FROZEN */ +] +interface nsIMutationObserver : nsISupports +{ + void CharacterDataWillChange(nsIDocument *aDocument, nsIContent *aContent, + void /*CharacterDataChangeInfo*/ *aInfo); + void CharacterDataChanged(nsIDocument *aDocument, nsIContent *aContent, + void /*CharacterDataChangeInfo*/ *aInfo); + void AttributeChanged(nsIDocument *aDocument, nsIContent *aContent, PRInt32 aNameSpaceID, + nsIAtom *aAttribute, PRInt32 aModType, PRUint32 aStateMask); + void ContentAppended(nsIDocument *aDocument, nsIContent *aContainer, PRInt32 aNewIndexInContainer); + void ContentInserted(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild, + PRInt32 aIndexInContainer); + void ContentRemoved(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild, + PRInt32 aIndexInContainer); + void NodeWillBeDestroyed(const nsINode *aNode); + void ParentChainChanged(nsIContent *aContent); +} + +[ + object, + uuid(4e14e321-a4bb-49f8-a57a-2363668d14d0), + local + /* NOT_FROZEN */ +] +interface nsIDocumentObserver : nsIMutationObserver +{ + typedef int nsUpdateType; + + void BeginUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType); + void EndUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType); + void BeginLoad(nsIDocument *aDocument); + void EndLoad(nsIDocument *aDocument); + void ContentStatesChanged(nsIDocument *aDocument, nsIContent *aContent1, nsIContent *aContent2, + PRInt32 aStateMask); + void StyleSheetAdded(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet); + void StyleSheetRemoved(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet); + void StyleSheetApplicableStateChanged(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, + PRBool aApplicable); + void StyleRuleChanged(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aOldStyleRule, + nsIStyleRule *aNewStyleRule); + void StyleRuleAdded(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule); + void StyleRuleRemoved(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule); + void BindToDocument(nsIDocument *aDocument, nsIContent *aContent); + void DoneAddingContent(nsIContent *aContent, PRBool aHaveNotified); +} + /* * NOTE: * This is a private Wine interface that is implemented by our implementation diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index c918d12ff72..7c402b295a9 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -2276,11 +2276,76 @@ static nsresult NSAPI nsNetUtil_ParseContentType(nsINetUtil *iface, const nsACSt return nsINetUtil_ParseContentType(net_util, aTypeHeader, aCharset, aHadCharset, aContentType); } +static nsresult NSAPI nsNetUtil_ProtocolHasFlags(nsINetUtil *iface, nsIURI *aURI, PRUint32 aFlags, PRBool *_retval) +{ + TRACE("()\n"); + + return nsINetUtil_ProtocolHasFlags(net_util, aURI, aFlags, _retval); +} + +static nsresult NSAPI nsNetUtil_URIChainHasFlags(nsINetUtil *iface, nsIURI *aURI, PRUint32 aFlags, PRBool *_retval) +{ + TRACE("(%p %08x %p)\n", aURI, aFlags, _retval); + + if(aFlags == (1<<11)) { + *_retval = FALSE; + return NS_OK; + } + + return nsINetUtil_URIChainHasFlags(net_util, aURI, aFlags, _retval); +} + +static nsresult NSAPI nsNetUtil_ToImmutableURI(nsINetUtil *iface, nsIURI *aURI, nsIURI **_retval) +{ + TRACE("(%p %p)\n", aURI, _retval); + + return nsINetUtil_ToImmutableURI(net_util, aURI, _retval); +} + +static nsresult NSAPI nsNetUtil_EscapeString(nsINetUtil *iface, const nsACString *aString, + PRUint32 aEscapeType, nsACString *_retval) +{ + TRACE("(%p %x %p)\n", aString, aEscapeType, _retval); + + return nsINetUtil_EscapeString(net_util, aString, aEscapeType, _retval); +} + +static nsresult NSAPI nsNetUtil_EscapeURL(nsINetUtil *iface, const nsACString *aStr, PRUint32 aFlags, + nsACString *_retval) +{ + TRACE("(%p %08x %p)\n", aStr, aFlags, _retval); + + return nsINetUtil_EscapeURL(net_util, aStr, aFlags, _retval); +} + +static nsresult NSAPI nsNetUtil_UnescapeString(nsINetUtil *iface, const nsACString *aStr, + PRUint32 aFlags, nsACString *_retval) +{ + TRACE("(%p %08x %p)\n", aStr, aFlags, _retval); + + return nsINetUtil_UnescapeString(net_util, aStr, aFlags, _retval); +} + +static nsresult NSAPI nsNetUtil_ExtractCharsetFromContentType(nsINetUtil *iface, const nsACString *aTypeHeader, + nsACString *aCharset, PRInt32 *aCharsetStart, PRInt32 *aCharsetEnd, PRBool *_retval) +{ + TRACE("(%p %p %p %p %p)\n", aTypeHeader, aCharset, aCharsetStart, aCharsetEnd, _retval); + + return nsINetUtil_ExtractCharsetFromContentType(net_util, aTypeHeader, aCharset, aCharsetStart, aCharsetEnd, _retval); +} + static const nsINetUtilVtbl nsNetUtilVtbl = { nsNetUtil_QueryInterface, nsNetUtil_AddRef, nsNetUtil_Release, - nsNetUtil_ParseContentType + nsNetUtil_ParseContentType, + nsNetUtil_ProtocolHasFlags, + nsNetUtil_URIChainHasFlags, + nsNetUtil_ToImmutableURI, + nsNetUtil_EscapeString, + nsNetUtil_EscapeURL, + nsNetUtil_UnescapeString, + nsNetUtil_ExtractCharsetFromContentType }; static nsINetUtil nsNetUtil = { &nsNetUtilVtbl }; diff --git a/dlls/mshtml/rsrc.rc b/dlls/mshtml/rsrc.rc index 17c0233d477..83e9d69a1fb 100644 --- a/dlls/mshtml/rsrc.rc +++ b/dlls/mshtml/rsrc.rc @@ -47,6 +47,7 @@ #include "No.rc" #include "Pl.rc" #include "Pt.rc" +#include "Ro.rc" #include "Ru.rc" #include "Si.rc" #include "Sv.rc" diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index aa8dbb8d4e6..ee2a5cafdc3 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2185,6 +2185,7 @@ static void test_compatmode(IHTMLDocument2 *doc) static void test_location(IHTMLDocument2 *doc) { IHTMLLocation *location, *location2; + IHTMLWindow2 *window; ULONG ref; HRESULT hres; @@ -2195,10 +2196,18 @@ static void test_location(IHTMLDocument2 *doc) ok(hres == S_OK, "get_location failed: %08x\n", hres); ok(location == location2, "location != location2\n"); + IHTMLLocation_Release(location2); - test_ifaces((IUnknown*)location, location_iids); + hres = IHTMLDocument2_get_parentWindow(doc, &window); + ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres); + hres = IHTMLWindow2_get_location(window, &location2); + ok(hres == S_OK, "get_location failed: %08x\n", hres); + ok(location == location2, "location != location2\n"); IHTMLLocation_Release(location2); + + test_ifaces((IUnknown*)location, location_iids); + ref = IHTMLLocation_Release(location); ok(!ref, "location chould be destroyed here\n"); } @@ -2236,7 +2245,11 @@ static void test_navigator(IHTMLDocument2 *doc) bstr = NULL; hres = IOmNavigator_get_platform(navigator, &bstr); ok(hres == S_OK, "get_platform failed: %08x\n", hres); +#ifdef _WIN64 + ok(!strcmp_wa(bstr, "Win64"), "unexpected platform %s\n", dbgstr_w(bstr)); +#else ok(!strcmp_wa(bstr, "Win32"), "unexpected platform %s\n", dbgstr_w(bstr)); +#endif SysFreeString(bstr); bstr = NULL; diff --git a/dlls/msi/database.c b/dlls/msi/database.c index 46670062019..5345b1d8514 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -692,7 +692,7 @@ UINT WINAPI MsiDatabaseImportW(MSIHANDLE handle, LPCWSTR szFolder, LPCWSTR szFil MSIDATABASE *db; UINT r; - TRACE("%lx %s %s\n",handle,debugstr_w(szFolder), debugstr_w(szFilename)); + TRACE("%x %s %s\n",handle,debugstr_w(szFolder), debugstr_w(szFilename)); db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ); if( !db ) @@ -720,7 +720,7 @@ UINT WINAPI MsiDatabaseImportA( MSIHANDLE handle, LPWSTR path = NULL, file = NULL; UINT r = ERROR_OUTOFMEMORY; - TRACE("%lx %s %s\n", handle, debugstr_a(szFolder), debugstr_a(szFilename)); + TRACE("%x %s %s\n", handle, debugstr_a(szFolder), debugstr_a(szFilename)); if( szFolder ) { @@ -912,7 +912,7 @@ UINT WINAPI MsiDatabaseExportW( MSIHANDLE handle, LPCWSTR szTable, MSIDATABASE *db; UINT r; - TRACE("%lx %s %s %s\n", handle, debugstr_w(szTable), + TRACE("%x %s %s %s\n", handle, debugstr_w(szTable), debugstr_w(szFolder), debugstr_w(szFilename)); db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ); @@ -941,7 +941,7 @@ UINT WINAPI MsiDatabaseExportA( MSIHANDLE handle, LPCSTR szTable, LPWSTR path = NULL, file = NULL, table = NULL; UINT r = ERROR_OUTOFMEMORY; - TRACE("%lx %s %s %s\n", handle, debugstr_a(szTable), + TRACE("%x %s %s %s\n", handle, debugstr_a(szTable), debugstr_a(szFolder), debugstr_a(szFilename)); if( szTable ) @@ -981,7 +981,7 @@ UINT WINAPI MsiDatabaseMergeA(MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, UINT r; LPWSTR table; - TRACE("(%ld, %ld, %s)\n", hDatabase, hDatabaseMerge, + TRACE("(%d, %d, %s)\n", hDatabase, hDatabaseMerge, debugstr_a(szTableName)); table = strdupAtoW(szTableName); @@ -1426,7 +1426,7 @@ UINT WINAPI MsiDatabaseMergeW(MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, BOOL conflicts; UINT r; - TRACE("(%ld, %ld, %s)\n", hDatabase, hDatabaseMerge, + TRACE("(%d, %d, %s)\n", hDatabase, hDatabaseMerge, debugstr_w(szTableName)); if (szTableName && !*szTableName) @@ -1488,7 +1488,7 @@ MSIDBSTATE WINAPI MsiGetDatabaseState( MSIHANDLE handle ) MSIDBSTATE ret = MSIDBSTATE_READ; MSIDATABASE *db; - TRACE("%ld\n", handle); + TRACE("%d\n", handle); db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ); if( !db ) diff --git a/dlls/msi/format.c b/dlls/msi/format.c index 454142ad7ce..de531bf1e13 100644 --- a/dlls/msi/format.c +++ b/dlls/msi/format.c @@ -913,7 +913,7 @@ UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord, MSIPACKAGE *package; MSIRECORD *record; - TRACE("%ld %ld %p %p\n", hInstall, hRecord, szResult, sz); + TRACE("%d %d %p %p\n", hInstall, hRecord, szResult, sz); package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE ); if (!package) @@ -978,7 +978,7 @@ UINT WINAPI MsiFormatRecordA( MSIHANDLE hInstall, MSIHANDLE hRecord, DWORD len, save; LPWSTR value; - TRACE("%ld %ld %p %p\n", hInstall, hRecord, szResult, sz); + TRACE("%d %d %p %p\n", hInstall, hRecord, szResult, sz); if (!hRecord) return ERROR_INVALID_HANDLE; diff --git a/dlls/msi/handle.c b/dlls/msi/handle.c index ae42d84729b..91629ef16d5 100644 --- a/dlls/msi/handle.c +++ b/dlls/msi/handle.c @@ -123,7 +123,7 @@ MSIHANDLE alloc_msihandle( MSIOBJECTHDR *obj ) LeaveCriticalSection( &MSI_handle_cs ); - TRACE("%p -> %ld\n", obj, ret ); + TRACE("%p -> %d\n", obj, ret ); return ret; } @@ -147,7 +147,7 @@ MSIHANDLE alloc_msi_remote_handle( IUnknown *unk ) LeaveCriticalSection( &MSI_handle_cs ); - TRACE("%p -> %ld\n", unk, ret); + TRACE("%p -> %d\n", unk, ret); return ret; } @@ -270,7 +270,7 @@ UINT WINAPI MsiCloseHandle(MSIHANDLE handle) MSIOBJECTHDR *info = NULL; UINT ret = ERROR_INVALID_HANDLE; - TRACE("%lx\n",handle); + TRACE("%x\n",handle); if (!handle) return ERROR_SUCCESS; @@ -304,7 +304,7 @@ UINT WINAPI MsiCloseHandle(MSIHANDLE handle) ret = ERROR_SUCCESS; - TRACE("handle %lx destroyed\n", handle+1); + TRACE("handle %x destroyed\n", handle+1); out: LeaveCriticalSection( &MSI_handle_cs ); if( info ) diff --git a/dlls/msi/install.c b/dlls/msi/install.c index bcb68c38865..606caba1345 100644 --- a/dlls/msi/install.c +++ b/dlls/msi/install.c @@ -707,7 +707,7 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode) break; default: - FIXME("%ld %d\n", hInstall, iRunMode); + FIXME("%d %d\n", hInstall, iRunMode); r = TRUE; } @@ -727,7 +727,7 @@ BOOL WINAPI MsiSetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode, BOOL fState) case MSIRUNMODE_RESERVED15: return FALSE; default: - FIXME("%ld %d %d\n", hInstall, iRunMode, fState); + FIXME("%d %d %d\n", hInstall, iRunMode, fState); } return TRUE; } @@ -886,7 +886,7 @@ UINT WINAPI MsiGetFeatureStateW(MSIHANDLE hInstall, LPCWSTR szFeature, MSIPACKAGE* package; UINT ret; - TRACE("%ld %s %p %p\n", hInstall, debugstr_w(szFeature), piInstalled, piAction); + TRACE("%d %s %p %p\n", hInstall, debugstr_w(szFeature), piInstalled, piAction); package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE); if (!package) @@ -934,7 +934,7 @@ UINT WINAPI MsiGetFeatureStateW(MSIHANDLE hInstall, LPCWSTR szFeature, UINT WINAPI MsiGetFeatureCostA(MSIHANDLE hInstall, LPCSTR szFeature, MSICOSTTREE iCostTree, INSTALLSTATE iState, LPINT piCost) { - FIXME("(%ld %s %i %i %p): stub\n", hInstall, debugstr_a(szFeature), + FIXME("(%d %s %i %i %p): stub\n", hInstall, debugstr_a(szFeature), iCostTree, iState, piCost); if (piCost) *piCost = 0; return ERROR_SUCCESS; @@ -946,7 +946,7 @@ UINT WINAPI MsiGetFeatureCostA(MSIHANDLE hInstall, LPCSTR szFeature, UINT WINAPI MsiGetFeatureCostW(MSIHANDLE hInstall, LPCWSTR szFeature, MSICOSTTREE iCostTree, INSTALLSTATE iState, LPINT piCost) { - FIXME("(%ld %s %i %i %p): stub\n", hInstall, debugstr_w(szFeature), + FIXME("(%d %s %i %i %p): stub\n", hInstall, debugstr_w(szFeature), iCostTree, iState, piCost); if (piCost) *piCost = 0; return ERROR_SUCCESS; @@ -1082,7 +1082,7 @@ UINT WINAPI MsiGetComponentStateW(MSIHANDLE hInstall, LPCWSTR szComponent, MSIPACKAGE* package; UINT ret; - TRACE("%ld %s %p %p\n", hInstall, debugstr_w(szComponent), + TRACE("%d %s %p %p\n", hInstall, debugstr_w(szComponent), piInstalled, piAction); package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE); @@ -1191,7 +1191,7 @@ UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int iInstallLevel) MSIPACKAGE* package; UINT r; - TRACE("%ld %i\n", hInstall, iInstallLevel); + TRACE("%d %i\n", hInstall, iInstallLevel); package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE); if (!package) @@ -1232,7 +1232,7 @@ UINT WINAPI MsiGetFeatureValidStatesW(MSIHANDLE hInstall, LPCWSTR szFeature, LPDWORD pInstallState) { if(pInstallState) *pInstallState = 1<str.w, pchValueBuf ); if (!name) diff --git a/dlls/msi/preview.c b/dlls/msi/preview.c index 565fb3605b3..801684d0e6c 100644 --- a/dlls/msi/preview.c +++ b/dlls/msi/preview.c @@ -68,7 +68,7 @@ UINT WINAPI MsiEnableUIPreview( MSIHANDLE hdb, MSIHANDLE* phPreview ) MSIPREVIEW *preview; UINT r = ERROR_FUNCTION_FAILED; - TRACE("%ld %p\n", hdb, phPreview); + TRACE("%d %p\n", hdb, phPreview); db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE ); if( !db ) @@ -137,7 +137,7 @@ UINT WINAPI MsiPreviewDialogW( MSIHANDLE hPreview, LPCWSTR szDialogName ) MSIPREVIEW *preview; UINT r; - TRACE("%ld %s\n", hPreview, debugstr_w(szDialogName)); + TRACE("%d %s\n", hPreview, debugstr_w(szDialogName)); preview = msihandle2msiinfo( hPreview, MSIHANDLETYPE_PREVIEW ); if( !preview ) @@ -155,7 +155,7 @@ UINT WINAPI MsiPreviewDialogA( MSIHANDLE hPreview, LPCSTR szDialogName ) UINT r; LPWSTR strW = NULL; - TRACE("%ld %s\n", hPreview, debugstr_a(szDialogName)); + TRACE("%d %s\n", hPreview, debugstr_a(szDialogName)); if( szDialogName ) { @@ -171,7 +171,7 @@ UINT WINAPI MsiPreviewDialogA( MSIHANDLE hPreview, LPCSTR szDialogName ) UINT WINAPI MsiPreviewBillboardW( MSIHANDLE hPreview, LPCWSTR szControlName, LPCWSTR szBillboard) { - FIXME("%ld %s %s\n", hPreview, debugstr_w(szControlName), + FIXME("%d %s %s\n", hPreview, debugstr_w(szControlName), debugstr_w(szBillboard)); return ERROR_CALL_NOT_IMPLEMENTED; } @@ -179,7 +179,7 @@ UINT WINAPI MsiPreviewBillboardW( MSIHANDLE hPreview, LPCWSTR szControlName, UINT WINAPI MsiPreviewBillboardA( MSIHANDLE hPreview, LPCSTR szControlName, LPCSTR szBillboard) { - FIXME("%ld %s %s\n", hPreview, debugstr_a(szControlName), + FIXME("%d %s %s\n", hPreview, debugstr_a(szControlName), debugstr_a(szBillboard)); return ERROR_CALL_NOT_IMPLEMENTED; } diff --git a/dlls/msi/record.c b/dlls/msi/record.c index b02fcd10b9a..665bae76cc8 100644 --- a/dlls/msi/record.c +++ b/dlls/msi/record.c @@ -116,7 +116,7 @@ UINT WINAPI MsiRecordGetFieldCount( MSIHANDLE handle ) MSIRECORD *rec; UINT ret; - TRACE("%ld\n", handle ); + TRACE("%d\n", handle ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -229,7 +229,7 @@ int WINAPI MsiRecordGetInteger( MSIHANDLE handle, UINT iField) MSIRECORD *rec; UINT ret; - TRACE("%ld %d\n", handle, iField ); + TRACE("%d %d\n", handle, iField ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -248,7 +248,7 @@ UINT WINAPI MsiRecordClearData( MSIHANDLE handle ) MSIRECORD *rec; UINT i; - TRACE("%ld\n", handle ); + TRACE("%d\n", handle ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -286,7 +286,7 @@ UINT WINAPI MsiRecordSetInteger( MSIHANDLE handle, UINT iField, int iVal ) MSIRECORD *rec; UINT ret; - TRACE("%ld %u %d\n", handle, iField, iVal); + TRACE("%d %u %d\n", handle, iField, iVal); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -316,7 +316,7 @@ BOOL WINAPI MsiRecordIsNull( MSIHANDLE handle, UINT iField ) MSIRECORD *rec; UINT ret; - TRACE("%ld %d\n", handle, iField ); + TRACE("%d %d\n", handle, iField ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -388,7 +388,7 @@ UINT WINAPI MsiRecordGetStringA(MSIHANDLE handle, UINT iField, MSIRECORD *rec; UINT ret; - TRACE("%ld %d %p %p\n", handle, iField, szValue, pcchValue); + TRACE("%d %d %p %p\n", handle, iField, szValue, pcchValue); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -464,7 +464,7 @@ UINT WINAPI MsiRecordGetStringW(MSIHANDLE handle, UINT iField, MSIRECORD *rec; UINT ret; - TRACE("%ld %d %p %p\n", handle, iField, szValue, pcchValue); + TRACE("%d %d %p %p\n", handle, iField, szValue, pcchValue); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -514,7 +514,7 @@ UINT WINAPI MsiRecordDataSize(MSIHANDLE handle, UINT iField) MSIRECORD *rec; UINT ret; - TRACE("%ld %d\n", handle, iField); + TRACE("%d %d\n", handle, iField); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -556,7 +556,7 @@ UINT WINAPI MsiRecordSetStringA( MSIHANDLE handle, UINT iField, LPCSTR szValue ) MSIRECORD *rec; UINT ret; - TRACE("%ld %d %s\n", handle, iField, debugstr_a(szValue)); + TRACE("%d %d %s\n", handle, iField, debugstr_a(szValue)); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -599,7 +599,7 @@ UINT WINAPI MsiRecordSetStringW( MSIHANDLE handle, UINT iField, LPCWSTR szValue MSIRECORD *rec; UINT ret; - TRACE("%ld %d %s\n", handle, iField, debugstr_w(szValue)); + TRACE("%d %d %s\n", handle, iField, debugstr_w(szValue)); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -719,7 +719,7 @@ UINT WINAPI MsiRecordSetStreamA(MSIHANDLE hRecord, UINT iField, LPCSTR szFilenam LPWSTR wstr = NULL; UINT ret; - TRACE("%ld %d %s\n", hRecord, iField, debugstr_a(szFilename)); + TRACE("%d %d %s\n", hRecord, iField, debugstr_a(szFilename)); if( szFilename ) { @@ -738,7 +738,7 @@ UINT WINAPI MsiRecordSetStreamW(MSIHANDLE handle, UINT iField, LPCWSTR szFilenam MSIRECORD *rec; UINT ret; - TRACE("%ld %d %s\n", handle, iField, debugstr_w(szFilename)); + TRACE("%d %d %s\n", handle, iField, debugstr_w(szFilename)); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -808,7 +808,7 @@ UINT WINAPI MsiRecordReadStream(MSIHANDLE handle, UINT iField, char *buf, LPDWOR MSIRECORD *rec; UINT ret; - TRACE("%ld %d %p %p\n", handle, iField, buf, sz); + TRACE("%d %d %p %p\n", handle, iField, buf, sz); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) diff --git a/dlls/msi/suminfo.c b/dlls/msi/suminfo.c index 148ba8ae807..ca6b6d1cd7c 100644 --- a/dlls/msi/suminfo.c +++ b/dlls/msi/suminfo.c @@ -466,7 +466,7 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase, MSIDATABASE *db; UINT ret = ERROR_FUNCTION_FAILED; - TRACE("%ld %s %d %p\n", hDatabase, debugstr_w(szDatabase), + TRACE("%d %s %d %p\n", hDatabase, debugstr_w(szDatabase), uiUpdateCount, pHandle); if( !pHandle ) @@ -529,7 +529,7 @@ UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase, LPWSTR szwDatabase = NULL; UINT ret; - TRACE("%ld %s %d %p\n", hDatabase, debugstr_a(szDatabase), + TRACE("%d %s %d %p\n", hDatabase, debugstr_a(szDatabase), uiUpdateCount, pHandle); if( szDatabase ) @@ -550,7 +550,7 @@ UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE hSummaryInfo, PUINT pCount) { MSISUMMARYINFO *si; - TRACE("%ld %p\n", hSummaryInfo, pCount); + TRACE("%d %p\n", hSummaryInfo, pCount); si = msihandle2msiinfo( hSummaryInfo, MSIHANDLETYPE_SUMMARYINFO ); if( !si ) @@ -570,7 +570,7 @@ static UINT get_prop( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, PROPVARIANT *prop; UINT ret = ERROR_SUCCESS; - TRACE("%ld %d %p %p %p %p %p\n", handle, uiProperty, puiDataType, + TRACE("%d %d %p %p %p %p %p\n", handle, uiProperty, puiDataType, piValue, pftValue, str, pcchValueBuf); if ( uiProperty >= MSI_MAX_PROPS ) @@ -668,7 +668,7 @@ UINT WINAPI MsiSummaryInfoGetPropertyA( { awstring str; - TRACE("%ld %d %p %p %p %p %p\n", handle, uiProperty, puiDataType, + TRACE("%d %d %p %p %p %p %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf, pcchValueBuf ); str.unicode = FALSE; @@ -684,7 +684,7 @@ UINT WINAPI MsiSummaryInfoGetPropertyW( { awstring str; - TRACE("%ld %d %p %p %p %p %p\n", handle, uiProperty, puiDataType, + TRACE("%d %d %p %p %p %p %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf, pcchValueBuf ); str.unicode = TRUE; @@ -701,7 +701,7 @@ static UINT set_prop( MSIHANDLE handle, UINT uiProperty, UINT uiDataType, PROPVARIANT *prop; UINT type, len, ret = ERROR_SUCCESS; - TRACE("%ld %u %u %i %p %p\n", handle, uiProperty, uiDataType, + TRACE("%d %u %u %i %p %p\n", handle, uiProperty, uiDataType, iValue, pftValue, str ); type = get_type( uiProperty ); @@ -773,7 +773,7 @@ UINT WINAPI MsiSummaryInfoSetPropertyW( MSIHANDLE handle, UINT uiProperty, { awcstring str; - TRACE("%ld %u %u %i %p %s\n", handle, uiProperty, uiDataType, + TRACE("%d %u %u %i %p %s\n", handle, uiProperty, uiDataType, iValue, pftValue, debugstr_w(szValue) ); str.unicode = TRUE; @@ -786,7 +786,7 @@ UINT WINAPI MsiSummaryInfoSetPropertyA( MSIHANDLE handle, UINT uiProperty, { awcstring str; - TRACE("%ld %u %u %i %p %s\n", handle, uiProperty, uiDataType, + TRACE("%d %u %u %i %p %s\n", handle, uiProperty, uiDataType, iValue, pftValue, debugstr_a(szValue) ); str.unicode = FALSE; @@ -802,7 +802,7 @@ UINT WINAPI MsiSummaryInfoPersist( MSIHANDLE handle ) HRESULT r; UINT ret = ERROR_FUNCTION_FAILED; - TRACE("%ld\n", handle ); + TRACE("%d\n", handle ); si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO ); if( !si ) diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index 9568fbf75f4..1c392cbf38a 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -723,7 +723,7 @@ static HRESULT Installer_RegistryValue(HKEY hkey, LPCWSTR szKey, VARIANT vValue, VariantInit(&vararg[2]); V_VT(&vararg[2]) = VT_I4; - V_I4(&vararg[2]) = (int)hkey; + V_I4(&vararg[2]) = (INT_PTR)hkey; VariantInit(&vararg[1]); V_VT(&vararg[1]) = VT_BSTR; V_BSTR(&vararg[1]) = SysAllocString(szKey); @@ -2401,7 +2401,7 @@ static void test_Installer(void) } /* Installer::OpenDatabase */ - hr = Installer_OpenDatabase(szPath, (int)MSIDBOPEN_TRANSACT, &pDatabase); + hr = Installer_OpenDatabase(szPath, (INT_PTR)MSIDBOPEN_TRANSACT, &pDatabase); ok(hr == S_OK, "Installer_OpenDatabase failed, hresult 0x%08x\n", hr); if (hr == S_OK) { diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index 475b10b970a..4037ac6e697 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -2347,7 +2347,7 @@ static MSIHANDLE package_from_db(MSIHANDLE hdb) CHAR szPackage[10]; MSIHANDLE hPackage; - sprintf(szPackage,"#%li",hdb); + sprintf(szPackage,"#%i",hdb); res = MsiOpenPackage(szPackage,&hPackage); if (res != ERROR_SUCCESS) return 0; @@ -6175,7 +6175,7 @@ static void test_dbtopackage(void) r = add_custom_action_entry(hdb, "'SetProp', 51, 'MYPROP', 'grape'"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - sprintf(package, "#%li", hdb); + sprintf(package, "#%i", hdb); r = MsiOpenPackage(package, &hpkg); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); @@ -6234,7 +6234,7 @@ static void test_dbtopackage(void) r = add_custom_action_entry(hdb, "'SetProp', 51, 'MYPROP', 'grape'"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - sprintf(package, "#%li", hdb); + sprintf(package, "#%i", hdb); r = MsiOpenPackage(package, &hpkg); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); diff --git a/dlls/msi/tests/format.c b/dlls/msi/tests/format.c index c4be4294650..316eed6b711 100644 --- a/dlls/msi/tests/format.c +++ b/dlls/msi/tests/format.c @@ -228,7 +228,7 @@ static MSIHANDLE package_from_db(MSIHANDLE hdb) CHAR szPackage[10]; MSIHANDLE hPackage; - sprintf(szPackage,"#%li",hdb); + sprintf(szPackage,"#%i",hdb); res = MsiOpenPackage(szPackage,&hPackage); ok( res == ERROR_SUCCESS , "Failed to open package\n" ); @@ -303,7 +303,7 @@ static MSIHANDLE helper_createpackage( const char *szName ) res = MsiCloseHandle( suminfo); ok( res == ERROR_SUCCESS , "Failed to close suminfo\n" ); - sprintf(szPackage,"#%li",hdb); + sprintf(szPackage,"#%i",hdb); res = MsiOpenPackage(szPackage,&hPackage); ok( res == ERROR_SUCCESS , "Failed to open package\n" ); diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 56d36e1108f..6d1f308c99a 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -1211,34 +1211,34 @@ static const msi_table pc_tables[] = /* the FCI callbacks */ -static void *mem_alloc(ULONG cb) +static void * CDECL mem_alloc(ULONG cb) { return HeapAlloc(GetProcessHeap(), 0, cb); } -static void mem_free(void *memory) +static void CDECL mem_free(void *memory) { HeapFree(GetProcessHeap(), 0, memory); } -static BOOL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) +static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) { sprintf(pccab->szCab, pv, pccab->iCab); return TRUE; } -static long progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) +static long CDECL progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) { return 0; } -static int file_placed(PCCAB pccab, char *pszFile, long cbFile, - BOOL fContinuation, void *pv) +static int CDECL file_placed(PCCAB pccab, char *pszFile, long cbFile, + BOOL fContinuation, void *pv) { return 0; } -static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) +static INT_PTR CDECL fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) { HANDLE handle; DWORD dwAccess = 0; @@ -1262,7 +1262,7 @@ static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) return (INT_PTR)handle; } -static UINT fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwRead; @@ -1274,7 +1274,7 @@ static UINT fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) return dwRead; } -static UINT fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwWritten; @@ -1286,7 +1286,7 @@ static UINT fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) return dwWritten; } -static int fci_close(INT_PTR hf, int *err, void *pv) +static int CDECL fci_close(INT_PTR hf, int *err, void *pv) { HANDLE handle = (HANDLE)hf; ok(CloseHandle(handle), "Failed to CloseHandle\n"); @@ -1294,7 +1294,7 @@ static int fci_close(INT_PTR hf, int *err, void *pv) return 0; } -static long fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) +static long CDECL fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD ret; @@ -1305,7 +1305,7 @@ static long fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) return ret; } -static int fci_delete(char *pszFile, int *err, void *pv) +static int CDECL fci_delete(char *pszFile, int *err, void *pv) { BOOL ret = DeleteFileA(pszFile); ok(ret, "Failed to DeleteFile %s\n", pszFile); @@ -1378,7 +1378,7 @@ static BOOL check_record(MSIHANDLE rec, UINT field, LPCSTR val) return (r == ERROR_SUCCESS ) && !strcmp(val, buffer); } -static BOOL get_temp_file(char *pszTempName, int cbTempName, void *pv) +static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv) { LPSTR tempname; @@ -1397,8 +1397,8 @@ static BOOL get_temp_file(char *pszTempName, int cbTempName, void *pv) return FALSE; } -static INT_PTR get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, - USHORT *pattribs, int *err, void *pv) +static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, + USHORT *pattribs, int *err, void *pv) { BY_HANDLE_FILE_INFORMATION finfo; FILETIME filetime; diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 5ad1d385bd8..871d673ab3a 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -665,7 +665,7 @@ static MSIHANDLE package_from_db(MSIHANDLE hdb) CHAR szPackage[10]; MSIHANDLE hPackage; - sprintf(szPackage,"#%li",hdb); + sprintf(szPackage,"#%i",hdb); res = MsiOpenPackage(szPackage,&hPackage); if (res != ERROR_SUCCESS) return 0; @@ -2116,7 +2116,7 @@ static void test_msipackage(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); /* database exists, but is emtpy */ - sprintf(name, "#%ld", hdb); + sprintf(name, "#%d", hdb); r = MsiOpenPackage(name, &hpack); ok(r == ERROR_INSTALL_PACKAGE_INVALID, "Expected ERROR_INSTALL_PACKAGE_INVALID, got %d\n", r); @@ -2134,7 +2134,7 @@ static void test_msipackage(void) ok(r == ERROR_SUCCESS, "failed to create InstallExecuteSequence table\n"); /* a few key tables exist */ - sprintf(name, "#%ld", hdb); + sprintf(name, "#%d", hdb); r = MsiOpenPackage(name, &hpack); ok(r == ERROR_INSTALL_PACKAGE_INVALID, "Expected ERROR_INSTALL_PACKAGE_INVALID, got %d\n", r); @@ -2146,7 +2146,7 @@ static void test_msipackage(void) r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - sprintf(name, "#%ld", hdb); + sprintf(name, "#%d", hdb); /* The following summary information props must exist: * - PID_REVNUMBER @@ -8888,7 +8888,7 @@ static void test_sourcedir(void) r = add_directory_entry(hdb, "'TARGETDIR', '', 'SourceDir'"); ok(r == S_OK, "failed\n"); - sprintf(package, "#%li", hdb); + sprintf(package, "#%i", hdb); r = MsiOpenPackage(package, &hpkg); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); @@ -8997,7 +8997,7 @@ static void test_sourcedir(void) MsiCloseHandle(hpkg); /* reset the package state */ - sprintf(package, "#%li", hdb); + sprintf(package, "#%i", hdb); r = MsiOpenPackage(package, &hpkg); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); diff --git a/dlls/msvcrt/console.c b/dlls/msvcrt/console.c index 267e0e1f748..268f6dbe514 100644 --- a/dlls/msvcrt/console.c +++ b/dlls/msvcrt/console.c @@ -289,9 +289,9 @@ int CDECL _cprintf(const char* format, ...) { char buf[2048], *mem = buf; int written, resize = sizeof(buf), retval; - va_list valist; + __ms_va_list valist; - va_start( valist, format ); + __ms_va_start( valist, format ); /* There are two conventions for snprintf failing: * Return -1 if we truncated, or * Return the number of bytes that would have been written @@ -305,9 +305,9 @@ int CDECL _cprintf(const char* format, ...) MSVCRT_free (mem); if (!(mem = MSVCRT_malloc(resize))) return MSVCRT_EOF; - va_start( valist, format ); + __ms_va_start( valist, format ); } - va_end(valist); + __ms_va_end(valist); LOCK_CONSOLE; retval = _cputs( mem ); UNLOCK_CONSOLE; diff --git a/dlls/msvcrt/errno.c b/dlls/msvcrt/errno.c index 1b5fd96bdeb..e52c49dc51b 100644 --- a/dlls/msvcrt/errno.c +++ b/dlls/msvcrt/errno.c @@ -129,7 +129,7 @@ void msvcrt_set_errno(int err) switch(err) { #define ERR_CASE(oserr) case oserr: -#define ERR_MAPS(oserr,crterr) case oserr:*errno = crterr;break; +#define ERR_MAPS(oserr, crterr) case oserr: *errno = crterr; break ERR_CASE(ERROR_ACCESS_DENIED) ERR_CASE(ERROR_NETWORK_ACCESS_DENIED) ERR_CASE(ERROR_CANNOT_MAKE) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 055ccac7e46..89450443b1f 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -1418,7 +1418,7 @@ int CDECL MSVCRT__pipe(int *pfds, unsigned int psize, int textmode) */ int CDECL MSVCRT__sopen( const char *path, int oflags, int shflags, ... ) { - va_list ap; + __ms_va_list ap; int pmode; DWORD access = 0, creation = 0, attrib; DWORD sharing; @@ -1440,9 +1440,9 @@ int CDECL MSVCRT__sopen( const char *path, int oflags, int shflags, ... ) if (oflags & MSVCRT__O_CREAT) { - va_start(ap, shflags); - pmode = va_arg(ap, int); - va_end(ap); + __ms_va_start(ap, shflags); + pmode = va_arg(ap, int); + __ms_va_end(ap); if(pmode & ~(MSVCRT__S_IREAD | MSVCRT__S_IWRITE)) FIXME(": pmode 0x%04x ignored\n", pmode); @@ -1516,12 +1516,12 @@ int CDECL MSVCRT__wsopen( const MSVCRT_wchar_t* path, int oflags, int shflags, . { const unsigned int len = strlenW(path); char *patha = MSVCRT_calloc(len + 1,1); - va_list ap; + __ms_va_list ap; int pmode; - va_start(ap, shflags); + __ms_va_start(ap, shflags); pmode = va_arg(ap, int); - va_end(ap); + __ms_va_end(ap); if (patha && WideCharToMultiByte(CP_ACP,0,path,len,patha,len,NULL,NULL)) { @@ -1539,14 +1539,14 @@ int CDECL MSVCRT__wsopen( const MSVCRT_wchar_t* path, int oflags, int shflags, . */ int CDECL MSVCRT__open( const char *path, int flags, ... ) { - va_list ap; + __ms_va_list ap; if (flags & MSVCRT__O_CREAT) { int pmode; - va_start(ap, flags); + __ms_va_start(ap, flags); pmode = va_arg(ap, int); - va_end(ap); + __ms_va_end(ap); return MSVCRT__sopen( path, flags, MSVCRT__SH_DENYNO, pmode ); } else @@ -1560,12 +1560,12 @@ int CDECL _wopen(const MSVCRT_wchar_t *path,int flags,...) { const unsigned int len = strlenW(path); char *patha = MSVCRT_calloc(len + 1,1); - va_list ap; + __ms_va_list ap; int pmode; - va_start(ap, flags); + __ms_va_start(ap, flags); pmode = va_arg(ap, int); - va_end(ap); + __ms_va_end(ap); if (patha && WideCharToMultiByte(CP_ACP,0,path,len,patha,len,NULL,NULL)) { @@ -3018,7 +3018,7 @@ MSVCRT_FILE* CDECL MSVCRT_tmpfile(void) /********************************************************************* * vfprintf (MSVCRT.@) */ -int CDECL MSVCRT_vfprintf(MSVCRT_FILE* file, const char *format, va_list valist) +int CDECL MSVCRT_vfprintf(MSVCRT_FILE* file, const char *format, __ms_va_list valist) { char buf[2048], *mem = buf; int written, resize = sizeof(buf), retval; @@ -3048,7 +3048,7 @@ int CDECL MSVCRT_vfprintf(MSVCRT_FILE* file, const char *format, va_list valist) * Is final char included in written (then resize is too big) or not * (then we must test for equality too)? */ -int CDECL MSVCRT_vfwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, va_list valist) +int CDECL MSVCRT_vfwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, __ms_va_list valist) { MSVCRT_wchar_t buf[2048], *mem = buf; int written, resize = sizeof(buf) / sizeof(MSVCRT_wchar_t), retval; @@ -3071,7 +3071,7 @@ int CDECL MSVCRT_vfwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, va_l /********************************************************************* * vprintf (MSVCRT.@) */ -int CDECL MSVCRT_vprintf(const char *format, va_list valist) +int CDECL MSVCRT_vprintf(const char *format, __ms_va_list valist) { return MSVCRT_vfprintf(MSVCRT_stdout,format,valist); } @@ -3079,7 +3079,7 @@ int CDECL MSVCRT_vprintf(const char *format, va_list valist) /********************************************************************* * vwprintf (MSVCRT.@) */ -int CDECL MSVCRT_vwprintf(const MSVCRT_wchar_t *format, va_list valist) +int CDECL MSVCRT_vwprintf(const MSVCRT_wchar_t *format, __ms_va_list valist) { return MSVCRT_vfwprintf(MSVCRT_stdout,format,valist); } @@ -3089,11 +3089,11 @@ int CDECL MSVCRT_vwprintf(const MSVCRT_wchar_t *format, va_list valist) */ int CDECL MSVCRT_fprintf(MSVCRT_FILE* file, const char *format, ...) { - va_list valist; + __ms_va_list valist; int res; - va_start(valist, format); + __ms_va_start(valist, format); res = MSVCRT_vfprintf(file, format, valist); - va_end(valist); + __ms_va_end(valist); return res; } @@ -3102,11 +3102,11 @@ int CDECL MSVCRT_fprintf(MSVCRT_FILE* file, const char *format, ...) */ int CDECL MSVCRT_fwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, ...) { - va_list valist; + __ms_va_list valist; int res; - va_start(valist, format); + __ms_va_start(valist, format); res = MSVCRT_vfwprintf(file, format, valist); - va_end(valist); + __ms_va_end(valist); return res; } @@ -3115,11 +3115,11 @@ int CDECL MSVCRT_fwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, ...) */ int CDECL MSVCRT_printf(const char *format, ...) { - va_list valist; + __ms_va_list valist; int res; - va_start(valist, format); + __ms_va_start(valist, format); res = MSVCRT_vfprintf(MSVCRT_stdout, format, valist); - va_end(valist); + __ms_va_end(valist); return res; } @@ -3164,11 +3164,11 @@ MSVCRT_wint_t CDECL MSVCRT_ungetwc(MSVCRT_wint_t wc, MSVCRT_FILE * file) */ int CDECL MSVCRT_wprintf(const MSVCRT_wchar_t *format, ...) { - va_list valist; + __ms_va_list valist; int res; - va_start(valist, format); + __ms_va_start(valist, format); res = MSVCRT_vwprintf(format, valist); - va_end(valist); + __ms_va_end(valist); return res; } diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 3a894e9457b..8ed8fd953ce 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -50,15 +50,17 @@ typedef unsigned long MSVCRT__fsize_t; typedef unsigned __int64 MSVCRT_size_t; typedef __int64 MSVCRT_intptr_t; typedef unsigned __int64 MSVCRT_uintptr_t; +typedef __int64 MSVCRT_time_t; #else typedef unsigned long MSVCRT_size_t; typedef long MSVCRT_intptr_t; typedef unsigned long MSVCRT_uintptr_t; +typedef long MSVCRT_time_t; #endif typedef unsigned int MSVCRT__dev_t; typedef int MSVCRT__off_t; typedef long MSVCRT_clock_t; -typedef long MSVCRT_time_t; +typedef long MSVCRT___time32_t; typedef __int64 MSVCRT___time64_t; typedef __int64 MSVCRT_fpos_t; @@ -598,7 +600,7 @@ struct MSVCRT__stat64 { #define MSVCRT_SIGABRT 22 #define MSVCRT_NSIG (MSVCRT_SIGABRT + 1) -typedef void (*MSVCRT___sighandler_t)(int); +typedef void (__cdecl *MSVCRT___sighandler_t)(int); #define MSVCRT_SIG_DFL ((MSVCRT___sighandler_t)0) #define MSVCRT_SIG_IGN ((MSVCRT___sighandler_t)1) @@ -665,9 +667,9 @@ double __cdecl MSVCRT_difftime(MSVCRT_time_t time1, MSVCRT_time_t time2); MSVCRT_time_t __cdecl MSVCRT_time(MSVCRT_time_t*); MSVCRT_FILE* __cdecl MSVCRT__fdopen(int, const char *); MSVCRT_FILE* __cdecl MSVCRT__wfdopen(int, const MSVCRT_wchar_t *); -int __cdecl MSVCRT_vsnprintf(char *str, unsigned int len, const char *format, va_list valist); +int __cdecl MSVCRT_vsnprintf(char *str, unsigned int len, const char *format, __ms_va_list valist); int __cdecl MSVCRT_vsnwprintf(MSVCRT_wchar_t *str, unsigned int len, - const MSVCRT_wchar_t *format, va_list valist ); + const MSVCRT_wchar_t *format, __ms_va_list valist ); int __cdecl MSVCRT_raise(int sig); #ifndef __WINE_MSVCRT_TEST diff --git a/dlls/msvcrt/process.c b/dlls/msvcrt/process.c index bb57b9f79c3..33661489ab5 100644 --- a/dlls/msvcrt/process.c +++ b/dlls/msvcrt/process.c @@ -269,7 +269,7 @@ static MSVCRT_wchar_t *msvcrt_argvtos_aw(const char * const *arg, MSVCRT_wchar_t /* INTERNAL: Convert wide va_list to a single 'delim'-separated wide string, with an * extra '\0' to terminate it. */ -static MSVCRT_wchar_t *msvcrt_valisttos(const MSVCRT_wchar_t *arg0, va_list alist, MSVCRT_wchar_t delim) +static MSVCRT_wchar_t *msvcrt_valisttos(const MSVCRT_wchar_t *arg0, __ms_va_list alist, MSVCRT_wchar_t delim) { unsigned int size = 0, pos = 0; const MSVCRT_wchar_t *arg; @@ -304,7 +304,7 @@ static MSVCRT_wchar_t *msvcrt_valisttos(const MSVCRT_wchar_t *arg0, va_list alis /* INTERNAL: Convert ansi va_list to a single 'delim'-separated wide string, with an * extra '\0' to terminate it. */ -static MSVCRT_wchar_t *msvcrt_valisttos_aw(const char *arg0, va_list alist, MSVCRT_wchar_t delim) +static MSVCRT_wchar_t *msvcrt_valisttos_aw(const char *arg0, __ms_va_list alist, MSVCRT_wchar_t delim) { unsigned int size = 0, pos = 0; const char *arg; @@ -391,13 +391,13 @@ MSVCRT_intptr_t CDECL _cwait(int *status, MSVCRT_intptr_t pid, int action) */ MSVCRT_intptr_t CDECL _wexecl(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *args; MSVCRT_intptr_t ret; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(MSVCRT__P_OVERLAY, name, args, NULL, 0); @@ -413,15 +413,15 @@ MSVCRT_intptr_t CDECL _wexecl(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* */ MSVCRT_intptr_t CDECL _execl(const char* name, const char* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *nameW, *args; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos_aw(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(MSVCRT__P_OVERLAY, nameW, args, NULL, 0); @@ -437,20 +437,20 @@ MSVCRT_intptr_t CDECL _execl(const char* name, const char* arg0, ...) */ MSVCRT_intptr_t CDECL _wexecle(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *args, *envs = NULL; const MSVCRT_wchar_t * const *envp; MSVCRT_intptr_t ret; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); - va_start(ap, arg0); + __ms_va_start(ap, arg0); while (va_arg( ap, MSVCRT_wchar_t * ) != NULL) /*nothing*/; envp = va_arg( ap, const MSVCRT_wchar_t * const * ); if (envp) envs = msvcrt_argvtos(envp, 0); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(MSVCRT__P_OVERLAY, name, args, envs, 0); @@ -464,22 +464,22 @@ MSVCRT_intptr_t CDECL _wexecle(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* */ MSVCRT_intptr_t CDECL _execle(const char* name, const char* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *nameW, *args, *envs = NULL; const char * const *envp; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos_aw(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); - va_start(ap, arg0); + __ms_va_start(ap, arg0); while (va_arg( ap, char * ) != NULL) /*nothing*/; envp = va_arg( ap, const char * const * ); if (envp) envs = msvcrt_argvtos_aw(envp, 0); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(MSVCRT__P_OVERLAY, nameW, args, envs, 0); @@ -496,13 +496,13 @@ MSVCRT_intptr_t CDECL _execle(const char* name, const char* arg0, ...) */ MSVCRT_intptr_t CDECL _wexeclp(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *args; MSVCRT_intptr_t ret; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(MSVCRT__P_OVERLAY, name, args, NULL, 1); @@ -518,15 +518,15 @@ MSVCRT_intptr_t CDECL _wexeclp(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* */ MSVCRT_intptr_t CDECL _execlp(const char* name, const char* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *nameW, *args; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos_aw(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(MSVCRT__P_OVERLAY, nameW, args, NULL, 1); @@ -542,20 +542,20 @@ MSVCRT_intptr_t CDECL _execlp(const char* name, const char* arg0, ...) */ MSVCRT_intptr_t CDECL _wexeclpe(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *args, *envs = NULL; const MSVCRT_wchar_t * const *envp; MSVCRT_intptr_t ret; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); - va_start(ap, arg0); + __ms_va_start(ap, arg0); while (va_arg( ap, MSVCRT_wchar_t * ) != NULL) /*nothing*/; envp = va_arg( ap, const MSVCRT_wchar_t * const * ); if (envp) envs = msvcrt_argvtos(envp, 0); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(MSVCRT__P_OVERLAY, name, args, envs, 1); @@ -569,22 +569,22 @@ MSVCRT_intptr_t CDECL _wexeclpe(const MSVCRT_wchar_t* name, const MSVCRT_wchar_t */ MSVCRT_intptr_t CDECL _execlpe(const char* name, const char* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *nameW, *args, *envs = NULL; const char * const *envp; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos_aw(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); - va_start(ap, arg0); + __ms_va_start(ap, arg0); while (va_arg( ap, char * ) != NULL) /*nothing*/; envp = va_arg( ap, const char * const * ); if (envp) envs = msvcrt_argvtos_aw(envp, 0); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(MSVCRT__P_OVERLAY, nameW, args, envs, 1); @@ -685,13 +685,13 @@ MSVCRT_intptr_t CDECL _execvp(const char* name, char* const* argv) */ MSVCRT_intptr_t CDECL _wspawnl(int flags, const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *args; MSVCRT_intptr_t ret; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(flags, name, args, NULL, 0); @@ -707,15 +707,15 @@ MSVCRT_intptr_t CDECL _wspawnl(int flags, const MSVCRT_wchar_t* name, const MSVC */ MSVCRT_intptr_t CDECL _spawnl(int flags, const char* name, const char* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *nameW, *args; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos_aw(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(flags, nameW, args, NULL, 0); @@ -731,20 +731,20 @@ MSVCRT_intptr_t CDECL _spawnl(int flags, const char* name, const char* arg0, ... */ MSVCRT_intptr_t CDECL _wspawnle(int flags, const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *args, *envs = NULL; const MSVCRT_wchar_t * const *envp; MSVCRT_intptr_t ret; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); - va_start(ap, arg0); + __ms_va_start(ap, arg0); while (va_arg( ap, MSVCRT_wchar_t * ) != NULL) /*nothing*/; envp = va_arg( ap, const MSVCRT_wchar_t * const * ); if (envp) envs = msvcrt_argvtos(envp, 0); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(flags, name, args, envs, 0); @@ -758,22 +758,22 @@ MSVCRT_intptr_t CDECL _wspawnle(int flags, const MSVCRT_wchar_t* name, const MSV */ MSVCRT_intptr_t CDECL _spawnle(int flags, const char* name, const char* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *nameW, *args, *envs = NULL; const char * const *envp; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos_aw(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); - va_start(ap, arg0); + __ms_va_start(ap, arg0); while (va_arg( ap, char * ) != NULL) /*nothing*/; envp = va_arg( ap, const char * const * ); if (envp) envs = msvcrt_argvtos_aw(envp, 0); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(flags, nameW, args, envs, 0); @@ -790,13 +790,13 @@ MSVCRT_intptr_t CDECL _spawnle(int flags, const char* name, const char* arg0, .. */ MSVCRT_intptr_t CDECL _wspawnlp(int flags, const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *args; MSVCRT_intptr_t ret; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(flags, name, args, NULL, 1); @@ -812,15 +812,15 @@ MSVCRT_intptr_t CDECL _wspawnlp(int flags, const MSVCRT_wchar_t* name, const MSV */ MSVCRT_intptr_t CDECL _spawnlp(int flags, const char* name, const char* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *nameW, *args; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos_aw(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(flags, nameW, args, NULL, 1); @@ -836,20 +836,20 @@ MSVCRT_intptr_t CDECL _spawnlp(int flags, const char* name, const char* arg0, .. */ MSVCRT_intptr_t CDECL _wspawnlpe(int flags, const MSVCRT_wchar_t* name, const MSVCRT_wchar_t* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *args, *envs = NULL; const MSVCRT_wchar_t * const *envp; MSVCRT_intptr_t ret; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); - va_start(ap, arg0); + __ms_va_start(ap, arg0); while (va_arg( ap, MSVCRT_wchar_t * ) != NULL) /*nothing*/; envp = va_arg( ap, const MSVCRT_wchar_t * const * ); if (envp) envs = msvcrt_argvtos(envp, 0); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(flags, name, args, envs, 1); @@ -863,22 +863,22 @@ MSVCRT_intptr_t CDECL _wspawnlpe(int flags, const MSVCRT_wchar_t* name, const MS */ MSVCRT_intptr_t CDECL _spawnlpe(int flags, const char* name, const char* arg0, ...) { - va_list ap; + __ms_va_list ap; MSVCRT_wchar_t *nameW, *args, *envs = NULL; const char * const *envp; MSVCRT_intptr_t ret; if (!(nameW = msvcrt_wstrdupa(name))) return -1; - va_start(ap, arg0); + __ms_va_start(ap, arg0); args = msvcrt_valisttos_aw(arg0, ap, ' '); - va_end(ap); + __ms_va_end(ap); - va_start(ap, arg0); + __ms_va_start(ap, arg0); while (va_arg( ap, char * ) != NULL) /*nothing*/; envp = va_arg( ap, const char * const * ); if (envp) envs = msvcrt_argvtos_aw(envp, 0); - va_end(ap); + __ms_va_end(ap); ret = msvcrt_spawn(flags, nameW, args, envs, 1); diff --git a/dlls/msvcrt/scanf.c b/dlls/msvcrt/scanf.c index c51c5ab0967..89598970310 100644 --- a/dlls/msvcrt/scanf.c +++ b/dlls/msvcrt/scanf.c @@ -93,12 +93,12 @@ static int wchar2digit(MSVCRT_wchar_t c, int base) { */ int CDECL MSVCRT_fscanf(MSVCRT_FILE *file, const char *format, ...) { - va_list valist; + __ms_va_list valist; int res; - va_start(valist, format); + __ms_va_start(valist, format); res = MSVCRT_vfscanf(file, format, valist); - va_end(valist); + __ms_va_end(valist); return res; } @@ -107,12 +107,12 @@ int CDECL MSVCRT_fscanf(MSVCRT_FILE *file, const char *format, ...) */ int CDECL MSVCRT_scanf(const char *format, ...) { - va_list valist; + __ms_va_list valist; int res; - va_start(valist, format); + __ms_va_start(valist, format); res = MSVCRT_vfscanf(MSVCRT_stdin, format, valist); - va_end(valist); + __ms_va_end(valist); return res; } @@ -121,12 +121,12 @@ int CDECL MSVCRT_scanf(const char *format, ...) */ int CDECL MSVCRT_fwscanf(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...) { - va_list valist; + __ms_va_list valist; int res; - va_start(valist, format); + __ms_va_start(valist, format); res = MSVCRT_vfwscanf(file, format, valist); - va_end(valist); + __ms_va_end(valist); return res; } @@ -136,12 +136,12 @@ int CDECL MSVCRT_fwscanf(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...) */ int CDECL MSVCRT_wscanf(const MSVCRT_wchar_t *format, ...) { - va_list valist; + __ms_va_list valist; int res; - va_start(valist, format); + __ms_va_start(valist, format); res = MSVCRT_vfwscanf(MSVCRT_stdin, format, valist); - va_end(valist); + __ms_va_end(valist); return res; } @@ -151,12 +151,12 @@ int CDECL MSVCRT_wscanf(const MSVCRT_wchar_t *format, ...) */ int CDECL MSVCRT_sscanf(const char *str, const char *format, ...) { - va_list valist; + __ms_va_list valist; int res; - va_start(valist, format); + __ms_va_start(valist, format); res = MSVCRT_vsscanf(str, format, valist); - va_end(valist); + __ms_va_end(valist); return res; } @@ -166,12 +166,12 @@ int CDECL MSVCRT_sscanf(const char *str, const char *format, ...) */ int CDECL MSVCRT_swscanf(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ...) { - va_list valist; + __ms_va_list valist; int res; - va_start(valist, format); + __ms_va_start(valist, format); res = MSVCRT_vswscanf(str, format, valist); - va_end(valist); + __ms_va_end(valist); return res; } @@ -181,11 +181,11 @@ int CDECL MSVCRT_swscanf(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format */ int CDECL _cscanf(const char *format, ...) { - va_list valist; + __ms_va_list valist; int res; - va_start(valist, format); + __ms_va_start(valist, format); res = MSVCRT_vcscanf(format, valist); - va_end(valist); + __ms_va_end(valist); return res; } diff --git a/dlls/msvcrt/scanf.h b/dlls/msvcrt/scanf.h index c236f48c4fd..fd1ad3b347d 100644 --- a/dlls/msvcrt/scanf.h +++ b/dlls/msvcrt/scanf.h @@ -48,7 +48,7 @@ #ifdef CONSOLE #define _GETC_(file) (consumed++, _getch()) #define _UNGETC_(nch, file) do { _ungetch(nch); consumed--; } while(0) -#define _FUNCTION_ static int MSVCRT_vcscanf(const char *format, va_list ap) +#define _FUNCTION_ static int MSVCRT_vcscanf(const char *format, __ms_va_list ap) #else #ifdef STRING #undef _EOF_ @@ -56,19 +56,19 @@ #define _GETC_(file) (consumed++, *file++) #define _UNGETC_(nch, file) do { file--; consumed--; } while(0) #ifdef WIDE_SCANF -#define _FUNCTION_ static int MSVCRT_vswscanf(const MSVCRT_wchar_t *file, const MSVCRT_wchar_t *format, va_list ap) +#define _FUNCTION_ static int MSVCRT_vswscanf(const MSVCRT_wchar_t *file, const MSVCRT_wchar_t *format, __ms_va_list ap) #else /* WIDE_SCANF */ -#define _FUNCTION_ static int MSVCRT_vsscanf(const char *file, const char *format, va_list ap) +#define _FUNCTION_ static int MSVCRT_vsscanf(const char *file, const char *format, __ms_va_list ap) #endif /* WIDE_SCANF */ #else /* STRING */ #ifdef WIDE_SCANF #define _GETC_(file) (consumed++, MSVCRT_fgetwc(file)) #define _UNGETC_(nch, file) do { MSVCRT_ungetwc(nch, file); consumed--; } while(0) -#define _FUNCTION_ static int MSVCRT_vfwscanf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, va_list ap) +#define _FUNCTION_ static int MSVCRT_vfwscanf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, __ms_va_list ap) #else /* WIDE_SCANF */ #define _GETC_(file) (consumed++, MSVCRT_fgetc(file)) #define _UNGETC_(nch, file) do { MSVCRT_ungetc(nch, file); consumed--; } while(0) -#define _FUNCTION_ static int MSVCRT_vfscanf(MSVCRT_FILE* file, const char *format, va_list ap) +#define _FUNCTION_ static int MSVCRT_vfscanf(MSVCRT_FILE* file, const char *format, __ms_va_list ap) #endif /* WIDE_SCANF */ #endif /* STRING */ #endif /* CONSOLE */ diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index 0f235b52ed9..91effe92aea 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -105,11 +105,11 @@ static void test_fileops( void ) rewind(file); ok(fgetpos(file,&pos) == 0, "fgetpos failed unexpected\n"); - ok(pos == 0, "Unexpected result of fgetpos 0x%Lx\n", pos); - pos = (ULONGLONG)sizeof (outbuffer); + ok(pos == 0, "Unexpected result of fgetpos %x%08x\n", (DWORD)(pos >> 32), (DWORD)pos); + pos = sizeof (outbuffer); ok(fsetpos(file, &pos) == 0, "fsetpos failed unexpected\n"); ok(fgetpos(file,&pos) == 0, "fgetpos failed unexpected\n"); - ok(pos == (ULONGLONG)sizeof (outbuffer), "Unexpected result of fgetpos 0x%Lx\n", pos); + ok(pos == sizeof (outbuffer), "Unexpected result of fgetpos %x%08x\n", (DWORD)(pos >> 32), (DWORD)pos); fclose (file); fd = open ("fdopen.tst", O_RDONLY | O_TEXT); @@ -463,8 +463,7 @@ static void test_fgetwc( void ) ok(l==BUFSIZ-2, "ftell expected %d got %ld\n", BUFSIZ-2, l); fgetws(wtextW,LLEN,tempfh); l=ftell(tempfh); - ok(l==BUFSIZ-2+strlen(mytext), "ftell expected %d got %ld\n", - BUFSIZ-2+strlen(mytext), l); + ok(l==BUFSIZ-2+strlen(mytext), "ftell got %ld\n", l); mytextW = AtoW (mytext); aptr = mytextW; wptr = wtextW; @@ -1019,7 +1018,7 @@ static void test_pipes_child(int argc, char** args) for (i=0; i 0) buf[r]='\0'; ok(strcmp(buf, pipe_string) == 0, "expected to read '%s', got '%s'\n", pipe_string, buf); @@ -1092,7 +1091,7 @@ static void test_pipes(const char* selfname) for (i=0; i 0) buf[r]='\0'; ok(strcmp(buf, expected) == 0, "got '%s' expected '%s'\n", buf, expected); diff --git a/dlls/msvcrt/tests/headers.c b/dlls/msvcrt/tests/headers.c index c9e9570c254..7133e1ec05d 100644 --- a/dlls/msvcrt/tests/headers.c +++ b/dlls/msvcrt/tests/headers.c @@ -88,6 +88,7 @@ static void test_types(void) CHECK_TYPE(_off_t); CHECK_TYPE(clock_t); CHECK_TYPE(time_t); + CHECK_TYPE(__time32_t); CHECK_TYPE(__time64_t); CHECK_TYPE(fpos_t); CHECK_SIZE(FILE); diff --git a/dlls/msvcrt/tests/heap.c b/dlls/msvcrt/tests/heap.c index ae98e3b8975..e094992d6ea 100644 --- a/dlls/msvcrt/tests/heap.c +++ b/dlls/msvcrt/tests/heap.c @@ -29,7 +29,7 @@ static void * (*p_aligned_offset_malloc)(size_t,size_t,size_t) = NULL; static void * (*p_aligned_realloc)(void*,size_t,size_t) = NULL; static void * (*p_aligned_offset_realloc)(void*,size_t,size_t,size_t) = NULL; -static void test_aligned_malloc(size_t size, size_t alignment) +static void test_aligned_malloc(unsigned int size, unsigned int alignment) { void *mem; @@ -57,7 +57,7 @@ static void test_aligned_malloc(size_t size, size_t alignment) ok(errno == EINVAL, "_aligned_malloc(%d, %d) errno: %d != %d\n", size, alignment, errno, EINVAL); } -static void test_aligned_offset_malloc(size_t size, size_t alignment, size_t offset) +static void test_aligned_offset_malloc(unsigned int size, unsigned int alignment, unsigned int offset) { void *mem; @@ -88,7 +88,7 @@ static void test_aligned_offset_malloc(size_t size, size_t alignment, size_t off ok(errno == EINVAL, "_aligned_offset_malloc(%d, %d, %d) errno: %d != %d\n", size, alignment, offset, errno, EINVAL); } -static void test_aligned_realloc(size_t size1, size_t size2, size_t alignment) +static void test_aligned_realloc(unsigned int size1, unsigned int size2, unsigned int alignment) { void *mem, *mem1, *mem2; @@ -160,7 +160,8 @@ static void test_aligned_realloc(size_t size1, size_t size2, size_t alignment) ok(errno == EINVAL, "_aligned_malloc(%d, %d) errno: %d != %d\n", size1, alignment, errno, EINVAL); } -static void test_aligned_offset_realloc(size_t size1, size_t size2, size_t alignment, size_t offset) +static void test_aligned_offset_realloc(unsigned int size1, unsigned int size2, + unsigned int alignment, unsigned int offset) { void *mem, *mem1, *mem2; diff --git a/dlls/msvcrt/tests/printf.c b/dlls/msvcrt/tests/printf.c index 1603893a811..9d31f869070 100644 --- a/dlls/msvcrt/tests/printf.c +++ b/dlls/msvcrt/tests/printf.c @@ -277,20 +277,50 @@ static void test_sprintf( void ) ok(!strcmp(buffer,"1 "),"Character zero-padded and/or not left-adjusted \"%s\"\n",buffer); ok( r==4, "return count wrong\n"); - format = "%p"; - r = sprintf(buffer,format,(void *)57); - ok(!strcmp(buffer,"00000039"),"Pointer formatted incorrectly \"%s\"\n",buffer); - ok( r==8, "return count wrong\n"); - - format = "%#012p"; - r = sprintf(buffer,format,(void *)57); - ok(!strcmp(buffer," 0X00000039"),"Pointer formatted incorrectly\n"); - ok( r==12, "return count wrong\n"); - - format = "%Fp"; - r = sprintf(buffer,format,(void *)57); - ok(!strcmp(buffer,"00000039"),"Pointer formatted incorrectly \"%s\"\n",buffer); - ok( r==8, "return count wrong\n"); + if (sizeof(void *) == 8) + { + format = "%p"; + r = sprintf(buffer,format,(void *)57); + ok(!strcmp(buffer,"0000000000000039"),"Pointer formatted incorrectly \"%s\"\n",buffer); + ok( r==16, "return count wrong\n"); + + format = "%#020p"; + r = sprintf(buffer,format,(void *)57); + ok(!strcmp(buffer," 0X0000000000000039"),"Pointer formatted incorrectly\n"); + ok( r==20, "return count wrong\n"); + + format = "%Fp"; + r = sprintf(buffer,format,(void *)57); + ok(!strcmp(buffer,"0000000000000039"),"Pointer formatted incorrectly \"%s\"\n",buffer); + ok( r==16, "return count wrong\n"); + + format = "%#-020p"; + r = sprintf(buffer,format,(void *)57); + ok(!strcmp(buffer,"0X0000000000000039 "),"Pointer formatted incorrectly\n"); + ok( r==20, "return count wrong\n"); + } + else + { + format = "%p"; + r = sprintf(buffer,format,(void *)57); + ok(!strcmp(buffer,"00000039"),"Pointer formatted incorrectly \"%s\"\n",buffer); + ok( r==8, "return count wrong\n"); + + format = "%#012p"; + r = sprintf(buffer,format,(void *)57); + ok(!strcmp(buffer," 0X00000039"),"Pointer formatted incorrectly\n"); + ok( r==12, "return count wrong\n"); + + format = "%Fp"; + r = sprintf(buffer,format,(void *)57); + ok(!strcmp(buffer,"00000039"),"Pointer formatted incorrectly \"%s\"\n",buffer); + ok( r==8, "return count wrong\n"); + + format = "%#-012p"; + r = sprintf(buffer,format,(void *)57); + ok(!strcmp(buffer,"0X00000039 "),"Pointer formatted incorrectly\n"); + ok( r==12, "return count wrong\n"); + } format = "%04s"; r = sprintf(buffer,format,"foo"); @@ -312,11 +342,6 @@ static void test_sprintf( void ) ok(!strcmp(buffer,"foo "),"Negative field width ignored \"%s\"\n",buffer); ok( r==5, "return count wrong\n"); - format = "%#-012p"; - r = sprintf(buffer,format,(void *)57); - ok(!strcmp(buffer,"0X00000039 "),"Pointer formatted incorrectly\n"); - ok( r==12, "return count wrong\n"); - format = "hello"; r = sprintf(buffer, format); ok(!strcmp(buffer,"hello"), "failed\n"); @@ -455,8 +480,16 @@ static void test_sprintf( void ) format = "%p"; r = sprintf(buffer, format,0); - ok(!strcmp(buffer,"00000000"), "failed\n"); - ok( r==8, "return count wrong\n"); + if (sizeof(void *) == 8) + { + ok(!strcmp(buffer,"0000000000000000"), "failed\n"); + ok( r==16, "return count wrong\n"); + } + else + { + ok(!strcmp(buffer,"00000000"), "failed\n"); + ok( r==8, "return count wrong\n"); + } format = "%s"; r = sprintf(buffer, format,0); diff --git a/dlls/msvcrt/tests/scanf.c b/dlls/msvcrt/tests/scanf.c index cb005f99cbb..0ec89ff5193 100644 --- a/dlls/msvcrt/tests/scanf.c +++ b/dlls/msvcrt/tests/scanf.c @@ -54,7 +54,8 @@ static void test_sscanf( void ) ok( ptr == NULL,"sscanf reads %p instead of %x\n", ptr, 0 ); ok( sscanf("-46F174", "%p", &ptr) == 1, "sscanf failed\n" ); - ok( ptr == (void *)0xFFB90E8C,"sscanf reads %p instead of %x\n", ptr, 0xFFB90E8C ); + ok( ptr == (void *)(ULONG_PTR)-0x46f174,"sscanf reads %p instead of %p\n", + ptr, (void *)(ULONG_PTR)-0x46f174 ); ok( sscanf("+46F175", "%p", &ptr) == 1, "sscanf failed\n" ); ok( ptr == (void *)0x46F175,"sscanf reads %p instead of %x\n", ptr, 0x46F175 ); diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 65b8c2e8793..9506a803393 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -525,7 +525,7 @@ static void pf_fixup_exponent( char *buf ) * * implements both A and W vsnprintf functions */ -static int pf_vsnprintf( pf_output *out, const WCHAR *format, va_list valist ) +static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valist ) { int r; LPCWSTR q, p = format; @@ -678,13 +678,14 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, va_list valist ) /* output a pointer */ else if( flags.Format == 'p' ) { - char pointer[11]; + char pointer[32]; + void *ptr = va_arg( valist, void * ); flags.PadZero = 0; if( flags.Alternate ) - sprintf(pointer, "0X%08lX", va_arg(valist, long)); + sprintf(pointer, "0X%0*lX", 2 * sizeof(ptr), (ULONG_PTR)ptr); else - sprintf(pointer, "%08lX", va_arg(valist, long)); + sprintf(pointer, "%0*lX", 2 * sizeof(ptr), (ULONG_PTR)ptr); r = pf_output_format_A( out, pointer, -1, &flags ); } @@ -768,7 +769,7 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, va_list valist ) * _vsnprintf (MSVCRT.@) */ int CDECL MSVCRT_vsnprintf( char *str, unsigned int len, - const char *format, va_list valist ) + const char *format, __ms_va_list valist ) { DWORD sz; LPWSTR formatW = NULL; @@ -797,7 +798,7 @@ int CDECL MSVCRT_vsnprintf( char *str, unsigned int len, /********************************************************************* * vsprintf (MSVCRT.@) */ -int CDECL MSVCRT_vsprintf( char *str, const char *format, va_list valist) +int CDECL MSVCRT_vsprintf( char *str, const char *format, __ms_va_list valist) { return MSVCRT_vsnprintf(str, INT_MAX, format, valist); } @@ -808,10 +809,10 @@ int CDECL MSVCRT_vsprintf( char *str, const char *format, va_list valist) int CDECL MSVCRT__snprintf(char *str, unsigned int len, const char *format, ...) { int retval; - va_list valist; - va_start(valist, format); + __ms_va_list valist; + __ms_va_start(valist, format); retval = MSVCRT_vsnprintf(str, len, format, valist); - va_end(valist); + __ms_va_end(valist); return retval; } @@ -819,7 +820,7 @@ int CDECL MSVCRT__snprintf(char *str, unsigned int len, const char *format, ...) * _vsnwsprintf (MSVCRT.@) */ int CDECL MSVCRT_vsnwprintf( MSVCRT_wchar_t *str, unsigned int len, - const MSVCRT_wchar_t *format, va_list valist ) + const MSVCRT_wchar_t *format, __ms_va_list valist ) { pf_output out; @@ -837,10 +838,10 @@ int CDECL MSVCRT_vsnwprintf( MSVCRT_wchar_t *str, unsigned int len, int CDECL MSVCRT__snwprintf( MSVCRT_wchar_t *str, unsigned int len, const MSVCRT_wchar_t *format, ...) { int retval; - va_list valist; - va_start(valist, format); + __ms_va_list valist; + __ms_va_start(valist, format); retval = MSVCRT_vsnwprintf(str, len, format, valist); - va_end(valist); + __ms_va_end(valist); return retval; } @@ -849,12 +850,12 @@ int CDECL MSVCRT__snwprintf( MSVCRT_wchar_t *str, unsigned int len, const MSVCRT */ int CDECL MSVCRT_sprintf( char *str, const char *format, ... ) { - va_list ap; + __ms_va_list ap; int r; - va_start( ap, format ); + __ms_va_start( ap, format ); r = MSVCRT_vsnprintf( str, INT_MAX, format, ap ); - va_end( ap ); + __ms_va_end( ap ); return r; } @@ -863,19 +864,19 @@ int CDECL MSVCRT_sprintf( char *str, const char *format, ... ) */ int CDECL MSVCRT_swprintf( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ... ) { - va_list ap; + __ms_va_list ap; int r; - va_start( ap, format ); + __ms_va_start( ap, format ); r = MSVCRT_vsnwprintf( str, INT_MAX, format, ap ); - va_end( ap ); + __ms_va_end( ap ); return r; } /********************************************************************* * vswprintf (MSVCRT.@) */ -int CDECL MSVCRT_vswprintf( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, va_list args ) +int CDECL MSVCRT_vswprintf( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, __ms_va_list args ) { return MSVCRT_vsnwprintf( str, INT_MAX, format, args ); } @@ -883,7 +884,7 @@ int CDECL MSVCRT_vswprintf( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, v /********************************************************************* * vswprintf_s (MSVCRT.@) */ -int CDECL MSVCRT_vswprintf_s( MSVCRT_wchar_t* str, MSVCRT_size_t num, const MSVCRT_wchar_t* format, va_list args ) +int CDECL MSVCRT_vswprintf_s( MSVCRT_wchar_t* str, MSVCRT_size_t num, const MSVCRT_wchar_t* format, __ms_va_list args ) { /* FIXME: must handle positional arguments */ return MSVCRT_vsnwprintf( str, num, format, args ); diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index f1f9ad773c2..79d475f3321 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -1398,7 +1398,11 @@ static BOOL parse_assembly_elem(xmlbuf_t* xmlbuf, struct actctx_loader* acl, if (assembly->type == ASSEMBLY_MANIFEST && memcmp(&assembly->id.version, &expected_ai->version, sizeof(assembly->id.version))) { - FIXME("wrong version for assembly manifest\n"); + FIXME("wrong version for assembly manifest: %u.%u.%u.%u / %u.%u.%u.%u\n", + expected_ai->version.major, expected_ai->version.minor, + expected_ai->version.build, expected_ai->version.revision, + assembly->id.version.major, assembly->id.version.minor, + assembly->id.version.build, assembly->id.version.revision); return FALSE; } else if (assembly->type == ASSEMBLY_SHARED_MANIFEST && diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 001c0042194..a8fabe98d39 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -2302,7 +2302,7 @@ static void WINAPI read_changes_user_apc( void *arg, IO_STATUS_BLOCK *io, ULONG RtlFreeHeap( GetProcessHeap(), 0, info ); } -static NTSTATUS read_changes_apc( void *user, PIO_STATUS_BLOCK iosb, NTSTATUS status, ULONG *total ) +static NTSTATUS read_changes_apc( void *user, PIO_STATUS_BLOCK iosb, NTSTATUS status, void **apc ) { struct read_changes_info *info = user; char path[PATH_MAX]; @@ -2347,7 +2347,8 @@ static NTSTATUS read_changes_apc( void *user, PIO_STATUS_BLOCK iosb, NTSTATUS st } iosb->u.Status = ret; - iosb->Information = *total = len; + iosb->Information = len; + *apc = read_changes_user_apc; return ret; } @@ -2396,14 +2397,13 @@ NtNotifyChangeDirectoryFile( HANDLE FileHandle, HANDLE Event, SERVER_START_REQ( read_directory_changes ) { - req->handle = wine_server_obj_handle( FileHandle ); req->filter = CompletionFilter; req->want_data = (Buffer != NULL); req->subtree = WatchTree; - req->async.callback = read_changes_apc; - req->async.iosb = IoStatusBlock; - req->async.arg = info; - req->async.apc = read_changes_user_apc; + req->async.handle = wine_server_obj_handle( FileHandle ); + req->async.callback = wine_server_client_ptr( read_changes_apc ); + req->async.iosb = wine_server_client_ptr( IoStatusBlock ); + req->async.arg = wine_server_client_ptr( info ); req->async.event = wine_server_obj_handle( Event ); req->async.cvalue = cvalue; status = wine_server_call( req ); diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c index c2bf5cbf091..c1c53c37be6 100644 --- a/dlls/ntdll/exception.c +++ b/dlls/ntdll/exception.c @@ -188,15 +188,25 @@ void wait_suspend( CONTEXT *context ) static NTSTATUS send_debug_event( EXCEPTION_RECORD *rec, int first_chance, CONTEXT *context ) { int ret; + DWORD i; HANDLE handle = 0; + client_ptr_t params[EXCEPTION_MAXIMUM_PARAMETERS]; if (!NtCurrentTeb()->Peb->BeingDebugged) return 0; /* no debugger present */ + for (i = 0; i < min( rec->NumberParameters, EXCEPTION_MAXIMUM_PARAMETERS ); i++) + params[i] = rec->ExceptionInformation[i]; + SERVER_START_REQ( queue_exception_event ) { req->first = first_chance; + req->code = rec->ExceptionCode; + req->flags = rec->ExceptionFlags; + req->record = wine_server_client_ptr( rec->ExceptionRecord ); + req->address = wine_server_client_ptr( rec->ExceptionAddress ); + req->len = i * sizeof(params[0]); + wine_server_add_data( req, params, req->len ); wine_server_add_data( req, context, sizeof(*context) ); - wine_server_add_data( req, rec, sizeof(*rec) ); if (!wine_server_call( req )) handle = wine_server_ptr_handle( reply->handle ); } SERVER_END_REQ; @@ -601,5 +611,5 @@ void __wine_spec_unimplemented_stub( const char *module, const char *function ) record.NumberParameters = 2; record.ExceptionInformation[0] = (ULONG_PTR)module; record.ExceptionInformation[1] = (ULONG_PTR)function; - RtlRaiseException( &record ); + for (;;) RtlRaiseException( &record ); } diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 9d6ed673c5d..bea4e0fbc84 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -334,7 +334,7 @@ NTSTATUS FILE_GetNtStatus(void) /*********************************************************************** * FILE_AsyncReadService (INTERNAL) */ -static NTSTATUS FILE_AsyncReadService(void *user, PIO_STATUS_BLOCK iosb, NTSTATUS status, ULONG *total) +static NTSTATUS FILE_AsyncReadService(void *user, PIO_STATUS_BLOCK iosb, NTSTATUS status, void **apc) { async_fileio_read *fileio = user; int fd, needs_close, result; @@ -385,7 +385,8 @@ static NTSTATUS FILE_AsyncReadService(void *user, PIO_STATUS_BLOCK iosb, NTSTATU if (status != STATUS_PENDING) { iosb->u.Status = status; - iosb->Information = *total = fileio->already; + iosb->Information = fileio->already; + *apc = fileio_apc; } return status; } @@ -652,14 +653,13 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent, SERVER_START_REQ( register_async ) { - req->handle = wine_server_obj_handle( hFile ); req->type = ASYNC_TYPE_READ; req->count = length; - req->async.callback = FILE_AsyncReadService; - req->async.iosb = io_status; - req->async.arg = fileio; - req->async.apc = fileio_apc; + req->async.handle = wine_server_obj_handle( hFile ); req->async.event = wine_server_obj_handle( hEvent ); + req->async.callback = wine_server_client_ptr( FILE_AsyncReadService ); + req->async.iosb = wine_server_client_ptr( io_status ); + req->async.arg = wine_server_client_ptr( fileio ); req->async.cvalue = cvalue; status = wine_server_call( req ); } @@ -812,7 +812,7 @@ NTSTATUS WINAPI NtReadFileScatter( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap /*********************************************************************** * FILE_AsyncWriteService (INTERNAL) */ -static NTSTATUS FILE_AsyncWriteService(void *user, IO_STATUS_BLOCK *iosb, NTSTATUS status, ULONG *total) +static NTSTATUS FILE_AsyncWriteService(void *user, IO_STATUS_BLOCK *iosb, NTSTATUS status, void **apc) { async_fileio_write *fileio = user; int result, fd, needs_close; @@ -853,7 +853,8 @@ static NTSTATUS FILE_AsyncWriteService(void *user, IO_STATUS_BLOCK *iosb, NTSTAT if (status != STATUS_PENDING) { iosb->u.Status = status; - iosb->Information = *total = fileio->already; + iosb->Information = fileio->already; + *apc = fileio_apc; } return status; } @@ -976,14 +977,13 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent, SERVER_START_REQ( register_async ) { - req->handle = wine_server_obj_handle( hFile ); req->type = ASYNC_TYPE_WRITE; req->count = length; - req->async.callback = FILE_AsyncWriteService; - req->async.iosb = io_status; - req->async.arg = fileio; - req->async.apc = fileio_apc; + req->async.handle = wine_server_obj_handle( hFile ); req->async.event = wine_server_obj_handle( hEvent ); + req->async.callback = wine_server_client_ptr( FILE_AsyncWriteService ); + req->async.iosb = wine_server_client_ptr( io_status ); + req->async.arg = wine_server_client_ptr( fileio ); req->async.cvalue = cvalue; status = wine_server_call( req ); } @@ -1139,14 +1139,23 @@ NTSTATUS WINAPI NtWriteFileGather( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap struct async_ioctl { HANDLE handle; /* handle to the device */ + HANDLE event; /* async event */ void *buffer; /* buffer for output */ ULONG size; /* size of buffer */ PIO_APC_ROUTINE apc; /* user apc params */ void *apc_arg; }; +/* callback for ioctl user APC */ +static void WINAPI ioctl_apc( void *arg, IO_STATUS_BLOCK *io, ULONG reserved ) +{ + struct async_ioctl *async = arg; + if (async->apc) async->apc( async->apc_arg, io, reserved ); + RtlFreeHeap( GetProcessHeap(), 0, async ); +} + /* callback for ioctl async I/O completion */ -static NTSTATUS ioctl_completion( void *arg, IO_STATUS_BLOCK *io, NTSTATUS status, ULONG *total ) +static NTSTATUS ioctl_completion( void *arg, IO_STATUS_BLOCK *io, NTSTATUS status, void **apc ) { struct async_ioctl *async = arg; @@ -1155,25 +1164,21 @@ static NTSTATUS ioctl_completion( void *arg, IO_STATUS_BLOCK *io, NTSTATUS statu SERVER_START_REQ( get_ioctl_result ) { req->handle = wine_server_obj_handle( async->handle ); - req->user_arg = async; + req->user_arg = wine_server_client_ptr( async ); wine_server_set_reply( req, async->buffer, async->size ); if (!(status = wine_server_call( req ))) - io->Information = *total = wine_server_reply_size( reply ); + io->Information = wine_server_reply_size( reply ); } SERVER_END_REQ; } - if (status != STATUS_PENDING) io->u.Status = status; + if (status != STATUS_PENDING) + { + io->u.Status = status; + if (async->apc || async->event) *apc = ioctl_apc; + } return status; } -/* callback for ioctl user APC */ -static void WINAPI ioctl_apc( void *arg, IO_STATUS_BLOCK *io, ULONG reserved ) -{ - struct async_ioctl *async = arg; - if (async->apc) async->apc( async->apc_arg, io, reserved ); - RtlFreeHeap( GetProcessHeap(), 0, async ); -} - /* do a ioctl call through the server */ static NTSTATUS server_ioctl_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, PVOID apc_context, @@ -1190,6 +1195,7 @@ static NTSTATUS server_ioctl_file( HANDLE handle, HANDLE event, if (!(async = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(*async) ))) return STATUS_NO_MEMORY; async->handle = handle; + async->event = event; async->buffer = out_buffer; async->size = out_size; async->apc = apc; @@ -1197,12 +1203,12 @@ static NTSTATUS server_ioctl_file( HANDLE handle, HANDLE event, SERVER_START_REQ( ioctl ) { - req->handle = wine_server_obj_handle( handle ); req->code = code; - req->async.callback = ioctl_completion; - req->async.iosb = io; - req->async.arg = async; - req->async.apc = (apc || event) ? ioctl_apc : NULL; + req->blocking = !apc && !event; + req->async.handle = wine_server_obj_handle( handle ); + req->async.callback = wine_server_client_ptr( ioctl_completion ); + req->async.iosb = wine_server_client_ptr( io ); + req->async.arg = wine_server_client_ptr( async ); req->async.event = wine_server_obj_handle( event ); req->async.cvalue = cvalue; wine_server_add_data( req, in_buffer, in_size ); @@ -2006,7 +2012,7 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC } -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__APPLE__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) /* helper for FILE_GetDeviceInfo to hide some platform differences in fstatfs */ static inline void get_device_info_fstatfs( FILE_FS_DEVICE_INFORMATION *info, const char *fstypename, unsigned int flags ) @@ -2127,7 +2133,7 @@ static NTSTATUS get_device_info( int fd, FILE_FS_DEVICE_INFORMATION *info ) info->DeviceType = FILE_DEVICE_DISK_FILE_SYSTEM; break; } -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__APPLE__) struct statfs stfs; if (fstatfs( fd, &stfs ) < 0) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 968d7fd68a7..560a932c1d1 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -1447,11 +1447,11 @@ static void load_builtin_callback( void *module, const char *filename ) SERVER_START_REQ( load_dll ) { req->handle = 0; - req->base = module; + req->base = wine_server_client_ptr( module ); req->size = nt->OptionalHeader.SizeOfImage; req->dbg_offset = nt->FileHeader.PointerToSymbolTable; req->dbg_size = nt->FileHeader.NumberOfSymbols; - req->name = &wm->ldr.FullDllName.Buffer; + req->name = wine_server_client_ptr( &wm->ldr.FullDllName.Buffer ); wine_server_add_data( req, wm->ldr.FullDllName.Buffer, wm->ldr.FullDllName.Length ); wine_server_call( req ); } @@ -1529,11 +1529,11 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file, SERVER_START_REQ( load_dll ) { req->handle = wine_server_obj_handle( file ); - req->base = module; + req->base = wine_server_client_ptr( module ); req->size = nt->OptionalHeader.SizeOfImage; req->dbg_offset = nt->FileHeader.PointerToSymbolTable; req->dbg_size = nt->FileHeader.NumberOfSymbols; - req->name = &wm->ldr.FullDllName.Buffer; + req->name = wine_server_client_ptr( &wm->ldr.FullDllName.Buffer ); wine_server_add_data( req, wm->ldr.FullDllName.Buffer, wm->ldr.FullDllName.Length ); wine_server_call( req ); } @@ -2101,7 +2101,7 @@ NTSTATUS WINAPI LdrAddRefDll( ULONG flags, HMODULE module ) * Apply relocations to a given page of a mapped PE image. */ IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock( void *page, UINT count, - USHORT *relocs, INT delta ) + USHORT *relocs, INT_PTR delta ) { while (count--) { @@ -2111,6 +2111,7 @@ IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock( void *page, UINT count { case IMAGE_REL_BASED_ABSOLUTE: break; +#ifdef __i386__ case IMAGE_REL_BASED_HIGH: *(short *)((char *)page + offset) += HIWORD(delta); break; @@ -2120,6 +2121,11 @@ IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock( void *page, UINT count case IMAGE_REL_BASED_HIGHLOW: *(int *)((char *)page + offset) += delta; break; +#elif defined(__x86_64__) + case IMAGE_REL_BASED_DIR64: + *(INT_PTR *)((char *)page + offset) += delta; + break; +#endif default: FIXME("Unknown/unsupported fixup type %x.\n", type); return NULL; @@ -2258,7 +2264,7 @@ static void free_modref( WINE_MODREF *wm ) SERVER_START_REQ( unload_dll ) { - req->base = wm->ldr.BaseAddress; + req->base = wine_server_client_ptr( wm->ldr.BaseAddress ); wine_server_call( req ); } SERVER_END_REQ; diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index c593f45e199..879a3242884 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -824,15 +824,15 @@ NTSTATUS WINAPI NtQuerySystemInformation( memset(spi, 0, sizeof(*spi)); - spi->dwOffset = procstructlen - wlen; + spi->NextEntryOffset = procstructlen - wlen; spi->dwThreadCount = reply->threads; /* spi->pszProcessName will be set later on */ spi->dwBasePriority = reply->priority; - spi->dwProcessID = (DWORD)reply->pid; - spi->dwParentProcessID = (DWORD)reply->ppid; - spi->dwHandleCount = reply->handles; + spi->UniqueProcessId = UlongToHandle(reply->pid); + spi->ParentProcessId = UlongToHandle(reply->ppid); + spi->HandleCount = reply->handles; /* spi->ti will be set later on */ @@ -863,7 +863,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( if (!(ret = wine_server_call( req ))) { j++; - if (reply->pid == spi->dwProcessID) + if (UlongToHandle(reply->pid) == spi->UniqueProcessId) { /* ftKernelTime, ftUserTime, ftCreateTime; * dwTickCount, dwStartAddress @@ -871,8 +871,9 @@ NTSTATUS WINAPI NtQuerySystemInformation( memset(&spi->ti[i], 0, sizeof(spi->ti)); - spi->ti[i].dwOwningPID = reply->pid; - spi->ti[i].dwThreadID = reply->tid; + spi->ti[i].CreateTime.QuadPart = 0xdeadbeef; + spi->ti[i].ClientId.UniqueProcess = UlongToHandle(reply->pid); + spi->ti[i].ClientId.UniqueThread = UlongToHandle(reply->tid); spi->ti[i].dwCurrentPriority = reply->base_pri + reply->delta_pri; spi->ti[i].dwBasePriority = reply->base_pri; i++; @@ -884,17 +885,17 @@ NTSTATUS WINAPI NtQuerySystemInformation( if (ret == STATUS_NO_MORE_FILES) ret = STATUS_SUCCESS; /* now append process name */ - spi->ProcessName.Buffer = (WCHAR*)((char*)spi + spi->dwOffset); + spi->ProcessName.Buffer = (WCHAR*)((char*)spi + spi->NextEntryOffset); spi->ProcessName.Length = wlen - sizeof(WCHAR); spi->ProcessName.MaximumLength = wlen; memcpy( spi->ProcessName.Buffer, exename, wlen ); - spi->dwOffset += wlen; + spi->NextEntryOffset += wlen; last = spi; - spi = (SYSTEM_PROCESS_INFORMATION*)((char*)spi + spi->dwOffset); + spi = (SYSTEM_PROCESS_INFORMATION*)((char*)spi + spi->NextEntryOffset); } } - if (ret == STATUS_SUCCESS && last) last->dwOffset = 0; + if (ret == STATUS_SUCCESS && last) last->NextEntryOffset = 0; if (hSnap) NtClose(hSnap); } break; diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 1e41e4d9bc0..1eb53d7d36e 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -1370,7 +1370,6 @@ # or 'wine_' (for user-visible functions) to avoid namespace conflicts. # Relays -@ cdecl -norelay -i386 __wine_call_from_32_regs() @ cdecl -i386 __wine_enter_vm86(ptr) # Server interface diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 4474f2f9d01..ced68d9bd51 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -146,6 +146,10 @@ extern void VIRTUAL_SetForceExec( BOOL enable ); extern void VIRTUAL_UseLargeAddressSpace(void); extern struct _KUSER_SHARED_DATA *user_shared_data; +/* completion */ +extern NTSTATUS NTDLL_AddCompletion( HANDLE hFile, ULONG_PTR CompletionValue, + NTSTATUS CompletionStatus, ULONG Information ); + /* code pages */ extern int ntdll_umbstowcs(DWORD flags, const char* src, int srclen, WCHAR* dst, int dstlen); extern int ntdll_wcstoumbs(DWORD flags, const WCHAR* src, int srclen, char* dst, int dstlen, @@ -210,8 +214,16 @@ static inline struct ntdll_thread_regs *ntdll_get_thread_regs(void) return (struct ntdll_thread_regs *)NtCurrentTeb()->SpareBytes1; } -/* Completion */ -extern NTSTATUS NTDLL_AddCompletion( HANDLE hFile, ULONG_PTR CompletionValue, - NTSTATUS CompletionStatus, ULONG Information ); +/* Register functions */ + +#ifdef __i386__ +#define DEFINE_REGS_ENTRYPOINT( name, args, pop_args ) \ + __ASM_GLOBAL_FUNC( name, \ + "pushl %eax\n\t" \ + "call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \ + ".long " __ASM_NAME("__regs_") #name "-.\n\t" \ + ".byte " #args "," #pop_args ) +/* FIXME: add support for other CPUs */ +#endif #endif diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c index 6ba1433f43b..153ac8ae022 100644 --- a/dlls/ntdll/process.c +++ b/dlls/ntdll/process.c @@ -162,7 +162,7 @@ NTSTATUS WINAPI NtQueryInformationProcess( if ((ret = wine_server_call( req )) == STATUS_SUCCESS) { pbi.ExitStatus = reply->exit_code; - pbi.PebBaseAddress = reply->peb; + pbi.PebBaseAddress = wine_server_get_ptr( reply->peb ); pbi.AffinityMask = reply->affinity & affinity_mask; pbi.BasePriority = reply->priority; pbi.UniqueProcessId = reply->pid; @@ -212,7 +212,8 @@ NTSTATUS WINAPI NtQueryInformationProcess( { VM_COUNTERS pvmi; - if (ProcessInformationLength >= sizeof(VM_COUNTERS)) + /* older Windows versions don't have the PrivatePageCount field */ + if (ProcessInformationLength >= FIELD_OFFSET(VM_COUNTERS,PrivatePageCount)) { if (!ProcessInformation) ret = STATUS_ACCESS_VIOLATION; @@ -223,12 +224,14 @@ NTSTATUS WINAPI NtQueryInformationProcess( /* FIXME : real data */ memset(&pvmi, 0 , sizeof(VM_COUNTERS)); - memcpy(ProcessInformation, &pvmi, sizeof(VM_COUNTERS)); + len = ProcessInformationLength; + if (len != FIELD_OFFSET(VM_COUNTERS,PrivatePageCount)) len = sizeof(VM_COUNTERS); - len = sizeof(VM_COUNTERS); + memcpy(ProcessInformation, &pvmi, min(ProcessInformationLength,sizeof(VM_COUNTERS))); } - if (ProcessInformationLength > sizeof(VM_COUNTERS)) + if (ProcessInformationLength != FIELD_OFFSET(VM_COUNTERS,PrivatePageCount) && + ProcessInformationLength != sizeof(VM_COUNTERS)) ret = STATUS_INFO_LENGTH_MISMATCH; } else ret = STATUS_INFO_LENGTH_MISMATCH; @@ -315,7 +318,7 @@ NTSTATUS WINAPI NtQueryInformationProcess( UNICODE_STRING *image_file_name_str = ProcessInformation; req->handle = wine_server_obj_handle( ProcessHandle ); - req->base_address = NULL; /* main module */ + req->base_address = 0; /* main module */ wine_server_set_reply( req, image_file_name_str ? image_file_name_str + 1 : NULL, ProcessInformationLength > sizeof(UNICODE_STRING) ? ProcessInformationLength - sizeof(UNICODE_STRING) : 0 ); ret = wine_server_call( req ); diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c index a3031f28e3c..6dec576f444 100644 --- a/dlls/ntdll/relay.c +++ b/dlls/ntdll/relay.c @@ -38,16 +38,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(relay); -#ifdef __i386__ - -WINE_DECLARE_DEBUG_CHANNEL(snoop); -WINE_DECLARE_DEBUG_CHANNEL(seh); +#if defined(__i386__) || defined(__x86_64__) struct relay_descr /* descriptor for a module */ { void *magic; /* signature */ - void *relay_from_32; /* functions to call from relay thunks */ - void *relay_from_32_regs; + void *relay_call; /* functions to call from relay thunks */ + void *relay_call_regs; void *private; /* reserved for the relay code private data */ const char *entry_point_base; /* base address of entry point thunks */ const unsigned int *entry_point_offsets; /* offsets of entry points thunks */ @@ -302,25 +299,26 @@ static BOOL check_from_module( const WCHAR **includelist, const WCHAR **excludel /*********************************************************************** * RELAY_PrintArgs */ -static inline void RELAY_PrintArgs( const int *args, int nb_args, unsigned int typemask ) +static inline void RELAY_PrintArgs( const INT_PTR *args, int nb_args, unsigned int typemask ) { while (nb_args--) { if ((typemask & 3) && HIWORD(*args)) { if (typemask & 2) - DPRINTF( "%08x %s", *args, debugstr_w((LPCWSTR)*args) ); + DPRINTF( "%08lx %s", *args, debugstr_w((LPCWSTR)*args) ); else - DPRINTF( "%08x %s", *args, debugstr_a((LPCSTR)*args) ); + DPRINTF( "%08lx %s", *args, debugstr_a((LPCSTR)*args) ); } - else DPRINTF( "%08x", *args ); + else DPRINTF( "%08lx", *args ); if (nb_args) DPRINTF( "," ); args++; typemask >>= 2; } } -extern LONGLONG call_entry_point( void *func, int nb_args, const int *args ); +extern LONGLONG CDECL call_entry_point( void *func, int nb_args, const INT_PTR *args ); +#ifdef __i386__ __ASM_GLOBAL_FUNC( call_entry_point, "\tpushl %ebp\n" "\tmovl %esp,%ebp\n" @@ -342,14 +340,41 @@ __ASM_GLOBAL_FUNC( call_entry_point, "\tpopl %esi\n" "\tpopl %ebp\n" "\tret" ) +#else +__ASM_GLOBAL_FUNC( call_entry_point, + "\tpushq %rbp\n" + "\tmovq %rsp,%rbp\n" + "\tpushq %rsi\n" + "\tpushq %rdi\n" + "\tmovq %rcx,%rax\n" + "\tmovq $4,%rcx\n" + "\tcmp %rcx,%rdx\n" + "\tcmovgq %rdx,%rcx\n" + "\tleaq 0(,%rcx,8),%rdx\n" + "\tsubq %rdx,%rsp\n" + "\tandq $~15,%rsp\n" + "\tmovq %rsp,%rdi\n" + "\tmovq %r8,%rsi\n" + "\trep; movsq\n" + "\tmovq 0(%rsp),%rcx\n" + "\tmovq 8(%rsp),%rdx\n" + "\tmovq 16(%rsp),%r8\n" + "\tmovq 24(%rsp),%r9\n" + "\tcallq *%rax\n" + "\tleaq -16(%rbp),%rsp\n" + "\tpopq %rdi\n" + "\tpopq %rsi\n" + "\tpopq %rbp\n" + "\tret\n" ) +#endif /*********************************************************************** - * relay_call_from_32 + * relay_call * * stack points to the return address, i.e. the first argument is stack[1]. */ -static LONGLONG WINAPI relay_call_from_32( struct relay_descr *descr, unsigned int idx, const int *stack ) +static LONGLONG WINAPI relay_call( struct relay_descr *descr, unsigned int idx, const INT_PTR *stack ) { LONGLONG ret; WORD ordinal = LOWORD(idx); @@ -367,7 +392,7 @@ static LONGLONG WINAPI relay_call_from_32( struct relay_descr *descr, unsigned i else DPRINTF( "%04x:Call %s.%u(", GetCurrentThreadId(), data->dllname, data->base + ordinal ); RELAY_PrintArgs( stack + 1, nb_args, descr->arg_types[ordinal] ); - DPRINTF( ") ret=%08x\n", stack[0] ); + DPRINTF( ") ret=%08lx\n", stack[0] ); ret = call_entry_point( entry_point->orig_func, nb_args, stack + 1 ); @@ -377,21 +402,22 @@ static LONGLONG WINAPI relay_call_from_32( struct relay_descr *descr, unsigned i DPRINTF( "%04x:Ret %s.%u()", GetCurrentThreadId(), data->dllname, data->base + ordinal ); if (flags & 1) /* 64-bit return value */ - DPRINTF( " retval=%08x%08x ret=%08x\n", + DPRINTF( " retval=%08x%08x ret=%08lx\n", (UINT)(ret >> 32), (UINT)ret, stack[0] ); else - DPRINTF( " retval=%08x ret=%08x\n", (UINT)ret, stack[0] ); + DPRINTF( " retval=%08lx ret=%08lx\n", (UINT_PTR)ret, stack[0] ); } return ret; } /*********************************************************************** - * relay_call_from_32_regs + * relay_call_regs */ -void WINAPI __regs_relay_call_from_32_regs( struct relay_descr *descr, unsigned int idx, - unsigned int orig_eax, unsigned int ret_addr, - CONTEXT86 *context ) +#ifdef __i386__ +void WINAPI __regs_relay_call_regs( struct relay_descr *descr, unsigned int idx, + unsigned int orig_eax, unsigned int ret_addr, + CONTEXT86 *context ) { WORD ordinal = LOWORD(idx); BYTE nb_args = LOBYTE(HIWORD(idx)); @@ -399,8 +425,8 @@ void WINAPI __regs_relay_call_from_32_regs( struct relay_descr *descr, unsigned struct relay_private_data *data = descr->private; struct relay_entry_point *entry_point = data->entry_points + ordinal; BYTE *orig_func = entry_point->orig_func; - int *args = (int *)context->Esp; - int args_copy[32]; + INT_PTR *args = (INT_PTR *)context->Esp; + INT_PTR args_copy[32]; /* restore the context to what it was before the relay thunk */ context->Eax = orig_eax; @@ -452,8 +478,9 @@ void WINAPI __regs_relay_call_from_32_regs( struct relay_descr *descr, unsigned context->SegDs, context->SegEs, context->SegFs, context->SegGs, context->EFlags ); } } -extern void WINAPI relay_call_from_32_regs(void); -DEFINE_REGS_ENTRYPOINT( relay_call_from_32_regs, 16, 16 ) +extern void WINAPI relay_call_regs(void); +DEFINE_REGS_ENTRYPOINT( relay_call_regs, 16, 16 ) +#endif /*********************************************************************** @@ -502,8 +529,10 @@ void RELAY_SetupDLL( HMODULE module ) (exports->NumberOfFunctions-1) * sizeof(data->entry_points) ))) return; - descr->relay_from_32 = relay_call_from_32; - descr->relay_from_32_regs = relay_call_from_32_regs; + descr->relay_call = relay_call; +#ifdef __i386__ + descr->relay_call_regs = relay_call_regs; +#endif descr->private = data; data->module = module; @@ -538,12 +567,30 @@ void RELAY_SetupDLL( HMODULE module ) } } +#else /* __i386__ || __x86_64__ */ + +FARPROC RELAY_GetProcAddress( HMODULE module, const IMAGE_EXPORT_DIRECTORY *exports, + DWORD exp_size, FARPROC proc, DWORD ordinal, const WCHAR *user ) +{ + return proc; +} + +void RELAY_SetupDLL( HMODULE module ) +{ +} + +#endif /* __i386__ || __x86_64__ */ /***********************************************************************/ /* snoop support */ /***********************************************************************/ +#ifdef __i386__ + +WINE_DECLARE_DEBUG_CHANNEL(seh); +WINE_DECLARE_DEBUG_CHANNEL(snoop); + #include "pshpack1.h" typedef struct @@ -931,22 +978,12 @@ DEFINE_REGS_ENTRYPOINT( SNOOP_Return, 0, 0 ) #else /* __i386__ */ -FARPROC RELAY_GetProcAddress( HMODULE module, const IMAGE_EXPORT_DIRECTORY *exports, - DWORD exp_size, FARPROC proc, DWORD ordinal, const WCHAR *user ) -{ - return proc; -} - FARPROC SNOOP_GetProcAddress( HMODULE hmod, const IMAGE_EXPORT_DIRECTORY *exports, DWORD exp_size, FARPROC origfun, DWORD ordinal, const WCHAR *user ) { return origfun; } -void RELAY_SetupDLL( HMODULE module ) -{ -} - void SNOOP_SetupDLL( HMODULE hmod ) { FIXME("snooping works only on i386 for now.\n"); diff --git a/dlls/ntdll/resource.c b/dlls/ntdll/resource.c index 4a8b260e233..5f3e845f673 100644 --- a/dlls/ntdll/resource.c +++ b/dlls/ntdll/resource.c @@ -438,7 +438,7 @@ NTSTATUS WINAPI RtlFindMessage( HMODULE hmod, ULONG type, ULONG lang, */ NTSTATUS WINAPI RtlFormatMessage( LPWSTR Message, UCHAR MaxWidth, BOOLEAN IgnoreInserts, BOOLEAN Ansi, - BOOLEAN ArgumentIsArray, va_list * Arguments, + BOOLEAN ArgumentIsArray, __ms_va_list * Arguments, LPWSTR Buffer, ULONG BufferSize ) { FIXME("(%s, %u, %s, %s, %s, %p, %p, %d)\n", debugstr_w(Message), diff --git a/dlls/ntdll/rtlbitmap.c b/dlls/ntdll/rtlbitmap.c index 3656d24f1c4..ef033b22848 100644 --- a/dlls/ntdll/rtlbitmap.c +++ b/dlls/ntdll/rtlbitmap.c @@ -170,7 +170,8 @@ VOID WINAPI RtlSetBits(PRTL_BITMAP lpBits, ULONG ulStart, ULONG ulCount) } /* Set remaining bits, if any */ - *lpOut |= NTDLL_maskBits[ulCount & 0x7]; + if (ulCount & 0x7) + *lpOut |= NTDLL_maskBits[ulCount & 0x7]; } /************************************************************************* diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c index a3a7148db7f..a764e2155b4 100644 --- a/dlls/ntdll/sec.c +++ b/dlls/ntdll/sec.c @@ -618,7 +618,12 @@ NTSTATUS WINAPI RtlGetDaclSecurityDescriptor( *pDacl = lpsd->Dacl; *lpbDaclDefaulted = (( SE_DACL_DEFAULTED & lpsd->Control ) ? 1 : 0); - } + } + else + { + *pDacl = NULL; + *lpbDaclDefaulted = 0; + } return STATUS_SUCCESS; } diff --git a/dlls/ntdll/serial.c b/dlls/ntdll/serial.c index e174c12c1d7..40262a42640 100644 --- a/dlls/ntdll/serial.c +++ b/dlls/ntdll/serial.c @@ -74,6 +74,9 @@ #include "wine/debug.h" #ifdef HAVE_LINUX_SERIAL_H +#ifdef HAVE_ASM_TYPES_H +#include +#endif #include #endif @@ -87,7 +90,7 @@ static const char* iocode2str(DWORD ioc) { switch (ioc) { -#define X(x) case (x): return #x; +#define X(x) case (x): return #x X(IOCTL_SERIAL_CLEAR_STATS); X(IOCTL_SERIAL_CLR_DTR); X(IOCTL_SERIAL_CLR_RTS); diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index fd154ff8f2c..145540f14da 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -934,7 +934,7 @@ static void send_server_task_port(void) */ void server_init_process(void) { - obj_handle_t dummy_handle; + obj_handle_t version; const char *env_socket = getenv( "WINESERVERSOCKET" ); if (env_socket) @@ -958,8 +958,15 @@ void server_init_process(void) pthread_functions.sigprocmask( SIG_BLOCK, &server_block_set, NULL ); /* receive the first thread request fd on the main socket */ - ntdll_get_thread_data()->request_fd = receive_fd( &dummy_handle ); + ntdll_get_thread_data()->request_fd = receive_fd( &version ); + if (version != SERVER_PROTOCOL_VERSION) + server_protocol_error( "version mismatch %d/%d.\n" + "Your %s binary was not upgraded correctly,\n" + "or you have an older one somewhere in your PATH.\n" + "Or maybe the wrong wineserver is still running?\n", + version, SERVER_PROTOCOL_VERSION, + (version > SERVER_PROTOCOL_VERSION) ? "wine" : "wineserver" ); #ifdef __APPLE__ send_server_task_port(); #endif @@ -986,9 +993,12 @@ NTSTATUS server_init_process_done(void) /* Signal the parent process to continue */ SERVER_START_REQ( init_process_done ) { - req->module = peb->ImageBaseAddress; - req->entry = (char *)peb->ImageBaseAddress + nt->OptionalHeader.AddressOfEntryPoint; - req->gui = (nt->OptionalHeader.Subsystem != IMAGE_SUBSYSTEM_WINDOWS_CUI); + req->module = wine_server_client_ptr( peb->ImageBaseAddress ); +#ifdef __i386__ + req->ldt_copy = wine_server_client_ptr( &wine_ldt_copy ); +#endif + req->entry = wine_server_client_ptr( (char *)peb->ImageBaseAddress + nt->OptionalHeader.AddressOfEntryPoint ); + req->gui = (nt->OptionalHeader.Subsystem != IMAGE_SUBSYSTEM_WINDOWS_CUI); status = wine_server_call( req ); } SERVER_END_REQ; @@ -1004,7 +1014,7 @@ NTSTATUS server_init_process_done(void) */ size_t server_init_thread( int unix_pid, int unix_tid, void *entry_point ) { - int version, ret; + int ret; int reply_pipe[2]; struct sigaction sig_act; size_t info_size; @@ -1038,10 +1048,9 @@ size_t server_init_thread( int unix_pid, int unix_tid, void *entry_point ) { req->unix_pid = unix_pid; req->unix_tid = unix_tid; - req->teb = NtCurrentTeb(); - req->peb = NtCurrentTeb()->Peb; - req->entry = entry_point; - req->ldt_copy = &wine_ldt_copy; + req->teb = wine_server_client_ptr( NtCurrentTeb() ); + req->peb = wine_server_client_ptr( NtCurrentTeb()->Peb ); + req->entry = wine_server_client_ptr( entry_point ); req->reply_fd = reply_pipe[1]; req->wait_fd = ntdll_get_thread_data()->wait_fd[1]; req->debug_level = (TRACE_ON(server) != 0); @@ -1049,18 +1058,10 @@ size_t server_init_thread( int unix_pid, int unix_tid, void *entry_point ) NtCurrentTeb()->ClientId.UniqueProcess = ULongToHandle(reply->pid); NtCurrentTeb()->ClientId.UniqueThread = ULongToHandle(reply->tid); info_size = reply->info_size; - version = reply->version; server_start_time = reply->server_start; } SERVER_END_REQ; if (ret) server_protocol_error( "init_thread failed with status %x\n", ret ); - if (version != SERVER_PROTOCOL_VERSION) - server_protocol_error( "version mismatch %d/%d.\n" - "Your %s binary was not upgraded correctly,\n" - "or you have an older one somewhere in your PATH.\n" - "Or maybe the wrong wineserver is still running?\n", - version, SERVER_PROTOCOL_VERSION, - (version > SERVER_PROTOCOL_VERSION) ? "wine" : "wineserver" ); return info_size; } diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index bd1e52b4470..47788e6331f 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -1179,7 +1179,7 @@ static inline CONTEXT *get_exception_context( EXCEPTION_RECORD *rec ) */ static inline DWORD get_fpu_code( const CONTEXT *context ) { - DWORD status = context->FloatSave.StatusWord; + DWORD status = context->FloatSave.StatusWord & ~(context->FloatSave.ControlWord & 0x3f); if (status & 0x01) /* IE */ { @@ -1452,6 +1452,7 @@ static void fpe_handler( int signal, siginfo_t *siginfo, void *sigcontext ) case TRAP_x86_ARITHTRAP: /* Floating point exception */ case TRAP_x86_UNKNOWN: /* Unknown fault code */ rec->ExceptionCode = get_fpu_code( win_context ); + rec->ExceptionAddress = (LPVOID)win_context->FloatSave.ErrorOffset; break; case TRAP_x86_CACHEFLT: /* SIMD exception */ /* TODO: diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index 002bf428f4b..d42eb643cc8 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -671,8 +671,8 @@ NTSTATUS WINAPI NtSetTimer(IN HANDLE handle, req->handle = wine_server_obj_handle( handle ); req->period = period; req->expire = when->QuadPart; - req->callback = callback; - req->arg = callback_arg; + req->callback = wine_server_client_ptr( callback ); + req->arg = wine_server_client_ptr( callback_arg ); status = wine_server_call( req ); if (state) *state = reply->signaled; } @@ -812,7 +812,7 @@ static int wait_reply( void *cookie ) if (ret == sizeof(reply)) { if (!reply.cookie) break; /* thread got killed */ - if (reply.cookie == cookie) return reply.signaled; + if (wine_server_get_ptr(reply.cookie) == cookie) return reply.signaled; /* we stole another reply, wait for the real one */ signaled = wait_reply( cookie ); /* and now put the wrong one back in the pipe */ @@ -844,6 +844,7 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result ) { BOOL user_apc = FALSE; SIZE_T size; + void *addr; memset( result, 0, sizeof(*result) ); @@ -852,45 +853,59 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result ) case APC_NONE: break; case APC_USER: - call->user.func( call->user.args[0], call->user.args[1], call->user.args[2] ); + { + void (WINAPI *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR) = wine_server_get_ptr( call->user.func ); + func( call->user.args[0], call->user.args[1], call->user.args[2] ); user_apc = TRUE; break; + } case APC_TIMER: - call->timer.func( call->timer.arg, (DWORD)call->timer.time, (DWORD)(call->timer.time >> 32) ); + { + void (WINAPI *func)(void*, unsigned int, unsigned int) = wine_server_get_ptr( call->timer.func ); + func( wine_server_get_ptr( call->timer.arg ), + (DWORD)call->timer.time, (DWORD)(call->timer.time >> 32) ); user_apc = TRUE; break; + } case APC_ASYNC_IO: + { + void *apc = NULL; + IO_STATUS_BLOCK *iosb = wine_server_get_ptr( call->async_io.sb ); + NTSTATUS (*func)(void *, IO_STATUS_BLOCK *, NTSTATUS, void **) = wine_server_get_ptr( call->async_io.func ); result->type = call->type; - result->async_io.status = call->async_io.func( call->async_io.user, - call->async_io.sb, - call->async_io.status, - &result->async_io.total ); + result->async_io.status = func( wine_server_get_ptr( call->async_io.user ), + iosb, call->async_io.status, &apc ); + if (result->async_io.status != STATUS_PENDING) + { + result->async_io.total = iosb->Information; + result->async_io.apc = wine_server_client_ptr( apc ); + } break; + } case APC_VIRTUAL_ALLOC: result->type = call->type; - result->virtual_alloc.addr = call->virtual_alloc.addr; + addr = wine_server_get_ptr( call->virtual_alloc.addr ); size = call->virtual_alloc.size; - if (size == call->virtual_alloc.size) /* not truncated */ + if ((ULONG_PTR)addr == call->virtual_alloc.addr && size == call->virtual_alloc.size) { - result->virtual_alloc.status = NtAllocateVirtualMemory( NtCurrentProcess(), - &result->virtual_alloc.addr, - call->virtual_alloc.zero_bits, - &size, + result->virtual_alloc.status = NtAllocateVirtualMemory( NtCurrentProcess(), &addr, + call->virtual_alloc.zero_bits, &size, call->virtual_alloc.op_type, call->virtual_alloc.prot ); + result->virtual_alloc.addr = wine_server_client_ptr( addr ); result->virtual_alloc.size = size; } else result->virtual_alloc.status = STATUS_WORKING_SET_LIMIT_RANGE; break; case APC_VIRTUAL_FREE: result->type = call->type; - result->virtual_free.addr = call->virtual_free.addr; + addr = wine_server_get_ptr( call->virtual_free.addr ); size = call->virtual_free.size; - if (size == call->virtual_free.size) /* not truncated */ + if ((ULONG_PTR)addr == call->virtual_free.addr && size == call->virtual_free.size) { - result->virtual_free.status = NtFreeVirtualMemory( NtCurrentProcess(), - &result->virtual_free.addr, &size, + result->virtual_free.status = NtFreeVirtualMemory( NtCurrentProcess(), &addr, &size, call->virtual_free.op_type ); + result->virtual_free.addr = wine_server_client_ptr( addr ); result->virtual_free.size = size; } else result->virtual_free.status = STATUS_INVALID_PARAMETER; @@ -899,96 +914,103 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result ) { MEMORY_BASIC_INFORMATION info; result->type = call->type; - result->virtual_query.status = NtQueryVirtualMemory( NtCurrentProcess(), - call->virtual_query.addr, - MemoryBasicInformation, &info, - sizeof(info), NULL ); + addr = wine_server_get_ptr( call->virtual_query.addr ); + if ((ULONG_PTR)addr == call->virtual_query.addr) + result->virtual_query.status = NtQueryVirtualMemory( NtCurrentProcess(), + addr, MemoryBasicInformation, &info, + sizeof(info), NULL ); + else + result->virtual_query.status = STATUS_WORKING_SET_LIMIT_RANGE; + if (result->virtual_query.status == STATUS_SUCCESS) { - result->virtual_query.base = info.BaseAddress; - result->virtual_query.alloc_base = info.AllocationBase; + result->virtual_query.base = wine_server_client_ptr( info.BaseAddress ); + result->virtual_query.alloc_base = wine_server_client_ptr( info.AllocationBase ); result->virtual_query.size = info.RegionSize; - result->virtual_query.state = info.State; result->virtual_query.prot = info.Protect; result->virtual_query.alloc_prot = info.AllocationProtect; - result->virtual_query.alloc_type = info.Type; + result->virtual_query.state = info.State >> 12; + result->virtual_query.alloc_type = info.Type >> 16; } break; } case APC_VIRTUAL_PROTECT: result->type = call->type; - result->virtual_protect.addr = call->virtual_protect.addr; + addr = wine_server_get_ptr( call->virtual_protect.addr ); size = call->virtual_protect.size; - if (size == call->virtual_protect.size) /* not truncated */ + if ((ULONG_PTR)addr == call->virtual_protect.addr && size == call->virtual_protect.size) { - result->virtual_protect.status = NtProtectVirtualMemory( NtCurrentProcess(), - &result->virtual_protect.addr, - &size, + result->virtual_protect.status = NtProtectVirtualMemory( NtCurrentProcess(), &addr, &size, call->virtual_protect.prot, &result->virtual_protect.prot ); + result->virtual_protect.addr = wine_server_client_ptr( addr ); result->virtual_protect.size = size; } else result->virtual_protect.status = STATUS_INVALID_PARAMETER; break; case APC_VIRTUAL_FLUSH: result->type = call->type; - result->virtual_flush.addr = call->virtual_flush.addr; + addr = wine_server_get_ptr( call->virtual_flush.addr ); size = call->virtual_flush.size; - if (size == call->virtual_flush.size) /* not truncated */ + if ((ULONG_PTR)addr == call->virtual_flush.addr && size == call->virtual_flush.size) { result->virtual_flush.status = NtFlushVirtualMemory( NtCurrentProcess(), - &result->virtual_flush.addr, &size, 0 ); + (const void **)&addr, &size, 0 ); + result->virtual_flush.addr = wine_server_client_ptr( addr ); result->virtual_flush.size = size; } else result->virtual_flush.status = STATUS_INVALID_PARAMETER; break; case APC_VIRTUAL_LOCK: result->type = call->type; - result->virtual_lock.addr = call->virtual_lock.addr; + addr = wine_server_get_ptr( call->virtual_lock.addr ); size = call->virtual_lock.size; - if (size == call->virtual_lock.size) /* not truncated */ + if ((ULONG_PTR)addr == call->virtual_lock.addr && size == call->virtual_lock.size) { - result->virtual_lock.status = NtLockVirtualMemory( NtCurrentProcess(), - &result->virtual_lock.addr, &size, 0 ); + result->virtual_lock.status = NtLockVirtualMemory( NtCurrentProcess(), &addr, &size, 0 ); + result->virtual_lock.addr = wine_server_client_ptr( addr ); result->virtual_lock.size = size; } else result->virtual_lock.status = STATUS_INVALID_PARAMETER; break; case APC_VIRTUAL_UNLOCK: result->type = call->type; - result->virtual_unlock.addr = call->virtual_unlock.addr; + addr = wine_server_get_ptr( call->virtual_unlock.addr ); size = call->virtual_unlock.size; - if (size == call->virtual_unlock.size) /* not truncated */ + if ((ULONG_PTR)addr == call->virtual_unlock.addr && size == call->virtual_unlock.size) { - result->virtual_unlock.status = NtUnlockVirtualMemory( NtCurrentProcess(), - &result->virtual_unlock.addr, &size, 0 ); + result->virtual_unlock.status = NtUnlockVirtualMemory( NtCurrentProcess(), &addr, &size, 0 ); + result->virtual_unlock.addr = wine_server_client_ptr( addr ); result->virtual_unlock.size = size; } else result->virtual_unlock.status = STATUS_INVALID_PARAMETER; break; case APC_MAP_VIEW: - { - LARGE_INTEGER offset; result->type = call->type; - result->map_view.addr = call->map_view.addr; - offset.QuadPart = call->map_view.offset; + addr = wine_server_get_ptr( call->map_view.addr ); size = call->map_view.size; - if (size == call->map_view.size) /* not truncated */ + if ((ULONG_PTR)addr == call->map_view.addr && size == call->map_view.size) { + LARGE_INTEGER offset; + offset.QuadPart = call->map_view.offset; result->map_view.status = NtMapViewOfSection( wine_server_ptr_handle(call->map_view.handle), - NtCurrentProcess(), &result->map_view.addr, + NtCurrentProcess(), &addr, call->map_view.zero_bits, 0, &offset, &size, ViewShare, call->map_view.alloc_type, call->map_view.prot ); - result->map_view.size = size; + result->map_view.addr = wine_server_client_ptr( addr ); + result->map_view.size = size; } else result->map_view.status = STATUS_INVALID_PARAMETER; NtClose( wine_server_ptr_handle(call->map_view.handle) ); break; - } case APC_UNMAP_VIEW: result->type = call->type; - result->unmap_view.status = NtUnmapViewOfSection( NtCurrentProcess(), call->unmap_view.addr ); + addr = wine_server_get_ptr( call->unmap_view.addr ); + if ((ULONG_PTR)addr == call->unmap_view.addr) + result->unmap_view.status = NtUnmapViewOfSection( NtCurrentProcess(), addr ); + else + result->unmap_view.status = STATUS_INVALID_PARAMETER; break; case APC_CREATE_THREAD: { @@ -996,16 +1018,16 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result ) HANDLE handle; SIZE_T reserve = call->create_thread.reserve; SIZE_T commit = call->create_thread.commit; + void *func = wine_server_get_ptr( call->create_thread.func ); + void *arg = wine_server_get_ptr( call->create_thread.arg ); result->type = call->type; - if (reserve == call->create_thread.reserve && commit == call->create_thread.commit) + if (reserve == call->create_thread.reserve && commit == call->create_thread.commit && + (ULONG_PTR)func == call->create_thread.func && (ULONG_PTR)arg == call->create_thread.arg) { result->create_thread.status = RtlCreateUserThread( NtCurrentProcess(), NULL, call->create_thread.suspend, NULL, - reserve, commit, - call->create_thread.func, - call->create_thread.arg, - &handle, &id ); + reserve, commit, func, arg, &handle, &id ); result->create_thread.handle = wine_server_obj_handle( handle ); result->create_thread.tid = HandleToULong(id.UniqueThread); } @@ -1032,7 +1054,7 @@ NTSTATUS NTDLL_queue_process_apc( HANDLE process, const apc_call_t *call, apc_re SERVER_START_REQ( queue_apc ) { - req->process = wine_server_obj_handle( process ); + req->handle = wine_server_obj_handle( process ); req->call = *call; if (!(ret = wine_server_call( req ))) { @@ -1091,7 +1113,7 @@ NTSTATUS NTDLL_wait_for_multiple_objects( UINT count, const HANDLE *handles, UIN SERVER_START_REQ( select ) { req->flags = flags; - req->cookie = &cookie; + req->cookie = wine_server_client_ptr( &cookie ); req->signal = wine_server_obj_handle( signal_object ); req->prev_apc = apc_handle; req->timeout = abs_timeout; diff --git a/dlls/ntdll/tests/atom.c b/dlls/ntdll/tests/atom.c index 7526654fcb8..220ea40482f 100644 --- a/dlls/ntdll/tests/atom.c +++ b/dlls/ntdll/tests/atom.c @@ -295,7 +295,7 @@ static void test_NtIntAtom(void) RTL_ATOM_TABLE AtomTable; RTL_ATOM testAtom; ULONG RefCount = 0, PinCount = 0; - int i; + INT_PTR i; WCHAR Name[64]; ULONG Len; @@ -311,25 +311,25 @@ static void test_NtIntAtom(void) ok(res == STATUS_INVALID_PARAMETER, "Didn't get expected result from adding 0 int atom, retval: %x\n", res); for (i = 1; i <= 0xbfff; i++) { - res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)i, &testAtom); - ok(!res, "Unable to add valid integer atom %i, retval: %x\n", i, res); + res = pRtlAddAtomToAtomTable(AtomTable, (LPWSTR)i, &testAtom); + ok(!res, "Unable to add valid integer atom %li, retval: %x\n", i, res); } for (i = 1; i <= 0xbfff; i++) { - res = pRtlLookupAtomInAtomTable(AtomTable, (PWSTR)i, &testAtom); - ok(!res, "Unable to find int atom %i, retval: %x\n", i, res); + res = pRtlLookupAtomInAtomTable(AtomTable, (LPWSTR)i, &testAtom); + ok(!res, "Unable to find int atom %li, retval: %x\n", i, res); if (!res) { res = pRtlPinAtomInAtomTable(AtomTable, testAtom); - ok(!res, "Unable to pin int atom %i, retval: %x\n", i, res); + ok(!res, "Unable to pin int atom %li, retval: %x\n", i, res); } } for (i = 0xc000; i <= 0xffff; i++) { - res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)i, &testAtom); - ok(res, "Able to illeageal integer atom %i, retval: %x\n", i, res); + res = pRtlAddAtomToAtomTable(AtomTable, (LPWSTR)i, &testAtom); + ok(res, "Able to illeageal integer atom %li, retval: %x\n", i, res); } res = pRtlDestroyAtomTable(AtomTable); diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index b0cb55418fc..0632f2dec14 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -841,6 +841,82 @@ static void test_simd_exceptions(void) ok( got_exception == 1, "got exception: %i, should be 1\n", got_exception); } +struct fpu_exception_info +{ + DWORD exception_code; + DWORD exception_offset; + DWORD eip_offset; +}; + +static DWORD fpu_exception_handler(EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, + CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher) +{ + struct fpu_exception_info *info = *(struct fpu_exception_info **)(frame + 1); + + info->exception_code = rec->ExceptionCode; + info->exception_offset = (BYTE *)rec->ExceptionAddress - (BYTE *)code_mem; + info->eip_offset = context->Eip - (DWORD)code_mem; + + ++context->Eip; + return ExceptionContinueExecution; +} + +static void test_fpu_exceptions(void) +{ + static const BYTE fpu_exception_test_ie[] = + { + 0x83, 0xec, 0x04, /* sub $0x4,%esp */ + 0x66, 0xc7, 0x04, 0x24, 0xfe, 0x03, /* movw $0x3fe,(%esp) */ + 0x9b, 0xd9, 0x7c, 0x24, 0x02, /* fstcw 0x2(%esp) */ + 0xd9, 0x2c, 0x24, /* fldcw (%esp) */ + 0xd9, 0xee, /* fldz */ + 0xd9, 0xe8, /* fld1 */ + 0xde, 0xf1, /* fdivp */ + 0xdd, 0xd8, /* fstp %st(0) */ + 0xdd, 0xd8, /* fstp %st(0) */ + 0x9b, /* fwait */ + 0xdb, 0xe2, /* fnclex */ + 0xd9, 0x6c, 0x24, 0x02, /* fldcw 0x2(%esp) */ + 0x83, 0xc4, 0x04, /* add $0x4,%esp */ + 0xc3, /* ret */ + }; + + static const BYTE fpu_exception_test_de[] = + { + 0x83, 0xec, 0x04, /* sub $0x4,%esp */ + 0x66, 0xc7, 0x04, 0x24, 0xfb, 0x03, /* movw $0x3fb,(%esp) */ + 0x9b, 0xd9, 0x7c, 0x24, 0x02, /* fstcw 0x2(%esp) */ + 0xd9, 0x2c, 0x24, /* fldcw (%esp) */ + 0xdd, 0xd8, /* fstp %st(0) */ + 0xd9, 0xee, /* fldz */ + 0xd9, 0xe8, /* fld1 */ + 0xde, 0xf1, /* fdivp */ + 0x9b, /* fwait */ + 0xdb, 0xe2, /* fnclex */ + 0xdd, 0xd8, /* fstp %st(0) */ + 0xdd, 0xd8, /* fstp %st(0) */ + 0xd9, 0x6c, 0x24, 0x02, /* fldcw 0x2(%esp) */ + 0x83, 0xc4, 0x04, /* add $0x4,%esp */ + 0xc3, /* ret */ + }; + + struct fpu_exception_info info; + + memset(&info, 0, sizeof(info)); + run_exception_test(fpu_exception_handler, &info, fpu_exception_test_ie, sizeof(fpu_exception_test_ie)); + ok(info.exception_code == EXCEPTION_FLT_STACK_CHECK, + "Got exception code %#x, expected EXCEPTION_FLT_STACK_CHECK\n", info.exception_code); + ok(info.exception_offset == 0x19, "Got exception offset %#x, expected 0x19\n", info.exception_offset); + ok(info.eip_offset == 0x1b, "Got EIP offset %#x, expected 0x1b\n", info.eip_offset); + + memset(&info, 0, sizeof(info)); + run_exception_test(fpu_exception_handler, &info, fpu_exception_test_de, sizeof(fpu_exception_test_de)); + ok(info.exception_code == EXCEPTION_FLT_DIVIDE_BY_ZERO, + "Got exception code %#x, expected EXCEPTION_FLT_DIVIDE_BY_ZERO\n", info.exception_code); + ok(info.exception_offset == 0x17, "Got exception offset %#x, expected 0x17\n", info.exception_offset); + ok(info.eip_offset == 0x19, "Got EIP offset %#x, expected 0x19\n", info.eip_offset); +} + #endif /* __i386__ */ START_TEST(exception) @@ -918,6 +994,7 @@ START_TEST(exception) test_rtlraiseexception(); test_debugger(); test_simd_exceptions(); + test_fpu_exceptions(); VirtualFree(code_mem, 1024, MEM_RELEASE); #endif diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index f61196eed74..b118bd3c088 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -227,7 +227,7 @@ static void test_query_process(void) /* Copy of our winternl.h structure turned into a private one */ typedef struct _SYSTEM_PROCESS_INFORMATION_PRIVATE { - DWORD dwOffset; + ULONG NextEntryOffset; DWORD dwThreadCount; DWORD dwUnknown1[6]; FILETIME ftCreationTime; @@ -235,9 +235,9 @@ static void test_query_process(void) FILETIME ftKernelTime; UNICODE_STRING ProcessName; DWORD dwBasePriority; - DWORD dwProcessID; - DWORD dwParentProcessID; - DWORD dwHandleCount; + HANDLE UniqueProcessId; + HANDLE ParentProcessId; + ULONG HandleCount; DWORD dwUnknown3; DWORD dwUnknown4; VM_COUNTERS vmCounters; @@ -261,15 +261,15 @@ static void test_query_process(void) ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); spi = spi_buf; - /* Get the first dwOffset, from this we can deduce the OS version we're running + /* Get the first NextEntryOffset, from this we can deduce the OS version we're running * * W2K/WinXP/W2K3: - * dwOffset for a process is 184 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) + * NextEntryOffset for a process is 184 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) * NT: - * dwOffset for a process is 136 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) + * NextEntryOffset for a process is 136 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) * Wine (with every windows version): - * dwOffset for a process is 0 if just this test is running - * dwOffset for a process is 184 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) + + * NextEntryOffset for a process is 0 if just this test is running + * NextEntryOffset for a process is 184 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) + * ProcessName.MaximumLength * if more wine processes are running * @@ -278,7 +278,7 @@ static void test_query_process(void) pNtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), &ReturnLength); - is_nt = ( spi->dwOffset - (sbi.NumberOfProcessors * sizeof(SYSTEM_THREAD_INFORMATION)) == 136); + is_nt = ( spi->NextEntryOffset - (sbi.NumberOfProcessors * sizeof(SYSTEM_THREAD_INFORMATION)) == 136); if (is_nt) skip("Windows version is NT, we will skip thread tests\n"); @@ -294,7 +294,7 @@ static void test_query_process(void) { i++; - last_pid = spi->dwProcessID; + last_pid = (DWORD_PTR)spi->UniqueProcessId; ok( spi->dwThreadCount > 0, "Expected some threads for this process, got 0\n"); @@ -306,17 +306,17 @@ static void test_query_process(void) for ( j = 0; j < spi->dwThreadCount; j++) { k++; - ok ( spi->ti[j].dwOwningPID == spi->dwProcessID, - "The owning pid of the thread (%d) doesn't equal the pid (%d) of the process\n", - spi->ti[j].dwOwningPID, spi->dwProcessID); + ok ( spi->ti[j].ClientId.UniqueProcess == spi->UniqueProcessId, + "The owning pid of the thread (%p) doesn't equal the pid (%p) of the process\n", + spi->ti[j].ClientId.UniqueProcess, spi->UniqueProcessId); } } - if (!spi->dwOffset) break; + if (!spi->NextEntryOffset) break; one_before_last_pid = last_pid; - spi = (SYSTEM_PROCESS_INFORMATION_PRIVATE*)((char*)spi + spi->dwOffset); + spi = (SYSTEM_PROCESS_INFORMATION_PRIVATE*)((char*)spi + spi->NextEntryOffset); } trace("Total number of running processes : %d\n", i); if (!is_nt) trace("Total number of running threads : %d\n", k); @@ -545,12 +545,12 @@ static void test_query_process_basic(void) ULONG ReturnLength; typedef struct _PROCESS_BASIC_INFORMATION_PRIVATE { - DWORD ExitStatus; - DWORD PebBaseAddress; - DWORD AffinityMask; - DWORD BasePriority; - ULONG UniqueProcessId; - ULONG InheritedFromUniqueProcessId; + DWORD_PTR ExitStatus; + PPEB PebBaseAddress; + DWORD_PTR AffinityMask; + DWORD_PTR BasePriority; + ULONG_PTR UniqueProcessId; + ULONG_PTR InheritedFromUniqueProcessId; } PROCESS_BASIC_INFORMATION_PRIVATE, *PPROCESS_BASIC_INFORMATION_PRIVATE; PROCESS_BASIC_INFORMATION_PRIVATE pbi; @@ -604,7 +604,7 @@ static void test_query_process_basic(void) ok( sizeof(pbi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); /* Check if we have some return values */ - trace("ProcessID : %d\n", pbi.UniqueProcessId); + trace("ProcessID : %lx\n", pbi.UniqueProcessId); ok( pbi.UniqueProcessId > 0, "Expected a ProcessID > 0, got 0\n"); } @@ -613,30 +613,30 @@ static void test_query_process_vm(void) NTSTATUS status; ULONG ReturnLength; VM_COUNTERS pvi; + ULONG old_size = FIELD_OFFSET(VM_COUNTERS,PrivatePageCount); status = pNtQueryInformationProcess(NULL, ProcessVmCounters, NULL, sizeof(pvi), NULL); ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE, "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n", status); - status = pNtQueryInformationProcess(NULL, ProcessVmCounters, &pvi, sizeof(pvi), NULL); + status = pNtQueryInformationProcess(NULL, ProcessVmCounters, &pvi, old_size, NULL); ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); /* Windows XP and W2K3 will report success for a size of 44 AND 48 ! Windows W2K will only report success for 44. - For now we only care for 44, which is sizeof(VM_COUNTERS) - If an app depends on it, we have to implement this in ntdll/process.c + For now we only care for 44, which is FIELD_OFFSET(VM_COUNTERS,PrivatePageCount)) */ status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, 24, &ReturnLength); ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, sizeof(pvi), &ReturnLength); + status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, old_size, &ReturnLength); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(pvi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); + ok( old_size == ReturnLength, "Inconsistent length %d\n", ReturnLength); status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, 46, &ReturnLength); ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - ok( sizeof(pvi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); + ok( ReturnLength == old_size || ReturnLength == sizeof(pvi), "Inconsistent length %d\n", ReturnLength); /* Check if we have some return values */ trace("WorkingSetSize : %ld\n", pvi.WorkingSetSize); diff --git a/dlls/ntdll/tests/large_int.c b/dlls/ntdll/tests/large_int.c index bec8ad9bf8f..69de5b78947 100644 --- a/dlls/ntdll/tests/large_int.c +++ b/dlls/ntdll/tests/large_int.c @@ -286,6 +286,14 @@ static void one_RtlInt64ToUnicodeString_test(int test_num, const largeint2str_t STRING ansi_str; NTSTATUS result; +#ifdef _WIN64 + if (largeint2str->value >> 32 == 0xffffffff) /* this crashes on 64-bit Vista */ + { + skip( "Value ffffffff%08x broken on 64-bit windows\n", (DWORD)largeint2str->value ); + return; + } +#endif + for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { expected_str_Buffer[pos] = largeint2str->Buffer[pos]; } /* for */ @@ -367,6 +375,14 @@ static void one_RtlLargeIntegerToChar_test(int test_num, const largeint2str_t *l char dest_str[LARGE_STRI_BUFFER_LENGTH + 1]; ULONGLONG value; +#ifdef _WIN64 + if (largeint2str->value >> 32 == 0xffffffff) /* this crashes on 64-bit Vista */ + { + skip( "Value ffffffff%08x broken on 64-bit windows\n", (DWORD)largeint2str->value ); + return; + } +#endif + memset(dest_str, '-', LARGE_STRI_BUFFER_LENGTH); dest_str[LARGE_STRI_BUFFER_LENGTH] = '\0'; value = largeint2str->value; diff --git a/dlls/ntdll/tests/string.c b/dlls/ntdll/tests/string.c index 205a880d670..6f4d85bdd85 100644 --- a/dlls/ntdll/tests/string.c +++ b/dlls/ntdll/tests/string.c @@ -591,20 +591,23 @@ static void one_i64toa_test(int test_num, const ulonglong2str_t *ulonglong2str) dest_str[LARGE_STRI_BUFFER_LENGTH] = '\0'; result = p_i64toa(ulonglong2str->value, dest_str, ulonglong2str->base); ok(result == dest_str, - "(test %d): _i64toa(%Lu, [out], %d) has result %p, expected: %p\n", - test_num, ulonglong2str->value, ulonglong2str->base, result, dest_str); + "(test %d): _i64toa(%08x%08x, [out], %d) has result %p, expected: %p\n", + test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, + ulonglong2str->base, result, dest_str); if (ulonglong2str->mask & 0x04) { if (memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) != 0) { if (memcmp(dest_str, ulonglong2str[1].Buffer, LARGE_STRI_BUFFER_LENGTH) != 0) { ok(memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _i64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, ulonglong2str->value, ulonglong2str->base, dest_str, ulonglong2str->Buffer); + "(test %d): _i64toa(%08x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n", + test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, + ulonglong2str->base, dest_str, ulonglong2str->Buffer); } /* if */ } /* if */ } else { ok(memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _i64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, ulonglong2str->value, ulonglong2str->base, dest_str, ulonglong2str->Buffer); + "(test %d): _i64toa(%08x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n", + test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, + ulonglong2str->base, dest_str, ulonglong2str->Buffer); } /* if */ } diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 89d5ce9d8cb..51b190a121f 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -483,8 +483,8 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR * memset( &call, 0, sizeof(call) ); call.create_thread.type = APC_CREATE_THREAD; - call.create_thread.func = start; - call.create_thread.arg = param; + call.create_thread.func = wine_server_client_ptr( start ); + call.create_thread.arg = wine_server_client_ptr( param ); call.create_thread.reserve = stack_reserve; call.create_thread.commit = stack_commit; call.create_thread.suspend = suspended; @@ -747,11 +747,11 @@ NTSTATUS WINAPI NtQueueApcThread( HANDLE handle, PNTAPCFUNC func, ULONG_PTR arg1 NTSTATUS ret; SERVER_START_REQ( queue_apc ) { - req->thread = wine_server_obj_handle( handle ); + req->handle = wine_server_obj_handle( handle ); if (func) { req->call.type = APC_USER; - req->call.user.func = func; + req->call.user.func = wine_server_client_ptr( func ); req->call.user.args[0] = arg1; req->call.user.args[1] = arg2; req->call.user.args[2] = arg3; @@ -1178,7 +1178,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class, if (!(status = wine_server_call( req ))) { info.ExitStatus = reply->exit_code; - info.TebBaseAddress = reply->teb; + info.TebBaseAddress = wine_server_get_ptr( reply->teb ); info.ClientId.UniqueProcess = ULongToHandle(reply->pid); info.ClientId.UniqueThread = ULongToHandle(reply->tid); info.AffinityMask = reply->affinity & affinity_mask; diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c index af42b307f38..31a1a5605e0 100644 --- a/dlls/ntdll/threadpool.c +++ b/dlls/ntdll/threadpool.c @@ -148,7 +148,7 @@ static NTSTATUS add_work_item_to_queue(struct work_item *work_item) if (!work_item_event) { HANDLE sem; - status = NtCreateSemaphore(&sem, SEMAPHORE_ALL_ACCESS, NULL, 1, LONG_MAX); + status = NtCreateSemaphore(&sem, SEMAPHORE_ALL_ACCESS, NULL, 1, INT_MAX); if (interlocked_cmpxchg_ptr( &work_item_event, sem, 0 )) NtClose(sem); /* somebody beat us to it */ } diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index bda8be195d8..d2610e9546c 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -993,7 +993,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz struct stat st; struct file_view *view = NULL; char *ptr, *header_end; - int delta = 0; + INT_PTR delta = 0; /* zero-map the whole range */ @@ -1611,7 +1611,7 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG zero_ memset( &call, 0, sizeof(call) ); call.virtual_alloc.type = APC_VIRTUAL_ALLOC; - call.virtual_alloc.addr = *ret; + call.virtual_alloc.addr = wine_server_client_ptr( *ret ); call.virtual_alloc.size = *size_ptr; call.virtual_alloc.zero_bits = zero_bits; call.virtual_alloc.op_type = type; @@ -1621,7 +1621,7 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG zero_ if (result.virtual_alloc.status == STATUS_SUCCESS) { - *ret = result.virtual_alloc.addr; + *ret = wine_server_get_ptr( result.virtual_alloc.addr ); *size_ptr = result.virtual_alloc.size; } return result.virtual_alloc.status; @@ -1739,7 +1739,7 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *si memset( &call, 0, sizeof(call) ); call.virtual_free.type = APC_VIRTUAL_FREE; - call.virtual_free.addr = addr; + call.virtual_free.addr = wine_server_client_ptr( addr ); call.virtual_free.size = size; call.virtual_free.op_type = type; status = NTDLL_queue_process_apc( process, &call, &result ); @@ -1747,7 +1747,7 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *si if (result.virtual_free.status == STATUS_SUCCESS) { - *addr_ptr = result.virtual_free.addr; + *addr_ptr = wine_server_get_ptr( result.virtual_free.addr ); *size_ptr = result.virtual_free.size; } return result.virtual_free.status; @@ -1825,7 +1825,7 @@ NTSTATUS WINAPI NtProtectVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T memset( &call, 0, sizeof(call) ); call.virtual_protect.type = APC_VIRTUAL_PROTECT; - call.virtual_protect.addr = addr; + call.virtual_protect.addr = wine_server_client_ptr( addr ); call.virtual_protect.size = size; call.virtual_protect.prot = new_prot; status = NTDLL_queue_process_apc( process, &call, &result ); @@ -1833,7 +1833,7 @@ NTSTATUS WINAPI NtProtectVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T if (result.virtual_protect.status == STATUS_SUCCESS) { - *addr_ptr = result.virtual_protect.addr; + *addr_ptr = wine_server_get_ptr( result.virtual_protect.addr ); *size_ptr = result.virtual_protect.size; if (old_prot) *old_prot = result.virtual_protect.prot; } @@ -1954,19 +1954,19 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr, memset( &call, 0, sizeof(call) ); call.virtual_query.type = APC_VIRTUAL_QUERY; - call.virtual_query.addr = addr; + call.virtual_query.addr = wine_server_client_ptr( addr ); status = NTDLL_queue_process_apc( process, &call, &result ); if (status != STATUS_SUCCESS) return status; if (result.virtual_query.status == STATUS_SUCCESS) { - info->BaseAddress = result.virtual_query.base; - info->AllocationBase = result.virtual_query.alloc_base; + info->BaseAddress = wine_server_get_ptr( result.virtual_query.base ); + info->AllocationBase = wine_server_get_ptr( result.virtual_query.alloc_base ); info->RegionSize = result.virtual_query.size; - info->State = result.virtual_query.state; info->Protect = result.virtual_query.prot; info->AllocationProtect = result.virtual_query.alloc_prot; - info->Type = result.virtual_query.alloc_type; + info->State = (DWORD)result.virtual_query.state << 12; + info->Type = (DWORD)result.virtual_query.alloc_type << 16; if (info->RegionSize != result.virtual_query.size) /* truncated */ return STATUS_INVALID_PARAMETER; /* FIXME */ if (res_len) *res_len = sizeof(*info); @@ -2063,14 +2063,14 @@ NTSTATUS WINAPI NtLockVirtualMemory( HANDLE process, PVOID *addr, SIZE_T *size, memset( &call, 0, sizeof(call) ); call.virtual_lock.type = APC_VIRTUAL_LOCK; - call.virtual_lock.addr = *addr; + call.virtual_lock.addr = wine_server_client_ptr( *addr ); call.virtual_lock.size = *size; status = NTDLL_queue_process_apc( process, &call, &result ); if (status != STATUS_SUCCESS) return status; if (result.virtual_lock.status == STATUS_SUCCESS) { - *addr = result.virtual_lock.addr; + *addr = wine_server_get_ptr( result.virtual_lock.addr ); *size = result.virtual_lock.size; } return result.virtual_lock.status; @@ -2100,14 +2100,14 @@ NTSTATUS WINAPI NtUnlockVirtualMemory( HANDLE process, PVOID *addr, SIZE_T *size memset( &call, 0, sizeof(call) ); call.virtual_unlock.type = APC_VIRTUAL_UNLOCK; - call.virtual_unlock.addr = *addr; + call.virtual_unlock.addr = wine_server_client_ptr( *addr ); call.virtual_unlock.size = *size; status = NTDLL_queue_process_apc( process, &call, &result ); if (status != STATUS_SUCCESS) return status; if (result.virtual_unlock.status == STATUS_SUCCESS) { - *addr = result.virtual_unlock.addr; + *addr = wine_server_get_ptr( result.virtual_unlock.addr ); *size = result.virtual_unlock.size; } return result.virtual_unlock.status; @@ -2233,6 +2233,26 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p if ((offset.u.LowPart & mask) || (*addr_ptr && ((UINT_PTR)*addr_ptr & mask))) return STATUS_INVALID_PARAMETER; + switch(protect) + { + case PAGE_NOACCESS: + access = SECTION_QUERY; + break; + case PAGE_READWRITE: + case PAGE_EXECUTE_READWRITE: + access = SECTION_QUERY | SECTION_MAP_WRITE; + break; + case PAGE_READONLY: + case PAGE_WRITECOPY: + case PAGE_EXECUTE: + case PAGE_EXECUTE_READ: + case PAGE_EXECUTE_WRITECOPY: + access = SECTION_QUERY | SECTION_MAP_READ; + break; + default: + return STATUS_INVALID_PARAMETER; + } + if (process != NtCurrentProcess()) { apc_call_t call; @@ -2242,7 +2262,7 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p call.map_view.type = APC_MAP_VIEW; call.map_view.handle = wine_server_obj_handle( handle ); - call.map_view.addr = *addr_ptr; + call.map_view.addr = wine_server_client_ptr( *addr_ptr ); call.map_view.size = *size_ptr; call.map_view.offset = offset.QuadPart; call.map_view.zero_bits = zero_bits; @@ -2253,43 +2273,24 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p if (result.map_view.status == STATUS_SUCCESS) { - *addr_ptr = result.map_view.addr; + *addr_ptr = wine_server_get_ptr( result.map_view.addr ); *size_ptr = result.map_view.size; } return result.map_view.status; } - switch(protect) - { - case PAGE_NOACCESS: - access = SECTION_QUERY; - break; - case PAGE_READWRITE: - case PAGE_EXECUTE_READWRITE: - access = SECTION_QUERY | SECTION_MAP_WRITE; - break; - case PAGE_READONLY: - case PAGE_WRITECOPY: - case PAGE_EXECUTE: - case PAGE_EXECUTE_READ: - case PAGE_EXECUTE_WRITECOPY: - access = SECTION_QUERY | SECTION_MAP_READ; - break; - default: - return STATUS_INVALID_PARAMETER; - } - SERVER_START_REQ( get_mapping_info ) { req->handle = wine_server_obj_handle( handle ); req->access = access; res = wine_server_call( req ); map_vprot = reply->protect; - base = reply->base; + base = wine_server_get_ptr( reply->base ); full_size = reply->size; header_size = reply->header_size; dup_mapping = wine_server_ptr_handle( reply->mapping ); shared_file = wine_server_ptr_handle( reply->shared_file ); + if ((ULONG_PTR)base != reply->base) base = NULL; } SERVER_END_REQ; if (res) return res; @@ -2397,7 +2398,7 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr ) memset( &call, 0, sizeof(call) ); call.unmap_view.type = APC_UNMAP_VIEW; - call.unmap_view.addr = addr; + call.unmap_view.addr = wine_server_client_ptr( addr ); status = NTDLL_queue_process_apc( process, &call, &result ); if (status == STATUS_SUCCESS) status = result.unmap_view.status; return status; @@ -2434,14 +2435,14 @@ NTSTATUS WINAPI NtFlushVirtualMemory( HANDLE process, LPCVOID *addr_ptr, memset( &call, 0, sizeof(call) ); call.virtual_flush.type = APC_VIRTUAL_FLUSH; - call.virtual_flush.addr = addr; + call.virtual_flush.addr = wine_server_client_ptr( addr ); call.virtual_flush.size = *size_ptr; status = NTDLL_queue_process_apc( process, &call, &result ); if (status != STATUS_SUCCESS) return status; if (result.virtual_flush.status == STATUS_SUCCESS) { - *addr_ptr = result.virtual_flush.addr; + *addr_ptr = wine_server_get_ptr( result.virtual_flush.addr ); *size_ptr = result.virtual_flush.size; } return result.virtual_flush.status; @@ -2549,7 +2550,7 @@ NTSTATUS WINAPI NtReadVirtualMemory( HANDLE process, const void *addr, void *buf SERVER_START_REQ( read_process_memory ) { req->handle = wine_server_obj_handle( process ); - req->addr = (void *)addr; + req->addr = wine_server_client_ptr( addr ); wine_server_set_reply( req, buffer, size ); if ((status = wine_server_call( req ))) size = 0; } @@ -2571,7 +2572,7 @@ NTSTATUS WINAPI NtWriteVirtualMemory( HANDLE process, void *addr, const void *bu SERVER_START_REQ( write_process_memory ) { req->handle = wine_server_obj_handle( process ); - req->addr = addr; + req->addr = wine_server_client_ptr( addr ); wine_server_add_data( req, buffer, size ); if ((status = wine_server_call( req ))) size = 0; } diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 227e393d207..f6d7d1e7011 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -54,6 +54,7 @@ typedef struct _KSERVICE_TABLE_DESCRIPTOR KSERVICE_TABLE_DESCRIPTOR KeServiceDescriptorTable[4] = { { 0 } }; typedef void (WINAPI *PCREATE_PROCESS_NOTIFY_ROUTINE)(HANDLE,HANDLE,BOOLEAN); +typedef void (WINAPI *PCREATE_THREAD_NOTIFY_ROUTINE)(HANDLE,HANDLE,BOOLEAN); static struct list Irps = LIST_INIT(Irps); @@ -224,7 +225,7 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event ) { code = reply->code; ioctl = reply->next; - device = reply->user_ptr; + device = wine_server_get_ptr( reply->user_ptr ); in_size = reply->in_size; out_size = reply->out_size; } @@ -267,7 +268,7 @@ NTSTATUS WINAPI IoAllocateDriverObjectExtension( PDRIVER_OBJECT DriverObject, ULONG DriverObjectExtensionSize, PVOID *DriverObjectExtension ) { - FIXME( "%p, %p, %u, %p\n", DriverObject, ClientIdentificationAddress, + FIXME( "stub: %p, %p, %u, %p\n", DriverObject, ClientIdentificationAddress, DriverObjectExtensionSize, DriverObjectExtension ); return STATUS_NOT_IMPLEMENTED; } @@ -279,7 +280,7 @@ NTSTATUS WINAPI IoAllocateDriverObjectExtension( PDRIVER_OBJECT DriverObject, PVOID WINAPI IoGetDriverObjectExtension( PDRIVER_OBJECT DriverObject, PVOID ClientIdentificationAddress ) { - FIXME( "%p, %p\n", DriverObject, ClientIdentificationAddress ); + FIXME( "stub: %p, %p\n", DriverObject, ClientIdentificationAddress ); return NULL; } @@ -490,7 +491,7 @@ NTSTATUS WINAPI IoCreateDevice( DRIVER_OBJECT *driver, ULONG ext_size, req->attributes = 0; req->rootdir = 0; req->manager = wine_server_obj_handle( manager ); - req->user_ptr = device; + req->user_ptr = wine_server_client_ptr( device ); if (name) wine_server_add_data( req, name->Buffer, name->Length ); if (!(status = wine_server_call( req ))) handle = wine_server_ptr_handle( reply->handle ); } @@ -862,11 +863,20 @@ void WINAPI ExFreePoolWithTag( void *ptr, ULONG tag ) /*********************************************************************** + * KeInitializeEvent (NTOSKRNL.EXE.@) + */ +void WINAPI KeInitializeEvent( PRKEVENT Event, EVENT_TYPE Type, BOOLEAN State ) +{ + FIXME( "stub: %p %d %d\n", Event, Type, State ); +} + + +/*********************************************************************** * KeInitializeSpinLock (NTOSKRNL.EXE.@) */ void WINAPI KeInitializeSpinLock( PKSPIN_LOCK SpinLock ) { - FIXME("%p\n", SpinLock); + FIXME( "stub: %p\n", SpinLock ); } @@ -875,7 +885,7 @@ void WINAPI KeInitializeSpinLock( PKSPIN_LOCK SpinLock ) */ void WINAPI KeInitializeTimerEx( PKTIMER Timer, TIMER_TYPE Type ) { - FIXME("%p %d\n", Timer, Type); + FIXME( "stub: %p %d\n", Timer, Type ); } @@ -1101,6 +1111,17 @@ NTSTATUS WINAPI PsSetCreateProcessNotifyRoutine( PCREATE_PROCESS_NOTIFY_ROUTINE return STATUS_SUCCESS; } + +/*********************************************************************** + * PsSetCreateThreadNotifyRoutine (NTOSKRNL.EXE.@) + */ +NTSTATUS WINAPI PsSetCreateThreadNotifyRoutine( PCREATE_THREAD_NOTIFY_ROUTINE NotifyRoutine ) +{ + FIXME( "stub: %p\n", NotifyRoutine ); + return STATUS_SUCCESS; +} + + /*********************************************************************** * MmGetSystemRoutineAddress (NTOSKRNL.EXE.@) */ diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 946249d82fb..7b958528714 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -546,7 +546,7 @@ @ stub KeInitializeApc @ stub KeInitializeDeviceQueue @ stub KeInitializeDpc -@ stub KeInitializeEvent +@ stdcall KeInitializeEvent(ptr long long) @ stub KeInitializeInterrupt @ stub KeInitializeMutant @ stub KeInitializeMutex @@ -908,7 +908,7 @@ @ stub PsRevertToSelf @ stub PsSetContextThread @ stdcall PsSetCreateProcessNotifyRoutine(ptr long) -@ stub PsSetCreateThreadNotifyRoutine +@ stdcall PsSetCreateThreadNotifyRoutine(ptr) @ stub PsSetJobUIRestrictionsClass @ stub PsSetLegoNotifyRoutine @ stub PsSetLoadImageNotifyRoutine diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c index 9b290bb314f..a3586542d09 100644 --- a/dlls/ole32/clipboard.c +++ b/dlls/ole32/clipboard.c @@ -80,7 +80,7 @@ #include "compobj_private.h" -#define HANDLE_ERROR(err) { hr = err; TRACE("(HRESULT=%x)\n", (HRESULT)err); goto CLEANUP; } +#define HANDLE_ERROR(err) do { hr = err; TRACE("(HRESULT=%x)\n", (HRESULT)err); goto CLEANUP; } while (0) WINE_DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 79376acb8c0..49ff1d3b1bb 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -138,6 +138,10 @@ @ stdcall HGLOBAL_UserMarshal(ptr ptr ptr) @ stdcall HGLOBAL_UserSize(ptr long ptr) @ stdcall HGLOBAL_UserUnmarshal(ptr ptr ptr) +@ stdcall HICON_UserFree(ptr ptr) +@ stdcall HICON_UserMarshal(ptr ptr ptr) +@ stdcall HICON_UserSize(ptr long ptr) +@ stdcall HICON_UserUnmarshal(ptr ptr ptr) @ stdcall HMENU_UserFree(ptr ptr) @ stdcall HMENU_UserMarshal(ptr ptr ptr) @ stdcall HMENU_UserSize(ptr long ptr) diff --git a/dlls/ole32/ole32_oleidl.idl b/dlls/ole32/ole32_oleidl.idl index b9315b37a2a..93cf079e1e1 100644 --- a/dlls/ole32/ole32_oleidl.idl +++ b/dlls/ole32/ole32_oleidl.idl @@ -16,5 +16,4 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -cpp_quote("#include ") #include "oleidl.idl" diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c index 74d7968f3b4..caad3448e11 100644 --- a/dlls/ole32/rpc.c +++ b/dlls/ole32/rpc.c @@ -568,7 +568,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface, /* save away the message state again */ msg->Handle = message_state; - TRACE("-- %ld\n", status); + TRACE("-- %d\n", status); return HRESULT_FROM_WIN32(status); } @@ -751,7 +751,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface, HeapFree(GetProcessHeap(), 0, channel_hook_data); - TRACE("-- %ld\n", status); + TRACE("-- %d\n", status); return HRESULT_FROM_WIN32(status); } @@ -771,7 +771,7 @@ static DWORD WINAPI rpc_sendreceive_thread(LPVOID param) * RPC functions do */ data->status = I_RpcSendReceive((RPC_MESSAGE *)data->msg); - TRACE("completed with status 0x%lx\n", data->status); + TRACE("completed with status 0x%x\n", data->status); SetEvent(data->handle); @@ -893,7 +893,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac orpcthat.flags = ORPCF_NULL; orpcthat.extensions = NULL; - TRACE("RPC call status: 0x%lx\n", status); + TRACE("RPC call status: 0x%x\n", status); if (status != RPC_S_OK) hr = HRESULT_FROM_WIN32(status); @@ -967,7 +967,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_FreeBuffer(LPRPCCHANNELBUFFER iface msg->Handle = message_state; - TRACE("-- %ld\n", status); + TRACE("-- %d\n", status); return HRESULT_FROM_WIN32(status); } @@ -1003,7 +1003,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_FreeBuffer(LPRPCCHANNELBUFFER iface IRpcChannelBuffer_Release(message_state->params.chan); HeapFree(GetProcessHeap(), 0, message_state); - TRACE("-- %ld\n", status); + TRACE("-- %d\n", status); return HRESULT_FROM_WIN32(status); } @@ -1104,7 +1104,7 @@ HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid, if (status != RPC_S_OK) { - ERR("Couldn't get binding for endpoint %s, status = %ld\n", debugstr_w(endpoint), status); + ERR("Couldn't get binding for endpoint %s, status = %d\n", debugstr_w(endpoint), status); return HRESULT_FROM_WIN32(status); } @@ -1536,7 +1536,7 @@ HRESULT RPC_RegisterInterface(REFIID riid) list_add_tail(®istered_interfaces, &rif->entry); else { - ERR("RpcServerRegisterIfEx failed with error %ld\n", status); + ERR("RpcServerRegisterIfEx failed with error %d\n", status); HeapFree(GetProcessHeap(), 0, rif); hr = HRESULT_FROM_WIN32(status); } diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c index 714fca8d26b..02dc080b8f6 100644 --- a/dlls/ole32/tests/compobj.c +++ b/dlls/ole32/tests/compobj.c @@ -887,7 +887,7 @@ static void test_registered_object_thread_affinity(void) ok(hr == S_OK, "CoGetClassObject on local server object registered in same " "thread should return S_OK instead of 0x%08x\n", hr); - thread = CreateThread(NULL, 0, revoke_class_object_thread, (LPVOID)cookie, 0, &tid); + thread = CreateThread(NULL, 0, revoke_class_object_thread, (LPVOID)(DWORD_PTR)cookie, 0, &tid); ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); WaitForSingleObject(thread, INFINITE); GetExitCodeThread(thread, &exitcode); @@ -931,7 +931,7 @@ static void test_CoFreeUnusedLibraries(void) ok(!is_module_loaded("urlmon.dll"), "urlmon.dll shouldn't be loaded\n"); - hr = CoCreateInstance(&CLSID_FileProtocol, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk); + hr = CoCreateInstance(&CLSID_FileProtocol, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void **)&pUnk); if (hr == REGDB_E_CLASSNOTREG) { trace("IE not installed so can't run CoFreeUnusedLibraries test\n"); diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c index 1b7bcc3badb..b959e74fd85 100644 --- a/dlls/ole32/tests/moniker.c +++ b/dlls/ole32/tests/moniker.c @@ -1750,7 +1750,7 @@ static void test_bind_context(void) hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts); ok_ole_success(hr, "IBindCtx_GetBindOptions"); ok(bind_opts.cbStruct == sizeof(bind_opts) || - bind_opts.cbStruct == 36, /* Vista */ + bind_opts.cbStruct == sizeof(bind_opts) + sizeof(void*), /* Vista */ "bind_opts.cbStruct was %d\n", bind_opts.cbStruct); bind_opts.cbStruct = sizeof(BIND_OPTS); diff --git a/dlls/ole32/tests/usrmarshal.c b/dlls/ole32/tests/usrmarshal.c index 087d5cb6388..d29c34f5f66 100644 --- a/dlls/ole32/tests/usrmarshal.c +++ b/dlls/ole32/tests/usrmarshal.c @@ -34,6 +34,17 @@ unsigned char * __RPC_USER HMETAFILE_UserMarshal(ULONG *, unsigned char *, HMETA unsigned char * __RPC_USER HMETAFILE_UserUnmarshal(ULONG *, unsigned char *, HMETAFILE *); void __RPC_USER HMETAFILE_UserFree(ULONG *, HMETAFILE *); +ULONG __RPC_USER HENHMETAFILE_UserSize(ULONG *, ULONG, HENHMETAFILE *); +unsigned char * __RPC_USER HENHMETAFILE_UserMarshal (ULONG *, unsigned char *, HENHMETAFILE *); +unsigned char * __RPC_USER HENHMETAFILE_UserUnmarshal(ULONG *, unsigned char *, HENHMETAFILE *); +void __RPC_USER HENHMETAFILE_UserFree(ULONG *, HENHMETAFILE *); + +ULONG __RPC_USER HMETAFILEPICT_UserSize(ULONG *, ULONG, HMETAFILEPICT *); +unsigned char * __RPC_USER HMETAFILEPICT_UserMarshal (ULONG *, unsigned char *, HMETAFILEPICT *); +unsigned char * __RPC_USER HMETAFILEPICT_UserUnmarshal(ULONG *, unsigned char *, HMETAFILEPICT *); +void __RPC_USER HMETAFILEPICT_UserFree(ULONG *, HMETAFILEPICT *); + + static const char cf_marshaled[] = { 0x9, 0x0, 0x0, 0x0, diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c index 8aed5d695e5..3af71df8a88 100644 --- a/dlls/ole32/usrmarshal.c +++ b/dlls/ole32/usrmarshal.c @@ -647,6 +647,105 @@ void __RPC_USER HBITMAP_UserFree(ULONG *pFlags, HBITMAP *phBmp) } /****************************************************************************** + * HICON_UserSize [OLE32.@] + * + * Calculates the buffer size required to marshal an icon. + * + * PARAMS + * pFlags [I] Flags. See notes. + * StartingSize [I] Starting size of the buffer. This value is added on to + * the buffer size required for the icon. + * phIcon [I] Icon to size. + * + * RETURNS + * The buffer size required to marshal an icon plus the starting size. + * + * NOTES + * Even though the function is documented to take a pointer to a ULONG in + * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which + * the first parameter is a ULONG. + * This function is only intended to be called by the RPC runtime. + */ +ULONG __RPC_USER HICON_UserSize(ULONG *pFlags, ULONG StartingSize, HICON *phIcon) +{ + FIXME(":stub\n"); + return StartingSize; +} + +/****************************************************************************** +* HICON_UserMarshal [OLE32.@] +* +* Marshals an icon into a buffer. +* +* PARAMS +* pFlags [I] Flags. See notes. +* pBuffer [I] Buffer to marshal the icon into. +* phIcon [I] Icon to marshal. +* +* RETURNS +* The end of the marshaled data in the buffer. +* +* NOTES +* Even though the function is documented to take a pointer to a ULONG in +* pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which +* the first parameter is a ULONG. +* This function is only intended to be called by the RPC runtime. +*/ +unsigned char * __RPC_USER HICON_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HICON *phIcon) +{ + FIXME(":stub\n"); + return pBuffer; +} + +/****************************************************************************** + * HICON_UserUnmarshal [OLE32.@] + * + * Unmarshals an icon from a buffer. + * + * PARAMS + * pFlags [I] Flags. See notes. + * pBuffer [I] Buffer to marshal the icon from. + * phIcon [O] Address that receive the unmarshaled icon. + * + * RETURNS + * The end of the marshaled data in the buffer. + * + * NOTES + * Even though the function is documented to take a pointer to an ULONG in + * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which + * the first parameter is an ULONG. + * This function is only intended to be called by the RPC runtime. + */ +unsigned char * __RPC_USER HICON_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, HICON *phIcon) +{ + FIXME(":stub\n"); + return pBuffer; +} + +/****************************************************************************** + * HICON_UserFree [OLE32.@] + * + * Frees an unmarshaled icon. + * + * PARAMS + * pFlags [I] Flags. See notes. + * phIcon [I] Icon to free. + * + * RETURNS + * The end of the marshaled data in the buffer. + * + * NOTES + * Even though the function is documented to take a pointer to a ULONG in + * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of + * which the first parameter is a ULONG. + * This function is only intended to be called by the RPC runtime. + */ +void __RPC_USER HICON_UserFree(ULONG *pFlags, HICON *phIcon) +{ + FIXME(":stub\n"); +} + +/****************************************************************************** * HDC_UserSize [OLE32.@] * * Calculates the buffer size required to marshal an HDC. diff --git a/dlls/oleacc/main.c b/dlls/oleacc/main.c index 5076e001866..0e7b78e8a08 100644 --- a/dlls/oleacc/main.c +++ b/dlls/oleacc/main.c @@ -23,6 +23,7 @@ #include "winbase.h" #include "winuser.h" #include "ole2.h" +#include "oleacc.h" #include "wine/unicode.h" #include "wine/debug.h" @@ -39,12 +40,18 @@ HRESULT WINAPI CreateStdAccessibleObject( HWND hwnd, LONG idObject, return E_NOTIMPL; } -HRESULT WINAPI LresultFromObject( REFIID riid, WPARAM wParam, LPUNKNOWN pAcc ) +LRESULT WINAPI LresultFromObject( REFIID riid, WPARAM wParam, LPUNKNOWN pAcc ) { FIXME("%s %ld %p\n", debugstr_guid(riid), wParam, pAcc ); return E_NOTIMPL; } +HRESULT WINAPI AccessibleObjectFromPoint( POINT ptScreen, IAccessible** ppacc, VARIANT* pvarChild ) +{ + FIXME("{%d,%d} %p %p: stub\n", ptScreen.x, ptScreen.y, ppacc, pvarChild ); + return E_NOTIMPL; +} + HRESULT WINAPI AccessibleObjectFromWindow( HWND hwnd, DWORD dwObjectID, REFIID riid, void** ppvObject ) { diff --git a/dlls/oleacc/oleacc.spec b/dlls/oleacc/oleacc.spec index 2baeb2b383f..2736a3d6070 100644 --- a/dlls/oleacc/oleacc.spec +++ b/dlls/oleacc/oleacc.spec @@ -1,6 +1,6 @@ @ stub AccessibleChildren @ stub AccessibleObjectFromEvent -@ stub AccessibleObjectFromPoint +@ stdcall AccessibleObjectFromPoint(double ptr ptr) @ stdcall AccessibleObjectFromWindow(ptr long ptr ptr) @ stdcall CreateStdAccessibleObject(ptr long ptr ptr) @ stub CreateStdAccessibleProxyA diff --git a/dlls/oleaut32/oleaut32_ocidl.idl b/dlls/oleaut32/oleaut32_ocidl.idl index 379df5bbfee..dcd3ea458da 100644 --- a/dlls/oleaut32/oleaut32_ocidl.idl +++ b/dlls/oleaut32/oleaut32_ocidl.idl @@ -16,5 +16,4 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -cpp_quote("#include ") #include "ocidl.idl" diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 8b564666344..d8a6675e6b7 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -649,7 +649,7 @@ static void test_QueryPathOfRegTypeLib(void) BSTR path; status = UuidCreate(&uid); - ok(!status || status == RPC_S_UUID_LOCAL_ONLY, "UuidCreate error %08lx\n", status); + ok(!status || status == RPC_S_UUID_LOCAL_ONLY, "UuidCreate error %08x\n", status); StringFromGUID2(&uid, uid_str, 40); /*trace("GUID: %s\n", wine_dbgstr_w(uid_str));*/ diff --git a/dlls/oleaut32/usrmarshal.c b/dlls/oleaut32/usrmarshal.c index 85faac46460..2811fcfb873 100644 --- a/dlls/oleaut32/usrmarshal.c +++ b/dlls/oleaut32/usrmarshal.c @@ -2017,8 +2017,35 @@ HRESULT CALLBACK IPropertyBag_Read_Proxy( VARIANT *pVar, IErrorLog *pErrorLog) { - FIXME("not implemented\n"); - return E_FAIL; + IUnknown *pUnk = NULL; + TRACE("(%p, %s, %p, %p)\n", This, debugstr_w(pszPropName), pVar, pErrorLog); + + if(!pVar) + return E_POINTER; + + if(V_VT(pVar) & (VT_BYREF | VT_ARRAY | VT_VECTOR)) + { + FIXME("Variant type %x is byref, array or vector. Not implemented.\n", V_VT(pVar)); + return E_NOTIMPL; + } + + switch(V_VT(pVar)) + { + case VT_DISPATCH: + pUnk = (IUnknown*)V_DISPATCH(pVar); + break; + case VT_UNKNOWN: + pUnk = V_UNKNOWN(pVar); + break; + case VT_SAFEARRAY: + FIXME("Safearray support not yet implemented.\n"); + return E_NOTIMPL; + default: + break; + } + + return IPropertyBag_RemoteRead_Proxy(This, pszPropName, pVar, pErrorLog, + V_VT(pVar), pUnk); } HRESULT __RPC_STUB IPropertyBag_Read_Stub( @@ -2029,8 +2056,45 @@ HRESULT __RPC_STUB IPropertyBag_Read_Stub( DWORD varType, IUnknown *pUnkObj) { - FIXME("not implemented\n"); - return E_FAIL; + static const WCHAR emptyWstr[1] = {0}; + IDispatch *disp; + HRESULT hr; + TRACE("(%p, %s, %p, %p, %x, %p)\n", This, debugstr_w(pszPropName), pVar, + pErrorLog, varType, pUnkObj); + + if(varType & (VT_BYREF | VT_ARRAY | VT_VECTOR)) + { + FIXME("Variant type %x is byref, array or vector. Not implemented.\n", V_VT(pVar)); + return E_NOTIMPL; + } + + V_VT(pVar) = varType; + switch(varType) + { + case VT_DISPATCH: + hr = IUnknown_QueryInterface(pUnkObj, &IID_IDispatch, (LPVOID*)&disp); + if(FAILED(hr)) + return hr; + IUnknown_Release(pUnkObj); + V_DISPATCH(pVar) = disp; + break; + case VT_UNKNOWN: + V_UNKNOWN(pVar) = pUnkObj; + break; + case VT_BSTR: + V_BSTR(pVar) = SysAllocString(emptyWstr); + break; + case VT_SAFEARRAY: + FIXME("Safearray support not yet implemented.\n"); + return E_NOTIMPL; + default: + break; + } + hr = IPropertyBag_Read(This, pszPropName, pVar, pErrorLog); + if(FAILED(hr)) + VariantClear(pVar); + + return hr; } /* call_as/local stubs for ocidl.idl */ diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index b4ae68090ee..d02a92ab92e 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -680,10 +680,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(opengl); # The thunks themselves.... my $count = keys %ext_functions; -print EXT "const int extension_registry_size = $count;\n"; -print EXT "void *extension_funcs[$count];\n"; +print EXT "enum extensions\n{\n"; +foreach (sort keys %ext_functions) { + my $func_ref = $ext_functions{$_}; + print EXT " EXT_$func_ref->[0],\n"; +} +print EXT " NB_EXTENSIONS\n};\n\n"; +print EXT "const int extension_registry_size = NB_EXTENSIONS;\n"; +print EXT "void *extension_funcs[NB_EXTENSIONS];\n"; print EXT "\n/* The thunks themselves....*/"; -my $pos = 0; foreach (sort keys %ext_functions) { my $func_ref = $ext_functions{$_}; my $local_var = " " . ConvertType($func_ref->[1]) . " (*$ext_prefix$func_ref->[0])( "; @@ -697,20 +702,19 @@ foreach (sort keys %ext_functions) { } } $local_var .= 'void ' if (!@{$func_ref->[2]}); - $local_var .= ") = extension_funcs[$pos];\n"; - $pos++; + $local_var .= ") = extension_funcs[EXT_$func_ref->[0]];\n"; print EXT "\nstatic ", GenerateThunk($ext_functions{$_}, 0, $ext_prefix, $gen_thread_safe, $local_var); } # Then the table giving the string <-> function correspondence */ print EXT "\n\n/* The table giving the correspondence between names and functions */\n"; -print EXT "const OpenGL_extension extension_registry[$count] = {\n"; +print EXT "const OpenGL_extension extension_registry[NB_EXTENSIONS] = {\n"; my $i = 0; foreach (sort keys %ext_functions) { my $func_ref = $ext_functions{$_}; if ($func_ref->[0] eq $func_ref->[3]) { - print EXT " { \"$func_ref->[0]\", \"$func_ref->[4]\", (void *) wine_$func_ref->[0] }"; + print EXT " { \"$func_ref->[0]\", \"$func_ref->[4]\", wine_$func_ref->[0] }"; } if ($i != $count-1) { print EXT ","; diff --git a/dlls/opengl32/opengl_ext.c b/dlls/opengl32/opengl_ext.c index d904b83add5..77ad92640c1 100644 --- a/dlls/opengl32/opengl_ext.c +++ b/dlls/opengl32/opengl_ext.c @@ -7,12 +7,1502 @@ WINE_DEFAULT_DEBUG_CHANNEL(opengl); -const int extension_registry_size = 1485; -void *extension_funcs[1485]; +enum extensions +{ + EXT_glActiveStencilFaceEXT, + EXT_glActiveTexture, + EXT_glActiveTextureARB, + EXT_glActiveVaryingNV, + EXT_glAlphaFragmentOp1ATI, + EXT_glAlphaFragmentOp2ATI, + EXT_glAlphaFragmentOp3ATI, + EXT_glApplyTextureEXT, + EXT_glAreProgramsResidentNV, + EXT_glAreTexturesResidentEXT, + EXT_glArrayElementEXT, + EXT_glArrayObjectATI, + EXT_glAsyncMarkerSGIX, + EXT_glAttachObjectARB, + EXT_glAttachShader, + EXT_glBeginConditionalRender, + EXT_glBeginConditionalRenderNV, + EXT_glBeginFragmentShaderATI, + EXT_glBeginOcclusionQueryNV, + EXT_glBeginQuery, + EXT_glBeginQueryARB, + EXT_glBeginTransformFeedback, + EXT_glBeginTransformFeedbackEXT, + EXT_glBeginTransformFeedbackNV, + EXT_glBeginVertexShaderEXT, + EXT_glBindAttribLocation, + EXT_glBindAttribLocationARB, + EXT_glBindBuffer, + EXT_glBindBufferARB, + EXT_glBindBufferBase, + EXT_glBindBufferBaseEXT, + EXT_glBindBufferBaseNV, + EXT_glBindBufferOffsetEXT, + EXT_glBindBufferOffsetNV, + EXT_glBindBufferRange, + EXT_glBindBufferRangeEXT, + EXT_glBindBufferRangeNV, + EXT_glBindFragDataLocation, + EXT_glBindFragDataLocationEXT, + EXT_glBindFragmentShaderATI, + EXT_glBindFramebuffer, + EXT_glBindFramebufferEXT, + EXT_glBindLightParameterEXT, + EXT_glBindMaterialParameterEXT, + EXT_glBindMultiTextureEXT, + EXT_glBindParameterEXT, + EXT_glBindProgramARB, + EXT_glBindProgramNV, + EXT_glBindRenderbuffer, + EXT_glBindRenderbufferEXT, + EXT_glBindTexGenParameterEXT, + EXT_glBindTextureEXT, + EXT_glBindTextureUnitParameterEXT, + EXT_glBindVertexArray, + EXT_glBindVertexArrayAPPLE, + EXT_glBindVertexShaderEXT, + EXT_glBinormal3bEXT, + EXT_glBinormal3bvEXT, + EXT_glBinormal3dEXT, + EXT_glBinormal3dvEXT, + EXT_glBinormal3fEXT, + EXT_glBinormal3fvEXT, + EXT_glBinormal3iEXT, + EXT_glBinormal3ivEXT, + EXT_glBinormal3sEXT, + EXT_glBinormal3svEXT, + EXT_glBinormalPointerEXT, + EXT_glBlendColorEXT, + EXT_glBlendEquationEXT, + EXT_glBlendEquationSeparate, + EXT_glBlendEquationSeparateEXT, + EXT_glBlendFuncSeparate, + EXT_glBlendFuncSeparateEXT, + EXT_glBlendFuncSeparateINGR, + EXT_glBlitFramebuffer, + EXT_glBlitFramebufferEXT, + EXT_glBufferData, + EXT_glBufferDataARB, + EXT_glBufferParameteriAPPLE, + EXT_glBufferRegionEnabled, + EXT_glBufferSubData, + EXT_glBufferSubDataARB, + EXT_glCheckFramebufferStatus, + EXT_glCheckFramebufferStatusEXT, + EXT_glCheckNamedFramebufferStatusEXT, + EXT_glClampColor, + EXT_glClampColorARB, + EXT_glClearBufferfi, + EXT_glClearBufferfv, + EXT_glClearBufferiv, + EXT_glClearBufferuiv, + EXT_glClearColorIiEXT, + EXT_glClearColorIuiEXT, + EXT_glClearDepthdNV, + EXT_glClientActiveTexture, + EXT_glClientActiveTextureARB, + EXT_glClientActiveVertexStreamATI, + EXT_glClientAttribDefaultEXT, + EXT_glColor3fVertex3fSUN, + EXT_glColor3fVertex3fvSUN, + EXT_glColor3hNV, + EXT_glColor3hvNV, + EXT_glColor4fNormal3fVertex3fSUN, + EXT_glColor4fNormal3fVertex3fvSUN, + EXT_glColor4hNV, + EXT_glColor4hvNV, + EXT_glColor4ubVertex2fSUN, + EXT_glColor4ubVertex2fvSUN, + EXT_glColor4ubVertex3fSUN, + EXT_glColor4ubVertex3fvSUN, + EXT_glColorFragmentOp1ATI, + EXT_glColorFragmentOp2ATI, + EXT_glColorFragmentOp3ATI, + EXT_glColorMaskIndexedEXT, + EXT_glColorMaski, + EXT_glColorPointerEXT, + EXT_glColorPointerListIBM, + EXT_glColorPointervINTEL, + EXT_glColorSubTableEXT, + EXT_glColorTableEXT, + EXT_glColorTableParameterfvSGI, + EXT_glColorTableParameterivSGI, + EXT_glColorTableSGI, + EXT_glCombinerInputNV, + EXT_glCombinerOutputNV, + EXT_glCombinerParameterfNV, + EXT_glCombinerParameterfvNV, + EXT_glCombinerParameteriNV, + EXT_glCombinerParameterivNV, + EXT_glCombinerStageParameterfvNV, + EXT_glCompileShader, + EXT_glCompileShaderARB, + EXT_glCompressedMultiTexImage1DEXT, + EXT_glCompressedMultiTexImage2DEXT, + EXT_glCompressedMultiTexImage3DEXT, + EXT_glCompressedMultiTexSubImage1DEXT, + EXT_glCompressedMultiTexSubImage2DEXT, + EXT_glCompressedMultiTexSubImage3DEXT, + EXT_glCompressedTexImage1D, + EXT_glCompressedTexImage1DARB, + EXT_glCompressedTexImage2D, + EXT_glCompressedTexImage2DARB, + EXT_glCompressedTexImage3D, + EXT_glCompressedTexImage3DARB, + EXT_glCompressedTexSubImage1D, + EXT_glCompressedTexSubImage1DARB, + EXT_glCompressedTexSubImage2D, + EXT_glCompressedTexSubImage2DARB, + EXT_glCompressedTexSubImage3D, + EXT_glCompressedTexSubImage3DARB, + EXT_glCompressedTextureImage1DEXT, + EXT_glCompressedTextureImage2DEXT, + EXT_glCompressedTextureImage3DEXT, + EXT_glCompressedTextureSubImage1DEXT, + EXT_glCompressedTextureSubImage2DEXT, + EXT_glCompressedTextureSubImage3DEXT, + EXT_glConvolutionFilter1DEXT, + EXT_glConvolutionFilter2DEXT, + EXT_glConvolutionParameterfEXT, + EXT_glConvolutionParameterfvEXT, + EXT_glConvolutionParameteriEXT, + EXT_glConvolutionParameterivEXT, + EXT_glCopyColorSubTableEXT, + EXT_glCopyColorTableSGI, + EXT_glCopyConvolutionFilter1DEXT, + EXT_glCopyConvolutionFilter2DEXT, + EXT_glCopyMultiTexImage1DEXT, + EXT_glCopyMultiTexImage2DEXT, + EXT_glCopyMultiTexSubImage1DEXT, + EXT_glCopyMultiTexSubImage2DEXT, + EXT_glCopyMultiTexSubImage3DEXT, + EXT_glCopyTexImage1DEXT, + EXT_glCopyTexImage2DEXT, + EXT_glCopyTexSubImage1DEXT, + EXT_glCopyTexSubImage2DEXT, + EXT_glCopyTexSubImage3DEXT, + EXT_glCopyTextureImage1DEXT, + EXT_glCopyTextureImage2DEXT, + EXT_glCopyTextureSubImage1DEXT, + EXT_glCopyTextureSubImage2DEXT, + EXT_glCopyTextureSubImage3DEXT, + EXT_glCreateProgram, + EXT_glCreateProgramObjectARB, + EXT_glCreateShader, + EXT_glCreateShaderObjectARB, + EXT_glCullParameterdvEXT, + EXT_glCullParameterfvEXT, + EXT_glCurrentPaletteMatrixARB, + EXT_glDeformSGIX, + EXT_glDeformationMap3dSGIX, + EXT_glDeformationMap3fSGIX, + EXT_glDeleteAsyncMarkersSGIX, + EXT_glDeleteBufferRegion, + EXT_glDeleteBuffers, + EXT_glDeleteBuffersARB, + EXT_glDeleteFencesAPPLE, + EXT_glDeleteFencesNV, + EXT_glDeleteFragmentShaderATI, + EXT_glDeleteFramebuffers, + EXT_glDeleteFramebuffersEXT, + EXT_glDeleteObjectARB, + EXT_glDeleteObjectBufferATI, + EXT_glDeleteOcclusionQueriesNV, + EXT_glDeleteProgram, + EXT_glDeleteProgramsARB, + EXT_glDeleteProgramsNV, + EXT_glDeleteQueries, + EXT_glDeleteQueriesARB, + EXT_glDeleteRenderbuffers, + EXT_glDeleteRenderbuffersEXT, + EXT_glDeleteShader, + EXT_glDeleteTexturesEXT, + EXT_glDeleteVertexArrays, + EXT_glDeleteVertexArraysAPPLE, + EXT_glDeleteVertexShaderEXT, + EXT_glDepthBoundsEXT, + EXT_glDepthBoundsdNV, + EXT_glDepthRangedNV, + EXT_glDetachObjectARB, + EXT_glDetachShader, + EXT_glDetailTexFuncSGIS, + EXT_glDisableClientStateIndexedEXT, + EXT_glDisableIndexedEXT, + EXT_glDisableVariantClientStateEXT, + EXT_glDisableVertexAttribArray, + EXT_glDisableVertexAttribArrayARB, + EXT_glDisablei, + EXT_glDrawArraysEXT, + EXT_glDrawArraysInstancedARB, + EXT_glDrawArraysInstancedEXT, + EXT_glDrawBufferRegion, + EXT_glDrawBuffers, + EXT_glDrawBuffersARB, + EXT_glDrawBuffersATI, + EXT_glDrawElementArrayAPPLE, + EXT_glDrawElementArrayATI, + EXT_glDrawElementsInstancedARB, + EXT_glDrawElementsInstancedEXT, + EXT_glDrawMeshArraysSUN, + EXT_glDrawRangeElementArrayAPPLE, + EXT_glDrawRangeElementArrayATI, + EXT_glDrawRangeElementsEXT, + EXT_glEdgeFlagPointerEXT, + EXT_glEdgeFlagPointerListIBM, + EXT_glElementPointerAPPLE, + EXT_glElementPointerATI, + EXT_glEnableClientStateIndexedEXT, + EXT_glEnableIndexedEXT, + EXT_glEnableVariantClientStateEXT, + EXT_glEnableVertexAttribArray, + EXT_glEnableVertexAttribArrayARB, + EXT_glEnablei, + EXT_glEndConditionalRender, + EXT_glEndConditionalRenderNV, + EXT_glEndFragmentShaderATI, + EXT_glEndOcclusionQueryNV, + EXT_glEndQuery, + EXT_glEndQueryARB, + EXT_glEndTransformFeedback, + EXT_glEndTransformFeedbackEXT, + EXT_glEndTransformFeedbackNV, + EXT_glEndVertexShaderEXT, + EXT_glEvalMapsNV, + EXT_glExecuteProgramNV, + EXT_glExtractComponentEXT, + EXT_glFinalCombinerInputNV, + EXT_glFinishAsyncSGIX, + EXT_glFinishFenceAPPLE, + EXT_glFinishFenceNV, + EXT_glFinishObjectAPPLE, + EXT_glFinishTextureSUNX, + EXT_glFlushMappedBufferRange, + EXT_glFlushMappedBufferRangeAPPLE, + EXT_glFlushPixelDataRangeNV, + EXT_glFlushRasterSGIX, + EXT_glFlushVertexArrayRangeAPPLE, + EXT_glFlushVertexArrayRangeNV, + EXT_glFogCoordPointer, + EXT_glFogCoordPointerEXT, + EXT_glFogCoordPointerListIBM, + EXT_glFogCoordd, + EXT_glFogCoorddEXT, + EXT_glFogCoorddv, + EXT_glFogCoorddvEXT, + EXT_glFogCoordf, + EXT_glFogCoordfEXT, + EXT_glFogCoordfv, + EXT_glFogCoordfvEXT, + EXT_glFogCoordhNV, + EXT_glFogCoordhvNV, + EXT_glFogFuncSGIS, + EXT_glFragmentColorMaterialSGIX, + EXT_glFragmentLightModelfSGIX, + EXT_glFragmentLightModelfvSGIX, + EXT_glFragmentLightModeliSGIX, + EXT_glFragmentLightModelivSGIX, + EXT_glFragmentLightfSGIX, + EXT_glFragmentLightfvSGIX, + EXT_glFragmentLightiSGIX, + EXT_glFragmentLightivSGIX, + EXT_glFragmentMaterialfSGIX, + EXT_glFragmentMaterialfvSGIX, + EXT_glFragmentMaterialiSGIX, + EXT_glFragmentMaterialivSGIX, + EXT_glFrameTerminatorGREMEDY, + EXT_glFrameZoomSGIX, + EXT_glFramebufferDrawBufferEXT, + EXT_glFramebufferDrawBuffersEXT, + EXT_glFramebufferReadBufferEXT, + EXT_glFramebufferRenderbuffer, + EXT_glFramebufferRenderbufferEXT, + EXT_glFramebufferTexture1D, + EXT_glFramebufferTexture1DEXT, + EXT_glFramebufferTexture2D, + EXT_glFramebufferTexture2DEXT, + EXT_glFramebufferTexture3D, + EXT_glFramebufferTexture3DEXT, + EXT_glFramebufferTextureARB, + EXT_glFramebufferTextureEXT, + EXT_glFramebufferTextureFaceARB, + EXT_glFramebufferTextureFaceEXT, + EXT_glFramebufferTextureLayer, + EXT_glFramebufferTextureLayerARB, + EXT_glFramebufferTextureLayerEXT, + EXT_glFreeObjectBufferATI, + EXT_glGenAsyncMarkersSGIX, + EXT_glGenBuffers, + EXT_glGenBuffersARB, + EXT_glGenFencesAPPLE, + EXT_glGenFencesNV, + EXT_glGenFragmentShadersATI, + EXT_glGenFramebuffers, + EXT_glGenFramebuffersEXT, + EXT_glGenOcclusionQueriesNV, + EXT_glGenProgramsARB, + EXT_glGenProgramsNV, + EXT_glGenQueries, + EXT_glGenQueriesARB, + EXT_glGenRenderbuffers, + EXT_glGenRenderbuffersEXT, + EXT_glGenSymbolsEXT, + EXT_glGenTexturesEXT, + EXT_glGenVertexArrays, + EXT_glGenVertexArraysAPPLE, + EXT_glGenVertexShadersEXT, + EXT_glGenerateMipmap, + EXT_glGenerateMipmapEXT, + EXT_glGenerateMultiTexMipmapEXT, + EXT_glGenerateTextureMipmapEXT, + EXT_glGetActiveAttrib, + EXT_glGetActiveAttribARB, + EXT_glGetActiveUniform, + EXT_glGetActiveUniformARB, + EXT_glGetActiveVaryingNV, + EXT_glGetArrayObjectfvATI, + EXT_glGetArrayObjectivATI, + EXT_glGetAttachedObjectsARB, + EXT_glGetAttachedShaders, + EXT_glGetAttribLocation, + EXT_glGetAttribLocationARB, + EXT_glGetBooleanIndexedvEXT, + EXT_glGetBooleani_v, + EXT_glGetBufferParameteriv, + EXT_glGetBufferParameterivARB, + EXT_glGetBufferPointerv, + EXT_glGetBufferPointervARB, + EXT_glGetBufferSubData, + EXT_glGetBufferSubDataARB, + EXT_glGetColorTableEXT, + EXT_glGetColorTableParameterfvEXT, + EXT_glGetColorTableParameterfvSGI, + EXT_glGetColorTableParameterivEXT, + EXT_glGetColorTableParameterivSGI, + EXT_glGetColorTableSGI, + EXT_glGetCombinerInputParameterfvNV, + EXT_glGetCombinerInputParameterivNV, + EXT_glGetCombinerOutputParameterfvNV, + EXT_glGetCombinerOutputParameterivNV, + EXT_glGetCombinerStageParameterfvNV, + EXT_glGetCompressedMultiTexImageEXT, + EXT_glGetCompressedTexImage, + EXT_glGetCompressedTexImageARB, + EXT_glGetCompressedTextureImageEXT, + EXT_glGetConvolutionFilterEXT, + EXT_glGetConvolutionParameterfvEXT, + EXT_glGetConvolutionParameterivEXT, + EXT_glGetDetailTexFuncSGIS, + EXT_glGetDoubleIndexedvEXT, + EXT_glGetFenceivNV, + EXT_glGetFinalCombinerInputParameterfvNV, + EXT_glGetFinalCombinerInputParameterivNV, + EXT_glGetFloatIndexedvEXT, + EXT_glGetFogFuncSGIS, + EXT_glGetFragDataLocation, + EXT_glGetFragDataLocationEXT, + EXT_glGetFragmentLightfvSGIX, + EXT_glGetFragmentLightivSGIX, + EXT_glGetFragmentMaterialfvSGIX, + EXT_glGetFragmentMaterialivSGIX, + EXT_glGetFramebufferAttachmentParameteriv, + EXT_glGetFramebufferAttachmentParameterivEXT, + EXT_glGetFramebufferParameterivEXT, + EXT_glGetHandleARB, + EXT_glGetHistogramEXT, + EXT_glGetHistogramParameterfvEXT, + EXT_glGetHistogramParameterivEXT, + EXT_glGetImageTransformParameterfvHP, + EXT_glGetImageTransformParameterivHP, + EXT_glGetInfoLogARB, + EXT_glGetInstrumentsSGIX, + EXT_glGetIntegerIndexedvEXT, + EXT_glGetIntegeri_v, + EXT_glGetInvariantBooleanvEXT, + EXT_glGetInvariantFloatvEXT, + EXT_glGetInvariantIntegervEXT, + EXT_glGetListParameterfvSGIX, + EXT_glGetListParameterivSGIX, + EXT_glGetLocalConstantBooleanvEXT, + EXT_glGetLocalConstantFloatvEXT, + EXT_glGetLocalConstantIntegervEXT, + EXT_glGetMapAttribParameterfvNV, + EXT_glGetMapAttribParameterivNV, + EXT_glGetMapControlPointsNV, + EXT_glGetMapParameterfvNV, + EXT_glGetMapParameterivNV, + EXT_glGetMinmaxEXT, + EXT_glGetMinmaxParameterfvEXT, + EXT_glGetMinmaxParameterivEXT, + EXT_glGetMultiTexEnvfvEXT, + EXT_glGetMultiTexEnvivEXT, + EXT_glGetMultiTexGendvEXT, + EXT_glGetMultiTexGenfvEXT, + EXT_glGetMultiTexGenivEXT, + EXT_glGetMultiTexImageEXT, + EXT_glGetMultiTexLevelParameterfvEXT, + EXT_glGetMultiTexLevelParameterivEXT, + EXT_glGetMultiTexParameterIivEXT, + EXT_glGetMultiTexParameterIuivEXT, + EXT_glGetMultiTexParameterfvEXT, + EXT_glGetMultiTexParameterivEXT, + EXT_glGetNamedBufferParameterivEXT, + EXT_glGetNamedBufferPointervEXT, + EXT_glGetNamedBufferSubDataEXT, + EXT_glGetNamedFramebufferAttachmentParameterivEXT, + EXT_glGetNamedProgramLocalParameterIivEXT, + EXT_glGetNamedProgramLocalParameterIuivEXT, + EXT_glGetNamedProgramLocalParameterdvEXT, + EXT_glGetNamedProgramLocalParameterfvEXT, + EXT_glGetNamedProgramStringEXT, + EXT_glGetNamedProgramivEXT, + EXT_glGetNamedRenderbufferParameterivEXT, + EXT_glGetObjectBufferfvATI, + EXT_glGetObjectBufferivATI, + EXT_glGetObjectParameterfvARB, + EXT_glGetObjectParameterivARB, + EXT_glGetOcclusionQueryivNV, + EXT_glGetOcclusionQueryuivNV, + EXT_glGetPixelTexGenParameterfvSGIS, + EXT_glGetPixelTexGenParameterivSGIS, + EXT_glGetPointerIndexedvEXT, + EXT_glGetPointervEXT, + EXT_glGetProgramEnvParameterIivNV, + EXT_glGetProgramEnvParameterIuivNV, + EXT_glGetProgramEnvParameterdvARB, + EXT_glGetProgramEnvParameterfvARB, + EXT_glGetProgramInfoLog, + EXT_glGetProgramLocalParameterIivNV, + EXT_glGetProgramLocalParameterIuivNV, + EXT_glGetProgramLocalParameterdvARB, + EXT_glGetProgramLocalParameterfvARB, + EXT_glGetProgramNamedParameterdvNV, + EXT_glGetProgramNamedParameterfvNV, + EXT_glGetProgramParameterdvNV, + EXT_glGetProgramParameterfvNV, + EXT_glGetProgramStringARB, + EXT_glGetProgramStringNV, + EXT_glGetProgramiv, + EXT_glGetProgramivARB, + EXT_glGetProgramivNV, + EXT_glGetQueryObjecti64vEXT, + EXT_glGetQueryObjectiv, + EXT_glGetQueryObjectivARB, + EXT_glGetQueryObjectui64vEXT, + EXT_glGetQueryObjectuiv, + EXT_glGetQueryObjectuivARB, + EXT_glGetQueryiv, + EXT_glGetQueryivARB, + EXT_glGetRenderbufferParameteriv, + EXT_glGetRenderbufferParameterivEXT, + EXT_glGetSeparableFilterEXT, + EXT_glGetShaderInfoLog, + EXT_glGetShaderSource, + EXT_glGetShaderSourceARB, + EXT_glGetShaderiv, + EXT_glGetSharpenTexFuncSGIS, + EXT_glGetStringi, + EXT_glGetTexBumpParameterfvATI, + EXT_glGetTexBumpParameterivATI, + EXT_glGetTexFilterFuncSGIS, + EXT_glGetTexParameterIiv, + EXT_glGetTexParameterIivEXT, + EXT_glGetTexParameterIuiv, + EXT_glGetTexParameterIuivEXT, + EXT_glGetTextureImageEXT, + EXT_glGetTextureLevelParameterfvEXT, + EXT_glGetTextureLevelParameterivEXT, + EXT_glGetTextureParameterIivEXT, + EXT_glGetTextureParameterIuivEXT, + EXT_glGetTextureParameterfvEXT, + EXT_glGetTextureParameterivEXT, + EXT_glGetTrackMatrixivNV, + EXT_glGetTransformFeedbackVarying, + EXT_glGetTransformFeedbackVaryingEXT, + EXT_glGetTransformFeedbackVaryingNV, + EXT_glGetUniformBufferSizeEXT, + EXT_glGetUniformLocation, + EXT_glGetUniformLocationARB, + EXT_glGetUniformOffsetEXT, + EXT_glGetUniformfv, + EXT_glGetUniformfvARB, + EXT_glGetUniformiv, + EXT_glGetUniformivARB, + EXT_glGetUniformuiv, + EXT_glGetUniformuivEXT, + EXT_glGetVariantArrayObjectfvATI, + EXT_glGetVariantArrayObjectivATI, + EXT_glGetVariantBooleanvEXT, + EXT_glGetVariantFloatvEXT, + EXT_glGetVariantIntegervEXT, + EXT_glGetVariantPointervEXT, + EXT_glGetVaryingLocationNV, + EXT_glGetVertexAttribArrayObjectfvATI, + EXT_glGetVertexAttribArrayObjectivATI, + EXT_glGetVertexAttribIiv, + EXT_glGetVertexAttribIivEXT, + EXT_glGetVertexAttribIuiv, + EXT_glGetVertexAttribIuivEXT, + EXT_glGetVertexAttribPointerv, + EXT_glGetVertexAttribPointervARB, + EXT_glGetVertexAttribPointervNV, + EXT_glGetVertexAttribdv, + EXT_glGetVertexAttribdvARB, + EXT_glGetVertexAttribdvNV, + EXT_glGetVertexAttribfv, + EXT_glGetVertexAttribfvARB, + EXT_glGetVertexAttribfvNV, + EXT_glGetVertexAttribiv, + EXT_glGetVertexAttribivARB, + EXT_glGetVertexAttribivNV, + EXT_glGlobalAlphaFactorbSUN, + EXT_glGlobalAlphaFactordSUN, + EXT_glGlobalAlphaFactorfSUN, + EXT_glGlobalAlphaFactoriSUN, + EXT_glGlobalAlphaFactorsSUN, + EXT_glGlobalAlphaFactorubSUN, + EXT_glGlobalAlphaFactoruiSUN, + EXT_glGlobalAlphaFactorusSUN, + EXT_glHintPGI, + EXT_glHistogramEXT, + EXT_glIglooInterfaceSGIX, + EXT_glImageTransformParameterfHP, + EXT_glImageTransformParameterfvHP, + EXT_glImageTransformParameteriHP, + EXT_glImageTransformParameterivHP, + EXT_glIndexFuncEXT, + EXT_glIndexMaterialEXT, + EXT_glIndexPointerEXT, + EXT_glIndexPointerListIBM, + EXT_glInsertComponentEXT, + EXT_glInstrumentsBufferSGIX, + EXT_glIsAsyncMarkerSGIX, + EXT_glIsBuffer, + EXT_glIsBufferARB, + EXT_glIsEnabledIndexedEXT, + EXT_glIsEnabledi, + EXT_glIsFenceAPPLE, + EXT_glIsFenceNV, + EXT_glIsFramebuffer, + EXT_glIsFramebufferEXT, + EXT_glIsObjectBufferATI, + EXT_glIsOcclusionQueryNV, + EXT_glIsProgram, + EXT_glIsProgramARB, + EXT_glIsProgramNV, + EXT_glIsQuery, + EXT_glIsQueryARB, + EXT_glIsRenderbuffer, + EXT_glIsRenderbufferEXT, + EXT_glIsShader, + EXT_glIsTextureEXT, + EXT_glIsVariantEnabledEXT, + EXT_glIsVertexArray, + EXT_glIsVertexArrayAPPLE, + EXT_glLightEnviSGIX, + EXT_glLinkProgram, + EXT_glLinkProgramARB, + EXT_glListParameterfSGIX, + EXT_glListParameterfvSGIX, + EXT_glListParameteriSGIX, + EXT_glListParameterivSGIX, + EXT_glLoadIdentityDeformationMapSGIX, + EXT_glLoadProgramNV, + EXT_glLoadTransposeMatrixd, + EXT_glLoadTransposeMatrixdARB, + EXT_glLoadTransposeMatrixf, + EXT_glLoadTransposeMatrixfARB, + EXT_glLockArraysEXT, + EXT_glMTexCoord2fSGIS, + EXT_glMTexCoord2fvSGIS, + EXT_glMapBuffer, + EXT_glMapBufferARB, + EXT_glMapBufferRange, + EXT_glMapControlPointsNV, + EXT_glMapNamedBufferEXT, + EXT_glMapObjectBufferATI, + EXT_glMapParameterfvNV, + EXT_glMapParameterivNV, + EXT_glMatrixFrustumEXT, + EXT_glMatrixIndexPointerARB, + EXT_glMatrixIndexubvARB, + EXT_glMatrixIndexuivARB, + EXT_glMatrixIndexusvARB, + EXT_glMatrixLoadIdentityEXT, + EXT_glMatrixLoadTransposedEXT, + EXT_glMatrixLoadTransposefEXT, + EXT_glMatrixLoaddEXT, + EXT_glMatrixLoadfEXT, + EXT_glMatrixMultTransposedEXT, + EXT_glMatrixMultTransposefEXT, + EXT_glMatrixMultdEXT, + EXT_glMatrixMultfEXT, + EXT_glMatrixOrthoEXT, + EXT_glMatrixPopEXT, + EXT_glMatrixPushEXT, + EXT_glMatrixRotatedEXT, + EXT_glMatrixRotatefEXT, + EXT_glMatrixScaledEXT, + EXT_glMatrixScalefEXT, + EXT_glMatrixTranslatedEXT, + EXT_glMatrixTranslatefEXT, + EXT_glMinmaxEXT, + EXT_glMultTransposeMatrixd, + EXT_glMultTransposeMatrixdARB, + EXT_glMultTransposeMatrixf, + EXT_glMultTransposeMatrixfARB, + EXT_glMultiDrawArrays, + EXT_glMultiDrawArraysEXT, + EXT_glMultiDrawElementArrayAPPLE, + EXT_glMultiDrawElements, + EXT_glMultiDrawElementsEXT, + EXT_glMultiDrawRangeElementArrayAPPLE, + EXT_glMultiModeDrawArraysIBM, + EXT_glMultiModeDrawElementsIBM, + EXT_glMultiTexBufferEXT, + EXT_glMultiTexCoord1d, + EXT_glMultiTexCoord1dARB, + EXT_glMultiTexCoord1dSGIS, + EXT_glMultiTexCoord1dv, + EXT_glMultiTexCoord1dvARB, + EXT_glMultiTexCoord1dvSGIS, + EXT_glMultiTexCoord1f, + EXT_glMultiTexCoord1fARB, + EXT_glMultiTexCoord1fSGIS, + EXT_glMultiTexCoord1fv, + EXT_glMultiTexCoord1fvARB, + EXT_glMultiTexCoord1fvSGIS, + EXT_glMultiTexCoord1hNV, + EXT_glMultiTexCoord1hvNV, + EXT_glMultiTexCoord1i, + EXT_glMultiTexCoord1iARB, + EXT_glMultiTexCoord1iSGIS, + EXT_glMultiTexCoord1iv, + EXT_glMultiTexCoord1ivARB, + EXT_glMultiTexCoord1ivSGIS, + EXT_glMultiTexCoord1s, + EXT_glMultiTexCoord1sARB, + EXT_glMultiTexCoord1sSGIS, + EXT_glMultiTexCoord1sv, + EXT_glMultiTexCoord1svARB, + EXT_glMultiTexCoord1svSGIS, + EXT_glMultiTexCoord2d, + EXT_glMultiTexCoord2dARB, + EXT_glMultiTexCoord2dSGIS, + EXT_glMultiTexCoord2dv, + EXT_glMultiTexCoord2dvARB, + EXT_glMultiTexCoord2dvSGIS, + EXT_glMultiTexCoord2f, + EXT_glMultiTexCoord2fARB, + EXT_glMultiTexCoord2fSGIS, + EXT_glMultiTexCoord2fv, + EXT_glMultiTexCoord2fvARB, + EXT_glMultiTexCoord2fvSGIS, + EXT_glMultiTexCoord2hNV, + EXT_glMultiTexCoord2hvNV, + EXT_glMultiTexCoord2i, + EXT_glMultiTexCoord2iARB, + EXT_glMultiTexCoord2iSGIS, + EXT_glMultiTexCoord2iv, + EXT_glMultiTexCoord2ivARB, + EXT_glMultiTexCoord2ivSGIS, + EXT_glMultiTexCoord2s, + EXT_glMultiTexCoord2sARB, + EXT_glMultiTexCoord2sSGIS, + EXT_glMultiTexCoord2sv, + EXT_glMultiTexCoord2svARB, + EXT_glMultiTexCoord2svSGIS, + EXT_glMultiTexCoord3d, + EXT_glMultiTexCoord3dARB, + EXT_glMultiTexCoord3dSGIS, + EXT_glMultiTexCoord3dv, + EXT_glMultiTexCoord3dvARB, + EXT_glMultiTexCoord3dvSGIS, + EXT_glMultiTexCoord3f, + EXT_glMultiTexCoord3fARB, + EXT_glMultiTexCoord3fSGIS, + EXT_glMultiTexCoord3fv, + EXT_glMultiTexCoord3fvARB, + EXT_glMultiTexCoord3fvSGIS, + EXT_glMultiTexCoord3hNV, + EXT_glMultiTexCoord3hvNV, + EXT_glMultiTexCoord3i, + EXT_glMultiTexCoord3iARB, + EXT_glMultiTexCoord3iSGIS, + EXT_glMultiTexCoord3iv, + EXT_glMultiTexCoord3ivARB, + EXT_glMultiTexCoord3ivSGIS, + EXT_glMultiTexCoord3s, + EXT_glMultiTexCoord3sARB, + EXT_glMultiTexCoord3sSGIS, + EXT_glMultiTexCoord3sv, + EXT_glMultiTexCoord3svARB, + EXT_glMultiTexCoord3svSGIS, + EXT_glMultiTexCoord4d, + EXT_glMultiTexCoord4dARB, + EXT_glMultiTexCoord4dSGIS, + EXT_glMultiTexCoord4dv, + EXT_glMultiTexCoord4dvARB, + EXT_glMultiTexCoord4dvSGIS, + EXT_glMultiTexCoord4f, + EXT_glMultiTexCoord4fARB, + EXT_glMultiTexCoord4fSGIS, + EXT_glMultiTexCoord4fv, + EXT_glMultiTexCoord4fvARB, + EXT_glMultiTexCoord4fvSGIS, + EXT_glMultiTexCoord4hNV, + EXT_glMultiTexCoord4hvNV, + EXT_glMultiTexCoord4i, + EXT_glMultiTexCoord4iARB, + EXT_glMultiTexCoord4iSGIS, + EXT_glMultiTexCoord4iv, + EXT_glMultiTexCoord4ivARB, + EXT_glMultiTexCoord4ivSGIS, + EXT_glMultiTexCoord4s, + EXT_glMultiTexCoord4sARB, + EXT_glMultiTexCoord4sSGIS, + EXT_glMultiTexCoord4sv, + EXT_glMultiTexCoord4svARB, + EXT_glMultiTexCoord4svSGIS, + EXT_glMultiTexCoordPointerEXT, + EXT_glMultiTexCoordPointerSGIS, + EXT_glMultiTexEnvfEXT, + EXT_glMultiTexEnvfvEXT, + EXT_glMultiTexEnviEXT, + EXT_glMultiTexEnvivEXT, + EXT_glMultiTexGendEXT, + EXT_glMultiTexGendvEXT, + EXT_glMultiTexGenfEXT, + EXT_glMultiTexGenfvEXT, + EXT_glMultiTexGeniEXT, + EXT_glMultiTexGenivEXT, + EXT_glMultiTexImage1DEXT, + EXT_glMultiTexImage2DEXT, + EXT_glMultiTexImage3DEXT, + EXT_glMultiTexParameterIivEXT, + EXT_glMultiTexParameterIuivEXT, + EXT_glMultiTexParameterfEXT, + EXT_glMultiTexParameterfvEXT, + EXT_glMultiTexParameteriEXT, + EXT_glMultiTexParameterivEXT, + EXT_glMultiTexRenderbufferEXT, + EXT_glMultiTexSubImage1DEXT, + EXT_glMultiTexSubImage2DEXT, + EXT_glMultiTexSubImage3DEXT, + EXT_glNamedBufferDataEXT, + EXT_glNamedBufferSubDataEXT, + EXT_glNamedFramebufferRenderbufferEXT, + EXT_glNamedFramebufferTexture1DEXT, + EXT_glNamedFramebufferTexture2DEXT, + EXT_glNamedFramebufferTexture3DEXT, + EXT_glNamedFramebufferTextureEXT, + EXT_glNamedFramebufferTextureFaceEXT, + EXT_glNamedFramebufferTextureLayerEXT, + EXT_glNamedProgramLocalParameter4dEXT, + EXT_glNamedProgramLocalParameter4dvEXT, + EXT_glNamedProgramLocalParameter4fEXT, + EXT_glNamedProgramLocalParameter4fvEXT, + EXT_glNamedProgramLocalParameterI4iEXT, + EXT_glNamedProgramLocalParameterI4ivEXT, + EXT_glNamedProgramLocalParameterI4uiEXT, + EXT_glNamedProgramLocalParameterI4uivEXT, + EXT_glNamedProgramLocalParameters4fvEXT, + EXT_glNamedProgramLocalParametersI4ivEXT, + EXT_glNamedProgramLocalParametersI4uivEXT, + EXT_glNamedProgramStringEXT, + EXT_glNamedRenderbufferStorageEXT, + EXT_glNamedRenderbufferStorageMultisampleCoverageEXT, + EXT_glNamedRenderbufferStorageMultisampleEXT, + EXT_glNewBufferRegion, + EXT_glNewObjectBufferATI, + EXT_glNormal3fVertex3fSUN, + EXT_glNormal3fVertex3fvSUN, + EXT_glNormal3hNV, + EXT_glNormal3hvNV, + EXT_glNormalPointerEXT, + EXT_glNormalPointerListIBM, + EXT_glNormalPointervINTEL, + EXT_glNormalStream3bATI, + EXT_glNormalStream3bvATI, + EXT_glNormalStream3dATI, + EXT_glNormalStream3dvATI, + EXT_glNormalStream3fATI, + EXT_glNormalStream3fvATI, + EXT_glNormalStream3iATI, + EXT_glNormalStream3ivATI, + EXT_glNormalStream3sATI, + EXT_glNormalStream3svATI, + EXT_glPNTrianglesfATI, + EXT_glPNTrianglesiATI, + EXT_glPassTexCoordATI, + EXT_glPixelDataRangeNV, + EXT_glPixelTexGenParameterfSGIS, + EXT_glPixelTexGenParameterfvSGIS, + EXT_glPixelTexGenParameteriSGIS, + EXT_glPixelTexGenParameterivSGIS, + EXT_glPixelTexGenSGIX, + EXT_glPixelTransformParameterfEXT, + EXT_glPixelTransformParameterfvEXT, + EXT_glPixelTransformParameteriEXT, + EXT_glPixelTransformParameterivEXT, + EXT_glPointParameterf, + EXT_glPointParameterfARB, + EXT_glPointParameterfEXT, + EXT_glPointParameterfSGIS, + EXT_glPointParameterfv, + EXT_glPointParameterfvARB, + EXT_glPointParameterfvEXT, + EXT_glPointParameterfvSGIS, + EXT_glPointParameteri, + EXT_glPointParameteriNV, + EXT_glPointParameteriv, + EXT_glPointParameterivNV, + EXT_glPollAsyncSGIX, + EXT_glPollInstrumentsSGIX, + EXT_glPolygonOffsetEXT, + EXT_glPrimitiveRestartIndexNV, + EXT_glPrimitiveRestartNV, + EXT_glPrioritizeTexturesEXT, + EXT_glProgramBufferParametersIivNV, + EXT_glProgramBufferParametersIuivNV, + EXT_glProgramBufferParametersfvNV, + EXT_glProgramEnvParameter4dARB, + EXT_glProgramEnvParameter4dvARB, + EXT_glProgramEnvParameter4fARB, + EXT_glProgramEnvParameter4fvARB, + EXT_glProgramEnvParameterI4iNV, + EXT_glProgramEnvParameterI4ivNV, + EXT_glProgramEnvParameterI4uiNV, + EXT_glProgramEnvParameterI4uivNV, + EXT_glProgramEnvParameters4fvEXT, + EXT_glProgramEnvParametersI4ivNV, + EXT_glProgramEnvParametersI4uivNV, + EXT_glProgramLocalParameter4dARB, + EXT_glProgramLocalParameter4dvARB, + EXT_glProgramLocalParameter4fARB, + EXT_glProgramLocalParameter4fvARB, + EXT_glProgramLocalParameterI4iNV, + EXT_glProgramLocalParameterI4ivNV, + EXT_glProgramLocalParameterI4uiNV, + EXT_glProgramLocalParameterI4uivNV, + EXT_glProgramLocalParameters4fvEXT, + EXT_glProgramLocalParametersI4ivNV, + EXT_glProgramLocalParametersI4uivNV, + EXT_glProgramNamedParameter4dNV, + EXT_glProgramNamedParameter4dvNV, + EXT_glProgramNamedParameter4fNV, + EXT_glProgramNamedParameter4fvNV, + EXT_glProgramParameter4dNV, + EXT_glProgramParameter4dvNV, + EXT_glProgramParameter4fNV, + EXT_glProgramParameter4fvNV, + EXT_glProgramParameteriARB, + EXT_glProgramParameteriEXT, + EXT_glProgramParameters4dvNV, + EXT_glProgramParameters4fvNV, + EXT_glProgramStringARB, + EXT_glProgramUniform1fEXT, + EXT_glProgramUniform1fvEXT, + EXT_glProgramUniform1iEXT, + EXT_glProgramUniform1ivEXT, + EXT_glProgramUniform1uiEXT, + EXT_glProgramUniform1uivEXT, + EXT_glProgramUniform2fEXT, + EXT_glProgramUniform2fvEXT, + EXT_glProgramUniform2iEXT, + EXT_glProgramUniform2ivEXT, + EXT_glProgramUniform2uiEXT, + EXT_glProgramUniform2uivEXT, + EXT_glProgramUniform3fEXT, + EXT_glProgramUniform3fvEXT, + EXT_glProgramUniform3iEXT, + EXT_glProgramUniform3ivEXT, + EXT_glProgramUniform3uiEXT, + EXT_glProgramUniform3uivEXT, + EXT_glProgramUniform4fEXT, + EXT_glProgramUniform4fvEXT, + EXT_glProgramUniform4iEXT, + EXT_glProgramUniform4ivEXT, + EXT_glProgramUniform4uiEXT, + EXT_glProgramUniform4uivEXT, + EXT_glProgramUniformMatrix2fvEXT, + EXT_glProgramUniformMatrix2x3fvEXT, + EXT_glProgramUniformMatrix2x4fvEXT, + EXT_glProgramUniformMatrix3fvEXT, + EXT_glProgramUniformMatrix3x2fvEXT, + EXT_glProgramUniformMatrix3x4fvEXT, + EXT_glProgramUniformMatrix4fvEXT, + EXT_glProgramUniformMatrix4x2fvEXT, + EXT_glProgramUniformMatrix4x3fvEXT, + EXT_glProgramVertexLimitNV, + EXT_glPushClientAttribDefaultEXT, + EXT_glReadBufferRegion, + EXT_glReadInstrumentsSGIX, + EXT_glReferencePlaneSGIX, + EXT_glRenderbufferStorage, + EXT_glRenderbufferStorageEXT, + EXT_glRenderbufferStorageMultisample, + EXT_glRenderbufferStorageMultisampleCoverageNV, + EXT_glRenderbufferStorageMultisampleEXT, + EXT_glReplacementCodePointerSUN, + EXT_glReplacementCodeubSUN, + EXT_glReplacementCodeubvSUN, + EXT_glReplacementCodeuiColor3fVertex3fSUN, + EXT_glReplacementCodeuiColor3fVertex3fvSUN, + EXT_glReplacementCodeuiColor4fNormal3fVertex3fSUN, + EXT_glReplacementCodeuiColor4fNormal3fVertex3fvSUN, + EXT_glReplacementCodeuiColor4ubVertex3fSUN, + EXT_glReplacementCodeuiColor4ubVertex3fvSUN, + EXT_glReplacementCodeuiNormal3fVertex3fSUN, + EXT_glReplacementCodeuiNormal3fVertex3fvSUN, + EXT_glReplacementCodeuiSUN, + EXT_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN, + EXT_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN, + EXT_glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN, + EXT_glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN, + EXT_glReplacementCodeuiTexCoord2fVertex3fSUN, + EXT_glReplacementCodeuiTexCoord2fVertex3fvSUN, + EXT_glReplacementCodeuiVertex3fSUN, + EXT_glReplacementCodeuiVertex3fvSUN, + EXT_glReplacementCodeuivSUN, + EXT_glReplacementCodeusSUN, + EXT_glReplacementCodeusvSUN, + EXT_glRequestResidentProgramsNV, + EXT_glResetHistogramEXT, + EXT_glResetMinmaxEXT, + EXT_glResizeBuffersMESA, + EXT_glSampleCoverage, + EXT_glSampleCoverageARB, + EXT_glSampleMapATI, + EXT_glSampleMaskEXT, + EXT_glSampleMaskSGIS, + EXT_glSamplePatternEXT, + EXT_glSamplePatternSGIS, + EXT_glSecondaryColor3b, + EXT_glSecondaryColor3bEXT, + EXT_glSecondaryColor3bv, + EXT_glSecondaryColor3bvEXT, + EXT_glSecondaryColor3d, + EXT_glSecondaryColor3dEXT, + EXT_glSecondaryColor3dv, + EXT_glSecondaryColor3dvEXT, + EXT_glSecondaryColor3f, + EXT_glSecondaryColor3fEXT, + EXT_glSecondaryColor3fv, + EXT_glSecondaryColor3fvEXT, + EXT_glSecondaryColor3hNV, + EXT_glSecondaryColor3hvNV, + EXT_glSecondaryColor3i, + EXT_glSecondaryColor3iEXT, + EXT_glSecondaryColor3iv, + EXT_glSecondaryColor3ivEXT, + EXT_glSecondaryColor3s, + EXT_glSecondaryColor3sEXT, + EXT_glSecondaryColor3sv, + EXT_glSecondaryColor3svEXT, + EXT_glSecondaryColor3ub, + EXT_glSecondaryColor3ubEXT, + EXT_glSecondaryColor3ubv, + EXT_glSecondaryColor3ubvEXT, + EXT_glSecondaryColor3ui, + EXT_glSecondaryColor3uiEXT, + EXT_glSecondaryColor3uiv, + EXT_glSecondaryColor3uivEXT, + EXT_glSecondaryColor3us, + EXT_glSecondaryColor3usEXT, + EXT_glSecondaryColor3usv, + EXT_glSecondaryColor3usvEXT, + EXT_glSecondaryColorPointer, + EXT_glSecondaryColorPointerEXT, + EXT_glSecondaryColorPointerListIBM, + EXT_glSelectTextureCoordSetSGIS, + EXT_glSelectTextureSGIS, + EXT_glSeparableFilter2DEXT, + EXT_glSetFenceAPPLE, + EXT_glSetFenceNV, + EXT_glSetFragmentShaderConstantATI, + EXT_glSetInvariantEXT, + EXT_glSetLocalConstantEXT, + EXT_glShaderOp1EXT, + EXT_glShaderOp2EXT, + EXT_glShaderOp3EXT, + EXT_glShaderSource, + EXT_glShaderSourceARB, + EXT_glSharpenTexFuncSGIS, + EXT_glSpriteParameterfSGIX, + EXT_glSpriteParameterfvSGIX, + EXT_glSpriteParameteriSGIX, + EXT_glSpriteParameterivSGIX, + EXT_glStartInstrumentsSGIX, + EXT_glStencilClearTagEXT, + EXT_glStencilFuncSeparate, + EXT_glStencilFuncSeparateATI, + EXT_glStencilMaskSeparate, + EXT_glStencilOpSeparate, + EXT_glStencilOpSeparateATI, + EXT_glStopInstrumentsSGIX, + EXT_glStringMarkerGREMEDY, + EXT_glSwizzleEXT, + EXT_glTagSampleBufferSGIX, + EXT_glTangent3bEXT, + EXT_glTangent3bvEXT, + EXT_glTangent3dEXT, + EXT_glTangent3dvEXT, + EXT_glTangent3fEXT, + EXT_glTangent3fvEXT, + EXT_glTangent3iEXT, + EXT_glTangent3ivEXT, + EXT_glTangent3sEXT, + EXT_glTangent3svEXT, + EXT_glTangentPointerEXT, + EXT_glTbufferMask3DFX, + EXT_glTestFenceAPPLE, + EXT_glTestFenceNV, + EXT_glTestObjectAPPLE, + EXT_glTexBufferARB, + EXT_glTexBufferEXT, + EXT_glTexBumpParameterfvATI, + EXT_glTexBumpParameterivATI, + EXT_glTexCoord1hNV, + EXT_glTexCoord1hvNV, + EXT_glTexCoord2fColor3fVertex3fSUN, + EXT_glTexCoord2fColor3fVertex3fvSUN, + EXT_glTexCoord2fColor4fNormal3fVertex3fSUN, + EXT_glTexCoord2fColor4fNormal3fVertex3fvSUN, + EXT_glTexCoord2fColor4ubVertex3fSUN, + EXT_glTexCoord2fColor4ubVertex3fvSUN, + EXT_glTexCoord2fNormal3fVertex3fSUN, + EXT_glTexCoord2fNormal3fVertex3fvSUN, + EXT_glTexCoord2fVertex3fSUN, + EXT_glTexCoord2fVertex3fvSUN, + EXT_glTexCoord2hNV, + EXT_glTexCoord2hvNV, + EXT_glTexCoord3hNV, + EXT_glTexCoord3hvNV, + EXT_glTexCoord4fColor4fNormal3fVertex4fSUN, + EXT_glTexCoord4fColor4fNormal3fVertex4fvSUN, + EXT_glTexCoord4fVertex4fSUN, + EXT_glTexCoord4fVertex4fvSUN, + EXT_glTexCoord4hNV, + EXT_glTexCoord4hvNV, + EXT_glTexCoordPointerEXT, + EXT_glTexCoordPointerListIBM, + EXT_glTexCoordPointervINTEL, + EXT_glTexFilterFuncSGIS, + EXT_glTexImage3DEXT, + EXT_glTexImage4DSGIS, + EXT_glTexParameterIiv, + EXT_glTexParameterIivEXT, + EXT_glTexParameterIuiv, + EXT_glTexParameterIuivEXT, + EXT_glTexSubImage1DEXT, + EXT_glTexSubImage2DEXT, + EXT_glTexSubImage3DEXT, + EXT_glTexSubImage4DSGIS, + EXT_glTextureBufferEXT, + EXT_glTextureColorMaskSGIS, + EXT_glTextureImage1DEXT, + EXT_glTextureImage2DEXT, + EXT_glTextureImage3DEXT, + EXT_glTextureLightEXT, + EXT_glTextureMaterialEXT, + EXT_glTextureNormalEXT, + EXT_glTextureParameterIivEXT, + EXT_glTextureParameterIuivEXT, + EXT_glTextureParameterfEXT, + EXT_glTextureParameterfvEXT, + EXT_glTextureParameteriEXT, + EXT_glTextureParameterivEXT, + EXT_glTextureRenderbufferEXT, + EXT_glTextureSubImage1DEXT, + EXT_glTextureSubImage2DEXT, + EXT_glTextureSubImage3DEXT, + EXT_glTrackMatrixNV, + EXT_glTransformFeedbackAttribsNV, + EXT_glTransformFeedbackVaryings, + EXT_glTransformFeedbackVaryingsEXT, + EXT_glTransformFeedbackVaryingsNV, + EXT_glUniform1f, + EXT_glUniform1fARB, + EXT_glUniform1fv, + EXT_glUniform1fvARB, + EXT_glUniform1i, + EXT_glUniform1iARB, + EXT_glUniform1iv, + EXT_glUniform1ivARB, + EXT_glUniform1ui, + EXT_glUniform1uiEXT, + EXT_glUniform1uiv, + EXT_glUniform1uivEXT, + EXT_glUniform2f, + EXT_glUniform2fARB, + EXT_glUniform2fv, + EXT_glUniform2fvARB, + EXT_glUniform2i, + EXT_glUniform2iARB, + EXT_glUniform2iv, + EXT_glUniform2ivARB, + EXT_glUniform2ui, + EXT_glUniform2uiEXT, + EXT_glUniform2uiv, + EXT_glUniform2uivEXT, + EXT_glUniform3f, + EXT_glUniform3fARB, + EXT_glUniform3fv, + EXT_glUniform3fvARB, + EXT_glUniform3i, + EXT_glUniform3iARB, + EXT_glUniform3iv, + EXT_glUniform3ivARB, + EXT_glUniform3ui, + EXT_glUniform3uiEXT, + EXT_glUniform3uiv, + EXT_glUniform3uivEXT, + EXT_glUniform4f, + EXT_glUniform4fARB, + EXT_glUniform4fv, + EXT_glUniform4fvARB, + EXT_glUniform4i, + EXT_glUniform4iARB, + EXT_glUniform4iv, + EXT_glUniform4ivARB, + EXT_glUniform4ui, + EXT_glUniform4uiEXT, + EXT_glUniform4uiv, + EXT_glUniform4uivEXT, + EXT_glUniformBufferEXT, + EXT_glUniformMatrix2fv, + EXT_glUniformMatrix2fvARB, + EXT_glUniformMatrix2x3fv, + EXT_glUniformMatrix2x4fv, + EXT_glUniformMatrix3fv, + EXT_glUniformMatrix3fvARB, + EXT_glUniformMatrix3x2fv, + EXT_glUniformMatrix3x4fv, + EXT_glUniformMatrix4fv, + EXT_glUniformMatrix4fvARB, + EXT_glUniformMatrix4x2fv, + EXT_glUniformMatrix4x3fv, + EXT_glUnlockArraysEXT, + EXT_glUnmapBuffer, + EXT_glUnmapBufferARB, + EXT_glUnmapNamedBufferEXT, + EXT_glUnmapObjectBufferATI, + EXT_glUpdateObjectBufferATI, + EXT_glUseProgram, + EXT_glUseProgramObjectARB, + EXT_glValidateProgram, + EXT_glValidateProgramARB, + EXT_glVariantArrayObjectATI, + EXT_glVariantPointerEXT, + EXT_glVariantbvEXT, + EXT_glVariantdvEXT, + EXT_glVariantfvEXT, + EXT_glVariantivEXT, + EXT_glVariantsvEXT, + EXT_glVariantubvEXT, + EXT_glVariantuivEXT, + EXT_glVariantusvEXT, + EXT_glVertex2hNV, + EXT_glVertex2hvNV, + EXT_glVertex3hNV, + EXT_glVertex3hvNV, + EXT_glVertex4hNV, + EXT_glVertex4hvNV, + EXT_glVertexArrayParameteriAPPLE, + EXT_glVertexArrayRangeAPPLE, + EXT_glVertexArrayRangeNV, + EXT_glVertexAttrib1d, + EXT_glVertexAttrib1dARB, + EXT_glVertexAttrib1dNV, + EXT_glVertexAttrib1dv, + EXT_glVertexAttrib1dvARB, + EXT_glVertexAttrib1dvNV, + EXT_glVertexAttrib1f, + EXT_glVertexAttrib1fARB, + EXT_glVertexAttrib1fNV, + EXT_glVertexAttrib1fv, + EXT_glVertexAttrib1fvARB, + EXT_glVertexAttrib1fvNV, + EXT_glVertexAttrib1hNV, + EXT_glVertexAttrib1hvNV, + EXT_glVertexAttrib1s, + EXT_glVertexAttrib1sARB, + EXT_glVertexAttrib1sNV, + EXT_glVertexAttrib1sv, + EXT_glVertexAttrib1svARB, + EXT_glVertexAttrib1svNV, + EXT_glVertexAttrib2d, + EXT_glVertexAttrib2dARB, + EXT_glVertexAttrib2dNV, + EXT_glVertexAttrib2dv, + EXT_glVertexAttrib2dvARB, + EXT_glVertexAttrib2dvNV, + EXT_glVertexAttrib2f, + EXT_glVertexAttrib2fARB, + EXT_glVertexAttrib2fNV, + EXT_glVertexAttrib2fv, + EXT_glVertexAttrib2fvARB, + EXT_glVertexAttrib2fvNV, + EXT_glVertexAttrib2hNV, + EXT_glVertexAttrib2hvNV, + EXT_glVertexAttrib2s, + EXT_glVertexAttrib2sARB, + EXT_glVertexAttrib2sNV, + EXT_glVertexAttrib2sv, + EXT_glVertexAttrib2svARB, + EXT_glVertexAttrib2svNV, + EXT_glVertexAttrib3d, + EXT_glVertexAttrib3dARB, + EXT_glVertexAttrib3dNV, + EXT_glVertexAttrib3dv, + EXT_glVertexAttrib3dvARB, + EXT_glVertexAttrib3dvNV, + EXT_glVertexAttrib3f, + EXT_glVertexAttrib3fARB, + EXT_glVertexAttrib3fNV, + EXT_glVertexAttrib3fv, + EXT_glVertexAttrib3fvARB, + EXT_glVertexAttrib3fvNV, + EXT_glVertexAttrib3hNV, + EXT_glVertexAttrib3hvNV, + EXT_glVertexAttrib3s, + EXT_glVertexAttrib3sARB, + EXT_glVertexAttrib3sNV, + EXT_glVertexAttrib3sv, + EXT_glVertexAttrib3svARB, + EXT_glVertexAttrib3svNV, + EXT_glVertexAttrib4Nbv, + EXT_glVertexAttrib4NbvARB, + EXT_glVertexAttrib4Niv, + EXT_glVertexAttrib4NivARB, + EXT_glVertexAttrib4Nsv, + EXT_glVertexAttrib4NsvARB, + EXT_glVertexAttrib4Nub, + EXT_glVertexAttrib4NubARB, + EXT_glVertexAttrib4Nubv, + EXT_glVertexAttrib4NubvARB, + EXT_glVertexAttrib4Nuiv, + EXT_glVertexAttrib4NuivARB, + EXT_glVertexAttrib4Nusv, + EXT_glVertexAttrib4NusvARB, + EXT_glVertexAttrib4bv, + EXT_glVertexAttrib4bvARB, + EXT_glVertexAttrib4d, + EXT_glVertexAttrib4dARB, + EXT_glVertexAttrib4dNV, + EXT_glVertexAttrib4dv, + EXT_glVertexAttrib4dvARB, + EXT_glVertexAttrib4dvNV, + EXT_glVertexAttrib4f, + EXT_glVertexAttrib4fARB, + EXT_glVertexAttrib4fNV, + EXT_glVertexAttrib4fv, + EXT_glVertexAttrib4fvARB, + EXT_glVertexAttrib4fvNV, + EXT_glVertexAttrib4hNV, + EXT_glVertexAttrib4hvNV, + EXT_glVertexAttrib4iv, + EXT_glVertexAttrib4ivARB, + EXT_glVertexAttrib4s, + EXT_glVertexAttrib4sARB, + EXT_glVertexAttrib4sNV, + EXT_glVertexAttrib4sv, + EXT_glVertexAttrib4svARB, + EXT_glVertexAttrib4svNV, + EXT_glVertexAttrib4ubNV, + EXT_glVertexAttrib4ubv, + EXT_glVertexAttrib4ubvARB, + EXT_glVertexAttrib4ubvNV, + EXT_glVertexAttrib4uiv, + EXT_glVertexAttrib4uivARB, + EXT_glVertexAttrib4usv, + EXT_glVertexAttrib4usvARB, + EXT_glVertexAttribArrayObjectATI, + EXT_glVertexAttribDivisor, + EXT_glVertexAttribI1i, + EXT_glVertexAttribI1iEXT, + EXT_glVertexAttribI1iv, + EXT_glVertexAttribI1ivEXT, + EXT_glVertexAttribI1ui, + EXT_glVertexAttribI1uiEXT, + EXT_glVertexAttribI1uiv, + EXT_glVertexAttribI1uivEXT, + EXT_glVertexAttribI2i, + EXT_glVertexAttribI2iEXT, + EXT_glVertexAttribI2iv, + EXT_glVertexAttribI2ivEXT, + EXT_glVertexAttribI2ui, + EXT_glVertexAttribI2uiEXT, + EXT_glVertexAttribI2uiv, + EXT_glVertexAttribI2uivEXT, + EXT_glVertexAttribI3i, + EXT_glVertexAttribI3iEXT, + EXT_glVertexAttribI3iv, + EXT_glVertexAttribI3ivEXT, + EXT_glVertexAttribI3ui, + EXT_glVertexAttribI3uiEXT, + EXT_glVertexAttribI3uiv, + EXT_glVertexAttribI3uivEXT, + EXT_glVertexAttribI4bv, + EXT_glVertexAttribI4bvEXT, + EXT_glVertexAttribI4i, + EXT_glVertexAttribI4iEXT, + EXT_glVertexAttribI4iv, + EXT_glVertexAttribI4ivEXT, + EXT_glVertexAttribI4sv, + EXT_glVertexAttribI4svEXT, + EXT_glVertexAttribI4ubv, + EXT_glVertexAttribI4ubvEXT, + EXT_glVertexAttribI4ui, + EXT_glVertexAttribI4uiEXT, + EXT_glVertexAttribI4uiv, + EXT_glVertexAttribI4uivEXT, + EXT_glVertexAttribI4usv, + EXT_glVertexAttribI4usvEXT, + EXT_glVertexAttribIPointer, + EXT_glVertexAttribIPointerEXT, + EXT_glVertexAttribPointer, + EXT_glVertexAttribPointerARB, + EXT_glVertexAttribPointerNV, + EXT_glVertexAttribs1dvNV, + EXT_glVertexAttribs1fvNV, + EXT_glVertexAttribs1hvNV, + EXT_glVertexAttribs1svNV, + EXT_glVertexAttribs2dvNV, + EXT_glVertexAttribs2fvNV, + EXT_glVertexAttribs2hvNV, + EXT_glVertexAttribs2svNV, + EXT_glVertexAttribs3dvNV, + EXT_glVertexAttribs3fvNV, + EXT_glVertexAttribs3hvNV, + EXT_glVertexAttribs3svNV, + EXT_glVertexAttribs4dvNV, + EXT_glVertexAttribs4fvNV, + EXT_glVertexAttribs4hvNV, + EXT_glVertexAttribs4svNV, + EXT_glVertexAttribs4ubvNV, + EXT_glVertexBlendARB, + EXT_glVertexBlendEnvfATI, + EXT_glVertexBlendEnviATI, + EXT_glVertexPointerEXT, + EXT_glVertexPointerListIBM, + EXT_glVertexPointervINTEL, + EXT_glVertexStream1dATI, + EXT_glVertexStream1dvATI, + EXT_glVertexStream1fATI, + EXT_glVertexStream1fvATI, + EXT_glVertexStream1iATI, + EXT_glVertexStream1ivATI, + EXT_glVertexStream1sATI, + EXT_glVertexStream1svATI, + EXT_glVertexStream2dATI, + EXT_glVertexStream2dvATI, + EXT_glVertexStream2fATI, + EXT_glVertexStream2fvATI, + EXT_glVertexStream2iATI, + EXT_glVertexStream2ivATI, + EXT_glVertexStream2sATI, + EXT_glVertexStream2svATI, + EXT_glVertexStream3dATI, + EXT_glVertexStream3dvATI, + EXT_glVertexStream3fATI, + EXT_glVertexStream3fvATI, + EXT_glVertexStream3iATI, + EXT_glVertexStream3ivATI, + EXT_glVertexStream3sATI, + EXT_glVertexStream3svATI, + EXT_glVertexStream4dATI, + EXT_glVertexStream4dvATI, + EXT_glVertexStream4fATI, + EXT_glVertexStream4fvATI, + EXT_glVertexStream4iATI, + EXT_glVertexStream4ivATI, + EXT_glVertexStream4sATI, + EXT_glVertexStream4svATI, + EXT_glVertexWeightPointerEXT, + EXT_glVertexWeightfEXT, + EXT_glVertexWeightfvEXT, + EXT_glVertexWeighthNV, + EXT_glVertexWeighthvNV, + EXT_glWeightPointerARB, + EXT_glWeightbvARB, + EXT_glWeightdvARB, + EXT_glWeightfvARB, + EXT_glWeightivARB, + EXT_glWeightsvARB, + EXT_glWeightubvARB, + EXT_glWeightuivARB, + EXT_glWeightusvARB, + EXT_glWindowPos2d, + EXT_glWindowPos2dARB, + EXT_glWindowPos2dMESA, + EXT_glWindowPos2dv, + EXT_glWindowPos2dvARB, + EXT_glWindowPos2dvMESA, + EXT_glWindowPos2f, + EXT_glWindowPos2fARB, + EXT_glWindowPos2fMESA, + EXT_glWindowPos2fv, + EXT_glWindowPos2fvARB, + EXT_glWindowPos2fvMESA, + EXT_glWindowPos2i, + EXT_glWindowPos2iARB, + EXT_glWindowPos2iMESA, + EXT_glWindowPos2iv, + EXT_glWindowPos2ivARB, + EXT_glWindowPos2ivMESA, + EXT_glWindowPos2s, + EXT_glWindowPos2sARB, + EXT_glWindowPos2sMESA, + EXT_glWindowPos2sv, + EXT_glWindowPos2svARB, + EXT_glWindowPos2svMESA, + EXT_glWindowPos3d, + EXT_glWindowPos3dARB, + EXT_glWindowPos3dMESA, + EXT_glWindowPos3dv, + EXT_glWindowPos3dvARB, + EXT_glWindowPos3dvMESA, + EXT_glWindowPos3f, + EXT_glWindowPos3fARB, + EXT_glWindowPos3fMESA, + EXT_glWindowPos3fv, + EXT_glWindowPos3fvARB, + EXT_glWindowPos3fvMESA, + EXT_glWindowPos3i, + EXT_glWindowPos3iARB, + EXT_glWindowPos3iMESA, + EXT_glWindowPos3iv, + EXT_glWindowPos3ivARB, + EXT_glWindowPos3ivMESA, + EXT_glWindowPos3s, + EXT_glWindowPos3sARB, + EXT_glWindowPos3sMESA, + EXT_glWindowPos3sv, + EXT_glWindowPos3svARB, + EXT_glWindowPos3svMESA, + EXT_glWindowPos4dMESA, + EXT_glWindowPos4dvMESA, + EXT_glWindowPos4fMESA, + EXT_glWindowPos4fvMESA, + EXT_glWindowPos4iMESA, + EXT_glWindowPos4ivMESA, + EXT_glWindowPos4sMESA, + EXT_glWindowPos4svMESA, + EXT_glWriteMaskEXT, + NB_EXTENSIONS +}; + +const int extension_registry_size = NB_EXTENSIONS; +void *extension_funcs[NB_EXTENSIONS]; /* The thunks themselves....*/ static void WINAPI wine_glActiveStencilFaceEXT( GLenum face ) { - void (*func_glActiveStencilFaceEXT)( GLenum ) = extension_funcs[0]; + void (*func_glActiveStencilFaceEXT)( GLenum ) = extension_funcs[EXT_glActiveStencilFaceEXT]; TRACE("(%d)\n", face ); ENTER_GL(); func_glActiveStencilFaceEXT( face ); @@ -20,7 +1510,7 @@ static void WINAPI wine_glActiveStencilFaceEXT( GLenum face ) { } static void WINAPI wine_glActiveTexture( GLenum texture ) { - void (*func_glActiveTexture)( GLenum ) = extension_funcs[1]; + void (*func_glActiveTexture)( GLenum ) = extension_funcs[EXT_glActiveTexture]; TRACE("(%d)\n", texture ); ENTER_GL(); func_glActiveTexture( texture ); @@ -28,7 +1518,7 @@ static void WINAPI wine_glActiveTexture( GLenum texture ) { } static void WINAPI wine_glActiveTextureARB( GLenum texture ) { - void (*func_glActiveTextureARB)( GLenum ) = extension_funcs[2]; + void (*func_glActiveTextureARB)( GLenum ) = extension_funcs[EXT_glActiveTextureARB]; TRACE("(%d)\n", texture ); ENTER_GL(); func_glActiveTextureARB( texture ); @@ -36,7 +1526,7 @@ static void WINAPI wine_glActiveTextureARB( GLenum texture ) { } static void WINAPI wine_glActiveVaryingNV( GLuint program, char* name ) { - void (*func_glActiveVaryingNV)( GLuint, char* ) = extension_funcs[3]; + void (*func_glActiveVaryingNV)( GLuint, char* ) = extension_funcs[EXT_glActiveVaryingNV]; TRACE("(%d, %p)\n", program, name ); ENTER_GL(); func_glActiveVaryingNV( program, name ); @@ -44,7 +1534,7 @@ static void WINAPI wine_glActiveVaryingNV( GLuint program, char* name ) { } static void WINAPI wine_glAlphaFragmentOp1ATI( GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod ) { - void (*func_glAlphaFragmentOp1ATI)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[4]; + void (*func_glAlphaFragmentOp1ATI)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glAlphaFragmentOp1ATI]; TRACE("(%d, %d, %d, %d, %d, %d)\n", op, dst, dstMod, arg1, arg1Rep, arg1Mod ); ENTER_GL(); func_glAlphaFragmentOp1ATI( op, dst, dstMod, arg1, arg1Rep, arg1Mod ); @@ -52,7 +1542,7 @@ static void WINAPI wine_glAlphaFragmentOp1ATI( GLenum op, GLuint dst, GLuint dst } static void WINAPI wine_glAlphaFragmentOp2ATI( GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod ) { - void (*func_glAlphaFragmentOp2ATI)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[5]; + void (*func_glAlphaFragmentOp2ATI)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glAlphaFragmentOp2ATI]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d)\n", op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod ); ENTER_GL(); func_glAlphaFragmentOp2ATI( op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod ); @@ -60,7 +1550,7 @@ static void WINAPI wine_glAlphaFragmentOp2ATI( GLenum op, GLuint dst, GLuint dst } static void WINAPI wine_glAlphaFragmentOp3ATI( GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod ) { - void (*func_glAlphaFragmentOp3ATI)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[6]; + void (*func_glAlphaFragmentOp3ATI)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glAlphaFragmentOp3ATI]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod ); ENTER_GL(); func_glAlphaFragmentOp3ATI( op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod ); @@ -68,7 +1558,7 @@ static void WINAPI wine_glAlphaFragmentOp3ATI( GLenum op, GLuint dst, GLuint dst } static void WINAPI wine_glApplyTextureEXT( GLenum mode ) { - void (*func_glApplyTextureEXT)( GLenum ) = extension_funcs[7]; + void (*func_glApplyTextureEXT)( GLenum ) = extension_funcs[EXT_glApplyTextureEXT]; TRACE("(%d)\n", mode ); ENTER_GL(); func_glApplyTextureEXT( mode ); @@ -77,7 +1567,7 @@ static void WINAPI wine_glApplyTextureEXT( GLenum mode ) { static GLboolean WINAPI wine_glAreProgramsResidentNV( GLsizei n, GLuint* programs, GLboolean* residences ) { GLboolean ret_value; - GLboolean (*func_glAreProgramsResidentNV)( GLsizei, GLuint*, GLboolean* ) = extension_funcs[8]; + GLboolean (*func_glAreProgramsResidentNV)( GLsizei, GLuint*, GLboolean* ) = extension_funcs[EXT_glAreProgramsResidentNV]; TRACE("(%d, %p, %p)\n", n, programs, residences ); ENTER_GL(); ret_value = func_glAreProgramsResidentNV( n, programs, residences ); @@ -87,7 +1577,7 @@ static GLboolean WINAPI wine_glAreProgramsResidentNV( GLsizei n, GLuint* program static GLboolean WINAPI wine_glAreTexturesResidentEXT( GLsizei n, GLuint* textures, GLboolean* residences ) { GLboolean ret_value; - GLboolean (*func_glAreTexturesResidentEXT)( GLsizei, GLuint*, GLboolean* ) = extension_funcs[9]; + GLboolean (*func_glAreTexturesResidentEXT)( GLsizei, GLuint*, GLboolean* ) = extension_funcs[EXT_glAreTexturesResidentEXT]; TRACE("(%d, %p, %p)\n", n, textures, residences ); ENTER_GL(); ret_value = func_glAreTexturesResidentEXT( n, textures, residences ); @@ -96,7 +1586,7 @@ static GLboolean WINAPI wine_glAreTexturesResidentEXT( GLsizei n, GLuint* textur } static void WINAPI wine_glArrayElementEXT( GLint i ) { - void (*func_glArrayElementEXT)( GLint ) = extension_funcs[10]; + void (*func_glArrayElementEXT)( GLint ) = extension_funcs[EXT_glArrayElementEXT]; TRACE("(%d)\n", i ); ENTER_GL(); func_glArrayElementEXT( i ); @@ -104,7 +1594,7 @@ static void WINAPI wine_glArrayElementEXT( GLint i ) { } static void WINAPI wine_glArrayObjectATI( GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset ) { - void (*func_glArrayObjectATI)( GLenum, GLint, GLenum, GLsizei, GLuint, GLuint ) = extension_funcs[11]; + void (*func_glArrayObjectATI)( GLenum, GLint, GLenum, GLsizei, GLuint, GLuint ) = extension_funcs[EXT_glArrayObjectATI]; TRACE("(%d, %d, %d, %d, %d, %d)\n", array, size, type, stride, buffer, offset ); ENTER_GL(); func_glArrayObjectATI( array, size, type, stride, buffer, offset ); @@ -112,7 +1602,7 @@ static void WINAPI wine_glArrayObjectATI( GLenum array, GLint size, GLenum type, } static void WINAPI wine_glAsyncMarkerSGIX( GLuint marker ) { - void (*func_glAsyncMarkerSGIX)( GLuint ) = extension_funcs[12]; + void (*func_glAsyncMarkerSGIX)( GLuint ) = extension_funcs[EXT_glAsyncMarkerSGIX]; TRACE("(%d)\n", marker ); ENTER_GL(); func_glAsyncMarkerSGIX( marker ); @@ -120,7 +1610,7 @@ static void WINAPI wine_glAsyncMarkerSGIX( GLuint marker ) { } static void WINAPI wine_glAttachObjectARB( unsigned int containerObj, unsigned int obj ) { - void (*func_glAttachObjectARB)( unsigned int, unsigned int ) = extension_funcs[13]; + void (*func_glAttachObjectARB)( unsigned int, unsigned int ) = extension_funcs[EXT_glAttachObjectARB]; TRACE("(%d, %d)\n", containerObj, obj ); ENTER_GL(); func_glAttachObjectARB( containerObj, obj ); @@ -128,7 +1618,7 @@ static void WINAPI wine_glAttachObjectARB( unsigned int containerObj, unsigned i } static void WINAPI wine_glAttachShader( GLuint program, GLuint shader ) { - void (*func_glAttachShader)( GLuint, GLuint ) = extension_funcs[14]; + void (*func_glAttachShader)( GLuint, GLuint ) = extension_funcs[EXT_glAttachShader]; TRACE("(%d, %d)\n", program, shader ); ENTER_GL(); func_glAttachShader( program, shader ); @@ -136,7 +1626,7 @@ static void WINAPI wine_glAttachShader( GLuint program, GLuint shader ) { } static void WINAPI wine_glBeginConditionalRender( GLuint id, GLenum mode ) { - void (*func_glBeginConditionalRender)( GLuint, GLenum ) = extension_funcs[15]; + void (*func_glBeginConditionalRender)( GLuint, GLenum ) = extension_funcs[EXT_glBeginConditionalRender]; TRACE("(%d, %d)\n", id, mode ); ENTER_GL(); func_glBeginConditionalRender( id, mode ); @@ -144,7 +1634,7 @@ static void WINAPI wine_glBeginConditionalRender( GLuint id, GLenum mode ) { } static void WINAPI wine_glBeginConditionalRenderNV( GLuint id, GLenum mode ) { - void (*func_glBeginConditionalRenderNV)( GLuint, GLenum ) = extension_funcs[16]; + void (*func_glBeginConditionalRenderNV)( GLuint, GLenum ) = extension_funcs[EXT_glBeginConditionalRenderNV]; TRACE("(%d, %d)\n", id, mode ); ENTER_GL(); func_glBeginConditionalRenderNV( id, mode ); @@ -152,7 +1642,7 @@ static void WINAPI wine_glBeginConditionalRenderNV( GLuint id, GLenum mode ) { } static void WINAPI wine_glBeginFragmentShaderATI( void ) { - void (*func_glBeginFragmentShaderATI)( void ) = extension_funcs[17]; + void (*func_glBeginFragmentShaderATI)( void ) = extension_funcs[EXT_glBeginFragmentShaderATI]; TRACE("()\n"); ENTER_GL(); func_glBeginFragmentShaderATI( ); @@ -160,7 +1650,7 @@ static void WINAPI wine_glBeginFragmentShaderATI( void ) { } static void WINAPI wine_glBeginOcclusionQueryNV( GLuint id ) { - void (*func_glBeginOcclusionQueryNV)( GLuint ) = extension_funcs[18]; + void (*func_glBeginOcclusionQueryNV)( GLuint ) = extension_funcs[EXT_glBeginOcclusionQueryNV]; TRACE("(%d)\n", id ); ENTER_GL(); func_glBeginOcclusionQueryNV( id ); @@ -168,7 +1658,7 @@ static void WINAPI wine_glBeginOcclusionQueryNV( GLuint id ) { } static void WINAPI wine_glBeginQuery( GLenum target, GLuint id ) { - void (*func_glBeginQuery)( GLenum, GLuint ) = extension_funcs[19]; + void (*func_glBeginQuery)( GLenum, GLuint ) = extension_funcs[EXT_glBeginQuery]; TRACE("(%d, %d)\n", target, id ); ENTER_GL(); func_glBeginQuery( target, id ); @@ -176,7 +1666,7 @@ static void WINAPI wine_glBeginQuery( GLenum target, GLuint id ) { } static void WINAPI wine_glBeginQueryARB( GLenum target, GLuint id ) { - void (*func_glBeginQueryARB)( GLenum, GLuint ) = extension_funcs[20]; + void (*func_glBeginQueryARB)( GLenum, GLuint ) = extension_funcs[EXT_glBeginQueryARB]; TRACE("(%d, %d)\n", target, id ); ENTER_GL(); func_glBeginQueryARB( target, id ); @@ -184,7 +1674,7 @@ static void WINAPI wine_glBeginQueryARB( GLenum target, GLuint id ) { } static void WINAPI wine_glBeginTransformFeedback( GLenum primitiveMode ) { - void (*func_glBeginTransformFeedback)( GLenum ) = extension_funcs[21]; + void (*func_glBeginTransformFeedback)( GLenum ) = extension_funcs[EXT_glBeginTransformFeedback]; TRACE("(%d)\n", primitiveMode ); ENTER_GL(); func_glBeginTransformFeedback( primitiveMode ); @@ -192,7 +1682,7 @@ static void WINAPI wine_glBeginTransformFeedback( GLenum primitiveMode ) { } static void WINAPI wine_glBeginTransformFeedbackEXT( GLenum primitiveMode ) { - void (*func_glBeginTransformFeedbackEXT)( GLenum ) = extension_funcs[22]; + void (*func_glBeginTransformFeedbackEXT)( GLenum ) = extension_funcs[EXT_glBeginTransformFeedbackEXT]; TRACE("(%d)\n", primitiveMode ); ENTER_GL(); func_glBeginTransformFeedbackEXT( primitiveMode ); @@ -200,7 +1690,7 @@ static void WINAPI wine_glBeginTransformFeedbackEXT( GLenum primitiveMode ) { } static void WINAPI wine_glBeginTransformFeedbackNV( GLenum primitiveMode ) { - void (*func_glBeginTransformFeedbackNV)( GLenum ) = extension_funcs[23]; + void (*func_glBeginTransformFeedbackNV)( GLenum ) = extension_funcs[EXT_glBeginTransformFeedbackNV]; TRACE("(%d)\n", primitiveMode ); ENTER_GL(); func_glBeginTransformFeedbackNV( primitiveMode ); @@ -208,7 +1698,7 @@ static void WINAPI wine_glBeginTransformFeedbackNV( GLenum primitiveMode ) { } static void WINAPI wine_glBeginVertexShaderEXT( void ) { - void (*func_glBeginVertexShaderEXT)( void ) = extension_funcs[24]; + void (*func_glBeginVertexShaderEXT)( void ) = extension_funcs[EXT_glBeginVertexShaderEXT]; TRACE("()\n"); ENTER_GL(); func_glBeginVertexShaderEXT( ); @@ -216,7 +1706,7 @@ static void WINAPI wine_glBeginVertexShaderEXT( void ) { } static void WINAPI wine_glBindAttribLocation( GLuint program, GLuint index, char* name ) { - void (*func_glBindAttribLocation)( GLuint, GLuint, char* ) = extension_funcs[25]; + void (*func_glBindAttribLocation)( GLuint, GLuint, char* ) = extension_funcs[EXT_glBindAttribLocation]; TRACE("(%d, %d, %p)\n", program, index, name ); ENTER_GL(); func_glBindAttribLocation( program, index, name ); @@ -224,7 +1714,7 @@ static void WINAPI wine_glBindAttribLocation( GLuint program, GLuint index, char } static void WINAPI wine_glBindAttribLocationARB( unsigned int programObj, GLuint index, char* name ) { - void (*func_glBindAttribLocationARB)( unsigned int, GLuint, char* ) = extension_funcs[26]; + void (*func_glBindAttribLocationARB)( unsigned int, GLuint, char* ) = extension_funcs[EXT_glBindAttribLocationARB]; TRACE("(%d, %d, %p)\n", programObj, index, name ); ENTER_GL(); func_glBindAttribLocationARB( programObj, index, name ); @@ -232,7 +1722,7 @@ static void WINAPI wine_glBindAttribLocationARB( unsigned int programObj, GLuint } static void WINAPI wine_glBindBuffer( GLenum target, GLuint buffer ) { - void (*func_glBindBuffer)( GLenum, GLuint ) = extension_funcs[27]; + void (*func_glBindBuffer)( GLenum, GLuint ) = extension_funcs[EXT_glBindBuffer]; TRACE("(%d, %d)\n", target, buffer ); ENTER_GL(); func_glBindBuffer( target, buffer ); @@ -240,7 +1730,7 @@ static void WINAPI wine_glBindBuffer( GLenum target, GLuint buffer ) { } static void WINAPI wine_glBindBufferARB( GLenum target, GLuint buffer ) { - void (*func_glBindBufferARB)( GLenum, GLuint ) = extension_funcs[28]; + void (*func_glBindBufferARB)( GLenum, GLuint ) = extension_funcs[EXT_glBindBufferARB]; TRACE("(%d, %d)\n", target, buffer ); ENTER_GL(); func_glBindBufferARB( target, buffer ); @@ -248,7 +1738,7 @@ static void WINAPI wine_glBindBufferARB( GLenum target, GLuint buffer ) { } static void WINAPI wine_glBindBufferBase( GLenum target, GLuint index, GLuint buffer ) { - void (*func_glBindBufferBase)( GLenum, GLuint, GLuint ) = extension_funcs[29]; + void (*func_glBindBufferBase)( GLenum, GLuint, GLuint ) = extension_funcs[EXT_glBindBufferBase]; TRACE("(%d, %d, %d)\n", target, index, buffer ); ENTER_GL(); func_glBindBufferBase( target, index, buffer ); @@ -256,7 +1746,7 @@ static void WINAPI wine_glBindBufferBase( GLenum target, GLuint index, GLuint bu } static void WINAPI wine_glBindBufferBaseEXT( GLenum target, GLuint index, GLuint buffer ) { - void (*func_glBindBufferBaseEXT)( GLenum, GLuint, GLuint ) = extension_funcs[30]; + void (*func_glBindBufferBaseEXT)( GLenum, GLuint, GLuint ) = extension_funcs[EXT_glBindBufferBaseEXT]; TRACE("(%d, %d, %d)\n", target, index, buffer ); ENTER_GL(); func_glBindBufferBaseEXT( target, index, buffer ); @@ -264,7 +1754,7 @@ static void WINAPI wine_glBindBufferBaseEXT( GLenum target, GLuint index, GLuint } static void WINAPI wine_glBindBufferBaseNV( GLenum target, GLuint index, GLuint buffer ) { - void (*func_glBindBufferBaseNV)( GLenum, GLuint, GLuint ) = extension_funcs[31]; + void (*func_glBindBufferBaseNV)( GLenum, GLuint, GLuint ) = extension_funcs[EXT_glBindBufferBaseNV]; TRACE("(%d, %d, %d)\n", target, index, buffer ); ENTER_GL(); func_glBindBufferBaseNV( target, index, buffer ); @@ -272,7 +1762,7 @@ static void WINAPI wine_glBindBufferBaseNV( GLenum target, GLuint index, GLuint } static void WINAPI wine_glBindBufferOffsetEXT( GLenum target, GLuint index, GLuint buffer, ptrdiff_t offset ) { - void (*func_glBindBufferOffsetEXT)( GLenum, GLuint, GLuint, ptrdiff_t ) = extension_funcs[32]; + void (*func_glBindBufferOffsetEXT)( GLenum, GLuint, GLuint, ptrdiff_t ) = extension_funcs[EXT_glBindBufferOffsetEXT]; TRACE("(%d, %d, %d, %d)\n", target, index, buffer, offset ); ENTER_GL(); func_glBindBufferOffsetEXT( target, index, buffer, offset ); @@ -280,7 +1770,7 @@ static void WINAPI wine_glBindBufferOffsetEXT( GLenum target, GLuint index, GLui } static void WINAPI wine_glBindBufferOffsetNV( GLenum target, GLuint index, GLuint buffer, ptrdiff_t offset ) { - void (*func_glBindBufferOffsetNV)( GLenum, GLuint, GLuint, ptrdiff_t ) = extension_funcs[33]; + void (*func_glBindBufferOffsetNV)( GLenum, GLuint, GLuint, ptrdiff_t ) = extension_funcs[EXT_glBindBufferOffsetNV]; TRACE("(%d, %d, %d, %d)\n", target, index, buffer, offset ); ENTER_GL(); func_glBindBufferOffsetNV( target, index, buffer, offset ); @@ -288,7 +1778,7 @@ static void WINAPI wine_glBindBufferOffsetNV( GLenum target, GLuint index, GLuin } static void WINAPI wine_glBindBufferRange( GLenum target, GLuint index, GLuint buffer, ptrdiff_t offset, ptrdiff_t size ) { - void (*func_glBindBufferRange)( GLenum, GLuint, GLuint, ptrdiff_t, ptrdiff_t ) = extension_funcs[34]; + void (*func_glBindBufferRange)( GLenum, GLuint, GLuint, ptrdiff_t, ptrdiff_t ) = extension_funcs[EXT_glBindBufferRange]; TRACE("(%d, %d, %d, %d, %d)\n", target, index, buffer, offset, size ); ENTER_GL(); func_glBindBufferRange( target, index, buffer, offset, size ); @@ -296,7 +1786,7 @@ static void WINAPI wine_glBindBufferRange( GLenum target, GLuint index, GLuint b } static void WINAPI wine_glBindBufferRangeEXT( GLenum target, GLuint index, GLuint buffer, ptrdiff_t offset, ptrdiff_t size ) { - void (*func_glBindBufferRangeEXT)( GLenum, GLuint, GLuint, ptrdiff_t, ptrdiff_t ) = extension_funcs[35]; + void (*func_glBindBufferRangeEXT)( GLenum, GLuint, GLuint, ptrdiff_t, ptrdiff_t ) = extension_funcs[EXT_glBindBufferRangeEXT]; TRACE("(%d, %d, %d, %d, %d)\n", target, index, buffer, offset, size ); ENTER_GL(); func_glBindBufferRangeEXT( target, index, buffer, offset, size ); @@ -304,7 +1794,7 @@ static void WINAPI wine_glBindBufferRangeEXT( GLenum target, GLuint index, GLuin } static void WINAPI wine_glBindBufferRangeNV( GLenum target, GLuint index, GLuint buffer, ptrdiff_t offset, ptrdiff_t size ) { - void (*func_glBindBufferRangeNV)( GLenum, GLuint, GLuint, ptrdiff_t, ptrdiff_t ) = extension_funcs[36]; + void (*func_glBindBufferRangeNV)( GLenum, GLuint, GLuint, ptrdiff_t, ptrdiff_t ) = extension_funcs[EXT_glBindBufferRangeNV]; TRACE("(%d, %d, %d, %d, %d)\n", target, index, buffer, offset, size ); ENTER_GL(); func_glBindBufferRangeNV( target, index, buffer, offset, size ); @@ -312,7 +1802,7 @@ static void WINAPI wine_glBindBufferRangeNV( GLenum target, GLuint index, GLuint } static void WINAPI wine_glBindFragDataLocation( GLuint program, GLuint color, char* name ) { - void (*func_glBindFragDataLocation)( GLuint, GLuint, char* ) = extension_funcs[37]; + void (*func_glBindFragDataLocation)( GLuint, GLuint, char* ) = extension_funcs[EXT_glBindFragDataLocation]; TRACE("(%d, %d, %p)\n", program, color, name ); ENTER_GL(); func_glBindFragDataLocation( program, color, name ); @@ -320,7 +1810,7 @@ static void WINAPI wine_glBindFragDataLocation( GLuint program, GLuint color, ch } static void WINAPI wine_glBindFragDataLocationEXT( GLuint program, GLuint color, char* name ) { - void (*func_glBindFragDataLocationEXT)( GLuint, GLuint, char* ) = extension_funcs[38]; + void (*func_glBindFragDataLocationEXT)( GLuint, GLuint, char* ) = extension_funcs[EXT_glBindFragDataLocationEXT]; TRACE("(%d, %d, %p)\n", program, color, name ); ENTER_GL(); func_glBindFragDataLocationEXT( program, color, name ); @@ -328,7 +1818,7 @@ static void WINAPI wine_glBindFragDataLocationEXT( GLuint program, GLuint color, } static void WINAPI wine_glBindFragmentShaderATI( GLuint id ) { - void (*func_glBindFragmentShaderATI)( GLuint ) = extension_funcs[39]; + void (*func_glBindFragmentShaderATI)( GLuint ) = extension_funcs[EXT_glBindFragmentShaderATI]; TRACE("(%d)\n", id ); ENTER_GL(); func_glBindFragmentShaderATI( id ); @@ -336,7 +1826,7 @@ static void WINAPI wine_glBindFragmentShaderATI( GLuint id ) { } static void WINAPI wine_glBindFramebuffer( GLenum target, GLuint framebuffer ) { - void (*func_glBindFramebuffer)( GLenum, GLuint ) = extension_funcs[40]; + void (*func_glBindFramebuffer)( GLenum, GLuint ) = extension_funcs[EXT_glBindFramebuffer]; TRACE("(%d, %d)\n", target, framebuffer ); ENTER_GL(); func_glBindFramebuffer( target, framebuffer ); @@ -344,7 +1834,7 @@ static void WINAPI wine_glBindFramebuffer( GLenum target, GLuint framebuffer ) { } static void WINAPI wine_glBindFramebufferEXT( GLenum target, GLuint framebuffer ) { - void (*func_glBindFramebufferEXT)( GLenum, GLuint ) = extension_funcs[41]; + void (*func_glBindFramebufferEXT)( GLenum, GLuint ) = extension_funcs[EXT_glBindFramebufferEXT]; TRACE("(%d, %d)\n", target, framebuffer ); ENTER_GL(); func_glBindFramebufferEXT( target, framebuffer ); @@ -353,7 +1843,7 @@ static void WINAPI wine_glBindFramebufferEXT( GLenum target, GLuint framebuffer static GLuint WINAPI wine_glBindLightParameterEXT( GLenum light, GLenum value ) { GLuint ret_value; - GLuint (*func_glBindLightParameterEXT)( GLenum, GLenum ) = extension_funcs[42]; + GLuint (*func_glBindLightParameterEXT)( GLenum, GLenum ) = extension_funcs[EXT_glBindLightParameterEXT]; TRACE("(%d, %d)\n", light, value ); ENTER_GL(); ret_value = func_glBindLightParameterEXT( light, value ); @@ -363,7 +1853,7 @@ static GLuint WINAPI wine_glBindLightParameterEXT( GLenum light, GLenum value ) static GLuint WINAPI wine_glBindMaterialParameterEXT( GLenum face, GLenum value ) { GLuint ret_value; - GLuint (*func_glBindMaterialParameterEXT)( GLenum, GLenum ) = extension_funcs[43]; + GLuint (*func_glBindMaterialParameterEXT)( GLenum, GLenum ) = extension_funcs[EXT_glBindMaterialParameterEXT]; TRACE("(%d, %d)\n", face, value ); ENTER_GL(); ret_value = func_glBindMaterialParameterEXT( face, value ); @@ -372,7 +1862,7 @@ static GLuint WINAPI wine_glBindMaterialParameterEXT( GLenum face, GLenum value } static void WINAPI wine_glBindMultiTextureEXT( GLenum texunit, GLenum target, GLuint texture ) { - void (*func_glBindMultiTextureEXT)( GLenum, GLenum, GLuint ) = extension_funcs[44]; + void (*func_glBindMultiTextureEXT)( GLenum, GLenum, GLuint ) = extension_funcs[EXT_glBindMultiTextureEXT]; TRACE("(%d, %d, %d)\n", texunit, target, texture ); ENTER_GL(); func_glBindMultiTextureEXT( texunit, target, texture ); @@ -381,7 +1871,7 @@ static void WINAPI wine_glBindMultiTextureEXT( GLenum texunit, GLenum target, GL static GLuint WINAPI wine_glBindParameterEXT( GLenum value ) { GLuint ret_value; - GLuint (*func_glBindParameterEXT)( GLenum ) = extension_funcs[45]; + GLuint (*func_glBindParameterEXT)( GLenum ) = extension_funcs[EXT_glBindParameterEXT]; TRACE("(%d)\n", value ); ENTER_GL(); ret_value = func_glBindParameterEXT( value ); @@ -390,7 +1880,7 @@ static GLuint WINAPI wine_glBindParameterEXT( GLenum value ) { } static void WINAPI wine_glBindProgramARB( GLenum target, GLuint program ) { - void (*func_glBindProgramARB)( GLenum, GLuint ) = extension_funcs[46]; + void (*func_glBindProgramARB)( GLenum, GLuint ) = extension_funcs[EXT_glBindProgramARB]; TRACE("(%d, %d)\n", target, program ); ENTER_GL(); func_glBindProgramARB( target, program ); @@ -398,7 +1888,7 @@ static void WINAPI wine_glBindProgramARB( GLenum target, GLuint program ) { } static void WINAPI wine_glBindProgramNV( GLenum target, GLuint id ) { - void (*func_glBindProgramNV)( GLenum, GLuint ) = extension_funcs[47]; + void (*func_glBindProgramNV)( GLenum, GLuint ) = extension_funcs[EXT_glBindProgramNV]; TRACE("(%d, %d)\n", target, id ); ENTER_GL(); func_glBindProgramNV( target, id ); @@ -406,7 +1896,7 @@ static void WINAPI wine_glBindProgramNV( GLenum target, GLuint id ) { } static void WINAPI wine_glBindRenderbuffer( GLenum target, GLuint renderbuffer ) { - void (*func_glBindRenderbuffer)( GLenum, GLuint ) = extension_funcs[48]; + void (*func_glBindRenderbuffer)( GLenum, GLuint ) = extension_funcs[EXT_glBindRenderbuffer]; TRACE("(%d, %d)\n", target, renderbuffer ); ENTER_GL(); func_glBindRenderbuffer( target, renderbuffer ); @@ -414,7 +1904,7 @@ static void WINAPI wine_glBindRenderbuffer( GLenum target, GLuint renderbuffer ) } static void WINAPI wine_glBindRenderbufferEXT( GLenum target, GLuint renderbuffer ) { - void (*func_glBindRenderbufferEXT)( GLenum, GLuint ) = extension_funcs[49]; + void (*func_glBindRenderbufferEXT)( GLenum, GLuint ) = extension_funcs[EXT_glBindRenderbufferEXT]; TRACE("(%d, %d)\n", target, renderbuffer ); ENTER_GL(); func_glBindRenderbufferEXT( target, renderbuffer ); @@ -423,7 +1913,7 @@ static void WINAPI wine_glBindRenderbufferEXT( GLenum target, GLuint renderbuffe static GLuint WINAPI wine_glBindTexGenParameterEXT( GLenum unit, GLenum coord, GLenum value ) { GLuint ret_value; - GLuint (*func_glBindTexGenParameterEXT)( GLenum, GLenum, GLenum ) = extension_funcs[50]; + GLuint (*func_glBindTexGenParameterEXT)( GLenum, GLenum, GLenum ) = extension_funcs[EXT_glBindTexGenParameterEXT]; TRACE("(%d, %d, %d)\n", unit, coord, value ); ENTER_GL(); ret_value = func_glBindTexGenParameterEXT( unit, coord, value ); @@ -432,7 +1922,7 @@ static GLuint WINAPI wine_glBindTexGenParameterEXT( GLenum unit, GLenum coord, G } static void WINAPI wine_glBindTextureEXT( GLenum target, GLuint texture ) { - void (*func_glBindTextureEXT)( GLenum, GLuint ) = extension_funcs[51]; + void (*func_glBindTextureEXT)( GLenum, GLuint ) = extension_funcs[EXT_glBindTextureEXT]; TRACE("(%d, %d)\n", target, texture ); ENTER_GL(); func_glBindTextureEXT( target, texture ); @@ -441,7 +1931,7 @@ static void WINAPI wine_glBindTextureEXT( GLenum target, GLuint texture ) { static GLuint WINAPI wine_glBindTextureUnitParameterEXT( GLenum unit, GLenum value ) { GLuint ret_value; - GLuint (*func_glBindTextureUnitParameterEXT)( GLenum, GLenum ) = extension_funcs[52]; + GLuint (*func_glBindTextureUnitParameterEXT)( GLenum, GLenum ) = extension_funcs[EXT_glBindTextureUnitParameterEXT]; TRACE("(%d, %d)\n", unit, value ); ENTER_GL(); ret_value = func_glBindTextureUnitParameterEXT( unit, value ); @@ -450,7 +1940,7 @@ static GLuint WINAPI wine_glBindTextureUnitParameterEXT( GLenum unit, GLenum val } static void WINAPI wine_glBindVertexArray( GLuint array ) { - void (*func_glBindVertexArray)( GLuint ) = extension_funcs[53]; + void (*func_glBindVertexArray)( GLuint ) = extension_funcs[EXT_glBindVertexArray]; TRACE("(%d)\n", array ); ENTER_GL(); func_glBindVertexArray( array ); @@ -458,7 +1948,7 @@ static void WINAPI wine_glBindVertexArray( GLuint array ) { } static void WINAPI wine_glBindVertexArrayAPPLE( GLuint array ) { - void (*func_glBindVertexArrayAPPLE)( GLuint ) = extension_funcs[54]; + void (*func_glBindVertexArrayAPPLE)( GLuint ) = extension_funcs[EXT_glBindVertexArrayAPPLE]; TRACE("(%d)\n", array ); ENTER_GL(); func_glBindVertexArrayAPPLE( array ); @@ -466,7 +1956,7 @@ static void WINAPI wine_glBindVertexArrayAPPLE( GLuint array ) { } static void WINAPI wine_glBindVertexShaderEXT( GLuint id ) { - void (*func_glBindVertexShaderEXT)( GLuint ) = extension_funcs[55]; + void (*func_glBindVertexShaderEXT)( GLuint ) = extension_funcs[EXT_glBindVertexShaderEXT]; TRACE("(%d)\n", id ); ENTER_GL(); func_glBindVertexShaderEXT( id ); @@ -474,7 +1964,7 @@ static void WINAPI wine_glBindVertexShaderEXT( GLuint id ) { } static void WINAPI wine_glBinormal3bEXT( GLbyte bx, GLbyte by, GLbyte bz ) { - void (*func_glBinormal3bEXT)( GLbyte, GLbyte, GLbyte ) = extension_funcs[56]; + void (*func_glBinormal3bEXT)( GLbyte, GLbyte, GLbyte ) = extension_funcs[EXT_glBinormal3bEXT]; TRACE("(%d, %d, %d)\n", bx, by, bz ); ENTER_GL(); func_glBinormal3bEXT( bx, by, bz ); @@ -482,7 +1972,7 @@ static void WINAPI wine_glBinormal3bEXT( GLbyte bx, GLbyte by, GLbyte bz ) { } static void WINAPI wine_glBinormal3bvEXT( GLbyte* v ) { - void (*func_glBinormal3bvEXT)( GLbyte* ) = extension_funcs[57]; + void (*func_glBinormal3bvEXT)( GLbyte* ) = extension_funcs[EXT_glBinormal3bvEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glBinormal3bvEXT( v ); @@ -490,7 +1980,7 @@ static void WINAPI wine_glBinormal3bvEXT( GLbyte* v ) { } static void WINAPI wine_glBinormal3dEXT( GLdouble bx, GLdouble by, GLdouble bz ) { - void (*func_glBinormal3dEXT)( GLdouble, GLdouble, GLdouble ) = extension_funcs[58]; + void (*func_glBinormal3dEXT)( GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glBinormal3dEXT]; TRACE("(%f, %f, %f)\n", bx, by, bz ); ENTER_GL(); func_glBinormal3dEXT( bx, by, bz ); @@ -498,7 +1988,7 @@ static void WINAPI wine_glBinormal3dEXT( GLdouble bx, GLdouble by, GLdouble bz ) } static void WINAPI wine_glBinormal3dvEXT( GLdouble* v ) { - void (*func_glBinormal3dvEXT)( GLdouble* ) = extension_funcs[59]; + void (*func_glBinormal3dvEXT)( GLdouble* ) = extension_funcs[EXT_glBinormal3dvEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glBinormal3dvEXT( v ); @@ -506,7 +1996,7 @@ static void WINAPI wine_glBinormal3dvEXT( GLdouble* v ) { } static void WINAPI wine_glBinormal3fEXT( GLfloat bx, GLfloat by, GLfloat bz ) { - void (*func_glBinormal3fEXT)( GLfloat, GLfloat, GLfloat ) = extension_funcs[60]; + void (*func_glBinormal3fEXT)( GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glBinormal3fEXT]; TRACE("(%f, %f, %f)\n", bx, by, bz ); ENTER_GL(); func_glBinormal3fEXT( bx, by, bz ); @@ -514,7 +2004,7 @@ static void WINAPI wine_glBinormal3fEXT( GLfloat bx, GLfloat by, GLfloat bz ) { } static void WINAPI wine_glBinormal3fvEXT( GLfloat* v ) { - void (*func_glBinormal3fvEXT)( GLfloat* ) = extension_funcs[61]; + void (*func_glBinormal3fvEXT)( GLfloat* ) = extension_funcs[EXT_glBinormal3fvEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glBinormal3fvEXT( v ); @@ -522,7 +2012,7 @@ static void WINAPI wine_glBinormal3fvEXT( GLfloat* v ) { } static void WINAPI wine_glBinormal3iEXT( GLint bx, GLint by, GLint bz ) { - void (*func_glBinormal3iEXT)( GLint, GLint, GLint ) = extension_funcs[62]; + void (*func_glBinormal3iEXT)( GLint, GLint, GLint ) = extension_funcs[EXT_glBinormal3iEXT]; TRACE("(%d, %d, %d)\n", bx, by, bz ); ENTER_GL(); func_glBinormal3iEXT( bx, by, bz ); @@ -530,7 +2020,7 @@ static void WINAPI wine_glBinormal3iEXT( GLint bx, GLint by, GLint bz ) { } static void WINAPI wine_glBinormal3ivEXT( GLint* v ) { - void (*func_glBinormal3ivEXT)( GLint* ) = extension_funcs[63]; + void (*func_glBinormal3ivEXT)( GLint* ) = extension_funcs[EXT_glBinormal3ivEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glBinormal3ivEXT( v ); @@ -538,7 +2028,7 @@ static void WINAPI wine_glBinormal3ivEXT( GLint* v ) { } static void WINAPI wine_glBinormal3sEXT( GLshort bx, GLshort by, GLshort bz ) { - void (*func_glBinormal3sEXT)( GLshort, GLshort, GLshort ) = extension_funcs[64]; + void (*func_glBinormal3sEXT)( GLshort, GLshort, GLshort ) = extension_funcs[EXT_glBinormal3sEXT]; TRACE("(%d, %d, %d)\n", bx, by, bz ); ENTER_GL(); func_glBinormal3sEXT( bx, by, bz ); @@ -546,7 +2036,7 @@ static void WINAPI wine_glBinormal3sEXT( GLshort bx, GLshort by, GLshort bz ) { } static void WINAPI wine_glBinormal3svEXT( GLshort* v ) { - void (*func_glBinormal3svEXT)( GLshort* ) = extension_funcs[65]; + void (*func_glBinormal3svEXT)( GLshort* ) = extension_funcs[EXT_glBinormal3svEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glBinormal3svEXT( v ); @@ -554,7 +2044,7 @@ static void WINAPI wine_glBinormal3svEXT( GLshort* v ) { } static void WINAPI wine_glBinormalPointerEXT( GLenum type, GLsizei stride, GLvoid* pointer ) { - void (*func_glBinormalPointerEXT)( GLenum, GLsizei, GLvoid* ) = extension_funcs[66]; + void (*func_glBinormalPointerEXT)( GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glBinormalPointerEXT]; TRACE("(%d, %d, %p)\n", type, stride, pointer ); ENTER_GL(); func_glBinormalPointerEXT( type, stride, pointer ); @@ -562,7 +2052,7 @@ static void WINAPI wine_glBinormalPointerEXT( GLenum type, GLsizei stride, GLvoi } static void WINAPI wine_glBlendColorEXT( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) { - void (*func_glBlendColorEXT)( GLclampf, GLclampf, GLclampf, GLclampf ) = extension_funcs[67]; + void (*func_glBlendColorEXT)( GLclampf, GLclampf, GLclampf, GLclampf ) = extension_funcs[EXT_glBlendColorEXT]; TRACE("(%f, %f, %f, %f)\n", red, green, blue, alpha ); ENTER_GL(); func_glBlendColorEXT( red, green, blue, alpha ); @@ -570,7 +2060,7 @@ static void WINAPI wine_glBlendColorEXT( GLclampf red, GLclampf green, GLclampf } static void WINAPI wine_glBlendEquationEXT( GLenum mode ) { - void (*func_glBlendEquationEXT)( GLenum ) = extension_funcs[68]; + void (*func_glBlendEquationEXT)( GLenum ) = extension_funcs[EXT_glBlendEquationEXT]; TRACE("(%d)\n", mode ); ENTER_GL(); func_glBlendEquationEXT( mode ); @@ -578,7 +2068,7 @@ static void WINAPI wine_glBlendEquationEXT( GLenum mode ) { } static void WINAPI wine_glBlendEquationSeparate( GLenum modeRGB, GLenum modeAlpha ) { - void (*func_glBlendEquationSeparate)( GLenum, GLenum ) = extension_funcs[69]; + void (*func_glBlendEquationSeparate)( GLenum, GLenum ) = extension_funcs[EXT_glBlendEquationSeparate]; TRACE("(%d, %d)\n", modeRGB, modeAlpha ); ENTER_GL(); func_glBlendEquationSeparate( modeRGB, modeAlpha ); @@ -586,7 +2076,7 @@ static void WINAPI wine_glBlendEquationSeparate( GLenum modeRGB, GLenum modeAlph } static void WINAPI wine_glBlendEquationSeparateEXT( GLenum modeRGB, GLenum modeAlpha ) { - void (*func_glBlendEquationSeparateEXT)( GLenum, GLenum ) = extension_funcs[70]; + void (*func_glBlendEquationSeparateEXT)( GLenum, GLenum ) = extension_funcs[EXT_glBlendEquationSeparateEXT]; TRACE("(%d, %d)\n", modeRGB, modeAlpha ); ENTER_GL(); func_glBlendEquationSeparateEXT( modeRGB, modeAlpha ); @@ -594,7 +2084,7 @@ static void WINAPI wine_glBlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA } static void WINAPI wine_glBlendFuncSeparate( GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha ) { - void (*func_glBlendFuncSeparate)( GLenum, GLenum, GLenum, GLenum ) = extension_funcs[71]; + void (*func_glBlendFuncSeparate)( GLenum, GLenum, GLenum, GLenum ) = extension_funcs[EXT_glBlendFuncSeparate]; TRACE("(%d, %d, %d, %d)\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha ); ENTER_GL(); func_glBlendFuncSeparate( sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha ); @@ -602,7 +2092,7 @@ static void WINAPI wine_glBlendFuncSeparate( GLenum sfactorRGB, GLenum dfactorRG } static void WINAPI wine_glBlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha ) { - void (*func_glBlendFuncSeparateEXT)( GLenum, GLenum, GLenum, GLenum ) = extension_funcs[72]; + void (*func_glBlendFuncSeparateEXT)( GLenum, GLenum, GLenum, GLenum ) = extension_funcs[EXT_glBlendFuncSeparateEXT]; TRACE("(%d, %d, %d, %d)\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha ); ENTER_GL(); func_glBlendFuncSeparateEXT( sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha ); @@ -610,7 +2100,7 @@ static void WINAPI wine_glBlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfacto } static void WINAPI wine_glBlendFuncSeparateINGR( GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha ) { - void (*func_glBlendFuncSeparateINGR)( GLenum, GLenum, GLenum, GLenum ) = extension_funcs[73]; + void (*func_glBlendFuncSeparateINGR)( GLenum, GLenum, GLenum, GLenum ) = extension_funcs[EXT_glBlendFuncSeparateINGR]; TRACE("(%d, %d, %d, %d)\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha ); ENTER_GL(); func_glBlendFuncSeparateINGR( sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha ); @@ -618,7 +2108,7 @@ static void WINAPI wine_glBlendFuncSeparateINGR( GLenum sfactorRGB, GLenum dfact } static void WINAPI wine_glBlitFramebuffer( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter ) { - void (*func_glBlitFramebuffer)( GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum ) = extension_funcs[74]; + void (*func_glBlitFramebuffer)( GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum ) = extension_funcs[EXT_glBlitFramebuffer]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter ); ENTER_GL(); func_glBlitFramebuffer( srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter ); @@ -626,7 +2116,7 @@ static void WINAPI wine_glBlitFramebuffer( GLint srcX0, GLint srcY0, GLint srcX1 } static void WINAPI wine_glBlitFramebufferEXT( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter ) { - void (*func_glBlitFramebufferEXT)( GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum ) = extension_funcs[75]; + void (*func_glBlitFramebufferEXT)( GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum ) = extension_funcs[EXT_glBlitFramebufferEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter ); ENTER_GL(); func_glBlitFramebufferEXT( srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter ); @@ -634,7 +2124,7 @@ static void WINAPI wine_glBlitFramebufferEXT( GLint srcX0, GLint srcY0, GLint sr } static void WINAPI wine_glBufferData( GLenum target, ptrdiff_t size, GLvoid* data, GLenum usage ) { - void (*func_glBufferData)( GLenum, ptrdiff_t, GLvoid*, GLenum ) = extension_funcs[76]; + void (*func_glBufferData)( GLenum, ptrdiff_t, GLvoid*, GLenum ) = extension_funcs[EXT_glBufferData]; TRACE("(%d, %d, %p, %d)\n", target, size, data, usage ); ENTER_GL(); func_glBufferData( target, size, data, usage ); @@ -642,7 +2132,7 @@ static void WINAPI wine_glBufferData( GLenum target, ptrdiff_t size, GLvoid* dat } static void WINAPI wine_glBufferDataARB( GLenum target, ptrdiff_t size, GLvoid* data, GLenum usage ) { - void (*func_glBufferDataARB)( GLenum, ptrdiff_t, GLvoid*, GLenum ) = extension_funcs[77]; + void (*func_glBufferDataARB)( GLenum, ptrdiff_t, GLvoid*, GLenum ) = extension_funcs[EXT_glBufferDataARB]; TRACE("(%d, %d, %p, %d)\n", target, size, data, usage ); ENTER_GL(); func_glBufferDataARB( target, size, data, usage ); @@ -650,7 +2140,7 @@ static void WINAPI wine_glBufferDataARB( GLenum target, ptrdiff_t size, GLvoid* } static void WINAPI wine_glBufferParameteriAPPLE( GLenum target, GLenum pname, GLint param ) { - void (*func_glBufferParameteriAPPLE)( GLenum, GLenum, GLint ) = extension_funcs[78]; + void (*func_glBufferParameteriAPPLE)( GLenum, GLenum, GLint ) = extension_funcs[EXT_glBufferParameteriAPPLE]; TRACE("(%d, %d, %d)\n", target, pname, param ); ENTER_GL(); func_glBufferParameteriAPPLE( target, pname, param ); @@ -659,7 +2149,7 @@ static void WINAPI wine_glBufferParameteriAPPLE( GLenum target, GLenum pname, GL static GLuint WINAPI wine_glBufferRegionEnabled( void ) { GLuint ret_value; - GLuint (*func_glBufferRegionEnabled)( void ) = extension_funcs[79]; + GLuint (*func_glBufferRegionEnabled)( void ) = extension_funcs[EXT_glBufferRegionEnabled]; TRACE("()\n"); ENTER_GL(); ret_value = func_glBufferRegionEnabled( ); @@ -668,7 +2158,7 @@ static GLuint WINAPI wine_glBufferRegionEnabled( void ) { } static void WINAPI wine_glBufferSubData( GLenum target, ptrdiff_t offset, ptrdiff_t size, GLvoid* data ) { - void (*func_glBufferSubData)( GLenum, ptrdiff_t, ptrdiff_t, GLvoid* ) = extension_funcs[80]; + void (*func_glBufferSubData)( GLenum, ptrdiff_t, ptrdiff_t, GLvoid* ) = extension_funcs[EXT_glBufferSubData]; TRACE("(%d, %d, %d, %p)\n", target, offset, size, data ); ENTER_GL(); func_glBufferSubData( target, offset, size, data ); @@ -676,7 +2166,7 @@ static void WINAPI wine_glBufferSubData( GLenum target, ptrdiff_t offset, ptrdif } static void WINAPI wine_glBufferSubDataARB( GLenum target, ptrdiff_t offset, ptrdiff_t size, GLvoid* data ) { - void (*func_glBufferSubDataARB)( GLenum, ptrdiff_t, ptrdiff_t, GLvoid* ) = extension_funcs[81]; + void (*func_glBufferSubDataARB)( GLenum, ptrdiff_t, ptrdiff_t, GLvoid* ) = extension_funcs[EXT_glBufferSubDataARB]; TRACE("(%d, %d, %d, %p)\n", target, offset, size, data ); ENTER_GL(); func_glBufferSubDataARB( target, offset, size, data ); @@ -685,7 +2175,7 @@ static void WINAPI wine_glBufferSubDataARB( GLenum target, ptrdiff_t offset, ptr static GLenum WINAPI wine_glCheckFramebufferStatus( GLenum target ) { GLenum ret_value; - GLenum (*func_glCheckFramebufferStatus)( GLenum ) = extension_funcs[82]; + GLenum (*func_glCheckFramebufferStatus)( GLenum ) = extension_funcs[EXT_glCheckFramebufferStatus]; TRACE("(%d)\n", target ); ENTER_GL(); ret_value = func_glCheckFramebufferStatus( target ); @@ -695,7 +2185,7 @@ static GLenum WINAPI wine_glCheckFramebufferStatus( GLenum target ) { static GLenum WINAPI wine_glCheckFramebufferStatusEXT( GLenum target ) { GLenum ret_value; - GLenum (*func_glCheckFramebufferStatusEXT)( GLenum ) = extension_funcs[83]; + GLenum (*func_glCheckFramebufferStatusEXT)( GLenum ) = extension_funcs[EXT_glCheckFramebufferStatusEXT]; TRACE("(%d)\n", target ); ENTER_GL(); ret_value = func_glCheckFramebufferStatusEXT( target ); @@ -705,7 +2195,7 @@ static GLenum WINAPI wine_glCheckFramebufferStatusEXT( GLenum target ) { static GLenum WINAPI wine_glCheckNamedFramebufferStatusEXT( GLuint framebuffer, GLenum target ) { GLenum ret_value; - GLenum (*func_glCheckNamedFramebufferStatusEXT)( GLuint, GLenum ) = extension_funcs[84]; + GLenum (*func_glCheckNamedFramebufferStatusEXT)( GLuint, GLenum ) = extension_funcs[EXT_glCheckNamedFramebufferStatusEXT]; TRACE("(%d, %d)\n", framebuffer, target ); ENTER_GL(); ret_value = func_glCheckNamedFramebufferStatusEXT( framebuffer, target ); @@ -714,7 +2204,7 @@ static GLenum WINAPI wine_glCheckNamedFramebufferStatusEXT( GLuint framebuffer, } static void WINAPI wine_glClampColor( GLenum target, GLenum clamp ) { - void (*func_glClampColor)( GLenum, GLenum ) = extension_funcs[85]; + void (*func_glClampColor)( GLenum, GLenum ) = extension_funcs[EXT_glClampColor]; TRACE("(%d, %d)\n", target, clamp ); ENTER_GL(); func_glClampColor( target, clamp ); @@ -722,7 +2212,7 @@ static void WINAPI wine_glClampColor( GLenum target, GLenum clamp ) { } static void WINAPI wine_glClampColorARB( GLenum target, GLenum clamp ) { - void (*func_glClampColorARB)( GLenum, GLenum ) = extension_funcs[86]; + void (*func_glClampColorARB)( GLenum, GLenum ) = extension_funcs[EXT_glClampColorARB]; TRACE("(%d, %d)\n", target, clamp ); ENTER_GL(); func_glClampColorARB( target, clamp ); @@ -730,7 +2220,7 @@ static void WINAPI wine_glClampColorARB( GLenum target, GLenum clamp ) { } static void WINAPI wine_glClearBufferfi( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil ) { - void (*func_glClearBufferfi)( GLenum, GLint, GLfloat, GLint ) = extension_funcs[87]; + void (*func_glClearBufferfi)( GLenum, GLint, GLfloat, GLint ) = extension_funcs[EXT_glClearBufferfi]; TRACE("(%d, %d, %f, %d)\n", buffer, drawbuffer, depth, stencil ); ENTER_GL(); func_glClearBufferfi( buffer, drawbuffer, depth, stencil ); @@ -738,7 +2228,7 @@ static void WINAPI wine_glClearBufferfi( GLenum buffer, GLint drawbuffer, GLfloa } static void WINAPI wine_glClearBufferfv( GLenum buffer, GLint drawbuffer, GLfloat* value ) { - void (*func_glClearBufferfv)( GLenum, GLint, GLfloat* ) = extension_funcs[88]; + void (*func_glClearBufferfv)( GLenum, GLint, GLfloat* ) = extension_funcs[EXT_glClearBufferfv]; TRACE("(%d, %d, %p)\n", buffer, drawbuffer, value ); ENTER_GL(); func_glClearBufferfv( buffer, drawbuffer, value ); @@ -746,7 +2236,7 @@ static void WINAPI wine_glClearBufferfv( GLenum buffer, GLint drawbuffer, GLfloa } static void WINAPI wine_glClearBufferiv( GLenum buffer, GLint drawbuffer, GLint* value ) { - void (*func_glClearBufferiv)( GLenum, GLint, GLint* ) = extension_funcs[89]; + void (*func_glClearBufferiv)( GLenum, GLint, GLint* ) = extension_funcs[EXT_glClearBufferiv]; TRACE("(%d, %d, %p)\n", buffer, drawbuffer, value ); ENTER_GL(); func_glClearBufferiv( buffer, drawbuffer, value ); @@ -754,7 +2244,7 @@ static void WINAPI wine_glClearBufferiv( GLenum buffer, GLint drawbuffer, GLint* } static void WINAPI wine_glClearBufferuiv( GLenum buffer, GLint drawbuffer, GLuint* value ) { - void (*func_glClearBufferuiv)( GLenum, GLint, GLuint* ) = extension_funcs[90]; + void (*func_glClearBufferuiv)( GLenum, GLint, GLuint* ) = extension_funcs[EXT_glClearBufferuiv]; TRACE("(%d, %d, %p)\n", buffer, drawbuffer, value ); ENTER_GL(); func_glClearBufferuiv( buffer, drawbuffer, value ); @@ -762,7 +2252,7 @@ static void WINAPI wine_glClearBufferuiv( GLenum buffer, GLint drawbuffer, GLuin } static void WINAPI wine_glClearColorIiEXT( GLint red, GLint green, GLint blue, GLint alpha ) { - void (*func_glClearColorIiEXT)( GLint, GLint, GLint, GLint ) = extension_funcs[91]; + void (*func_glClearColorIiEXT)( GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glClearColorIiEXT]; TRACE("(%d, %d, %d, %d)\n", red, green, blue, alpha ); ENTER_GL(); func_glClearColorIiEXT( red, green, blue, alpha ); @@ -770,7 +2260,7 @@ static void WINAPI wine_glClearColorIiEXT( GLint red, GLint green, GLint blue, G } static void WINAPI wine_glClearColorIuiEXT( GLuint red, GLuint green, GLuint blue, GLuint alpha ) { - void (*func_glClearColorIuiEXT)( GLuint, GLuint, GLuint, GLuint ) = extension_funcs[92]; + void (*func_glClearColorIuiEXT)( GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glClearColorIuiEXT]; TRACE("(%d, %d, %d, %d)\n", red, green, blue, alpha ); ENTER_GL(); func_glClearColorIuiEXT( red, green, blue, alpha ); @@ -778,7 +2268,7 @@ static void WINAPI wine_glClearColorIuiEXT( GLuint red, GLuint green, GLuint blu } static void WINAPI wine_glClearDepthdNV( GLdouble depth ) { - void (*func_glClearDepthdNV)( GLdouble ) = extension_funcs[93]; + void (*func_glClearDepthdNV)( GLdouble ) = extension_funcs[EXT_glClearDepthdNV]; TRACE("(%f)\n", depth ); ENTER_GL(); func_glClearDepthdNV( depth ); @@ -786,7 +2276,7 @@ static void WINAPI wine_glClearDepthdNV( GLdouble depth ) { } static void WINAPI wine_glClientActiveTexture( GLenum texture ) { - void (*func_glClientActiveTexture)( GLenum ) = extension_funcs[94]; + void (*func_glClientActiveTexture)( GLenum ) = extension_funcs[EXT_glClientActiveTexture]; TRACE("(%d)\n", texture ); ENTER_GL(); func_glClientActiveTexture( texture ); @@ -794,7 +2284,7 @@ static void WINAPI wine_glClientActiveTexture( GLenum texture ) { } static void WINAPI wine_glClientActiveTextureARB( GLenum texture ) { - void (*func_glClientActiveTextureARB)( GLenum ) = extension_funcs[95]; + void (*func_glClientActiveTextureARB)( GLenum ) = extension_funcs[EXT_glClientActiveTextureARB]; TRACE("(%d)\n", texture ); ENTER_GL(); func_glClientActiveTextureARB( texture ); @@ -802,7 +2292,7 @@ static void WINAPI wine_glClientActiveTextureARB( GLenum texture ) { } static void WINAPI wine_glClientActiveVertexStreamATI( GLenum stream ) { - void (*func_glClientActiveVertexStreamATI)( GLenum ) = extension_funcs[96]; + void (*func_glClientActiveVertexStreamATI)( GLenum ) = extension_funcs[EXT_glClientActiveVertexStreamATI]; TRACE("(%d)\n", stream ); ENTER_GL(); func_glClientActiveVertexStreamATI( stream ); @@ -810,7 +2300,7 @@ static void WINAPI wine_glClientActiveVertexStreamATI( GLenum stream ) { } static void WINAPI wine_glClientAttribDefaultEXT( GLbitfield mask ) { - void (*func_glClientAttribDefaultEXT)( GLbitfield ) = extension_funcs[97]; + void (*func_glClientAttribDefaultEXT)( GLbitfield ) = extension_funcs[EXT_glClientAttribDefaultEXT]; TRACE("(%d)\n", mask ); ENTER_GL(); func_glClientAttribDefaultEXT( mask ); @@ -818,7 +2308,7 @@ static void WINAPI wine_glClientAttribDefaultEXT( GLbitfield mask ) { } static void WINAPI wine_glColor3fVertex3fSUN( GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glColor3fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[98]; + void (*func_glColor3fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glColor3fVertex3fSUN]; TRACE("(%f, %f, %f, %f, %f, %f)\n", r, g, b, x, y, z ); ENTER_GL(); func_glColor3fVertex3fSUN( r, g, b, x, y, z ); @@ -826,7 +2316,7 @@ static void WINAPI wine_glColor3fVertex3fSUN( GLfloat r, GLfloat g, GLfloat b, G } static void WINAPI wine_glColor3fVertex3fvSUN( GLfloat* c, GLfloat* v ) { - void (*func_glColor3fVertex3fvSUN)( GLfloat*, GLfloat* ) = extension_funcs[99]; + void (*func_glColor3fVertex3fvSUN)( GLfloat*, GLfloat* ) = extension_funcs[EXT_glColor3fVertex3fvSUN]; TRACE("(%p, %p)\n", c, v ); ENTER_GL(); func_glColor3fVertex3fvSUN( c, v ); @@ -834,7 +2324,7 @@ static void WINAPI wine_glColor3fVertex3fvSUN( GLfloat* c, GLfloat* v ) { } static void WINAPI wine_glColor3hNV( unsigned short red, unsigned short green, unsigned short blue ) { - void (*func_glColor3hNV)( unsigned short, unsigned short, unsigned short ) = extension_funcs[100]; + void (*func_glColor3hNV)( unsigned short, unsigned short, unsigned short ) = extension_funcs[EXT_glColor3hNV]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glColor3hNV( red, green, blue ); @@ -842,7 +2332,7 @@ static void WINAPI wine_glColor3hNV( unsigned short red, unsigned short green, u } static void WINAPI wine_glColor3hvNV( unsigned short* v ) { - void (*func_glColor3hvNV)( unsigned short* ) = extension_funcs[101]; + void (*func_glColor3hvNV)( unsigned short* ) = extension_funcs[EXT_glColor3hvNV]; TRACE("(%p)\n", v ); ENTER_GL(); func_glColor3hvNV( v ); @@ -850,7 +2340,7 @@ static void WINAPI wine_glColor3hvNV( unsigned short* v ) { } static void WINAPI wine_glColor4fNormal3fVertex3fSUN( GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glColor4fNormal3fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[102]; + void (*func_glColor4fNormal3fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glColor4fNormal3fVertex3fSUN]; TRACE("(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f)\n", r, g, b, a, nx, ny, nz, x, y, z ); ENTER_GL(); func_glColor4fNormal3fVertex3fSUN( r, g, b, a, nx, ny, nz, x, y, z ); @@ -858,7 +2348,7 @@ static void WINAPI wine_glColor4fNormal3fVertex3fSUN( GLfloat r, GLfloat g, GLfl } static void WINAPI wine_glColor4fNormal3fVertex3fvSUN( GLfloat* c, GLfloat* n, GLfloat* v ) { - void (*func_glColor4fNormal3fVertex3fvSUN)( GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[103]; + void (*func_glColor4fNormal3fVertex3fvSUN)( GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[EXT_glColor4fNormal3fVertex3fvSUN]; TRACE("(%p, %p, %p)\n", c, n, v ); ENTER_GL(); func_glColor4fNormal3fVertex3fvSUN( c, n, v ); @@ -866,7 +2356,7 @@ static void WINAPI wine_glColor4fNormal3fVertex3fvSUN( GLfloat* c, GLfloat* n, G } static void WINAPI wine_glColor4hNV( unsigned short red, unsigned short green, unsigned short blue, unsigned short alpha ) { - void (*func_glColor4hNV)( unsigned short, unsigned short, unsigned short, unsigned short ) = extension_funcs[104]; + void (*func_glColor4hNV)( unsigned short, unsigned short, unsigned short, unsigned short ) = extension_funcs[EXT_glColor4hNV]; TRACE("(%d, %d, %d, %d)\n", red, green, blue, alpha ); ENTER_GL(); func_glColor4hNV( red, green, blue, alpha ); @@ -874,7 +2364,7 @@ static void WINAPI wine_glColor4hNV( unsigned short red, unsigned short green, u } static void WINAPI wine_glColor4hvNV( unsigned short* v ) { - void (*func_glColor4hvNV)( unsigned short* ) = extension_funcs[105]; + void (*func_glColor4hvNV)( unsigned short* ) = extension_funcs[EXT_glColor4hvNV]; TRACE("(%p)\n", v ); ENTER_GL(); func_glColor4hvNV( v ); @@ -882,7 +2372,7 @@ static void WINAPI wine_glColor4hvNV( unsigned short* v ) { } static void WINAPI wine_glColor4ubVertex2fSUN( GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y ) { - void (*func_glColor4ubVertex2fSUN)( GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat ) = extension_funcs[106]; + void (*func_glColor4ubVertex2fSUN)( GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat ) = extension_funcs[EXT_glColor4ubVertex2fSUN]; TRACE("(%d, %d, %d, %d, %f, %f)\n", r, g, b, a, x, y ); ENTER_GL(); func_glColor4ubVertex2fSUN( r, g, b, a, x, y ); @@ -890,7 +2380,7 @@ static void WINAPI wine_glColor4ubVertex2fSUN( GLubyte r, GLubyte g, GLubyte b, } static void WINAPI wine_glColor4ubVertex2fvSUN( GLubyte* c, GLfloat* v ) { - void (*func_glColor4ubVertex2fvSUN)( GLubyte*, GLfloat* ) = extension_funcs[107]; + void (*func_glColor4ubVertex2fvSUN)( GLubyte*, GLfloat* ) = extension_funcs[EXT_glColor4ubVertex2fvSUN]; TRACE("(%p, %p)\n", c, v ); ENTER_GL(); func_glColor4ubVertex2fvSUN( c, v ); @@ -898,7 +2388,7 @@ static void WINAPI wine_glColor4ubVertex2fvSUN( GLubyte* c, GLfloat* v ) { } static void WINAPI wine_glColor4ubVertex3fSUN( GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glColor4ubVertex3fSUN)( GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat ) = extension_funcs[108]; + void (*func_glColor4ubVertex3fSUN)( GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glColor4ubVertex3fSUN]; TRACE("(%d, %d, %d, %d, %f, %f, %f)\n", r, g, b, a, x, y, z ); ENTER_GL(); func_glColor4ubVertex3fSUN( r, g, b, a, x, y, z ); @@ -906,7 +2396,7 @@ static void WINAPI wine_glColor4ubVertex3fSUN( GLubyte r, GLubyte g, GLubyte b, } static void WINAPI wine_glColor4ubVertex3fvSUN( GLubyte* c, GLfloat* v ) { - void (*func_glColor4ubVertex3fvSUN)( GLubyte*, GLfloat* ) = extension_funcs[109]; + void (*func_glColor4ubVertex3fvSUN)( GLubyte*, GLfloat* ) = extension_funcs[EXT_glColor4ubVertex3fvSUN]; TRACE("(%p, %p)\n", c, v ); ENTER_GL(); func_glColor4ubVertex3fvSUN( c, v ); @@ -914,7 +2404,7 @@ static void WINAPI wine_glColor4ubVertex3fvSUN( GLubyte* c, GLfloat* v ) { } static void WINAPI wine_glColorFragmentOp1ATI( GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod ) { - void (*func_glColorFragmentOp1ATI)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[110]; + void (*func_glColorFragmentOp1ATI)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glColorFragmentOp1ATI]; TRACE("(%d, %d, %d, %d, %d, %d, %d)\n", op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod ); ENTER_GL(); func_glColorFragmentOp1ATI( op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod ); @@ -922,7 +2412,7 @@ static void WINAPI wine_glColorFragmentOp1ATI( GLenum op, GLuint dst, GLuint dst } static void WINAPI wine_glColorFragmentOp2ATI( GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod ) { - void (*func_glColorFragmentOp2ATI)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[111]; + void (*func_glColorFragmentOp2ATI)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glColorFragmentOp2ATI]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod ); ENTER_GL(); func_glColorFragmentOp2ATI( op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod ); @@ -930,7 +2420,7 @@ static void WINAPI wine_glColorFragmentOp2ATI( GLenum op, GLuint dst, GLuint dst } static void WINAPI wine_glColorFragmentOp3ATI( GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod ) { - void (*func_glColorFragmentOp3ATI)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[112]; + void (*func_glColorFragmentOp3ATI)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glColorFragmentOp3ATI]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod ); ENTER_GL(); func_glColorFragmentOp3ATI( op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod ); @@ -938,7 +2428,7 @@ static void WINAPI wine_glColorFragmentOp3ATI( GLenum op, GLuint dst, GLuint dst } static void WINAPI wine_glColorMaskIndexedEXT( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a ) { - void (*func_glColorMaskIndexedEXT)( GLuint, GLboolean, GLboolean, GLboolean, GLboolean ) = extension_funcs[113]; + void (*func_glColorMaskIndexedEXT)( GLuint, GLboolean, GLboolean, GLboolean, GLboolean ) = extension_funcs[EXT_glColorMaskIndexedEXT]; TRACE("(%d, %d, %d, %d, %d)\n", index, r, g, b, a ); ENTER_GL(); func_glColorMaskIndexedEXT( index, r, g, b, a ); @@ -946,7 +2436,7 @@ static void WINAPI wine_glColorMaskIndexedEXT( GLuint index, GLboolean r, GLbool } static void WINAPI wine_glColorMaski( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a ) { - void (*func_glColorMaski)( GLuint, GLboolean, GLboolean, GLboolean, GLboolean ) = extension_funcs[114]; + void (*func_glColorMaski)( GLuint, GLboolean, GLboolean, GLboolean, GLboolean ) = extension_funcs[EXT_glColorMaski]; TRACE("(%d, %d, %d, %d, %d)\n", index, r, g, b, a ); ENTER_GL(); func_glColorMaski( index, r, g, b, a ); @@ -954,7 +2444,7 @@ static void WINAPI wine_glColorMaski( GLuint index, GLboolean r, GLboolean g, GL } static void WINAPI wine_glColorPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer ) { - void (*func_glColorPointerEXT)( GLint, GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[115]; + void (*func_glColorPointerEXT)( GLint, GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[EXT_glColorPointerEXT]; TRACE("(%d, %d, %d, %d, %p)\n", size, type, stride, count, pointer ); ENTER_GL(); func_glColorPointerEXT( size, type, stride, count, pointer ); @@ -962,7 +2452,7 @@ static void WINAPI wine_glColorPointerEXT( GLint size, GLenum type, GLsizei stri } static void WINAPI wine_glColorPointerListIBM( GLint size, GLenum type, GLint stride, GLvoid** pointer, GLint ptrstride ) { - void (*func_glColorPointerListIBM)( GLint, GLenum, GLint, GLvoid**, GLint ) = extension_funcs[116]; + void (*func_glColorPointerListIBM)( GLint, GLenum, GLint, GLvoid**, GLint ) = extension_funcs[EXT_glColorPointerListIBM]; TRACE("(%d, %d, %d, %p, %d)\n", size, type, stride, pointer, ptrstride ); ENTER_GL(); func_glColorPointerListIBM( size, type, stride, pointer, ptrstride ); @@ -970,7 +2460,7 @@ static void WINAPI wine_glColorPointerListIBM( GLint size, GLenum type, GLint st } static void WINAPI wine_glColorPointervINTEL( GLint size, GLenum type, GLvoid** pointer ) { - void (*func_glColorPointervINTEL)( GLint, GLenum, GLvoid** ) = extension_funcs[117]; + void (*func_glColorPointervINTEL)( GLint, GLenum, GLvoid** ) = extension_funcs[EXT_glColorPointervINTEL]; TRACE("(%d, %d, %p)\n", size, type, pointer ); ENTER_GL(); func_glColorPointervINTEL( size, type, pointer ); @@ -978,7 +2468,7 @@ static void WINAPI wine_glColorPointervINTEL( GLint size, GLenum type, GLvoid** } static void WINAPI wine_glColorSubTableEXT( GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, GLvoid* data ) { - void (*func_glColorSubTableEXT)( GLenum, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[118]; + void (*func_glColorSubTableEXT)( GLenum, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glColorSubTableEXT]; TRACE("(%d, %d, %d, %d, %d, %p)\n", target, start, count, format, type, data ); ENTER_GL(); func_glColorSubTableEXT( target, start, count, format, type, data ); @@ -986,7 +2476,7 @@ static void WINAPI wine_glColorSubTableEXT( GLenum target, GLsizei start, GLsize } static void WINAPI wine_glColorTableEXT( GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, GLvoid* table ) { - void (*func_glColorTableEXT)( GLenum, GLenum, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[119]; + void (*func_glColorTableEXT)( GLenum, GLenum, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glColorTableEXT]; TRACE("(%d, %d, %d, %d, %d, %p)\n", target, internalFormat, width, format, type, table ); ENTER_GL(); func_glColorTableEXT( target, internalFormat, width, format, type, table ); @@ -994,7 +2484,7 @@ static void WINAPI wine_glColorTableEXT( GLenum target, GLenum internalFormat, G } static void WINAPI wine_glColorTableParameterfvSGI( GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glColorTableParameterfvSGI)( GLenum, GLenum, GLfloat* ) = extension_funcs[120]; + void (*func_glColorTableParameterfvSGI)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glColorTableParameterfvSGI]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glColorTableParameterfvSGI( target, pname, params ); @@ -1002,7 +2492,7 @@ static void WINAPI wine_glColorTableParameterfvSGI( GLenum target, GLenum pname, } static void WINAPI wine_glColorTableParameterivSGI( GLenum target, GLenum pname, GLint* params ) { - void (*func_glColorTableParameterivSGI)( GLenum, GLenum, GLint* ) = extension_funcs[121]; + void (*func_glColorTableParameterivSGI)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glColorTableParameterivSGI]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glColorTableParameterivSGI( target, pname, params ); @@ -1010,7 +2500,7 @@ static void WINAPI wine_glColorTableParameterivSGI( GLenum target, GLenum pname, } static void WINAPI wine_glColorTableSGI( GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid* table ) { - void (*func_glColorTableSGI)( GLenum, GLenum, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[122]; + void (*func_glColorTableSGI)( GLenum, GLenum, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glColorTableSGI]; TRACE("(%d, %d, %d, %d, %d, %p)\n", target, internalformat, width, format, type, table ); ENTER_GL(); func_glColorTableSGI( target, internalformat, width, format, type, table ); @@ -1018,7 +2508,7 @@ static void WINAPI wine_glColorTableSGI( GLenum target, GLenum internalformat, G } static void WINAPI wine_glCombinerInputNV( GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage ) { - void (*func_glCombinerInputNV)( GLenum, GLenum, GLenum, GLenum, GLenum, GLenum ) = extension_funcs[123]; + void (*func_glCombinerInputNV)( GLenum, GLenum, GLenum, GLenum, GLenum, GLenum ) = extension_funcs[EXT_glCombinerInputNV]; TRACE("(%d, %d, %d, %d, %d, %d)\n", stage, portion, variable, input, mapping, componentUsage ); ENTER_GL(); func_glCombinerInputNV( stage, portion, variable, input, mapping, componentUsage ); @@ -1026,7 +2516,7 @@ static void WINAPI wine_glCombinerInputNV( GLenum stage, GLenum portion, GLenum } static void WINAPI wine_glCombinerOutputNV( GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum ) { - void (*func_glCombinerOutputNV)( GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean ) = extension_funcs[124]; + void (*func_glCombinerOutputNV)( GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean ) = extension_funcs[EXT_glCombinerOutputNV]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum ); ENTER_GL(); func_glCombinerOutputNV( stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum ); @@ -1034,7 +2524,7 @@ static void WINAPI wine_glCombinerOutputNV( GLenum stage, GLenum portion, GLenum } static void WINAPI wine_glCombinerParameterfNV( GLenum pname, GLfloat param ) { - void (*func_glCombinerParameterfNV)( GLenum, GLfloat ) = extension_funcs[125]; + void (*func_glCombinerParameterfNV)( GLenum, GLfloat ) = extension_funcs[EXT_glCombinerParameterfNV]; TRACE("(%d, %f)\n", pname, param ); ENTER_GL(); func_glCombinerParameterfNV( pname, param ); @@ -1042,7 +2532,7 @@ static void WINAPI wine_glCombinerParameterfNV( GLenum pname, GLfloat param ) { } static void WINAPI wine_glCombinerParameterfvNV( GLenum pname, GLfloat* params ) { - void (*func_glCombinerParameterfvNV)( GLenum, GLfloat* ) = extension_funcs[126]; + void (*func_glCombinerParameterfvNV)( GLenum, GLfloat* ) = extension_funcs[EXT_glCombinerParameterfvNV]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glCombinerParameterfvNV( pname, params ); @@ -1050,7 +2540,7 @@ static void WINAPI wine_glCombinerParameterfvNV( GLenum pname, GLfloat* params ) } static void WINAPI wine_glCombinerParameteriNV( GLenum pname, GLint param ) { - void (*func_glCombinerParameteriNV)( GLenum, GLint ) = extension_funcs[127]; + void (*func_glCombinerParameteriNV)( GLenum, GLint ) = extension_funcs[EXT_glCombinerParameteriNV]; TRACE("(%d, %d)\n", pname, param ); ENTER_GL(); func_glCombinerParameteriNV( pname, param ); @@ -1058,7 +2548,7 @@ static void WINAPI wine_glCombinerParameteriNV( GLenum pname, GLint param ) { } static void WINAPI wine_glCombinerParameterivNV( GLenum pname, GLint* params ) { - void (*func_glCombinerParameterivNV)( GLenum, GLint* ) = extension_funcs[128]; + void (*func_glCombinerParameterivNV)( GLenum, GLint* ) = extension_funcs[EXT_glCombinerParameterivNV]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glCombinerParameterivNV( pname, params ); @@ -1066,7 +2556,7 @@ static void WINAPI wine_glCombinerParameterivNV( GLenum pname, GLint* params ) { } static void WINAPI wine_glCombinerStageParameterfvNV( GLenum stage, GLenum pname, GLfloat* params ) { - void (*func_glCombinerStageParameterfvNV)( GLenum, GLenum, GLfloat* ) = extension_funcs[129]; + void (*func_glCombinerStageParameterfvNV)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glCombinerStageParameterfvNV]; TRACE("(%d, %d, %p)\n", stage, pname, params ); ENTER_GL(); func_glCombinerStageParameterfvNV( stage, pname, params ); @@ -1074,7 +2564,7 @@ static void WINAPI wine_glCombinerStageParameterfvNV( GLenum stage, GLenum pname } static void WINAPI wine_glCompileShader( GLuint shader ) { - void (*func_glCompileShader)( GLuint ) = extension_funcs[130]; + void (*func_glCompileShader)( GLuint ) = extension_funcs[EXT_glCompileShader]; TRACE("(%d)\n", shader ); ENTER_GL(); func_glCompileShader( shader ); @@ -1082,7 +2572,7 @@ static void WINAPI wine_glCompileShader( GLuint shader ) { } static void WINAPI wine_glCompileShaderARB( unsigned int shaderObj ) { - void (*func_glCompileShaderARB)( unsigned int ) = extension_funcs[131]; + void (*func_glCompileShaderARB)( unsigned int ) = extension_funcs[EXT_glCompileShaderARB]; TRACE("(%d)\n", shaderObj ); ENTER_GL(); func_glCompileShaderARB( shaderObj ); @@ -1090,7 +2580,7 @@ static void WINAPI wine_glCompileShaderARB( unsigned int shaderObj ) { } static void WINAPI wine_glCompressedMultiTexImage1DEXT( GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, GLvoid* bits ) { - void (*func_glCompressedMultiTexImage1DEXT)( GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[132]; + void (*func_glCompressedMultiTexImage1DEXT)( GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedMultiTexImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %p)\n", texunit, target, level, internalformat, width, border, imageSize, bits ); ENTER_GL(); func_glCompressedMultiTexImage1DEXT( texunit, target, level, internalformat, width, border, imageSize, bits ); @@ -1098,7 +2588,7 @@ static void WINAPI wine_glCompressedMultiTexImage1DEXT( GLenum texunit, GLenum t } static void WINAPI wine_glCompressedMultiTexImage2DEXT( GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLvoid* bits ) { - void (*func_glCompressedMultiTexImage2DEXT)( GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[133]; + void (*func_glCompressedMultiTexImage2DEXT)( GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedMultiTexImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texunit, target, level, internalformat, width, height, border, imageSize, bits ); ENTER_GL(); func_glCompressedMultiTexImage2DEXT( texunit, target, level, internalformat, width, height, border, imageSize, bits ); @@ -1106,7 +2596,7 @@ static void WINAPI wine_glCompressedMultiTexImage2DEXT( GLenum texunit, GLenum t } static void WINAPI wine_glCompressedMultiTexImage3DEXT( GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLvoid* bits ) { - void (*func_glCompressedMultiTexImage3DEXT)( GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[134]; + void (*func_glCompressedMultiTexImage3DEXT)( GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedMultiTexImage3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texunit, target, level, internalformat, width, height, depth, border, imageSize, bits ); ENTER_GL(); func_glCompressedMultiTexImage3DEXT( texunit, target, level, internalformat, width, height, depth, border, imageSize, bits ); @@ -1114,7 +2604,7 @@ static void WINAPI wine_glCompressedMultiTexImage3DEXT( GLenum texunit, GLenum t } static void WINAPI wine_glCompressedMultiTexSubImage1DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, GLvoid* bits ) { - void (*func_glCompressedMultiTexSubImage1DEXT)( GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[135]; + void (*func_glCompressedMultiTexSubImage1DEXT)( GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedMultiTexSubImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %p)\n", texunit, target, level, xoffset, width, format, imageSize, bits ); ENTER_GL(); func_glCompressedMultiTexSubImage1DEXT( texunit, target, level, xoffset, width, format, imageSize, bits ); @@ -1122,7 +2612,7 @@ static void WINAPI wine_glCompressedMultiTexSubImage1DEXT( GLenum texunit, GLenu } static void WINAPI wine_glCompressedMultiTexSubImage2DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLvoid* bits ) { - void (*func_glCompressedMultiTexSubImage2DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[136]; + void (*func_glCompressedMultiTexSubImage2DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedMultiTexSubImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texunit, target, level, xoffset, yoffset, width, height, format, imageSize, bits ); ENTER_GL(); func_glCompressedMultiTexSubImage2DEXT( texunit, target, level, xoffset, yoffset, width, height, format, imageSize, bits ); @@ -1130,7 +2620,7 @@ static void WINAPI wine_glCompressedMultiTexSubImage2DEXT( GLenum texunit, GLenu } static void WINAPI wine_glCompressedMultiTexSubImage3DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLvoid* bits ) { - void (*func_glCompressedMultiTexSubImage3DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[137]; + void (*func_glCompressedMultiTexSubImage3DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedMultiTexSubImage3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits ); ENTER_GL(); func_glCompressedMultiTexSubImage3DEXT( texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits ); @@ -1138,7 +2628,7 @@ static void WINAPI wine_glCompressedMultiTexSubImage3DEXT( GLenum texunit, GLenu } static void WINAPI wine_glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, GLvoid* data ) { - void (*func_glCompressedTexImage1D)( GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[138]; + void (*func_glCompressedTexImage1D)( GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTexImage1D]; TRACE("(%d, %d, %d, %d, %d, %d, %p)\n", target, level, internalformat, width, border, imageSize, data ); ENTER_GL(); func_glCompressedTexImage1D( target, level, internalformat, width, border, imageSize, data ); @@ -1146,7 +2636,7 @@ static void WINAPI wine_glCompressedTexImage1D( GLenum target, GLint level, GLen } static void WINAPI wine_glCompressedTexImage1DARB( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, GLvoid* data ) { - void (*func_glCompressedTexImage1DARB)( GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[139]; + void (*func_glCompressedTexImage1DARB)( GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTexImage1DARB]; TRACE("(%d, %d, %d, %d, %d, %d, %p)\n", target, level, internalformat, width, border, imageSize, data ); ENTER_GL(); func_glCompressedTexImage1DARB( target, level, internalformat, width, border, imageSize, data ); @@ -1154,7 +2644,7 @@ static void WINAPI wine_glCompressedTexImage1DARB( GLenum target, GLint level, G } static void WINAPI wine_glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLvoid* data ) { - void (*func_glCompressedTexImage2D)( GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[140]; + void (*func_glCompressedTexImage2D)( GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTexImage2D]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %p)\n", target, level, internalformat, width, height, border, imageSize, data ); ENTER_GL(); func_glCompressedTexImage2D( target, level, internalformat, width, height, border, imageSize, data ); @@ -1162,7 +2652,7 @@ static void WINAPI wine_glCompressedTexImage2D( GLenum target, GLint level, GLen } static void WINAPI wine_glCompressedTexImage2DARB( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLvoid* data ) { - void (*func_glCompressedTexImage2DARB)( GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[141]; + void (*func_glCompressedTexImage2DARB)( GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTexImage2DARB]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %p)\n", target, level, internalformat, width, height, border, imageSize, data ); ENTER_GL(); func_glCompressedTexImage2DARB( target, level, internalformat, width, height, border, imageSize, data ); @@ -1170,7 +2660,7 @@ static void WINAPI wine_glCompressedTexImage2DARB( GLenum target, GLint level, G } static void WINAPI wine_glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLvoid* data ) { - void (*func_glCompressedTexImage3D)( GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[142]; + void (*func_glCompressedTexImage3D)( GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTexImage3D]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %p)\n", target, level, internalformat, width, height, depth, border, imageSize, data ); ENTER_GL(); func_glCompressedTexImage3D( target, level, internalformat, width, height, depth, border, imageSize, data ); @@ -1178,7 +2668,7 @@ static void WINAPI wine_glCompressedTexImage3D( GLenum target, GLint level, GLen } static void WINAPI wine_glCompressedTexImage3DARB( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLvoid* data ) { - void (*func_glCompressedTexImage3DARB)( GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[143]; + void (*func_glCompressedTexImage3DARB)( GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTexImage3DARB]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %p)\n", target, level, internalformat, width, height, depth, border, imageSize, data ); ENTER_GL(); func_glCompressedTexImage3DARB( target, level, internalformat, width, height, depth, border, imageSize, data ); @@ -1186,7 +2676,7 @@ static void WINAPI wine_glCompressedTexImage3DARB( GLenum target, GLint level, G } static void WINAPI wine_glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, GLvoid* data ) { - void (*func_glCompressedTexSubImage1D)( GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[144]; + void (*func_glCompressedTexSubImage1D)( GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTexSubImage1D]; TRACE("(%d, %d, %d, %d, %d, %d, %p)\n", target, level, xoffset, width, format, imageSize, data ); ENTER_GL(); func_glCompressedTexSubImage1D( target, level, xoffset, width, format, imageSize, data ); @@ -1194,7 +2684,7 @@ static void WINAPI wine_glCompressedTexSubImage1D( GLenum target, GLint level, G } static void WINAPI wine_glCompressedTexSubImage1DARB( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, GLvoid* data ) { - void (*func_glCompressedTexSubImage1DARB)( GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[145]; + void (*func_glCompressedTexSubImage1DARB)( GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTexSubImage1DARB]; TRACE("(%d, %d, %d, %d, %d, %d, %p)\n", target, level, xoffset, width, format, imageSize, data ); ENTER_GL(); func_glCompressedTexSubImage1DARB( target, level, xoffset, width, format, imageSize, data ); @@ -1202,7 +2692,7 @@ static void WINAPI wine_glCompressedTexSubImage1DARB( GLenum target, GLint level } static void WINAPI wine_glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLvoid* data ) { - void (*func_glCompressedTexSubImage2D)( GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[146]; + void (*func_glCompressedTexSubImage2D)( GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTexSubImage2D]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %p)\n", target, level, xoffset, yoffset, width, height, format, imageSize, data ); ENTER_GL(); func_glCompressedTexSubImage2D( target, level, xoffset, yoffset, width, height, format, imageSize, data ); @@ -1210,7 +2700,7 @@ static void WINAPI wine_glCompressedTexSubImage2D( GLenum target, GLint level, G } static void WINAPI wine_glCompressedTexSubImage2DARB( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLvoid* data ) { - void (*func_glCompressedTexSubImage2DARB)( GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[147]; + void (*func_glCompressedTexSubImage2DARB)( GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTexSubImage2DARB]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %p)\n", target, level, xoffset, yoffset, width, height, format, imageSize, data ); ENTER_GL(); func_glCompressedTexSubImage2DARB( target, level, xoffset, yoffset, width, height, format, imageSize, data ); @@ -1218,7 +2708,7 @@ static void WINAPI wine_glCompressedTexSubImage2DARB( GLenum target, GLint level } static void WINAPI wine_glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLvoid* data ) { - void (*func_glCompressedTexSubImage3D)( GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[148]; + void (*func_glCompressedTexSubImage3D)( GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTexSubImage3D]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data ); ENTER_GL(); func_glCompressedTexSubImage3D( target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data ); @@ -1226,7 +2716,7 @@ static void WINAPI wine_glCompressedTexSubImage3D( GLenum target, GLint level, G } static void WINAPI wine_glCompressedTexSubImage3DARB( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLvoid* data ) { - void (*func_glCompressedTexSubImage3DARB)( GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[149]; + void (*func_glCompressedTexSubImage3DARB)( GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTexSubImage3DARB]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data ); ENTER_GL(); func_glCompressedTexSubImage3DARB( target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data ); @@ -1234,7 +2724,7 @@ static void WINAPI wine_glCompressedTexSubImage3DARB( GLenum target, GLint level } static void WINAPI wine_glCompressedTextureImage1DEXT( GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, GLvoid* bits ) { - void (*func_glCompressedTextureImage1DEXT)( GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[150]; + void (*func_glCompressedTextureImage1DEXT)( GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTextureImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %p)\n", texture, target, level, internalformat, width, border, imageSize, bits ); ENTER_GL(); func_glCompressedTextureImage1DEXT( texture, target, level, internalformat, width, border, imageSize, bits ); @@ -1242,7 +2732,7 @@ static void WINAPI wine_glCompressedTextureImage1DEXT( GLuint texture, GLenum ta } static void WINAPI wine_glCompressedTextureImage2DEXT( GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLvoid* bits ) { - void (*func_glCompressedTextureImage2DEXT)( GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[151]; + void (*func_glCompressedTextureImage2DEXT)( GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTextureImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texture, target, level, internalformat, width, height, border, imageSize, bits ); ENTER_GL(); func_glCompressedTextureImage2DEXT( texture, target, level, internalformat, width, height, border, imageSize, bits ); @@ -1250,7 +2740,7 @@ static void WINAPI wine_glCompressedTextureImage2DEXT( GLuint texture, GLenum ta } static void WINAPI wine_glCompressedTextureImage3DEXT( GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLvoid* bits ) { - void (*func_glCompressedTextureImage3DEXT)( GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[152]; + void (*func_glCompressedTextureImage3DEXT)( GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTextureImage3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texture, target, level, internalformat, width, height, depth, border, imageSize, bits ); ENTER_GL(); func_glCompressedTextureImage3DEXT( texture, target, level, internalformat, width, height, depth, border, imageSize, bits ); @@ -1258,7 +2748,7 @@ static void WINAPI wine_glCompressedTextureImage3DEXT( GLuint texture, GLenum ta } static void WINAPI wine_glCompressedTextureSubImage1DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, GLvoid* bits ) { - void (*func_glCompressedTextureSubImage1DEXT)( GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[153]; + void (*func_glCompressedTextureSubImage1DEXT)( GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTextureSubImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %p)\n", texture, target, level, xoffset, width, format, imageSize, bits ); ENTER_GL(); func_glCompressedTextureSubImage1DEXT( texture, target, level, xoffset, width, format, imageSize, bits ); @@ -1266,7 +2756,7 @@ static void WINAPI wine_glCompressedTextureSubImage1DEXT( GLuint texture, GLenum } static void WINAPI wine_glCompressedTextureSubImage2DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLvoid* bits ) { - void (*func_glCompressedTextureSubImage2DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[154]; + void (*func_glCompressedTextureSubImage2DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTextureSubImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texture, target, level, xoffset, yoffset, width, height, format, imageSize, bits ); ENTER_GL(); func_glCompressedTextureSubImage2DEXT( texture, target, level, xoffset, yoffset, width, height, format, imageSize, bits ); @@ -1274,7 +2764,7 @@ static void WINAPI wine_glCompressedTextureSubImage2DEXT( GLuint texture, GLenum } static void WINAPI wine_glCompressedTextureSubImage3DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLvoid* bits ) { - void (*func_glCompressedTextureSubImage3DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[155]; + void (*func_glCompressedTextureSubImage3DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glCompressedTextureSubImage3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits ); ENTER_GL(); func_glCompressedTextureSubImage3DEXT( texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits ); @@ -1282,7 +2772,7 @@ static void WINAPI wine_glCompressedTextureSubImage3DEXT( GLuint texture, GLenum } static void WINAPI wine_glConvolutionFilter1DEXT( GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid* image ) { - void (*func_glConvolutionFilter1DEXT)( GLenum, GLenum, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[156]; + void (*func_glConvolutionFilter1DEXT)( GLenum, GLenum, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glConvolutionFilter1DEXT]; TRACE("(%d, %d, %d, %d, %d, %p)\n", target, internalformat, width, format, type, image ); ENTER_GL(); func_glConvolutionFilter1DEXT( target, internalformat, width, format, type, image ); @@ -1290,7 +2780,7 @@ static void WINAPI wine_glConvolutionFilter1DEXT( GLenum target, GLenum internal } static void WINAPI wine_glConvolutionFilter2DEXT( GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* image ) { - void (*func_glConvolutionFilter2DEXT)( GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[157]; + void (*func_glConvolutionFilter2DEXT)( GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glConvolutionFilter2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %p)\n", target, internalformat, width, height, format, type, image ); ENTER_GL(); func_glConvolutionFilter2DEXT( target, internalformat, width, height, format, type, image ); @@ -1298,7 +2788,7 @@ static void WINAPI wine_glConvolutionFilter2DEXT( GLenum target, GLenum internal } static void WINAPI wine_glConvolutionParameterfEXT( GLenum target, GLenum pname, GLfloat params ) { - void (*func_glConvolutionParameterfEXT)( GLenum, GLenum, GLfloat ) = extension_funcs[158]; + void (*func_glConvolutionParameterfEXT)( GLenum, GLenum, GLfloat ) = extension_funcs[EXT_glConvolutionParameterfEXT]; TRACE("(%d, %d, %f)\n", target, pname, params ); ENTER_GL(); func_glConvolutionParameterfEXT( target, pname, params ); @@ -1306,7 +2796,7 @@ static void WINAPI wine_glConvolutionParameterfEXT( GLenum target, GLenum pname, } static void WINAPI wine_glConvolutionParameterfvEXT( GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glConvolutionParameterfvEXT)( GLenum, GLenum, GLfloat* ) = extension_funcs[159]; + void (*func_glConvolutionParameterfvEXT)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glConvolutionParameterfvEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glConvolutionParameterfvEXT( target, pname, params ); @@ -1314,7 +2804,7 @@ static void WINAPI wine_glConvolutionParameterfvEXT( GLenum target, GLenum pname } static void WINAPI wine_glConvolutionParameteriEXT( GLenum target, GLenum pname, GLint params ) { - void (*func_glConvolutionParameteriEXT)( GLenum, GLenum, GLint ) = extension_funcs[160]; + void (*func_glConvolutionParameteriEXT)( GLenum, GLenum, GLint ) = extension_funcs[EXT_glConvolutionParameteriEXT]; TRACE("(%d, %d, %d)\n", target, pname, params ); ENTER_GL(); func_glConvolutionParameteriEXT( target, pname, params ); @@ -1322,7 +2812,7 @@ static void WINAPI wine_glConvolutionParameteriEXT( GLenum target, GLenum pname, } static void WINAPI wine_glConvolutionParameterivEXT( GLenum target, GLenum pname, GLint* params ) { - void (*func_glConvolutionParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[161]; + void (*func_glConvolutionParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glConvolutionParameterivEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glConvolutionParameterivEXT( target, pname, params ); @@ -1330,7 +2820,7 @@ static void WINAPI wine_glConvolutionParameterivEXT( GLenum target, GLenum pname } static void WINAPI wine_glCopyColorSubTableEXT( GLenum target, GLsizei start, GLint x, GLint y, GLsizei width ) { - void (*func_glCopyColorSubTableEXT)( GLenum, GLsizei, GLint, GLint, GLsizei ) = extension_funcs[162]; + void (*func_glCopyColorSubTableEXT)( GLenum, GLsizei, GLint, GLint, GLsizei ) = extension_funcs[EXT_glCopyColorSubTableEXT]; TRACE("(%d, %d, %d, %d, %d)\n", target, start, x, y, width ); ENTER_GL(); func_glCopyColorSubTableEXT( target, start, x, y, width ); @@ -1338,7 +2828,7 @@ static void WINAPI wine_glCopyColorSubTableEXT( GLenum target, GLsizei start, GL } static void WINAPI wine_glCopyColorTableSGI( GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width ) { - void (*func_glCopyColorTableSGI)( GLenum, GLenum, GLint, GLint, GLsizei ) = extension_funcs[163]; + void (*func_glCopyColorTableSGI)( GLenum, GLenum, GLint, GLint, GLsizei ) = extension_funcs[EXT_glCopyColorTableSGI]; TRACE("(%d, %d, %d, %d, %d)\n", target, internalformat, x, y, width ); ENTER_GL(); func_glCopyColorTableSGI( target, internalformat, x, y, width ); @@ -1346,7 +2836,7 @@ static void WINAPI wine_glCopyColorTableSGI( GLenum target, GLenum internalforma } static void WINAPI wine_glCopyConvolutionFilter1DEXT( GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width ) { - void (*func_glCopyConvolutionFilter1DEXT)( GLenum, GLenum, GLint, GLint, GLsizei ) = extension_funcs[164]; + void (*func_glCopyConvolutionFilter1DEXT)( GLenum, GLenum, GLint, GLint, GLsizei ) = extension_funcs[EXT_glCopyConvolutionFilter1DEXT]; TRACE("(%d, %d, %d, %d, %d)\n", target, internalformat, x, y, width ); ENTER_GL(); func_glCopyConvolutionFilter1DEXT( target, internalformat, x, y, width ); @@ -1354,7 +2844,7 @@ static void WINAPI wine_glCopyConvolutionFilter1DEXT( GLenum target, GLenum inte } static void WINAPI wine_glCopyConvolutionFilter2DEXT( GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height ) { - void (*func_glCopyConvolutionFilter2DEXT)( GLenum, GLenum, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[165]; + void (*func_glCopyConvolutionFilter2DEXT)( GLenum, GLenum, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[EXT_glCopyConvolutionFilter2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d)\n", target, internalformat, x, y, width, height ); ENTER_GL(); func_glCopyConvolutionFilter2DEXT( target, internalformat, x, y, width, height ); @@ -1362,7 +2852,7 @@ static void WINAPI wine_glCopyConvolutionFilter2DEXT( GLenum target, GLenum inte } static void WINAPI wine_glCopyMultiTexImage1DEXT( GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border ) { - void (*func_glCopyMultiTexImage1DEXT)( GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint ) = extension_funcs[166]; + void (*func_glCopyMultiTexImage1DEXT)( GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint ) = extension_funcs[EXT_glCopyMultiTexImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d)\n", texunit, target, level, internalformat, x, y, width, border ); ENTER_GL(); func_glCopyMultiTexImage1DEXT( texunit, target, level, internalformat, x, y, width, border ); @@ -1370,7 +2860,7 @@ static void WINAPI wine_glCopyMultiTexImage1DEXT( GLenum texunit, GLenum target, } static void WINAPI wine_glCopyMultiTexImage2DEXT( GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) { - void (*func_glCopyMultiTexImage2DEXT)( GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint ) = extension_funcs[167]; + void (*func_glCopyMultiTexImage2DEXT)( GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint ) = extension_funcs[EXT_glCopyMultiTexImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d)\n", texunit, target, level, internalformat, x, y, width, height, border ); ENTER_GL(); func_glCopyMultiTexImage2DEXT( texunit, target, level, internalformat, x, y, width, height, border ); @@ -1378,7 +2868,7 @@ static void WINAPI wine_glCopyMultiTexImage2DEXT( GLenum texunit, GLenum target, } static void WINAPI wine_glCopyMultiTexSubImage1DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width ) { - void (*func_glCopyMultiTexSubImage1DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei ) = extension_funcs[168]; + void (*func_glCopyMultiTexSubImage1DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei ) = extension_funcs[EXT_glCopyMultiTexSubImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d)\n", texunit, target, level, xoffset, x, y, width ); ENTER_GL(); func_glCopyMultiTexSubImage1DEXT( texunit, target, level, xoffset, x, y, width ); @@ -1386,7 +2876,7 @@ static void WINAPI wine_glCopyMultiTexSubImage1DEXT( GLenum texunit, GLenum targ } static void WINAPI wine_glCopyMultiTexSubImage2DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) { - void (*func_glCopyMultiTexSubImage2DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[169]; + void (*func_glCopyMultiTexSubImage2DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[EXT_glCopyMultiTexSubImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d)\n", texunit, target, level, xoffset, yoffset, x, y, width, height ); ENTER_GL(); func_glCopyMultiTexSubImage2DEXT( texunit, target, level, xoffset, yoffset, x, y, width, height ); @@ -1394,7 +2884,7 @@ static void WINAPI wine_glCopyMultiTexSubImage2DEXT( GLenum texunit, GLenum targ } static void WINAPI wine_glCopyMultiTexSubImage3DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) { - void (*func_glCopyMultiTexSubImage3DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[170]; + void (*func_glCopyMultiTexSubImage3DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[EXT_glCopyMultiTexSubImage3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", texunit, target, level, xoffset, yoffset, zoffset, x, y, width, height ); ENTER_GL(); func_glCopyMultiTexSubImage3DEXT( texunit, target, level, xoffset, yoffset, zoffset, x, y, width, height ); @@ -1402,7 +2892,7 @@ static void WINAPI wine_glCopyMultiTexSubImage3DEXT( GLenum texunit, GLenum targ } static void WINAPI wine_glCopyTexImage1DEXT( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border ) { - void (*func_glCopyTexImage1DEXT)( GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint ) = extension_funcs[171]; + void (*func_glCopyTexImage1DEXT)( GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint ) = extension_funcs[EXT_glCopyTexImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d)\n", target, level, internalformat, x, y, width, border ); ENTER_GL(); func_glCopyTexImage1DEXT( target, level, internalformat, x, y, width, border ); @@ -1410,7 +2900,7 @@ static void WINAPI wine_glCopyTexImage1DEXT( GLenum target, GLint level, GLenum } static void WINAPI wine_glCopyTexImage2DEXT( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) { - void (*func_glCopyTexImage2DEXT)( GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint ) = extension_funcs[172]; + void (*func_glCopyTexImage2DEXT)( GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint ) = extension_funcs[EXT_glCopyTexImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d)\n", target, level, internalformat, x, y, width, height, border ); ENTER_GL(); func_glCopyTexImage2DEXT( target, level, internalformat, x, y, width, height, border ); @@ -1418,7 +2908,7 @@ static void WINAPI wine_glCopyTexImage2DEXT( GLenum target, GLint level, GLenum } static void WINAPI wine_glCopyTexSubImage1DEXT( GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width ) { - void (*func_glCopyTexSubImage1DEXT)( GLenum, GLint, GLint, GLint, GLint, GLsizei ) = extension_funcs[173]; + void (*func_glCopyTexSubImage1DEXT)( GLenum, GLint, GLint, GLint, GLint, GLsizei ) = extension_funcs[EXT_glCopyTexSubImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d)\n", target, level, xoffset, x, y, width ); ENTER_GL(); func_glCopyTexSubImage1DEXT( target, level, xoffset, x, y, width ); @@ -1426,7 +2916,7 @@ static void WINAPI wine_glCopyTexSubImage1DEXT( GLenum target, GLint level, GLin } static void WINAPI wine_glCopyTexSubImage2DEXT( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) { - void (*func_glCopyTexSubImage2DEXT)( GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[174]; + void (*func_glCopyTexSubImage2DEXT)( GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[EXT_glCopyTexSubImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d)\n", target, level, xoffset, yoffset, x, y, width, height ); ENTER_GL(); func_glCopyTexSubImage2DEXT( target, level, xoffset, yoffset, x, y, width, height ); @@ -1434,7 +2924,7 @@ static void WINAPI wine_glCopyTexSubImage2DEXT( GLenum target, GLint level, GLin } static void WINAPI wine_glCopyTexSubImage3DEXT( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) { - void (*func_glCopyTexSubImage3DEXT)( GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[175]; + void (*func_glCopyTexSubImage3DEXT)( GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[EXT_glCopyTexSubImage3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d)\n", target, level, xoffset, yoffset, zoffset, x, y, width, height ); ENTER_GL(); func_glCopyTexSubImage3DEXT( target, level, xoffset, yoffset, zoffset, x, y, width, height ); @@ -1442,7 +2932,7 @@ static void WINAPI wine_glCopyTexSubImage3DEXT( GLenum target, GLint level, GLin } static void WINAPI wine_glCopyTextureImage1DEXT( GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border ) { - void (*func_glCopyTextureImage1DEXT)( GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint ) = extension_funcs[176]; + void (*func_glCopyTextureImage1DEXT)( GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint ) = extension_funcs[EXT_glCopyTextureImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d)\n", texture, target, level, internalformat, x, y, width, border ); ENTER_GL(); func_glCopyTextureImage1DEXT( texture, target, level, internalformat, x, y, width, border ); @@ -1450,7 +2940,7 @@ static void WINAPI wine_glCopyTextureImage1DEXT( GLuint texture, GLenum target, } static void WINAPI wine_glCopyTextureImage2DEXT( GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) { - void (*func_glCopyTextureImage2DEXT)( GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint ) = extension_funcs[177]; + void (*func_glCopyTextureImage2DEXT)( GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint ) = extension_funcs[EXT_glCopyTextureImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d)\n", texture, target, level, internalformat, x, y, width, height, border ); ENTER_GL(); func_glCopyTextureImage2DEXT( texture, target, level, internalformat, x, y, width, height, border ); @@ -1458,7 +2948,7 @@ static void WINAPI wine_glCopyTextureImage2DEXT( GLuint texture, GLenum target, } static void WINAPI wine_glCopyTextureSubImage1DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width ) { - void (*func_glCopyTextureSubImage1DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei ) = extension_funcs[178]; + void (*func_glCopyTextureSubImage1DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei ) = extension_funcs[EXT_glCopyTextureSubImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d)\n", texture, target, level, xoffset, x, y, width ); ENTER_GL(); func_glCopyTextureSubImage1DEXT( texture, target, level, xoffset, x, y, width ); @@ -1466,7 +2956,7 @@ static void WINAPI wine_glCopyTextureSubImage1DEXT( GLuint texture, GLenum targe } static void WINAPI wine_glCopyTextureSubImage2DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) { - void (*func_glCopyTextureSubImage2DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[179]; + void (*func_glCopyTextureSubImage2DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[EXT_glCopyTextureSubImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d)\n", texture, target, level, xoffset, yoffset, x, y, width, height ); ENTER_GL(); func_glCopyTextureSubImage2DEXT( texture, target, level, xoffset, yoffset, x, y, width, height ); @@ -1474,7 +2964,7 @@ static void WINAPI wine_glCopyTextureSubImage2DEXT( GLuint texture, GLenum targe } static void WINAPI wine_glCopyTextureSubImage3DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) { - void (*func_glCopyTextureSubImage3DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[180]; + void (*func_glCopyTextureSubImage3DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[EXT_glCopyTextureSubImage3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", texture, target, level, xoffset, yoffset, zoffset, x, y, width, height ); ENTER_GL(); func_glCopyTextureSubImage3DEXT( texture, target, level, xoffset, yoffset, zoffset, x, y, width, height ); @@ -1483,7 +2973,7 @@ static void WINAPI wine_glCopyTextureSubImage3DEXT( GLuint texture, GLenum targe static GLuint WINAPI wine_glCreateProgram( void ) { GLuint ret_value; - GLuint (*func_glCreateProgram)( void ) = extension_funcs[181]; + GLuint (*func_glCreateProgram)( void ) = extension_funcs[EXT_glCreateProgram]; TRACE("()\n"); ENTER_GL(); ret_value = func_glCreateProgram( ); @@ -1493,7 +2983,7 @@ static GLuint WINAPI wine_glCreateProgram( void ) { static unsigned int WINAPI wine_glCreateProgramObjectARB( void ) { unsigned int ret_value; - unsigned int (*func_glCreateProgramObjectARB)( void ) = extension_funcs[182]; + unsigned int (*func_glCreateProgramObjectARB)( void ) = extension_funcs[EXT_glCreateProgramObjectARB]; TRACE("()\n"); ENTER_GL(); ret_value = func_glCreateProgramObjectARB( ); @@ -1503,7 +2993,7 @@ static unsigned int WINAPI wine_glCreateProgramObjectARB( void ) { static GLuint WINAPI wine_glCreateShader( GLenum type ) { GLuint ret_value; - GLuint (*func_glCreateShader)( GLenum ) = extension_funcs[183]; + GLuint (*func_glCreateShader)( GLenum ) = extension_funcs[EXT_glCreateShader]; TRACE("(%d)\n", type ); ENTER_GL(); ret_value = func_glCreateShader( type ); @@ -1513,7 +3003,7 @@ static GLuint WINAPI wine_glCreateShader( GLenum type ) { static unsigned int WINAPI wine_glCreateShaderObjectARB( GLenum shaderType ) { unsigned int ret_value; - unsigned int (*func_glCreateShaderObjectARB)( GLenum ) = extension_funcs[184]; + unsigned int (*func_glCreateShaderObjectARB)( GLenum ) = extension_funcs[EXT_glCreateShaderObjectARB]; TRACE("(%d)\n", shaderType ); ENTER_GL(); ret_value = func_glCreateShaderObjectARB( shaderType ); @@ -1522,7 +3012,7 @@ static unsigned int WINAPI wine_glCreateShaderObjectARB( GLenum shaderType ) { } static void WINAPI wine_glCullParameterdvEXT( GLenum pname, GLdouble* params ) { - void (*func_glCullParameterdvEXT)( GLenum, GLdouble* ) = extension_funcs[185]; + void (*func_glCullParameterdvEXT)( GLenum, GLdouble* ) = extension_funcs[EXT_glCullParameterdvEXT]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glCullParameterdvEXT( pname, params ); @@ -1530,7 +3020,7 @@ static void WINAPI wine_glCullParameterdvEXT( GLenum pname, GLdouble* params ) { } static void WINAPI wine_glCullParameterfvEXT( GLenum pname, GLfloat* params ) { - void (*func_glCullParameterfvEXT)( GLenum, GLfloat* ) = extension_funcs[186]; + void (*func_glCullParameterfvEXT)( GLenum, GLfloat* ) = extension_funcs[EXT_glCullParameterfvEXT]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glCullParameterfvEXT( pname, params ); @@ -1538,7 +3028,7 @@ static void WINAPI wine_glCullParameterfvEXT( GLenum pname, GLfloat* params ) { } static void WINAPI wine_glCurrentPaletteMatrixARB( GLint index ) { - void (*func_glCurrentPaletteMatrixARB)( GLint ) = extension_funcs[187]; + void (*func_glCurrentPaletteMatrixARB)( GLint ) = extension_funcs[EXT_glCurrentPaletteMatrixARB]; TRACE("(%d)\n", index ); ENTER_GL(); func_glCurrentPaletteMatrixARB( index ); @@ -1546,7 +3036,7 @@ static void WINAPI wine_glCurrentPaletteMatrixARB( GLint index ) { } static void WINAPI wine_glDeformSGIX( GLbitfield mask ) { - void (*func_glDeformSGIX)( GLbitfield ) = extension_funcs[188]; + void (*func_glDeformSGIX)( GLbitfield ) = extension_funcs[EXT_glDeformSGIX]; TRACE("(%d)\n", mask ); ENTER_GL(); func_glDeformSGIX( mask ); @@ -1554,7 +3044,7 @@ static void WINAPI wine_glDeformSGIX( GLbitfield mask ) { } static void WINAPI wine_glDeformationMap3dSGIX( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, GLdouble* points ) { - void (*func_glDeformationMap3dSGIX)( GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble* ) = extension_funcs[189]; + void (*func_glDeformationMap3dSGIX)( GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble* ) = extension_funcs[EXT_glDeformationMap3dSGIX]; TRACE("(%d, %f, %f, %d, %d, %f, %f, %d, %d, %f, %f, %d, %d, %p)\n", target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, w1, w2, wstride, worder, points ); ENTER_GL(); func_glDeformationMap3dSGIX( target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, w1, w2, wstride, worder, points ); @@ -1562,7 +3052,7 @@ static void WINAPI wine_glDeformationMap3dSGIX( GLenum target, GLdouble u1, GLdo } static void WINAPI wine_glDeformationMap3fSGIX( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, GLfloat* points ) { - void (*func_glDeformationMap3fSGIX)( GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat* ) = extension_funcs[190]; + void (*func_glDeformationMap3fSGIX)( GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat* ) = extension_funcs[EXT_glDeformationMap3fSGIX]; TRACE("(%d, %f, %f, %d, %d, %f, %f, %d, %d, %f, %f, %d, %d, %p)\n", target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, w1, w2, wstride, worder, points ); ENTER_GL(); func_glDeformationMap3fSGIX( target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, w1, w2, wstride, worder, points ); @@ -1570,7 +3060,7 @@ static void WINAPI wine_glDeformationMap3fSGIX( GLenum target, GLfloat u1, GLflo } static void WINAPI wine_glDeleteAsyncMarkersSGIX( GLuint marker, GLsizei range ) { - void (*func_glDeleteAsyncMarkersSGIX)( GLuint, GLsizei ) = extension_funcs[191]; + void (*func_glDeleteAsyncMarkersSGIX)( GLuint, GLsizei ) = extension_funcs[EXT_glDeleteAsyncMarkersSGIX]; TRACE("(%d, %d)\n", marker, range ); ENTER_GL(); func_glDeleteAsyncMarkersSGIX( marker, range ); @@ -1578,7 +3068,7 @@ static void WINAPI wine_glDeleteAsyncMarkersSGIX( GLuint marker, GLsizei range ) } static void WINAPI wine_glDeleteBufferRegion( GLenum region ) { - void (*func_glDeleteBufferRegion)( GLenum ) = extension_funcs[192]; + void (*func_glDeleteBufferRegion)( GLenum ) = extension_funcs[EXT_glDeleteBufferRegion]; TRACE("(%d)\n", region ); ENTER_GL(); func_glDeleteBufferRegion( region ); @@ -1586,7 +3076,7 @@ static void WINAPI wine_glDeleteBufferRegion( GLenum region ) { } static void WINAPI wine_glDeleteBuffers( GLsizei n, GLuint* buffers ) { - void (*func_glDeleteBuffers)( GLsizei, GLuint* ) = extension_funcs[193]; + void (*func_glDeleteBuffers)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteBuffers]; TRACE("(%d, %p)\n", n, buffers ); ENTER_GL(); func_glDeleteBuffers( n, buffers ); @@ -1594,7 +3084,7 @@ static void WINAPI wine_glDeleteBuffers( GLsizei n, GLuint* buffers ) { } static void WINAPI wine_glDeleteBuffersARB( GLsizei n, GLuint* buffers ) { - void (*func_glDeleteBuffersARB)( GLsizei, GLuint* ) = extension_funcs[194]; + void (*func_glDeleteBuffersARB)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteBuffersARB]; TRACE("(%d, %p)\n", n, buffers ); ENTER_GL(); func_glDeleteBuffersARB( n, buffers ); @@ -1602,7 +3092,7 @@ static void WINAPI wine_glDeleteBuffersARB( GLsizei n, GLuint* buffers ) { } static void WINAPI wine_glDeleteFencesAPPLE( GLsizei n, GLuint* fences ) { - void (*func_glDeleteFencesAPPLE)( GLsizei, GLuint* ) = extension_funcs[195]; + void (*func_glDeleteFencesAPPLE)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteFencesAPPLE]; TRACE("(%d, %p)\n", n, fences ); ENTER_GL(); func_glDeleteFencesAPPLE( n, fences ); @@ -1610,7 +3100,7 @@ static void WINAPI wine_glDeleteFencesAPPLE( GLsizei n, GLuint* fences ) { } static void WINAPI wine_glDeleteFencesNV( GLsizei n, GLuint* fences ) { - void (*func_glDeleteFencesNV)( GLsizei, GLuint* ) = extension_funcs[196]; + void (*func_glDeleteFencesNV)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteFencesNV]; TRACE("(%d, %p)\n", n, fences ); ENTER_GL(); func_glDeleteFencesNV( n, fences ); @@ -1618,7 +3108,7 @@ static void WINAPI wine_glDeleteFencesNV( GLsizei n, GLuint* fences ) { } static void WINAPI wine_glDeleteFragmentShaderATI( GLuint id ) { - void (*func_glDeleteFragmentShaderATI)( GLuint ) = extension_funcs[197]; + void (*func_glDeleteFragmentShaderATI)( GLuint ) = extension_funcs[EXT_glDeleteFragmentShaderATI]; TRACE("(%d)\n", id ); ENTER_GL(); func_glDeleteFragmentShaderATI( id ); @@ -1626,7 +3116,7 @@ static void WINAPI wine_glDeleteFragmentShaderATI( GLuint id ) { } static void WINAPI wine_glDeleteFramebuffers( GLsizei n, GLuint* framebuffers ) { - void (*func_glDeleteFramebuffers)( GLsizei, GLuint* ) = extension_funcs[198]; + void (*func_glDeleteFramebuffers)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteFramebuffers]; TRACE("(%d, %p)\n", n, framebuffers ); ENTER_GL(); func_glDeleteFramebuffers( n, framebuffers ); @@ -1634,7 +3124,7 @@ static void WINAPI wine_glDeleteFramebuffers( GLsizei n, GLuint* framebuffers ) } static void WINAPI wine_glDeleteFramebuffersEXT( GLsizei n, GLuint* framebuffers ) { - void (*func_glDeleteFramebuffersEXT)( GLsizei, GLuint* ) = extension_funcs[199]; + void (*func_glDeleteFramebuffersEXT)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteFramebuffersEXT]; TRACE("(%d, %p)\n", n, framebuffers ); ENTER_GL(); func_glDeleteFramebuffersEXT( n, framebuffers ); @@ -1642,7 +3132,7 @@ static void WINAPI wine_glDeleteFramebuffersEXT( GLsizei n, GLuint* framebuffers } static void WINAPI wine_glDeleteObjectARB( unsigned int obj ) { - void (*func_glDeleteObjectARB)( unsigned int ) = extension_funcs[200]; + void (*func_glDeleteObjectARB)( unsigned int ) = extension_funcs[EXT_glDeleteObjectARB]; TRACE("(%d)\n", obj ); ENTER_GL(); func_glDeleteObjectARB( obj ); @@ -1650,7 +3140,7 @@ static void WINAPI wine_glDeleteObjectARB( unsigned int obj ) { } static void WINAPI wine_glDeleteObjectBufferATI( GLuint buffer ) { - void (*func_glDeleteObjectBufferATI)( GLuint ) = extension_funcs[201]; + void (*func_glDeleteObjectBufferATI)( GLuint ) = extension_funcs[EXT_glDeleteObjectBufferATI]; TRACE("(%d)\n", buffer ); ENTER_GL(); func_glDeleteObjectBufferATI( buffer ); @@ -1658,7 +3148,7 @@ static void WINAPI wine_glDeleteObjectBufferATI( GLuint buffer ) { } static void WINAPI wine_glDeleteOcclusionQueriesNV( GLsizei n, GLuint* ids ) { - void (*func_glDeleteOcclusionQueriesNV)( GLsizei, GLuint* ) = extension_funcs[202]; + void (*func_glDeleteOcclusionQueriesNV)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteOcclusionQueriesNV]; TRACE("(%d, %p)\n", n, ids ); ENTER_GL(); func_glDeleteOcclusionQueriesNV( n, ids ); @@ -1666,7 +3156,7 @@ static void WINAPI wine_glDeleteOcclusionQueriesNV( GLsizei n, GLuint* ids ) { } static void WINAPI wine_glDeleteProgram( GLuint program ) { - void (*func_glDeleteProgram)( GLuint ) = extension_funcs[203]; + void (*func_glDeleteProgram)( GLuint ) = extension_funcs[EXT_glDeleteProgram]; TRACE("(%d)\n", program ); ENTER_GL(); func_glDeleteProgram( program ); @@ -1674,7 +3164,7 @@ static void WINAPI wine_glDeleteProgram( GLuint program ) { } static void WINAPI wine_glDeleteProgramsARB( GLsizei n, GLuint* programs ) { - void (*func_glDeleteProgramsARB)( GLsizei, GLuint* ) = extension_funcs[204]; + void (*func_glDeleteProgramsARB)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteProgramsARB]; TRACE("(%d, %p)\n", n, programs ); ENTER_GL(); func_glDeleteProgramsARB( n, programs ); @@ -1682,7 +3172,7 @@ static void WINAPI wine_glDeleteProgramsARB( GLsizei n, GLuint* programs ) { } static void WINAPI wine_glDeleteProgramsNV( GLsizei n, GLuint* programs ) { - void (*func_glDeleteProgramsNV)( GLsizei, GLuint* ) = extension_funcs[205]; + void (*func_glDeleteProgramsNV)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteProgramsNV]; TRACE("(%d, %p)\n", n, programs ); ENTER_GL(); func_glDeleteProgramsNV( n, programs ); @@ -1690,7 +3180,7 @@ static void WINAPI wine_glDeleteProgramsNV( GLsizei n, GLuint* programs ) { } static void WINAPI wine_glDeleteQueries( GLsizei n, GLuint* ids ) { - void (*func_glDeleteQueries)( GLsizei, GLuint* ) = extension_funcs[206]; + void (*func_glDeleteQueries)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteQueries]; TRACE("(%d, %p)\n", n, ids ); ENTER_GL(); func_glDeleteQueries( n, ids ); @@ -1698,7 +3188,7 @@ static void WINAPI wine_glDeleteQueries( GLsizei n, GLuint* ids ) { } static void WINAPI wine_glDeleteQueriesARB( GLsizei n, GLuint* ids ) { - void (*func_glDeleteQueriesARB)( GLsizei, GLuint* ) = extension_funcs[207]; + void (*func_glDeleteQueriesARB)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteQueriesARB]; TRACE("(%d, %p)\n", n, ids ); ENTER_GL(); func_glDeleteQueriesARB( n, ids ); @@ -1706,7 +3196,7 @@ static void WINAPI wine_glDeleteQueriesARB( GLsizei n, GLuint* ids ) { } static void WINAPI wine_glDeleteRenderbuffers( GLsizei n, GLuint* renderbuffers ) { - void (*func_glDeleteRenderbuffers)( GLsizei, GLuint* ) = extension_funcs[208]; + void (*func_glDeleteRenderbuffers)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteRenderbuffers]; TRACE("(%d, %p)\n", n, renderbuffers ); ENTER_GL(); func_glDeleteRenderbuffers( n, renderbuffers ); @@ -1714,7 +3204,7 @@ static void WINAPI wine_glDeleteRenderbuffers( GLsizei n, GLuint* renderbuffers } static void WINAPI wine_glDeleteRenderbuffersEXT( GLsizei n, GLuint* renderbuffers ) { - void (*func_glDeleteRenderbuffersEXT)( GLsizei, GLuint* ) = extension_funcs[209]; + void (*func_glDeleteRenderbuffersEXT)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteRenderbuffersEXT]; TRACE("(%d, %p)\n", n, renderbuffers ); ENTER_GL(); func_glDeleteRenderbuffersEXT( n, renderbuffers ); @@ -1722,7 +3212,7 @@ static void WINAPI wine_glDeleteRenderbuffersEXT( GLsizei n, GLuint* renderbuffe } static void WINAPI wine_glDeleteShader( GLuint shader ) { - void (*func_glDeleteShader)( GLuint ) = extension_funcs[210]; + void (*func_glDeleteShader)( GLuint ) = extension_funcs[EXT_glDeleteShader]; TRACE("(%d)\n", shader ); ENTER_GL(); func_glDeleteShader( shader ); @@ -1730,7 +3220,7 @@ static void WINAPI wine_glDeleteShader( GLuint shader ) { } static void WINAPI wine_glDeleteTexturesEXT( GLsizei n, GLuint* textures ) { - void (*func_glDeleteTexturesEXT)( GLsizei, GLuint* ) = extension_funcs[211]; + void (*func_glDeleteTexturesEXT)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteTexturesEXT]; TRACE("(%d, %p)\n", n, textures ); ENTER_GL(); func_glDeleteTexturesEXT( n, textures ); @@ -1738,7 +3228,7 @@ static void WINAPI wine_glDeleteTexturesEXT( GLsizei n, GLuint* textures ) { } static void WINAPI wine_glDeleteVertexArrays( GLsizei n, GLuint* arrays ) { - void (*func_glDeleteVertexArrays)( GLsizei, GLuint* ) = extension_funcs[212]; + void (*func_glDeleteVertexArrays)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteVertexArrays]; TRACE("(%d, %p)\n", n, arrays ); ENTER_GL(); func_glDeleteVertexArrays( n, arrays ); @@ -1746,7 +3236,7 @@ static void WINAPI wine_glDeleteVertexArrays( GLsizei n, GLuint* arrays ) { } static void WINAPI wine_glDeleteVertexArraysAPPLE( GLsizei n, GLuint* arrays ) { - void (*func_glDeleteVertexArraysAPPLE)( GLsizei, GLuint* ) = extension_funcs[213]; + void (*func_glDeleteVertexArraysAPPLE)( GLsizei, GLuint* ) = extension_funcs[EXT_glDeleteVertexArraysAPPLE]; TRACE("(%d, %p)\n", n, arrays ); ENTER_GL(); func_glDeleteVertexArraysAPPLE( n, arrays ); @@ -1754,7 +3244,7 @@ static void WINAPI wine_glDeleteVertexArraysAPPLE( GLsizei n, GLuint* arrays ) { } static void WINAPI wine_glDeleteVertexShaderEXT( GLuint id ) { - void (*func_glDeleteVertexShaderEXT)( GLuint ) = extension_funcs[214]; + void (*func_glDeleteVertexShaderEXT)( GLuint ) = extension_funcs[EXT_glDeleteVertexShaderEXT]; TRACE("(%d)\n", id ); ENTER_GL(); func_glDeleteVertexShaderEXT( id ); @@ -1762,7 +3252,7 @@ static void WINAPI wine_glDeleteVertexShaderEXT( GLuint id ) { } static void WINAPI wine_glDepthBoundsEXT( GLclampd zmin, GLclampd zmax ) { - void (*func_glDepthBoundsEXT)( GLclampd, GLclampd ) = extension_funcs[215]; + void (*func_glDepthBoundsEXT)( GLclampd, GLclampd ) = extension_funcs[EXT_glDepthBoundsEXT]; TRACE("(%f, %f)\n", zmin, zmax ); ENTER_GL(); func_glDepthBoundsEXT( zmin, zmax ); @@ -1770,7 +3260,7 @@ static void WINAPI wine_glDepthBoundsEXT( GLclampd zmin, GLclampd zmax ) { } static void WINAPI wine_glDepthBoundsdNV( GLdouble zmin, GLdouble zmax ) { - void (*func_glDepthBoundsdNV)( GLdouble, GLdouble ) = extension_funcs[216]; + void (*func_glDepthBoundsdNV)( GLdouble, GLdouble ) = extension_funcs[EXT_glDepthBoundsdNV]; TRACE("(%f, %f)\n", zmin, zmax ); ENTER_GL(); func_glDepthBoundsdNV( zmin, zmax ); @@ -1778,7 +3268,7 @@ static void WINAPI wine_glDepthBoundsdNV( GLdouble zmin, GLdouble zmax ) { } static void WINAPI wine_glDepthRangedNV( GLdouble zNear, GLdouble zFar ) { - void (*func_glDepthRangedNV)( GLdouble, GLdouble ) = extension_funcs[217]; + void (*func_glDepthRangedNV)( GLdouble, GLdouble ) = extension_funcs[EXT_glDepthRangedNV]; TRACE("(%f, %f)\n", zNear, zFar ); ENTER_GL(); func_glDepthRangedNV( zNear, zFar ); @@ -1786,7 +3276,7 @@ static void WINAPI wine_glDepthRangedNV( GLdouble zNear, GLdouble zFar ) { } static void WINAPI wine_glDetachObjectARB( unsigned int containerObj, unsigned int attachedObj ) { - void (*func_glDetachObjectARB)( unsigned int, unsigned int ) = extension_funcs[218]; + void (*func_glDetachObjectARB)( unsigned int, unsigned int ) = extension_funcs[EXT_glDetachObjectARB]; TRACE("(%d, %d)\n", containerObj, attachedObj ); ENTER_GL(); func_glDetachObjectARB( containerObj, attachedObj ); @@ -1794,7 +3284,7 @@ static void WINAPI wine_glDetachObjectARB( unsigned int containerObj, unsigned i } static void WINAPI wine_glDetachShader( GLuint program, GLuint shader ) { - void (*func_glDetachShader)( GLuint, GLuint ) = extension_funcs[219]; + void (*func_glDetachShader)( GLuint, GLuint ) = extension_funcs[EXT_glDetachShader]; TRACE("(%d, %d)\n", program, shader ); ENTER_GL(); func_glDetachShader( program, shader ); @@ -1802,7 +3292,7 @@ static void WINAPI wine_glDetachShader( GLuint program, GLuint shader ) { } static void WINAPI wine_glDetailTexFuncSGIS( GLenum target, GLsizei n, GLfloat* points ) { - void (*func_glDetailTexFuncSGIS)( GLenum, GLsizei, GLfloat* ) = extension_funcs[220]; + void (*func_glDetailTexFuncSGIS)( GLenum, GLsizei, GLfloat* ) = extension_funcs[EXT_glDetailTexFuncSGIS]; TRACE("(%d, %d, %p)\n", target, n, points ); ENTER_GL(); func_glDetailTexFuncSGIS( target, n, points ); @@ -1810,7 +3300,7 @@ static void WINAPI wine_glDetailTexFuncSGIS( GLenum target, GLsizei n, GLfloat* } static void WINAPI wine_glDisableClientStateIndexedEXT( GLenum array, GLuint index ) { - void (*func_glDisableClientStateIndexedEXT)( GLenum, GLuint ) = extension_funcs[221]; + void (*func_glDisableClientStateIndexedEXT)( GLenum, GLuint ) = extension_funcs[EXT_glDisableClientStateIndexedEXT]; TRACE("(%d, %d)\n", array, index ); ENTER_GL(); func_glDisableClientStateIndexedEXT( array, index ); @@ -1818,7 +3308,7 @@ static void WINAPI wine_glDisableClientStateIndexedEXT( GLenum array, GLuint ind } static void WINAPI wine_glDisableIndexedEXT( GLenum target, GLuint index ) { - void (*func_glDisableIndexedEXT)( GLenum, GLuint ) = extension_funcs[222]; + void (*func_glDisableIndexedEXT)( GLenum, GLuint ) = extension_funcs[EXT_glDisableIndexedEXT]; TRACE("(%d, %d)\n", target, index ); ENTER_GL(); func_glDisableIndexedEXT( target, index ); @@ -1826,7 +3316,7 @@ static void WINAPI wine_glDisableIndexedEXT( GLenum target, GLuint index ) { } static void WINAPI wine_glDisableVariantClientStateEXT( GLuint id ) { - void (*func_glDisableVariantClientStateEXT)( GLuint ) = extension_funcs[223]; + void (*func_glDisableVariantClientStateEXT)( GLuint ) = extension_funcs[EXT_glDisableVariantClientStateEXT]; TRACE("(%d)\n", id ); ENTER_GL(); func_glDisableVariantClientStateEXT( id ); @@ -1834,7 +3324,7 @@ static void WINAPI wine_glDisableVariantClientStateEXT( GLuint id ) { } static void WINAPI wine_glDisableVertexAttribArray( GLuint index ) { - void (*func_glDisableVertexAttribArray)( GLuint ) = extension_funcs[224]; + void (*func_glDisableVertexAttribArray)( GLuint ) = extension_funcs[EXT_glDisableVertexAttribArray]; TRACE("(%d)\n", index ); ENTER_GL(); func_glDisableVertexAttribArray( index ); @@ -1842,7 +3332,7 @@ static void WINAPI wine_glDisableVertexAttribArray( GLuint index ) { } static void WINAPI wine_glDisableVertexAttribArrayARB( GLuint index ) { - void (*func_glDisableVertexAttribArrayARB)( GLuint ) = extension_funcs[225]; + void (*func_glDisableVertexAttribArrayARB)( GLuint ) = extension_funcs[EXT_glDisableVertexAttribArrayARB]; TRACE("(%d)\n", index ); ENTER_GL(); func_glDisableVertexAttribArrayARB( index ); @@ -1850,7 +3340,7 @@ static void WINAPI wine_glDisableVertexAttribArrayARB( GLuint index ) { } static void WINAPI wine_glDisablei( GLenum target, GLuint index ) { - void (*func_glDisablei)( GLenum, GLuint ) = extension_funcs[226]; + void (*func_glDisablei)( GLenum, GLuint ) = extension_funcs[EXT_glDisablei]; TRACE("(%d, %d)\n", target, index ); ENTER_GL(); func_glDisablei( target, index ); @@ -1858,7 +3348,7 @@ static void WINAPI wine_glDisablei( GLenum target, GLuint index ) { } static void WINAPI wine_glDrawArraysEXT( GLenum mode, GLint first, GLsizei count ) { - void (*func_glDrawArraysEXT)( GLenum, GLint, GLsizei ) = extension_funcs[227]; + void (*func_glDrawArraysEXT)( GLenum, GLint, GLsizei ) = extension_funcs[EXT_glDrawArraysEXT]; TRACE("(%d, %d, %d)\n", mode, first, count ); ENTER_GL(); func_glDrawArraysEXT( mode, first, count ); @@ -1866,7 +3356,7 @@ static void WINAPI wine_glDrawArraysEXT( GLenum mode, GLint first, GLsizei count } static void WINAPI wine_glDrawArraysInstancedARB( GLenum mode, GLint first, GLsizei count, GLsizei primcount ) { - void (*func_glDrawArraysInstancedARB)( GLenum, GLint, GLsizei, GLsizei ) = extension_funcs[228]; + void (*func_glDrawArraysInstancedARB)( GLenum, GLint, GLsizei, GLsizei ) = extension_funcs[EXT_glDrawArraysInstancedARB]; TRACE("(%d, %d, %d, %d)\n", mode, first, count, primcount ); ENTER_GL(); func_glDrawArraysInstancedARB( mode, first, count, primcount ); @@ -1874,7 +3364,7 @@ static void WINAPI wine_glDrawArraysInstancedARB( GLenum mode, GLint first, GLsi } static void WINAPI wine_glDrawArraysInstancedEXT( GLenum mode, GLint start, GLsizei count, GLsizei primcount ) { - void (*func_glDrawArraysInstancedEXT)( GLenum, GLint, GLsizei, GLsizei ) = extension_funcs[229]; + void (*func_glDrawArraysInstancedEXT)( GLenum, GLint, GLsizei, GLsizei ) = extension_funcs[EXT_glDrawArraysInstancedEXT]; TRACE("(%d, %d, %d, %d)\n", mode, start, count, primcount ); ENTER_GL(); func_glDrawArraysInstancedEXT( mode, start, count, primcount ); @@ -1882,7 +3372,7 @@ static void WINAPI wine_glDrawArraysInstancedEXT( GLenum mode, GLint start, GLsi } static void WINAPI wine_glDrawBufferRegion( GLenum region, GLint x, GLint y, GLsizei width, GLsizei height, GLint xDest, GLint yDest ) { - void (*func_glDrawBufferRegion)( GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLint ) = extension_funcs[230]; + void (*func_glDrawBufferRegion)( GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLint ) = extension_funcs[EXT_glDrawBufferRegion]; TRACE("(%d, %d, %d, %d, %d, %d, %d)\n", region, x, y, width, height, xDest, yDest ); ENTER_GL(); func_glDrawBufferRegion( region, x, y, width, height, xDest, yDest ); @@ -1890,7 +3380,7 @@ static void WINAPI wine_glDrawBufferRegion( GLenum region, GLint x, GLint y, GLs } static void WINAPI wine_glDrawBuffers( GLsizei n, GLenum* bufs ) { - void (*func_glDrawBuffers)( GLsizei, GLenum* ) = extension_funcs[231]; + void (*func_glDrawBuffers)( GLsizei, GLenum* ) = extension_funcs[EXT_glDrawBuffers]; TRACE("(%d, %p)\n", n, bufs ); ENTER_GL(); func_glDrawBuffers( n, bufs ); @@ -1898,7 +3388,7 @@ static void WINAPI wine_glDrawBuffers( GLsizei n, GLenum* bufs ) { } static void WINAPI wine_glDrawBuffersARB( GLsizei n, GLenum* bufs ) { - void (*func_glDrawBuffersARB)( GLsizei, GLenum* ) = extension_funcs[232]; + void (*func_glDrawBuffersARB)( GLsizei, GLenum* ) = extension_funcs[EXT_glDrawBuffersARB]; TRACE("(%d, %p)\n", n, bufs ); ENTER_GL(); func_glDrawBuffersARB( n, bufs ); @@ -1906,7 +3396,7 @@ static void WINAPI wine_glDrawBuffersARB( GLsizei n, GLenum* bufs ) { } static void WINAPI wine_glDrawBuffersATI( GLsizei n, GLenum* bufs ) { - void (*func_glDrawBuffersATI)( GLsizei, GLenum* ) = extension_funcs[233]; + void (*func_glDrawBuffersATI)( GLsizei, GLenum* ) = extension_funcs[EXT_glDrawBuffersATI]; TRACE("(%d, %p)\n", n, bufs ); ENTER_GL(); func_glDrawBuffersATI( n, bufs ); @@ -1914,7 +3404,7 @@ static void WINAPI wine_glDrawBuffersATI( GLsizei n, GLenum* bufs ) { } static void WINAPI wine_glDrawElementArrayAPPLE( GLenum mode, GLint first, GLsizei count ) { - void (*func_glDrawElementArrayAPPLE)( GLenum, GLint, GLsizei ) = extension_funcs[234]; + void (*func_glDrawElementArrayAPPLE)( GLenum, GLint, GLsizei ) = extension_funcs[EXT_glDrawElementArrayAPPLE]; TRACE("(%d, %d, %d)\n", mode, first, count ); ENTER_GL(); func_glDrawElementArrayAPPLE( mode, first, count ); @@ -1922,7 +3412,7 @@ static void WINAPI wine_glDrawElementArrayAPPLE( GLenum mode, GLint first, GLsiz } static void WINAPI wine_glDrawElementArrayATI( GLenum mode, GLsizei count ) { - void (*func_glDrawElementArrayATI)( GLenum, GLsizei ) = extension_funcs[235]; + void (*func_glDrawElementArrayATI)( GLenum, GLsizei ) = extension_funcs[EXT_glDrawElementArrayATI]; TRACE("(%d, %d)\n", mode, count ); ENTER_GL(); func_glDrawElementArrayATI( mode, count ); @@ -1930,7 +3420,7 @@ static void WINAPI wine_glDrawElementArrayATI( GLenum mode, GLsizei count ) { } static void WINAPI wine_glDrawElementsInstancedARB( GLenum mode, GLsizei count, GLenum type, GLvoid* indices, GLsizei primcount ) { - void (*func_glDrawElementsInstancedARB)( GLenum, GLsizei, GLenum, GLvoid*, GLsizei ) = extension_funcs[236]; + void (*func_glDrawElementsInstancedARB)( GLenum, GLsizei, GLenum, GLvoid*, GLsizei ) = extension_funcs[EXT_glDrawElementsInstancedARB]; TRACE("(%d, %d, %d, %p, %d)\n", mode, count, type, indices, primcount ); ENTER_GL(); func_glDrawElementsInstancedARB( mode, count, type, indices, primcount ); @@ -1938,7 +3428,7 @@ static void WINAPI wine_glDrawElementsInstancedARB( GLenum mode, GLsizei count, } static void WINAPI wine_glDrawElementsInstancedEXT( GLenum mode, GLsizei count, GLenum type, GLvoid* indices, GLsizei primcount ) { - void (*func_glDrawElementsInstancedEXT)( GLenum, GLsizei, GLenum, GLvoid*, GLsizei ) = extension_funcs[237]; + void (*func_glDrawElementsInstancedEXT)( GLenum, GLsizei, GLenum, GLvoid*, GLsizei ) = extension_funcs[EXT_glDrawElementsInstancedEXT]; TRACE("(%d, %d, %d, %p, %d)\n", mode, count, type, indices, primcount ); ENTER_GL(); func_glDrawElementsInstancedEXT( mode, count, type, indices, primcount ); @@ -1946,7 +3436,7 @@ static void WINAPI wine_glDrawElementsInstancedEXT( GLenum mode, GLsizei count, } static void WINAPI wine_glDrawMeshArraysSUN( GLenum mode, GLint first, GLsizei count, GLsizei width ) { - void (*func_glDrawMeshArraysSUN)( GLenum, GLint, GLsizei, GLsizei ) = extension_funcs[238]; + void (*func_glDrawMeshArraysSUN)( GLenum, GLint, GLsizei, GLsizei ) = extension_funcs[EXT_glDrawMeshArraysSUN]; TRACE("(%d, %d, %d, %d)\n", mode, first, count, width ); ENTER_GL(); func_glDrawMeshArraysSUN( mode, first, count, width ); @@ -1954,7 +3444,7 @@ static void WINAPI wine_glDrawMeshArraysSUN( GLenum mode, GLint first, GLsizei c } static void WINAPI wine_glDrawRangeElementArrayAPPLE( GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count ) { - void (*func_glDrawRangeElementArrayAPPLE)( GLenum, GLuint, GLuint, GLint, GLsizei ) = extension_funcs[239]; + void (*func_glDrawRangeElementArrayAPPLE)( GLenum, GLuint, GLuint, GLint, GLsizei ) = extension_funcs[EXT_glDrawRangeElementArrayAPPLE]; TRACE("(%d, %d, %d, %d, %d)\n", mode, start, end, first, count ); ENTER_GL(); func_glDrawRangeElementArrayAPPLE( mode, start, end, first, count ); @@ -1962,7 +3452,7 @@ static void WINAPI wine_glDrawRangeElementArrayAPPLE( GLenum mode, GLuint start, } static void WINAPI wine_glDrawRangeElementArrayATI( GLenum mode, GLuint start, GLuint end, GLsizei count ) { - void (*func_glDrawRangeElementArrayATI)( GLenum, GLuint, GLuint, GLsizei ) = extension_funcs[240]; + void (*func_glDrawRangeElementArrayATI)( GLenum, GLuint, GLuint, GLsizei ) = extension_funcs[EXT_glDrawRangeElementArrayATI]; TRACE("(%d, %d, %d, %d)\n", mode, start, end, count ); ENTER_GL(); func_glDrawRangeElementArrayATI( mode, start, end, count ); @@ -1970,7 +3460,7 @@ static void WINAPI wine_glDrawRangeElementArrayATI( GLenum mode, GLuint start, G } static void WINAPI wine_glDrawRangeElementsEXT( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid* indices ) { - void (*func_glDrawRangeElementsEXT)( GLenum, GLuint, GLuint, GLsizei, GLenum, GLvoid* ) = extension_funcs[241]; + void (*func_glDrawRangeElementsEXT)( GLenum, GLuint, GLuint, GLsizei, GLenum, GLvoid* ) = extension_funcs[EXT_glDrawRangeElementsEXT]; TRACE("(%d, %d, %d, %d, %d, %p)\n", mode, start, end, count, type, indices ); ENTER_GL(); func_glDrawRangeElementsEXT( mode, start, end, count, type, indices ); @@ -1978,7 +3468,7 @@ static void WINAPI wine_glDrawRangeElementsEXT( GLenum mode, GLuint start, GLuin } static void WINAPI wine_glEdgeFlagPointerEXT( GLsizei stride, GLsizei count, GLboolean* pointer ) { - void (*func_glEdgeFlagPointerEXT)( GLsizei, GLsizei, GLboolean* ) = extension_funcs[242]; + void (*func_glEdgeFlagPointerEXT)( GLsizei, GLsizei, GLboolean* ) = extension_funcs[EXT_glEdgeFlagPointerEXT]; TRACE("(%d, %d, %p)\n", stride, count, pointer ); ENTER_GL(); func_glEdgeFlagPointerEXT( stride, count, pointer ); @@ -1986,7 +3476,7 @@ static void WINAPI wine_glEdgeFlagPointerEXT( GLsizei stride, GLsizei count, GLb } static void WINAPI wine_glEdgeFlagPointerListIBM( GLint stride, GLboolean** pointer, GLint ptrstride ) { - void (*func_glEdgeFlagPointerListIBM)( GLint, GLboolean**, GLint ) = extension_funcs[243]; + void (*func_glEdgeFlagPointerListIBM)( GLint, GLboolean**, GLint ) = extension_funcs[EXT_glEdgeFlagPointerListIBM]; TRACE("(%d, %p, %d)\n", stride, pointer, ptrstride ); ENTER_GL(); func_glEdgeFlagPointerListIBM( stride, pointer, ptrstride ); @@ -1994,7 +3484,7 @@ static void WINAPI wine_glEdgeFlagPointerListIBM( GLint stride, GLboolean** poin } static void WINAPI wine_glElementPointerAPPLE( GLenum type, GLvoid* pointer ) { - void (*func_glElementPointerAPPLE)( GLenum, GLvoid* ) = extension_funcs[244]; + void (*func_glElementPointerAPPLE)( GLenum, GLvoid* ) = extension_funcs[EXT_glElementPointerAPPLE]; TRACE("(%d, %p)\n", type, pointer ); ENTER_GL(); func_glElementPointerAPPLE( type, pointer ); @@ -2002,7 +3492,7 @@ static void WINAPI wine_glElementPointerAPPLE( GLenum type, GLvoid* pointer ) { } static void WINAPI wine_glElementPointerATI( GLenum type, GLvoid* pointer ) { - void (*func_glElementPointerATI)( GLenum, GLvoid* ) = extension_funcs[245]; + void (*func_glElementPointerATI)( GLenum, GLvoid* ) = extension_funcs[EXT_glElementPointerATI]; TRACE("(%d, %p)\n", type, pointer ); ENTER_GL(); func_glElementPointerATI( type, pointer ); @@ -2010,7 +3500,7 @@ static void WINAPI wine_glElementPointerATI( GLenum type, GLvoid* pointer ) { } static void WINAPI wine_glEnableClientStateIndexedEXT( GLenum array, GLuint index ) { - void (*func_glEnableClientStateIndexedEXT)( GLenum, GLuint ) = extension_funcs[246]; + void (*func_glEnableClientStateIndexedEXT)( GLenum, GLuint ) = extension_funcs[EXT_glEnableClientStateIndexedEXT]; TRACE("(%d, %d)\n", array, index ); ENTER_GL(); func_glEnableClientStateIndexedEXT( array, index ); @@ -2018,7 +3508,7 @@ static void WINAPI wine_glEnableClientStateIndexedEXT( GLenum array, GLuint inde } static void WINAPI wine_glEnableIndexedEXT( GLenum target, GLuint index ) { - void (*func_glEnableIndexedEXT)( GLenum, GLuint ) = extension_funcs[247]; + void (*func_glEnableIndexedEXT)( GLenum, GLuint ) = extension_funcs[EXT_glEnableIndexedEXT]; TRACE("(%d, %d)\n", target, index ); ENTER_GL(); func_glEnableIndexedEXT( target, index ); @@ -2026,7 +3516,7 @@ static void WINAPI wine_glEnableIndexedEXT( GLenum target, GLuint index ) { } static void WINAPI wine_glEnableVariantClientStateEXT( GLuint id ) { - void (*func_glEnableVariantClientStateEXT)( GLuint ) = extension_funcs[248]; + void (*func_glEnableVariantClientStateEXT)( GLuint ) = extension_funcs[EXT_glEnableVariantClientStateEXT]; TRACE("(%d)\n", id ); ENTER_GL(); func_glEnableVariantClientStateEXT( id ); @@ -2034,7 +3524,7 @@ static void WINAPI wine_glEnableVariantClientStateEXT( GLuint id ) { } static void WINAPI wine_glEnableVertexAttribArray( GLuint index ) { - void (*func_glEnableVertexAttribArray)( GLuint ) = extension_funcs[249]; + void (*func_glEnableVertexAttribArray)( GLuint ) = extension_funcs[EXT_glEnableVertexAttribArray]; TRACE("(%d)\n", index ); ENTER_GL(); func_glEnableVertexAttribArray( index ); @@ -2042,7 +3532,7 @@ static void WINAPI wine_glEnableVertexAttribArray( GLuint index ) { } static void WINAPI wine_glEnableVertexAttribArrayARB( GLuint index ) { - void (*func_glEnableVertexAttribArrayARB)( GLuint ) = extension_funcs[250]; + void (*func_glEnableVertexAttribArrayARB)( GLuint ) = extension_funcs[EXT_glEnableVertexAttribArrayARB]; TRACE("(%d)\n", index ); ENTER_GL(); func_glEnableVertexAttribArrayARB( index ); @@ -2050,7 +3540,7 @@ static void WINAPI wine_glEnableVertexAttribArrayARB( GLuint index ) { } static void WINAPI wine_glEnablei( GLenum target, GLuint index ) { - void (*func_glEnablei)( GLenum, GLuint ) = extension_funcs[251]; + void (*func_glEnablei)( GLenum, GLuint ) = extension_funcs[EXT_glEnablei]; TRACE("(%d, %d)\n", target, index ); ENTER_GL(); func_glEnablei( target, index ); @@ -2058,7 +3548,7 @@ static void WINAPI wine_glEnablei( GLenum target, GLuint index ) { } static void WINAPI wine_glEndConditionalRender( void ) { - void (*func_glEndConditionalRender)( void ) = extension_funcs[252]; + void (*func_glEndConditionalRender)( void ) = extension_funcs[EXT_glEndConditionalRender]; TRACE("()\n"); ENTER_GL(); func_glEndConditionalRender( ); @@ -2066,7 +3556,7 @@ static void WINAPI wine_glEndConditionalRender( void ) { } static void WINAPI wine_glEndConditionalRenderNV( void ) { - void (*func_glEndConditionalRenderNV)( void ) = extension_funcs[253]; + void (*func_glEndConditionalRenderNV)( void ) = extension_funcs[EXT_glEndConditionalRenderNV]; TRACE("()\n"); ENTER_GL(); func_glEndConditionalRenderNV( ); @@ -2074,7 +3564,7 @@ static void WINAPI wine_glEndConditionalRenderNV( void ) { } static void WINAPI wine_glEndFragmentShaderATI( void ) { - void (*func_glEndFragmentShaderATI)( void ) = extension_funcs[254]; + void (*func_glEndFragmentShaderATI)( void ) = extension_funcs[EXT_glEndFragmentShaderATI]; TRACE("()\n"); ENTER_GL(); func_glEndFragmentShaderATI( ); @@ -2082,7 +3572,7 @@ static void WINAPI wine_glEndFragmentShaderATI( void ) { } static void WINAPI wine_glEndOcclusionQueryNV( void ) { - void (*func_glEndOcclusionQueryNV)( void ) = extension_funcs[255]; + void (*func_glEndOcclusionQueryNV)( void ) = extension_funcs[EXT_glEndOcclusionQueryNV]; TRACE("()\n"); ENTER_GL(); func_glEndOcclusionQueryNV( ); @@ -2090,7 +3580,7 @@ static void WINAPI wine_glEndOcclusionQueryNV( void ) { } static void WINAPI wine_glEndQuery( GLenum target ) { - void (*func_glEndQuery)( GLenum ) = extension_funcs[256]; + void (*func_glEndQuery)( GLenum ) = extension_funcs[EXT_glEndQuery]; TRACE("(%d)\n", target ); ENTER_GL(); func_glEndQuery( target ); @@ -2098,7 +3588,7 @@ static void WINAPI wine_glEndQuery( GLenum target ) { } static void WINAPI wine_glEndQueryARB( GLenum target ) { - void (*func_glEndQueryARB)( GLenum ) = extension_funcs[257]; + void (*func_glEndQueryARB)( GLenum ) = extension_funcs[EXT_glEndQueryARB]; TRACE("(%d)\n", target ); ENTER_GL(); func_glEndQueryARB( target ); @@ -2106,7 +3596,7 @@ static void WINAPI wine_glEndQueryARB( GLenum target ) { } static void WINAPI wine_glEndTransformFeedback( void ) { - void (*func_glEndTransformFeedback)( void ) = extension_funcs[258]; + void (*func_glEndTransformFeedback)( void ) = extension_funcs[EXT_glEndTransformFeedback]; TRACE("()\n"); ENTER_GL(); func_glEndTransformFeedback( ); @@ -2114,7 +3604,7 @@ static void WINAPI wine_glEndTransformFeedback( void ) { } static void WINAPI wine_glEndTransformFeedbackEXT( void ) { - void (*func_glEndTransformFeedbackEXT)( void ) = extension_funcs[259]; + void (*func_glEndTransformFeedbackEXT)( void ) = extension_funcs[EXT_glEndTransformFeedbackEXT]; TRACE("()\n"); ENTER_GL(); func_glEndTransformFeedbackEXT( ); @@ -2122,7 +3612,7 @@ static void WINAPI wine_glEndTransformFeedbackEXT( void ) { } static void WINAPI wine_glEndTransformFeedbackNV( void ) { - void (*func_glEndTransformFeedbackNV)( void ) = extension_funcs[260]; + void (*func_glEndTransformFeedbackNV)( void ) = extension_funcs[EXT_glEndTransformFeedbackNV]; TRACE("()\n"); ENTER_GL(); func_glEndTransformFeedbackNV( ); @@ -2130,7 +3620,7 @@ static void WINAPI wine_glEndTransformFeedbackNV( void ) { } static void WINAPI wine_glEndVertexShaderEXT( void ) { - void (*func_glEndVertexShaderEXT)( void ) = extension_funcs[261]; + void (*func_glEndVertexShaderEXT)( void ) = extension_funcs[EXT_glEndVertexShaderEXT]; TRACE("()\n"); ENTER_GL(); func_glEndVertexShaderEXT( ); @@ -2138,7 +3628,7 @@ static void WINAPI wine_glEndVertexShaderEXT( void ) { } static void WINAPI wine_glEvalMapsNV( GLenum target, GLenum mode ) { - void (*func_glEvalMapsNV)( GLenum, GLenum ) = extension_funcs[262]; + void (*func_glEvalMapsNV)( GLenum, GLenum ) = extension_funcs[EXT_glEvalMapsNV]; TRACE("(%d, %d)\n", target, mode ); ENTER_GL(); func_glEvalMapsNV( target, mode ); @@ -2146,7 +3636,7 @@ static void WINAPI wine_glEvalMapsNV( GLenum target, GLenum mode ) { } static void WINAPI wine_glExecuteProgramNV( GLenum target, GLuint id, GLfloat* params ) { - void (*func_glExecuteProgramNV)( GLenum, GLuint, GLfloat* ) = extension_funcs[263]; + void (*func_glExecuteProgramNV)( GLenum, GLuint, GLfloat* ) = extension_funcs[EXT_glExecuteProgramNV]; TRACE("(%d, %d, %p)\n", target, id, params ); ENTER_GL(); func_glExecuteProgramNV( target, id, params ); @@ -2154,7 +3644,7 @@ static void WINAPI wine_glExecuteProgramNV( GLenum target, GLuint id, GLfloat* p } static void WINAPI wine_glExtractComponentEXT( GLuint res, GLuint src, GLuint num ) { - void (*func_glExtractComponentEXT)( GLuint, GLuint, GLuint ) = extension_funcs[264]; + void (*func_glExtractComponentEXT)( GLuint, GLuint, GLuint ) = extension_funcs[EXT_glExtractComponentEXT]; TRACE("(%d, %d, %d)\n", res, src, num ); ENTER_GL(); func_glExtractComponentEXT( res, src, num ); @@ -2162,7 +3652,7 @@ static void WINAPI wine_glExtractComponentEXT( GLuint res, GLuint src, GLuint nu } static void WINAPI wine_glFinalCombinerInputNV( GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage ) { - void (*func_glFinalCombinerInputNV)( GLenum, GLenum, GLenum, GLenum ) = extension_funcs[265]; + void (*func_glFinalCombinerInputNV)( GLenum, GLenum, GLenum, GLenum ) = extension_funcs[EXT_glFinalCombinerInputNV]; TRACE("(%d, %d, %d, %d)\n", variable, input, mapping, componentUsage ); ENTER_GL(); func_glFinalCombinerInputNV( variable, input, mapping, componentUsage ); @@ -2171,7 +3661,7 @@ static void WINAPI wine_glFinalCombinerInputNV( GLenum variable, GLenum input, G static GLint WINAPI wine_glFinishAsyncSGIX( GLuint* markerp ) { GLint ret_value; - GLint (*func_glFinishAsyncSGIX)( GLuint* ) = extension_funcs[266]; + GLint (*func_glFinishAsyncSGIX)( GLuint* ) = extension_funcs[EXT_glFinishAsyncSGIX]; TRACE("(%p)\n", markerp ); ENTER_GL(); ret_value = func_glFinishAsyncSGIX( markerp ); @@ -2180,7 +3670,7 @@ static GLint WINAPI wine_glFinishAsyncSGIX( GLuint* markerp ) { } static void WINAPI wine_glFinishFenceAPPLE( GLuint fence ) { - void (*func_glFinishFenceAPPLE)( GLuint ) = extension_funcs[267]; + void (*func_glFinishFenceAPPLE)( GLuint ) = extension_funcs[EXT_glFinishFenceAPPLE]; TRACE("(%d)\n", fence ); ENTER_GL(); func_glFinishFenceAPPLE( fence ); @@ -2188,7 +3678,7 @@ static void WINAPI wine_glFinishFenceAPPLE( GLuint fence ) { } static void WINAPI wine_glFinishFenceNV( GLuint fence ) { - void (*func_glFinishFenceNV)( GLuint ) = extension_funcs[268]; + void (*func_glFinishFenceNV)( GLuint ) = extension_funcs[EXT_glFinishFenceNV]; TRACE("(%d)\n", fence ); ENTER_GL(); func_glFinishFenceNV( fence ); @@ -2196,7 +3686,7 @@ static void WINAPI wine_glFinishFenceNV( GLuint fence ) { } static void WINAPI wine_glFinishObjectAPPLE( GLenum object, GLint name ) { - void (*func_glFinishObjectAPPLE)( GLenum, GLint ) = extension_funcs[269]; + void (*func_glFinishObjectAPPLE)( GLenum, GLint ) = extension_funcs[EXT_glFinishObjectAPPLE]; TRACE("(%d, %d)\n", object, name ); ENTER_GL(); func_glFinishObjectAPPLE( object, name ); @@ -2204,7 +3694,7 @@ static void WINAPI wine_glFinishObjectAPPLE( GLenum object, GLint name ) { } static void WINAPI wine_glFinishTextureSUNX( void ) { - void (*func_glFinishTextureSUNX)( void ) = extension_funcs[270]; + void (*func_glFinishTextureSUNX)( void ) = extension_funcs[EXT_glFinishTextureSUNX]; TRACE("()\n"); ENTER_GL(); func_glFinishTextureSUNX( ); @@ -2212,7 +3702,7 @@ static void WINAPI wine_glFinishTextureSUNX( void ) { } static void WINAPI wine_glFlushMappedBufferRange( GLenum target, ptrdiff_t offset, ptrdiff_t length ) { - void (*func_glFlushMappedBufferRange)( GLenum, ptrdiff_t, ptrdiff_t ) = extension_funcs[271]; + void (*func_glFlushMappedBufferRange)( GLenum, ptrdiff_t, ptrdiff_t ) = extension_funcs[EXT_glFlushMappedBufferRange]; TRACE("(%d, %d, %d)\n", target, offset, length ); ENTER_GL(); func_glFlushMappedBufferRange( target, offset, length ); @@ -2220,7 +3710,7 @@ static void WINAPI wine_glFlushMappedBufferRange( GLenum target, ptrdiff_t offse } static void WINAPI wine_glFlushMappedBufferRangeAPPLE( GLenum target, ptrdiff_t offset, ptrdiff_t size ) { - void (*func_glFlushMappedBufferRangeAPPLE)( GLenum, ptrdiff_t, ptrdiff_t ) = extension_funcs[272]; + void (*func_glFlushMappedBufferRangeAPPLE)( GLenum, ptrdiff_t, ptrdiff_t ) = extension_funcs[EXT_glFlushMappedBufferRangeAPPLE]; TRACE("(%d, %d, %d)\n", target, offset, size ); ENTER_GL(); func_glFlushMappedBufferRangeAPPLE( target, offset, size ); @@ -2228,7 +3718,7 @@ static void WINAPI wine_glFlushMappedBufferRangeAPPLE( GLenum target, ptrdiff_t } static void WINAPI wine_glFlushPixelDataRangeNV( GLenum target ) { - void (*func_glFlushPixelDataRangeNV)( GLenum ) = extension_funcs[273]; + void (*func_glFlushPixelDataRangeNV)( GLenum ) = extension_funcs[EXT_glFlushPixelDataRangeNV]; TRACE("(%d)\n", target ); ENTER_GL(); func_glFlushPixelDataRangeNV( target ); @@ -2236,7 +3726,7 @@ static void WINAPI wine_glFlushPixelDataRangeNV( GLenum target ) { } static void WINAPI wine_glFlushRasterSGIX( void ) { - void (*func_glFlushRasterSGIX)( void ) = extension_funcs[274]; + void (*func_glFlushRasterSGIX)( void ) = extension_funcs[EXT_glFlushRasterSGIX]; TRACE("()\n"); ENTER_GL(); func_glFlushRasterSGIX( ); @@ -2244,7 +3734,7 @@ static void WINAPI wine_glFlushRasterSGIX( void ) { } static void WINAPI wine_glFlushVertexArrayRangeAPPLE( GLsizei length, GLvoid* pointer ) { - void (*func_glFlushVertexArrayRangeAPPLE)( GLsizei, GLvoid* ) = extension_funcs[275]; + void (*func_glFlushVertexArrayRangeAPPLE)( GLsizei, GLvoid* ) = extension_funcs[EXT_glFlushVertexArrayRangeAPPLE]; TRACE("(%d, %p)\n", length, pointer ); ENTER_GL(); func_glFlushVertexArrayRangeAPPLE( length, pointer ); @@ -2252,7 +3742,7 @@ static void WINAPI wine_glFlushVertexArrayRangeAPPLE( GLsizei length, GLvoid* po } static void WINAPI wine_glFlushVertexArrayRangeNV( void ) { - void (*func_glFlushVertexArrayRangeNV)( void ) = extension_funcs[276]; + void (*func_glFlushVertexArrayRangeNV)( void ) = extension_funcs[EXT_glFlushVertexArrayRangeNV]; TRACE("()\n"); ENTER_GL(); func_glFlushVertexArrayRangeNV( ); @@ -2260,7 +3750,7 @@ static void WINAPI wine_glFlushVertexArrayRangeNV( void ) { } static void WINAPI wine_glFogCoordPointer( GLenum type, GLsizei stride, GLvoid* pointer ) { - void (*func_glFogCoordPointer)( GLenum, GLsizei, GLvoid* ) = extension_funcs[277]; + void (*func_glFogCoordPointer)( GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glFogCoordPointer]; TRACE("(%d, %d, %p)\n", type, stride, pointer ); ENTER_GL(); func_glFogCoordPointer( type, stride, pointer ); @@ -2268,7 +3758,7 @@ static void WINAPI wine_glFogCoordPointer( GLenum type, GLsizei stride, GLvoid* } static void WINAPI wine_glFogCoordPointerEXT( GLenum type, GLsizei stride, GLvoid* pointer ) { - void (*func_glFogCoordPointerEXT)( GLenum, GLsizei, GLvoid* ) = extension_funcs[278]; + void (*func_glFogCoordPointerEXT)( GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glFogCoordPointerEXT]; TRACE("(%d, %d, %p)\n", type, stride, pointer ); ENTER_GL(); func_glFogCoordPointerEXT( type, stride, pointer ); @@ -2276,7 +3766,7 @@ static void WINAPI wine_glFogCoordPointerEXT( GLenum type, GLsizei stride, GLvoi } static void WINAPI wine_glFogCoordPointerListIBM( GLenum type, GLint stride, GLvoid** pointer, GLint ptrstride ) { - void (*func_glFogCoordPointerListIBM)( GLenum, GLint, GLvoid**, GLint ) = extension_funcs[279]; + void (*func_glFogCoordPointerListIBM)( GLenum, GLint, GLvoid**, GLint ) = extension_funcs[EXT_glFogCoordPointerListIBM]; TRACE("(%d, %d, %p, %d)\n", type, stride, pointer, ptrstride ); ENTER_GL(); func_glFogCoordPointerListIBM( type, stride, pointer, ptrstride ); @@ -2284,7 +3774,7 @@ static void WINAPI wine_glFogCoordPointerListIBM( GLenum type, GLint stride, GLv } static void WINAPI wine_glFogCoordd( GLdouble coord ) { - void (*func_glFogCoordd)( GLdouble ) = extension_funcs[280]; + void (*func_glFogCoordd)( GLdouble ) = extension_funcs[EXT_glFogCoordd]; TRACE("(%f)\n", coord ); ENTER_GL(); func_glFogCoordd( coord ); @@ -2292,7 +3782,7 @@ static void WINAPI wine_glFogCoordd( GLdouble coord ) { } static void WINAPI wine_glFogCoorddEXT( GLdouble coord ) { - void (*func_glFogCoorddEXT)( GLdouble ) = extension_funcs[281]; + void (*func_glFogCoorddEXT)( GLdouble ) = extension_funcs[EXT_glFogCoorddEXT]; TRACE("(%f)\n", coord ); ENTER_GL(); func_glFogCoorddEXT( coord ); @@ -2300,7 +3790,7 @@ static void WINAPI wine_glFogCoorddEXT( GLdouble coord ) { } static void WINAPI wine_glFogCoorddv( GLdouble* coord ) { - void (*func_glFogCoorddv)( GLdouble* ) = extension_funcs[282]; + void (*func_glFogCoorddv)( GLdouble* ) = extension_funcs[EXT_glFogCoorddv]; TRACE("(%p)\n", coord ); ENTER_GL(); func_glFogCoorddv( coord ); @@ -2308,7 +3798,7 @@ static void WINAPI wine_glFogCoorddv( GLdouble* coord ) { } static void WINAPI wine_glFogCoorddvEXT( GLdouble* coord ) { - void (*func_glFogCoorddvEXT)( GLdouble* ) = extension_funcs[283]; + void (*func_glFogCoorddvEXT)( GLdouble* ) = extension_funcs[EXT_glFogCoorddvEXT]; TRACE("(%p)\n", coord ); ENTER_GL(); func_glFogCoorddvEXT( coord ); @@ -2316,7 +3806,7 @@ static void WINAPI wine_glFogCoorddvEXT( GLdouble* coord ) { } static void WINAPI wine_glFogCoordf( GLfloat coord ) { - void (*func_glFogCoordf)( GLfloat ) = extension_funcs[284]; + void (*func_glFogCoordf)( GLfloat ) = extension_funcs[EXT_glFogCoordf]; TRACE("(%f)\n", coord ); ENTER_GL(); func_glFogCoordf( coord ); @@ -2324,7 +3814,7 @@ static void WINAPI wine_glFogCoordf( GLfloat coord ) { } static void WINAPI wine_glFogCoordfEXT( GLfloat coord ) { - void (*func_glFogCoordfEXT)( GLfloat ) = extension_funcs[285]; + void (*func_glFogCoordfEXT)( GLfloat ) = extension_funcs[EXT_glFogCoordfEXT]; TRACE("(%f)\n", coord ); ENTER_GL(); func_glFogCoordfEXT( coord ); @@ -2332,7 +3822,7 @@ static void WINAPI wine_glFogCoordfEXT( GLfloat coord ) { } static void WINAPI wine_glFogCoordfv( GLfloat* coord ) { - void (*func_glFogCoordfv)( GLfloat* ) = extension_funcs[286]; + void (*func_glFogCoordfv)( GLfloat* ) = extension_funcs[EXT_glFogCoordfv]; TRACE("(%p)\n", coord ); ENTER_GL(); func_glFogCoordfv( coord ); @@ -2340,7 +3830,7 @@ static void WINAPI wine_glFogCoordfv( GLfloat* coord ) { } static void WINAPI wine_glFogCoordfvEXT( GLfloat* coord ) { - void (*func_glFogCoordfvEXT)( GLfloat* ) = extension_funcs[287]; + void (*func_glFogCoordfvEXT)( GLfloat* ) = extension_funcs[EXT_glFogCoordfvEXT]; TRACE("(%p)\n", coord ); ENTER_GL(); func_glFogCoordfvEXT( coord ); @@ -2348,7 +3838,7 @@ static void WINAPI wine_glFogCoordfvEXT( GLfloat* coord ) { } static void WINAPI wine_glFogCoordhNV( unsigned short fog ) { - void (*func_glFogCoordhNV)( unsigned short ) = extension_funcs[288]; + void (*func_glFogCoordhNV)( unsigned short ) = extension_funcs[EXT_glFogCoordhNV]; TRACE("(%d)\n", fog ); ENTER_GL(); func_glFogCoordhNV( fog ); @@ -2356,7 +3846,7 @@ static void WINAPI wine_glFogCoordhNV( unsigned short fog ) { } static void WINAPI wine_glFogCoordhvNV( unsigned short* fog ) { - void (*func_glFogCoordhvNV)( unsigned short* ) = extension_funcs[289]; + void (*func_glFogCoordhvNV)( unsigned short* ) = extension_funcs[EXT_glFogCoordhvNV]; TRACE("(%p)\n", fog ); ENTER_GL(); func_glFogCoordhvNV( fog ); @@ -2364,7 +3854,7 @@ static void WINAPI wine_glFogCoordhvNV( unsigned short* fog ) { } static void WINAPI wine_glFogFuncSGIS( GLsizei n, GLfloat* points ) { - void (*func_glFogFuncSGIS)( GLsizei, GLfloat* ) = extension_funcs[290]; + void (*func_glFogFuncSGIS)( GLsizei, GLfloat* ) = extension_funcs[EXT_glFogFuncSGIS]; TRACE("(%d, %p)\n", n, points ); ENTER_GL(); func_glFogFuncSGIS( n, points ); @@ -2372,7 +3862,7 @@ static void WINAPI wine_glFogFuncSGIS( GLsizei n, GLfloat* points ) { } static void WINAPI wine_glFragmentColorMaterialSGIX( GLenum face, GLenum mode ) { - void (*func_glFragmentColorMaterialSGIX)( GLenum, GLenum ) = extension_funcs[291]; + void (*func_glFragmentColorMaterialSGIX)( GLenum, GLenum ) = extension_funcs[EXT_glFragmentColorMaterialSGIX]; TRACE("(%d, %d)\n", face, mode ); ENTER_GL(); func_glFragmentColorMaterialSGIX( face, mode ); @@ -2380,7 +3870,7 @@ static void WINAPI wine_glFragmentColorMaterialSGIX( GLenum face, GLenum mode ) } static void WINAPI wine_glFragmentLightModelfSGIX( GLenum pname, GLfloat param ) { - void (*func_glFragmentLightModelfSGIX)( GLenum, GLfloat ) = extension_funcs[292]; + void (*func_glFragmentLightModelfSGIX)( GLenum, GLfloat ) = extension_funcs[EXT_glFragmentLightModelfSGIX]; TRACE("(%d, %f)\n", pname, param ); ENTER_GL(); func_glFragmentLightModelfSGIX( pname, param ); @@ -2388,7 +3878,7 @@ static void WINAPI wine_glFragmentLightModelfSGIX( GLenum pname, GLfloat param ) } static void WINAPI wine_glFragmentLightModelfvSGIX( GLenum pname, GLfloat* params ) { - void (*func_glFragmentLightModelfvSGIX)( GLenum, GLfloat* ) = extension_funcs[293]; + void (*func_glFragmentLightModelfvSGIX)( GLenum, GLfloat* ) = extension_funcs[EXT_glFragmentLightModelfvSGIX]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glFragmentLightModelfvSGIX( pname, params ); @@ -2396,7 +3886,7 @@ static void WINAPI wine_glFragmentLightModelfvSGIX( GLenum pname, GLfloat* param } static void WINAPI wine_glFragmentLightModeliSGIX( GLenum pname, GLint param ) { - void (*func_glFragmentLightModeliSGIX)( GLenum, GLint ) = extension_funcs[294]; + void (*func_glFragmentLightModeliSGIX)( GLenum, GLint ) = extension_funcs[EXT_glFragmentLightModeliSGIX]; TRACE("(%d, %d)\n", pname, param ); ENTER_GL(); func_glFragmentLightModeliSGIX( pname, param ); @@ -2404,7 +3894,7 @@ static void WINAPI wine_glFragmentLightModeliSGIX( GLenum pname, GLint param ) { } static void WINAPI wine_glFragmentLightModelivSGIX( GLenum pname, GLint* params ) { - void (*func_glFragmentLightModelivSGIX)( GLenum, GLint* ) = extension_funcs[295]; + void (*func_glFragmentLightModelivSGIX)( GLenum, GLint* ) = extension_funcs[EXT_glFragmentLightModelivSGIX]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glFragmentLightModelivSGIX( pname, params ); @@ -2412,7 +3902,7 @@ static void WINAPI wine_glFragmentLightModelivSGIX( GLenum pname, GLint* params } static void WINAPI wine_glFragmentLightfSGIX( GLenum light, GLenum pname, GLfloat param ) { - void (*func_glFragmentLightfSGIX)( GLenum, GLenum, GLfloat ) = extension_funcs[296]; + void (*func_glFragmentLightfSGIX)( GLenum, GLenum, GLfloat ) = extension_funcs[EXT_glFragmentLightfSGIX]; TRACE("(%d, %d, %f)\n", light, pname, param ); ENTER_GL(); func_glFragmentLightfSGIX( light, pname, param ); @@ -2420,7 +3910,7 @@ static void WINAPI wine_glFragmentLightfSGIX( GLenum light, GLenum pname, GLfloa } static void WINAPI wine_glFragmentLightfvSGIX( GLenum light, GLenum pname, GLfloat* params ) { - void (*func_glFragmentLightfvSGIX)( GLenum, GLenum, GLfloat* ) = extension_funcs[297]; + void (*func_glFragmentLightfvSGIX)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glFragmentLightfvSGIX]; TRACE("(%d, %d, %p)\n", light, pname, params ); ENTER_GL(); func_glFragmentLightfvSGIX( light, pname, params ); @@ -2428,7 +3918,7 @@ static void WINAPI wine_glFragmentLightfvSGIX( GLenum light, GLenum pname, GLflo } static void WINAPI wine_glFragmentLightiSGIX( GLenum light, GLenum pname, GLint param ) { - void (*func_glFragmentLightiSGIX)( GLenum, GLenum, GLint ) = extension_funcs[298]; + void (*func_glFragmentLightiSGIX)( GLenum, GLenum, GLint ) = extension_funcs[EXT_glFragmentLightiSGIX]; TRACE("(%d, %d, %d)\n", light, pname, param ); ENTER_GL(); func_glFragmentLightiSGIX( light, pname, param ); @@ -2436,7 +3926,7 @@ static void WINAPI wine_glFragmentLightiSGIX( GLenum light, GLenum pname, GLint } static void WINAPI wine_glFragmentLightivSGIX( GLenum light, GLenum pname, GLint* params ) { - void (*func_glFragmentLightivSGIX)( GLenum, GLenum, GLint* ) = extension_funcs[299]; + void (*func_glFragmentLightivSGIX)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glFragmentLightivSGIX]; TRACE("(%d, %d, %p)\n", light, pname, params ); ENTER_GL(); func_glFragmentLightivSGIX( light, pname, params ); @@ -2444,7 +3934,7 @@ static void WINAPI wine_glFragmentLightivSGIX( GLenum light, GLenum pname, GLint } static void WINAPI wine_glFragmentMaterialfSGIX( GLenum face, GLenum pname, GLfloat param ) { - void (*func_glFragmentMaterialfSGIX)( GLenum, GLenum, GLfloat ) = extension_funcs[300]; + void (*func_glFragmentMaterialfSGIX)( GLenum, GLenum, GLfloat ) = extension_funcs[EXT_glFragmentMaterialfSGIX]; TRACE("(%d, %d, %f)\n", face, pname, param ); ENTER_GL(); func_glFragmentMaterialfSGIX( face, pname, param ); @@ -2452,7 +3942,7 @@ static void WINAPI wine_glFragmentMaterialfSGIX( GLenum face, GLenum pname, GLfl } static void WINAPI wine_glFragmentMaterialfvSGIX( GLenum face, GLenum pname, GLfloat* params ) { - void (*func_glFragmentMaterialfvSGIX)( GLenum, GLenum, GLfloat* ) = extension_funcs[301]; + void (*func_glFragmentMaterialfvSGIX)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glFragmentMaterialfvSGIX]; TRACE("(%d, %d, %p)\n", face, pname, params ); ENTER_GL(); func_glFragmentMaterialfvSGIX( face, pname, params ); @@ -2460,7 +3950,7 @@ static void WINAPI wine_glFragmentMaterialfvSGIX( GLenum face, GLenum pname, GLf } static void WINAPI wine_glFragmentMaterialiSGIX( GLenum face, GLenum pname, GLint param ) { - void (*func_glFragmentMaterialiSGIX)( GLenum, GLenum, GLint ) = extension_funcs[302]; + void (*func_glFragmentMaterialiSGIX)( GLenum, GLenum, GLint ) = extension_funcs[EXT_glFragmentMaterialiSGIX]; TRACE("(%d, %d, %d)\n", face, pname, param ); ENTER_GL(); func_glFragmentMaterialiSGIX( face, pname, param ); @@ -2468,7 +3958,7 @@ static void WINAPI wine_glFragmentMaterialiSGIX( GLenum face, GLenum pname, GLin } static void WINAPI wine_glFragmentMaterialivSGIX( GLenum face, GLenum pname, GLint* params ) { - void (*func_glFragmentMaterialivSGIX)( GLenum, GLenum, GLint* ) = extension_funcs[303]; + void (*func_glFragmentMaterialivSGIX)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glFragmentMaterialivSGIX]; TRACE("(%d, %d, %p)\n", face, pname, params ); ENTER_GL(); func_glFragmentMaterialivSGIX( face, pname, params ); @@ -2476,7 +3966,7 @@ static void WINAPI wine_glFragmentMaterialivSGIX( GLenum face, GLenum pname, GLi } static void WINAPI wine_glFrameTerminatorGREMEDY( void ) { - void (*func_glFrameTerminatorGREMEDY)( void ) = extension_funcs[304]; + void (*func_glFrameTerminatorGREMEDY)( void ) = extension_funcs[EXT_glFrameTerminatorGREMEDY]; TRACE("()\n"); ENTER_GL(); func_glFrameTerminatorGREMEDY( ); @@ -2484,7 +3974,7 @@ static void WINAPI wine_glFrameTerminatorGREMEDY( void ) { } static void WINAPI wine_glFrameZoomSGIX( GLint factor ) { - void (*func_glFrameZoomSGIX)( GLint ) = extension_funcs[305]; + void (*func_glFrameZoomSGIX)( GLint ) = extension_funcs[EXT_glFrameZoomSGIX]; TRACE("(%d)\n", factor ); ENTER_GL(); func_glFrameZoomSGIX( factor ); @@ -2492,7 +3982,7 @@ static void WINAPI wine_glFrameZoomSGIX( GLint factor ) { } static void WINAPI wine_glFramebufferDrawBufferEXT( GLuint framebuffer, GLenum mode ) { - void (*func_glFramebufferDrawBufferEXT)( GLuint, GLenum ) = extension_funcs[306]; + void (*func_glFramebufferDrawBufferEXT)( GLuint, GLenum ) = extension_funcs[EXT_glFramebufferDrawBufferEXT]; TRACE("(%d, %d)\n", framebuffer, mode ); ENTER_GL(); func_glFramebufferDrawBufferEXT( framebuffer, mode ); @@ -2500,7 +3990,7 @@ static void WINAPI wine_glFramebufferDrawBufferEXT( GLuint framebuffer, GLenum m } static void WINAPI wine_glFramebufferDrawBuffersEXT( GLuint framebuffer, GLsizei n, GLenum* bufs ) { - void (*func_glFramebufferDrawBuffersEXT)( GLuint, GLsizei, GLenum* ) = extension_funcs[307]; + void (*func_glFramebufferDrawBuffersEXT)( GLuint, GLsizei, GLenum* ) = extension_funcs[EXT_glFramebufferDrawBuffersEXT]; TRACE("(%d, %d, %p)\n", framebuffer, n, bufs ); ENTER_GL(); func_glFramebufferDrawBuffersEXT( framebuffer, n, bufs ); @@ -2508,7 +3998,7 @@ static void WINAPI wine_glFramebufferDrawBuffersEXT( GLuint framebuffer, GLsizei } static void WINAPI wine_glFramebufferReadBufferEXT( GLuint framebuffer, GLenum mode ) { - void (*func_glFramebufferReadBufferEXT)( GLuint, GLenum ) = extension_funcs[308]; + void (*func_glFramebufferReadBufferEXT)( GLuint, GLenum ) = extension_funcs[EXT_glFramebufferReadBufferEXT]; TRACE("(%d, %d)\n", framebuffer, mode ); ENTER_GL(); func_glFramebufferReadBufferEXT( framebuffer, mode ); @@ -2516,7 +4006,7 @@ static void WINAPI wine_glFramebufferReadBufferEXT( GLuint framebuffer, GLenum m } static void WINAPI wine_glFramebufferRenderbuffer( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) { - void (*func_glFramebufferRenderbuffer)( GLenum, GLenum, GLenum, GLuint ) = extension_funcs[309]; + void (*func_glFramebufferRenderbuffer)( GLenum, GLenum, GLenum, GLuint ) = extension_funcs[EXT_glFramebufferRenderbuffer]; TRACE("(%d, %d, %d, %d)\n", target, attachment, renderbuffertarget, renderbuffer ); ENTER_GL(); func_glFramebufferRenderbuffer( target, attachment, renderbuffertarget, renderbuffer ); @@ -2524,7 +4014,7 @@ static void WINAPI wine_glFramebufferRenderbuffer( GLenum target, GLenum attachm } static void WINAPI wine_glFramebufferRenderbufferEXT( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) { - void (*func_glFramebufferRenderbufferEXT)( GLenum, GLenum, GLenum, GLuint ) = extension_funcs[310]; + void (*func_glFramebufferRenderbufferEXT)( GLenum, GLenum, GLenum, GLuint ) = extension_funcs[EXT_glFramebufferRenderbufferEXT]; TRACE("(%d, %d, %d, %d)\n", target, attachment, renderbuffertarget, renderbuffer ); ENTER_GL(); func_glFramebufferRenderbufferEXT( target, attachment, renderbuffertarget, renderbuffer ); @@ -2532,7 +4022,7 @@ static void WINAPI wine_glFramebufferRenderbufferEXT( GLenum target, GLenum atta } static void WINAPI wine_glFramebufferTexture1D( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) { - void (*func_glFramebufferTexture1D)( GLenum, GLenum, GLenum, GLuint, GLint ) = extension_funcs[311]; + void (*func_glFramebufferTexture1D)( GLenum, GLenum, GLenum, GLuint, GLint ) = extension_funcs[EXT_glFramebufferTexture1D]; TRACE("(%d, %d, %d, %d, %d)\n", target, attachment, textarget, texture, level ); ENTER_GL(); func_glFramebufferTexture1D( target, attachment, textarget, texture, level ); @@ -2540,7 +4030,7 @@ static void WINAPI wine_glFramebufferTexture1D( GLenum target, GLenum attachment } static void WINAPI wine_glFramebufferTexture1DEXT( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) { - void (*func_glFramebufferTexture1DEXT)( GLenum, GLenum, GLenum, GLuint, GLint ) = extension_funcs[312]; + void (*func_glFramebufferTexture1DEXT)( GLenum, GLenum, GLenum, GLuint, GLint ) = extension_funcs[EXT_glFramebufferTexture1DEXT]; TRACE("(%d, %d, %d, %d, %d)\n", target, attachment, textarget, texture, level ); ENTER_GL(); func_glFramebufferTexture1DEXT( target, attachment, textarget, texture, level ); @@ -2548,7 +4038,7 @@ static void WINAPI wine_glFramebufferTexture1DEXT( GLenum target, GLenum attachm } static void WINAPI wine_glFramebufferTexture2D( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) { - void (*func_glFramebufferTexture2D)( GLenum, GLenum, GLenum, GLuint, GLint ) = extension_funcs[313]; + void (*func_glFramebufferTexture2D)( GLenum, GLenum, GLenum, GLuint, GLint ) = extension_funcs[EXT_glFramebufferTexture2D]; TRACE("(%d, %d, %d, %d, %d)\n", target, attachment, textarget, texture, level ); ENTER_GL(); func_glFramebufferTexture2D( target, attachment, textarget, texture, level ); @@ -2556,7 +4046,7 @@ static void WINAPI wine_glFramebufferTexture2D( GLenum target, GLenum attachment } static void WINAPI wine_glFramebufferTexture2DEXT( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) { - void (*func_glFramebufferTexture2DEXT)( GLenum, GLenum, GLenum, GLuint, GLint ) = extension_funcs[314]; + void (*func_glFramebufferTexture2DEXT)( GLenum, GLenum, GLenum, GLuint, GLint ) = extension_funcs[EXT_glFramebufferTexture2DEXT]; TRACE("(%d, %d, %d, %d, %d)\n", target, attachment, textarget, texture, level ); ENTER_GL(); func_glFramebufferTexture2DEXT( target, attachment, textarget, texture, level ); @@ -2564,7 +4054,7 @@ static void WINAPI wine_glFramebufferTexture2DEXT( GLenum target, GLenum attachm } static void WINAPI wine_glFramebufferTexture3D( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset ) { - void (*func_glFramebufferTexture3D)( GLenum, GLenum, GLenum, GLuint, GLint, GLint ) = extension_funcs[315]; + void (*func_glFramebufferTexture3D)( GLenum, GLenum, GLenum, GLuint, GLint, GLint ) = extension_funcs[EXT_glFramebufferTexture3D]; TRACE("(%d, %d, %d, %d, %d, %d)\n", target, attachment, textarget, texture, level, zoffset ); ENTER_GL(); func_glFramebufferTexture3D( target, attachment, textarget, texture, level, zoffset ); @@ -2572,7 +4062,7 @@ static void WINAPI wine_glFramebufferTexture3D( GLenum target, GLenum attachment } static void WINAPI wine_glFramebufferTexture3DEXT( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset ) { - void (*func_glFramebufferTexture3DEXT)( GLenum, GLenum, GLenum, GLuint, GLint, GLint ) = extension_funcs[316]; + void (*func_glFramebufferTexture3DEXT)( GLenum, GLenum, GLenum, GLuint, GLint, GLint ) = extension_funcs[EXT_glFramebufferTexture3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d)\n", target, attachment, textarget, texture, level, zoffset ); ENTER_GL(); func_glFramebufferTexture3DEXT( target, attachment, textarget, texture, level, zoffset ); @@ -2580,7 +4070,7 @@ static void WINAPI wine_glFramebufferTexture3DEXT( GLenum target, GLenum attachm } static void WINAPI wine_glFramebufferTextureARB( GLenum target, GLenum attachment, GLuint texture, GLint level ) { - void (*func_glFramebufferTextureARB)( GLenum, GLenum, GLuint, GLint ) = extension_funcs[317]; + void (*func_glFramebufferTextureARB)( GLenum, GLenum, GLuint, GLint ) = extension_funcs[EXT_glFramebufferTextureARB]; TRACE("(%d, %d, %d, %d)\n", target, attachment, texture, level ); ENTER_GL(); func_glFramebufferTextureARB( target, attachment, texture, level ); @@ -2588,7 +4078,7 @@ static void WINAPI wine_glFramebufferTextureARB( GLenum target, GLenum attachmen } static void WINAPI wine_glFramebufferTextureEXT( GLenum target, GLenum attachment, GLuint texture, GLint level ) { - void (*func_glFramebufferTextureEXT)( GLenum, GLenum, GLuint, GLint ) = extension_funcs[318]; + void (*func_glFramebufferTextureEXT)( GLenum, GLenum, GLuint, GLint ) = extension_funcs[EXT_glFramebufferTextureEXT]; TRACE("(%d, %d, %d, %d)\n", target, attachment, texture, level ); ENTER_GL(); func_glFramebufferTextureEXT( target, attachment, texture, level ); @@ -2596,7 +4086,7 @@ static void WINAPI wine_glFramebufferTextureEXT( GLenum target, GLenum attachmen } static void WINAPI wine_glFramebufferTextureFaceARB( GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face ) { - void (*func_glFramebufferTextureFaceARB)( GLenum, GLenum, GLuint, GLint, GLenum ) = extension_funcs[319]; + void (*func_glFramebufferTextureFaceARB)( GLenum, GLenum, GLuint, GLint, GLenum ) = extension_funcs[EXT_glFramebufferTextureFaceARB]; TRACE("(%d, %d, %d, %d, %d)\n", target, attachment, texture, level, face ); ENTER_GL(); func_glFramebufferTextureFaceARB( target, attachment, texture, level, face ); @@ -2604,7 +4094,7 @@ static void WINAPI wine_glFramebufferTextureFaceARB( GLenum target, GLenum attac } static void WINAPI wine_glFramebufferTextureFaceEXT( GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face ) { - void (*func_glFramebufferTextureFaceEXT)( GLenum, GLenum, GLuint, GLint, GLenum ) = extension_funcs[320]; + void (*func_glFramebufferTextureFaceEXT)( GLenum, GLenum, GLuint, GLint, GLenum ) = extension_funcs[EXT_glFramebufferTextureFaceEXT]; TRACE("(%d, %d, %d, %d, %d)\n", target, attachment, texture, level, face ); ENTER_GL(); func_glFramebufferTextureFaceEXT( target, attachment, texture, level, face ); @@ -2612,7 +4102,7 @@ static void WINAPI wine_glFramebufferTextureFaceEXT( GLenum target, GLenum attac } static void WINAPI wine_glFramebufferTextureLayer( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) { - void (*func_glFramebufferTextureLayer)( GLenum, GLenum, GLuint, GLint, GLint ) = extension_funcs[321]; + void (*func_glFramebufferTextureLayer)( GLenum, GLenum, GLuint, GLint, GLint ) = extension_funcs[EXT_glFramebufferTextureLayer]; TRACE("(%d, %d, %d, %d, %d)\n", target, attachment, texture, level, layer ); ENTER_GL(); func_glFramebufferTextureLayer( target, attachment, texture, level, layer ); @@ -2620,7 +4110,7 @@ static void WINAPI wine_glFramebufferTextureLayer( GLenum target, GLenum attachm } static void WINAPI wine_glFramebufferTextureLayerARB( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) { - void (*func_glFramebufferTextureLayerARB)( GLenum, GLenum, GLuint, GLint, GLint ) = extension_funcs[322]; + void (*func_glFramebufferTextureLayerARB)( GLenum, GLenum, GLuint, GLint, GLint ) = extension_funcs[EXT_glFramebufferTextureLayerARB]; TRACE("(%d, %d, %d, %d, %d)\n", target, attachment, texture, level, layer ); ENTER_GL(); func_glFramebufferTextureLayerARB( target, attachment, texture, level, layer ); @@ -2628,7 +4118,7 @@ static void WINAPI wine_glFramebufferTextureLayerARB( GLenum target, GLenum atta } static void WINAPI wine_glFramebufferTextureLayerEXT( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) { - void (*func_glFramebufferTextureLayerEXT)( GLenum, GLenum, GLuint, GLint, GLint ) = extension_funcs[323]; + void (*func_glFramebufferTextureLayerEXT)( GLenum, GLenum, GLuint, GLint, GLint ) = extension_funcs[EXT_glFramebufferTextureLayerEXT]; TRACE("(%d, %d, %d, %d, %d)\n", target, attachment, texture, level, layer ); ENTER_GL(); func_glFramebufferTextureLayerEXT( target, attachment, texture, level, layer ); @@ -2636,7 +4126,7 @@ static void WINAPI wine_glFramebufferTextureLayerEXT( GLenum target, GLenum atta } static void WINAPI wine_glFreeObjectBufferATI( GLuint buffer ) { - void (*func_glFreeObjectBufferATI)( GLuint ) = extension_funcs[324]; + void (*func_glFreeObjectBufferATI)( GLuint ) = extension_funcs[EXT_glFreeObjectBufferATI]; TRACE("(%d)\n", buffer ); ENTER_GL(); func_glFreeObjectBufferATI( buffer ); @@ -2645,7 +4135,7 @@ static void WINAPI wine_glFreeObjectBufferATI( GLuint buffer ) { static GLuint WINAPI wine_glGenAsyncMarkersSGIX( GLsizei range ) { GLuint ret_value; - GLuint (*func_glGenAsyncMarkersSGIX)( GLsizei ) = extension_funcs[325]; + GLuint (*func_glGenAsyncMarkersSGIX)( GLsizei ) = extension_funcs[EXT_glGenAsyncMarkersSGIX]; TRACE("(%d)\n", range ); ENTER_GL(); ret_value = func_glGenAsyncMarkersSGIX( range ); @@ -2654,7 +4144,7 @@ static GLuint WINAPI wine_glGenAsyncMarkersSGIX( GLsizei range ) { } static void WINAPI wine_glGenBuffers( GLsizei n, GLuint* buffers ) { - void (*func_glGenBuffers)( GLsizei, GLuint* ) = extension_funcs[326]; + void (*func_glGenBuffers)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenBuffers]; TRACE("(%d, %p)\n", n, buffers ); ENTER_GL(); func_glGenBuffers( n, buffers ); @@ -2662,7 +4152,7 @@ static void WINAPI wine_glGenBuffers( GLsizei n, GLuint* buffers ) { } static void WINAPI wine_glGenBuffersARB( GLsizei n, GLuint* buffers ) { - void (*func_glGenBuffersARB)( GLsizei, GLuint* ) = extension_funcs[327]; + void (*func_glGenBuffersARB)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenBuffersARB]; TRACE("(%d, %p)\n", n, buffers ); ENTER_GL(); func_glGenBuffersARB( n, buffers ); @@ -2670,7 +4160,7 @@ static void WINAPI wine_glGenBuffersARB( GLsizei n, GLuint* buffers ) { } static void WINAPI wine_glGenFencesAPPLE( GLsizei n, GLuint* fences ) { - void (*func_glGenFencesAPPLE)( GLsizei, GLuint* ) = extension_funcs[328]; + void (*func_glGenFencesAPPLE)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenFencesAPPLE]; TRACE("(%d, %p)\n", n, fences ); ENTER_GL(); func_glGenFencesAPPLE( n, fences ); @@ -2678,7 +4168,7 @@ static void WINAPI wine_glGenFencesAPPLE( GLsizei n, GLuint* fences ) { } static void WINAPI wine_glGenFencesNV( GLsizei n, GLuint* fences ) { - void (*func_glGenFencesNV)( GLsizei, GLuint* ) = extension_funcs[329]; + void (*func_glGenFencesNV)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenFencesNV]; TRACE("(%d, %p)\n", n, fences ); ENTER_GL(); func_glGenFencesNV( n, fences ); @@ -2687,7 +4177,7 @@ static void WINAPI wine_glGenFencesNV( GLsizei n, GLuint* fences ) { static GLuint WINAPI wine_glGenFragmentShadersATI( GLuint range ) { GLuint ret_value; - GLuint (*func_glGenFragmentShadersATI)( GLuint ) = extension_funcs[330]; + GLuint (*func_glGenFragmentShadersATI)( GLuint ) = extension_funcs[EXT_glGenFragmentShadersATI]; TRACE("(%d)\n", range ); ENTER_GL(); ret_value = func_glGenFragmentShadersATI( range ); @@ -2696,7 +4186,7 @@ static GLuint WINAPI wine_glGenFragmentShadersATI( GLuint range ) { } static void WINAPI wine_glGenFramebuffers( GLsizei n, GLuint* framebuffers ) { - void (*func_glGenFramebuffers)( GLsizei, GLuint* ) = extension_funcs[331]; + void (*func_glGenFramebuffers)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenFramebuffers]; TRACE("(%d, %p)\n", n, framebuffers ); ENTER_GL(); func_glGenFramebuffers( n, framebuffers ); @@ -2704,7 +4194,7 @@ static void WINAPI wine_glGenFramebuffers( GLsizei n, GLuint* framebuffers ) { } static void WINAPI wine_glGenFramebuffersEXT( GLsizei n, GLuint* framebuffers ) { - void (*func_glGenFramebuffersEXT)( GLsizei, GLuint* ) = extension_funcs[332]; + void (*func_glGenFramebuffersEXT)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenFramebuffersEXT]; TRACE("(%d, %p)\n", n, framebuffers ); ENTER_GL(); func_glGenFramebuffersEXT( n, framebuffers ); @@ -2712,7 +4202,7 @@ static void WINAPI wine_glGenFramebuffersEXT( GLsizei n, GLuint* framebuffers ) } static void WINAPI wine_glGenOcclusionQueriesNV( GLsizei n, GLuint* ids ) { - void (*func_glGenOcclusionQueriesNV)( GLsizei, GLuint* ) = extension_funcs[333]; + void (*func_glGenOcclusionQueriesNV)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenOcclusionQueriesNV]; TRACE("(%d, %p)\n", n, ids ); ENTER_GL(); func_glGenOcclusionQueriesNV( n, ids ); @@ -2720,7 +4210,7 @@ static void WINAPI wine_glGenOcclusionQueriesNV( GLsizei n, GLuint* ids ) { } static void WINAPI wine_glGenProgramsARB( GLsizei n, GLuint* programs ) { - void (*func_glGenProgramsARB)( GLsizei, GLuint* ) = extension_funcs[334]; + void (*func_glGenProgramsARB)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenProgramsARB]; TRACE("(%d, %p)\n", n, programs ); ENTER_GL(); func_glGenProgramsARB( n, programs ); @@ -2728,7 +4218,7 @@ static void WINAPI wine_glGenProgramsARB( GLsizei n, GLuint* programs ) { } static void WINAPI wine_glGenProgramsNV( GLsizei n, GLuint* programs ) { - void (*func_glGenProgramsNV)( GLsizei, GLuint* ) = extension_funcs[335]; + void (*func_glGenProgramsNV)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenProgramsNV]; TRACE("(%d, %p)\n", n, programs ); ENTER_GL(); func_glGenProgramsNV( n, programs ); @@ -2736,7 +4226,7 @@ static void WINAPI wine_glGenProgramsNV( GLsizei n, GLuint* programs ) { } static void WINAPI wine_glGenQueries( GLsizei n, GLuint* ids ) { - void (*func_glGenQueries)( GLsizei, GLuint* ) = extension_funcs[336]; + void (*func_glGenQueries)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenQueries]; TRACE("(%d, %p)\n", n, ids ); ENTER_GL(); func_glGenQueries( n, ids ); @@ -2744,7 +4234,7 @@ static void WINAPI wine_glGenQueries( GLsizei n, GLuint* ids ) { } static void WINAPI wine_glGenQueriesARB( GLsizei n, GLuint* ids ) { - void (*func_glGenQueriesARB)( GLsizei, GLuint* ) = extension_funcs[337]; + void (*func_glGenQueriesARB)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenQueriesARB]; TRACE("(%d, %p)\n", n, ids ); ENTER_GL(); func_glGenQueriesARB( n, ids ); @@ -2752,7 +4242,7 @@ static void WINAPI wine_glGenQueriesARB( GLsizei n, GLuint* ids ) { } static void WINAPI wine_glGenRenderbuffers( GLsizei n, GLuint* renderbuffers ) { - void (*func_glGenRenderbuffers)( GLsizei, GLuint* ) = extension_funcs[338]; + void (*func_glGenRenderbuffers)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenRenderbuffers]; TRACE("(%d, %p)\n", n, renderbuffers ); ENTER_GL(); func_glGenRenderbuffers( n, renderbuffers ); @@ -2760,7 +4250,7 @@ static void WINAPI wine_glGenRenderbuffers( GLsizei n, GLuint* renderbuffers ) { } static void WINAPI wine_glGenRenderbuffersEXT( GLsizei n, GLuint* renderbuffers ) { - void (*func_glGenRenderbuffersEXT)( GLsizei, GLuint* ) = extension_funcs[339]; + void (*func_glGenRenderbuffersEXT)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenRenderbuffersEXT]; TRACE("(%d, %p)\n", n, renderbuffers ); ENTER_GL(); func_glGenRenderbuffersEXT( n, renderbuffers ); @@ -2769,7 +4259,7 @@ static void WINAPI wine_glGenRenderbuffersEXT( GLsizei n, GLuint* renderbuffers static GLuint WINAPI wine_glGenSymbolsEXT( GLenum datatype, GLenum storagetype, GLenum range, GLuint components ) { GLuint ret_value; - GLuint (*func_glGenSymbolsEXT)( GLenum, GLenum, GLenum, GLuint ) = extension_funcs[340]; + GLuint (*func_glGenSymbolsEXT)( GLenum, GLenum, GLenum, GLuint ) = extension_funcs[EXT_glGenSymbolsEXT]; TRACE("(%d, %d, %d, %d)\n", datatype, storagetype, range, components ); ENTER_GL(); ret_value = func_glGenSymbolsEXT( datatype, storagetype, range, components ); @@ -2778,7 +4268,7 @@ static GLuint WINAPI wine_glGenSymbolsEXT( GLenum datatype, GLenum storagetype, } static void WINAPI wine_glGenTexturesEXT( GLsizei n, GLuint* textures ) { - void (*func_glGenTexturesEXT)( GLsizei, GLuint* ) = extension_funcs[341]; + void (*func_glGenTexturesEXT)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenTexturesEXT]; TRACE("(%d, %p)\n", n, textures ); ENTER_GL(); func_glGenTexturesEXT( n, textures ); @@ -2786,7 +4276,7 @@ static void WINAPI wine_glGenTexturesEXT( GLsizei n, GLuint* textures ) { } static void WINAPI wine_glGenVertexArrays( GLsizei n, GLuint* arrays ) { - void (*func_glGenVertexArrays)( GLsizei, GLuint* ) = extension_funcs[342]; + void (*func_glGenVertexArrays)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenVertexArrays]; TRACE("(%d, %p)\n", n, arrays ); ENTER_GL(); func_glGenVertexArrays( n, arrays ); @@ -2794,7 +4284,7 @@ static void WINAPI wine_glGenVertexArrays( GLsizei n, GLuint* arrays ) { } static void WINAPI wine_glGenVertexArraysAPPLE( GLsizei n, GLuint* arrays ) { - void (*func_glGenVertexArraysAPPLE)( GLsizei, GLuint* ) = extension_funcs[343]; + void (*func_glGenVertexArraysAPPLE)( GLsizei, GLuint* ) = extension_funcs[EXT_glGenVertexArraysAPPLE]; TRACE("(%d, %p)\n", n, arrays ); ENTER_GL(); func_glGenVertexArraysAPPLE( n, arrays ); @@ -2803,7 +4293,7 @@ static void WINAPI wine_glGenVertexArraysAPPLE( GLsizei n, GLuint* arrays ) { static GLuint WINAPI wine_glGenVertexShadersEXT( GLuint range ) { GLuint ret_value; - GLuint (*func_glGenVertexShadersEXT)( GLuint ) = extension_funcs[344]; + GLuint (*func_glGenVertexShadersEXT)( GLuint ) = extension_funcs[EXT_glGenVertexShadersEXT]; TRACE("(%d)\n", range ); ENTER_GL(); ret_value = func_glGenVertexShadersEXT( range ); @@ -2812,7 +4302,7 @@ static GLuint WINAPI wine_glGenVertexShadersEXT( GLuint range ) { } static void WINAPI wine_glGenerateMipmap( GLenum target ) { - void (*func_glGenerateMipmap)( GLenum ) = extension_funcs[345]; + void (*func_glGenerateMipmap)( GLenum ) = extension_funcs[EXT_glGenerateMipmap]; TRACE("(%d)\n", target ); ENTER_GL(); func_glGenerateMipmap( target ); @@ -2820,7 +4310,7 @@ static void WINAPI wine_glGenerateMipmap( GLenum target ) { } static void WINAPI wine_glGenerateMipmapEXT( GLenum target ) { - void (*func_glGenerateMipmapEXT)( GLenum ) = extension_funcs[346]; + void (*func_glGenerateMipmapEXT)( GLenum ) = extension_funcs[EXT_glGenerateMipmapEXT]; TRACE("(%d)\n", target ); ENTER_GL(); func_glGenerateMipmapEXT( target ); @@ -2828,7 +4318,7 @@ static void WINAPI wine_glGenerateMipmapEXT( GLenum target ) { } static void WINAPI wine_glGenerateMultiTexMipmapEXT( GLenum texunit, GLenum target ) { - void (*func_glGenerateMultiTexMipmapEXT)( GLenum, GLenum ) = extension_funcs[347]; + void (*func_glGenerateMultiTexMipmapEXT)( GLenum, GLenum ) = extension_funcs[EXT_glGenerateMultiTexMipmapEXT]; TRACE("(%d, %d)\n", texunit, target ); ENTER_GL(); func_glGenerateMultiTexMipmapEXT( texunit, target ); @@ -2836,7 +4326,7 @@ static void WINAPI wine_glGenerateMultiTexMipmapEXT( GLenum texunit, GLenum targ } static void WINAPI wine_glGenerateTextureMipmapEXT( GLuint texture, GLenum target ) { - void (*func_glGenerateTextureMipmapEXT)( GLuint, GLenum ) = extension_funcs[348]; + void (*func_glGenerateTextureMipmapEXT)( GLuint, GLenum ) = extension_funcs[EXT_glGenerateTextureMipmapEXT]; TRACE("(%d, %d)\n", texture, target ); ENTER_GL(); func_glGenerateTextureMipmapEXT( texture, target ); @@ -2844,7 +4334,7 @@ static void WINAPI wine_glGenerateTextureMipmapEXT( GLuint texture, GLenum targe } static void WINAPI wine_glGetActiveAttrib( GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, char* name ) { - void (*func_glGetActiveAttrib)( GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, char* ) = extension_funcs[349]; + void (*func_glGetActiveAttrib)( GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, char* ) = extension_funcs[EXT_glGetActiveAttrib]; TRACE("(%d, %d, %d, %p, %p, %p, %p)\n", program, index, bufSize, length, size, type, name ); ENTER_GL(); func_glGetActiveAttrib( program, index, bufSize, length, size, type, name ); @@ -2852,7 +4342,7 @@ static void WINAPI wine_glGetActiveAttrib( GLuint program, GLuint index, GLsizei } static void WINAPI wine_glGetActiveAttribARB( unsigned int programObj, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, char* name ) { - void (*func_glGetActiveAttribARB)( unsigned int, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, char* ) = extension_funcs[350]; + void (*func_glGetActiveAttribARB)( unsigned int, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, char* ) = extension_funcs[EXT_glGetActiveAttribARB]; TRACE("(%d, %d, %d, %p, %p, %p, %p)\n", programObj, index, maxLength, length, size, type, name ); ENTER_GL(); func_glGetActiveAttribARB( programObj, index, maxLength, length, size, type, name ); @@ -2860,7 +4350,7 @@ static void WINAPI wine_glGetActiveAttribARB( unsigned int programObj, GLuint in } static void WINAPI wine_glGetActiveUniform( GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, char* name ) { - void (*func_glGetActiveUniform)( GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, char* ) = extension_funcs[351]; + void (*func_glGetActiveUniform)( GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, char* ) = extension_funcs[EXT_glGetActiveUniform]; TRACE("(%d, %d, %d, %p, %p, %p, %p)\n", program, index, bufSize, length, size, type, name ); ENTER_GL(); func_glGetActiveUniform( program, index, bufSize, length, size, type, name ); @@ -2868,7 +4358,7 @@ static void WINAPI wine_glGetActiveUniform( GLuint program, GLuint index, GLsize } static void WINAPI wine_glGetActiveUniformARB( unsigned int programObj, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, char* name ) { - void (*func_glGetActiveUniformARB)( unsigned int, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, char* ) = extension_funcs[352]; + void (*func_glGetActiveUniformARB)( unsigned int, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, char* ) = extension_funcs[EXT_glGetActiveUniformARB]; TRACE("(%d, %d, %d, %p, %p, %p, %p)\n", programObj, index, maxLength, length, size, type, name ); ENTER_GL(); func_glGetActiveUniformARB( programObj, index, maxLength, length, size, type, name ); @@ -2876,7 +4366,7 @@ static void WINAPI wine_glGetActiveUniformARB( unsigned int programObj, GLuint i } static void WINAPI wine_glGetActiveVaryingNV( GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, char* name ) { - void (*func_glGetActiveVaryingNV)( GLuint, GLuint, GLsizei, GLsizei*, GLsizei*, GLenum*, char* ) = extension_funcs[353]; + void (*func_glGetActiveVaryingNV)( GLuint, GLuint, GLsizei, GLsizei*, GLsizei*, GLenum*, char* ) = extension_funcs[EXT_glGetActiveVaryingNV]; TRACE("(%d, %d, %d, %p, %p, %p, %p)\n", program, index, bufSize, length, size, type, name ); ENTER_GL(); func_glGetActiveVaryingNV( program, index, bufSize, length, size, type, name ); @@ -2884,7 +4374,7 @@ static void WINAPI wine_glGetActiveVaryingNV( GLuint program, GLuint index, GLsi } static void WINAPI wine_glGetArrayObjectfvATI( GLenum array, GLenum pname, GLfloat* params ) { - void (*func_glGetArrayObjectfvATI)( GLenum, GLenum, GLfloat* ) = extension_funcs[354]; + void (*func_glGetArrayObjectfvATI)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetArrayObjectfvATI]; TRACE("(%d, %d, %p)\n", array, pname, params ); ENTER_GL(); func_glGetArrayObjectfvATI( array, pname, params ); @@ -2892,7 +4382,7 @@ static void WINAPI wine_glGetArrayObjectfvATI( GLenum array, GLenum pname, GLflo } static void WINAPI wine_glGetArrayObjectivATI( GLenum array, GLenum pname, GLint* params ) { - void (*func_glGetArrayObjectivATI)( GLenum, GLenum, GLint* ) = extension_funcs[355]; + void (*func_glGetArrayObjectivATI)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetArrayObjectivATI]; TRACE("(%d, %d, %p)\n", array, pname, params ); ENTER_GL(); func_glGetArrayObjectivATI( array, pname, params ); @@ -2900,7 +4390,7 @@ static void WINAPI wine_glGetArrayObjectivATI( GLenum array, GLenum pname, GLint } static void WINAPI wine_glGetAttachedObjectsARB( unsigned int containerObj, GLsizei maxCount, GLsizei* count, unsigned int* obj ) { - void (*func_glGetAttachedObjectsARB)( unsigned int, GLsizei, GLsizei*, unsigned int* ) = extension_funcs[356]; + void (*func_glGetAttachedObjectsARB)( unsigned int, GLsizei, GLsizei*, unsigned int* ) = extension_funcs[EXT_glGetAttachedObjectsARB]; TRACE("(%d, %d, %p, %p)\n", containerObj, maxCount, count, obj ); ENTER_GL(); func_glGetAttachedObjectsARB( containerObj, maxCount, count, obj ); @@ -2908,7 +4398,7 @@ static void WINAPI wine_glGetAttachedObjectsARB( unsigned int containerObj, GLsi } static void WINAPI wine_glGetAttachedShaders( GLuint program, GLsizei maxCount, GLsizei* count, GLuint* obj ) { - void (*func_glGetAttachedShaders)( GLuint, GLsizei, GLsizei*, GLuint* ) = extension_funcs[357]; + void (*func_glGetAttachedShaders)( GLuint, GLsizei, GLsizei*, GLuint* ) = extension_funcs[EXT_glGetAttachedShaders]; TRACE("(%d, %d, %p, %p)\n", program, maxCount, count, obj ); ENTER_GL(); func_glGetAttachedShaders( program, maxCount, count, obj ); @@ -2917,7 +4407,7 @@ static void WINAPI wine_glGetAttachedShaders( GLuint program, GLsizei maxCount, static GLint WINAPI wine_glGetAttribLocation( GLuint program, char* name ) { GLint ret_value; - GLint (*func_glGetAttribLocation)( GLuint, char* ) = extension_funcs[358]; + GLint (*func_glGetAttribLocation)( GLuint, char* ) = extension_funcs[EXT_glGetAttribLocation]; TRACE("(%d, %p)\n", program, name ); ENTER_GL(); ret_value = func_glGetAttribLocation( program, name ); @@ -2927,7 +4417,7 @@ static GLint WINAPI wine_glGetAttribLocation( GLuint program, char* name ) { static GLint WINAPI wine_glGetAttribLocationARB( unsigned int programObj, char* name ) { GLint ret_value; - GLint (*func_glGetAttribLocationARB)( unsigned int, char* ) = extension_funcs[359]; + GLint (*func_glGetAttribLocationARB)( unsigned int, char* ) = extension_funcs[EXT_glGetAttribLocationARB]; TRACE("(%d, %p)\n", programObj, name ); ENTER_GL(); ret_value = func_glGetAttribLocationARB( programObj, name ); @@ -2936,7 +4426,7 @@ static GLint WINAPI wine_glGetAttribLocationARB( unsigned int programObj, char* } static void WINAPI wine_glGetBooleanIndexedvEXT( GLenum target, GLuint index, GLboolean* data ) { - void (*func_glGetBooleanIndexedvEXT)( GLenum, GLuint, GLboolean* ) = extension_funcs[360]; + void (*func_glGetBooleanIndexedvEXT)( GLenum, GLuint, GLboolean* ) = extension_funcs[EXT_glGetBooleanIndexedvEXT]; TRACE("(%d, %d, %p)\n", target, index, data ); ENTER_GL(); func_glGetBooleanIndexedvEXT( target, index, data ); @@ -2944,7 +4434,7 @@ static void WINAPI wine_glGetBooleanIndexedvEXT( GLenum target, GLuint index, GL } static void WINAPI wine_glGetBooleani_v( GLenum target, GLuint index, GLboolean* data ) { - void (*func_glGetBooleani_v)( GLenum, GLuint, GLboolean* ) = extension_funcs[361]; + void (*func_glGetBooleani_v)( GLenum, GLuint, GLboolean* ) = extension_funcs[EXT_glGetBooleani_v]; TRACE("(%d, %d, %p)\n", target, index, data ); ENTER_GL(); func_glGetBooleani_v( target, index, data ); @@ -2952,7 +4442,7 @@ static void WINAPI wine_glGetBooleani_v( GLenum target, GLuint index, GLboolean* } static void WINAPI wine_glGetBufferParameteriv( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetBufferParameteriv)( GLenum, GLenum, GLint* ) = extension_funcs[362]; + void (*func_glGetBufferParameteriv)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetBufferParameteriv]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetBufferParameteriv( target, pname, params ); @@ -2960,7 +4450,7 @@ static void WINAPI wine_glGetBufferParameteriv( GLenum target, GLenum pname, GLi } static void WINAPI wine_glGetBufferParameterivARB( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetBufferParameterivARB)( GLenum, GLenum, GLint* ) = extension_funcs[363]; + void (*func_glGetBufferParameterivARB)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetBufferParameterivARB]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetBufferParameterivARB( target, pname, params ); @@ -2968,7 +4458,7 @@ static void WINAPI wine_glGetBufferParameterivARB( GLenum target, GLenum pname, } static void WINAPI wine_glGetBufferPointerv( GLenum target, GLenum pname, GLvoid** params ) { - void (*func_glGetBufferPointerv)( GLenum, GLenum, GLvoid** ) = extension_funcs[364]; + void (*func_glGetBufferPointerv)( GLenum, GLenum, GLvoid** ) = extension_funcs[EXT_glGetBufferPointerv]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetBufferPointerv( target, pname, params ); @@ -2976,7 +4466,7 @@ static void WINAPI wine_glGetBufferPointerv( GLenum target, GLenum pname, GLvoid } static void WINAPI wine_glGetBufferPointervARB( GLenum target, GLenum pname, GLvoid** params ) { - void (*func_glGetBufferPointervARB)( GLenum, GLenum, GLvoid** ) = extension_funcs[365]; + void (*func_glGetBufferPointervARB)( GLenum, GLenum, GLvoid** ) = extension_funcs[EXT_glGetBufferPointervARB]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetBufferPointervARB( target, pname, params ); @@ -2984,7 +4474,7 @@ static void WINAPI wine_glGetBufferPointervARB( GLenum target, GLenum pname, GLv } static void WINAPI wine_glGetBufferSubData( GLenum target, ptrdiff_t offset, ptrdiff_t size, GLvoid* data ) { - void (*func_glGetBufferSubData)( GLenum, ptrdiff_t, ptrdiff_t, GLvoid* ) = extension_funcs[366]; + void (*func_glGetBufferSubData)( GLenum, ptrdiff_t, ptrdiff_t, GLvoid* ) = extension_funcs[EXT_glGetBufferSubData]; TRACE("(%d, %d, %d, %p)\n", target, offset, size, data ); ENTER_GL(); func_glGetBufferSubData( target, offset, size, data ); @@ -2992,7 +4482,7 @@ static void WINAPI wine_glGetBufferSubData( GLenum target, ptrdiff_t offset, ptr } static void WINAPI wine_glGetBufferSubDataARB( GLenum target, ptrdiff_t offset, ptrdiff_t size, GLvoid* data ) { - void (*func_glGetBufferSubDataARB)( GLenum, ptrdiff_t, ptrdiff_t, GLvoid* ) = extension_funcs[367]; + void (*func_glGetBufferSubDataARB)( GLenum, ptrdiff_t, ptrdiff_t, GLvoid* ) = extension_funcs[EXT_glGetBufferSubDataARB]; TRACE("(%d, %d, %d, %p)\n", target, offset, size, data ); ENTER_GL(); func_glGetBufferSubDataARB( target, offset, size, data ); @@ -3000,7 +4490,7 @@ static void WINAPI wine_glGetBufferSubDataARB( GLenum target, ptrdiff_t offset, } static void WINAPI wine_glGetColorTableEXT( GLenum target, GLenum format, GLenum type, GLvoid* data ) { - void (*func_glGetColorTableEXT)( GLenum, GLenum, GLenum, GLvoid* ) = extension_funcs[368]; + void (*func_glGetColorTableEXT)( GLenum, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glGetColorTableEXT]; TRACE("(%d, %d, %d, %p)\n", target, format, type, data ); ENTER_GL(); func_glGetColorTableEXT( target, format, type, data ); @@ -3008,7 +4498,7 @@ static void WINAPI wine_glGetColorTableEXT( GLenum target, GLenum format, GLenum } static void WINAPI wine_glGetColorTableParameterfvEXT( GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glGetColorTableParameterfvEXT)( GLenum, GLenum, GLfloat* ) = extension_funcs[369]; + void (*func_glGetColorTableParameterfvEXT)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetColorTableParameterfvEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetColorTableParameterfvEXT( target, pname, params ); @@ -3016,7 +4506,7 @@ static void WINAPI wine_glGetColorTableParameterfvEXT( GLenum target, GLenum pna } static void WINAPI wine_glGetColorTableParameterfvSGI( GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glGetColorTableParameterfvSGI)( GLenum, GLenum, GLfloat* ) = extension_funcs[370]; + void (*func_glGetColorTableParameterfvSGI)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetColorTableParameterfvSGI]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetColorTableParameterfvSGI( target, pname, params ); @@ -3024,7 +4514,7 @@ static void WINAPI wine_glGetColorTableParameterfvSGI( GLenum target, GLenum pna } static void WINAPI wine_glGetColorTableParameterivEXT( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetColorTableParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[371]; + void (*func_glGetColorTableParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetColorTableParameterivEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetColorTableParameterivEXT( target, pname, params ); @@ -3032,7 +4522,7 @@ static void WINAPI wine_glGetColorTableParameterivEXT( GLenum target, GLenum pna } static void WINAPI wine_glGetColorTableParameterivSGI( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetColorTableParameterivSGI)( GLenum, GLenum, GLint* ) = extension_funcs[372]; + void (*func_glGetColorTableParameterivSGI)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetColorTableParameterivSGI]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetColorTableParameterivSGI( target, pname, params ); @@ -3040,7 +4530,7 @@ static void WINAPI wine_glGetColorTableParameterivSGI( GLenum target, GLenum pna } static void WINAPI wine_glGetColorTableSGI( GLenum target, GLenum format, GLenum type, GLvoid* table ) { - void (*func_glGetColorTableSGI)( GLenum, GLenum, GLenum, GLvoid* ) = extension_funcs[373]; + void (*func_glGetColorTableSGI)( GLenum, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glGetColorTableSGI]; TRACE("(%d, %d, %d, %p)\n", target, format, type, table ); ENTER_GL(); func_glGetColorTableSGI( target, format, type, table ); @@ -3048,7 +4538,7 @@ static void WINAPI wine_glGetColorTableSGI( GLenum target, GLenum format, GLenum } static void WINAPI wine_glGetCombinerInputParameterfvNV( GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat* params ) { - void (*func_glGetCombinerInputParameterfvNV)( GLenum, GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[374]; + void (*func_glGetCombinerInputParameterfvNV)( GLenum, GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetCombinerInputParameterfvNV]; TRACE("(%d, %d, %d, %d, %p)\n", stage, portion, variable, pname, params ); ENTER_GL(); func_glGetCombinerInputParameterfvNV( stage, portion, variable, pname, params ); @@ -3056,7 +4546,7 @@ static void WINAPI wine_glGetCombinerInputParameterfvNV( GLenum stage, GLenum po } static void WINAPI wine_glGetCombinerInputParameterivNV( GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint* params ) { - void (*func_glGetCombinerInputParameterivNV)( GLenum, GLenum, GLenum, GLenum, GLint* ) = extension_funcs[375]; + void (*func_glGetCombinerInputParameterivNV)( GLenum, GLenum, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetCombinerInputParameterivNV]; TRACE("(%d, %d, %d, %d, %p)\n", stage, portion, variable, pname, params ); ENTER_GL(); func_glGetCombinerInputParameterivNV( stage, portion, variable, pname, params ); @@ -3064,7 +4554,7 @@ static void WINAPI wine_glGetCombinerInputParameterivNV( GLenum stage, GLenum po } static void WINAPI wine_glGetCombinerOutputParameterfvNV( GLenum stage, GLenum portion, GLenum pname, GLfloat* params ) { - void (*func_glGetCombinerOutputParameterfvNV)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[376]; + void (*func_glGetCombinerOutputParameterfvNV)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetCombinerOutputParameterfvNV]; TRACE("(%d, %d, %d, %p)\n", stage, portion, pname, params ); ENTER_GL(); func_glGetCombinerOutputParameterfvNV( stage, portion, pname, params ); @@ -3072,7 +4562,7 @@ static void WINAPI wine_glGetCombinerOutputParameterfvNV( GLenum stage, GLenum p } static void WINAPI wine_glGetCombinerOutputParameterivNV( GLenum stage, GLenum portion, GLenum pname, GLint* params ) { - void (*func_glGetCombinerOutputParameterivNV)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[377]; + void (*func_glGetCombinerOutputParameterivNV)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetCombinerOutputParameterivNV]; TRACE("(%d, %d, %d, %p)\n", stage, portion, pname, params ); ENTER_GL(); func_glGetCombinerOutputParameterivNV( stage, portion, pname, params ); @@ -3080,7 +4570,7 @@ static void WINAPI wine_glGetCombinerOutputParameterivNV( GLenum stage, GLenum p } static void WINAPI wine_glGetCombinerStageParameterfvNV( GLenum stage, GLenum pname, GLfloat* params ) { - void (*func_glGetCombinerStageParameterfvNV)( GLenum, GLenum, GLfloat* ) = extension_funcs[378]; + void (*func_glGetCombinerStageParameterfvNV)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetCombinerStageParameterfvNV]; TRACE("(%d, %d, %p)\n", stage, pname, params ); ENTER_GL(); func_glGetCombinerStageParameterfvNV( stage, pname, params ); @@ -3088,7 +4578,7 @@ static void WINAPI wine_glGetCombinerStageParameterfvNV( GLenum stage, GLenum pn } static void WINAPI wine_glGetCompressedMultiTexImageEXT( GLenum texunit, GLenum target, GLint lod, GLvoid* img ) { - void (*func_glGetCompressedMultiTexImageEXT)( GLenum, GLenum, GLint, GLvoid* ) = extension_funcs[379]; + void (*func_glGetCompressedMultiTexImageEXT)( GLenum, GLenum, GLint, GLvoid* ) = extension_funcs[EXT_glGetCompressedMultiTexImageEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, target, lod, img ); ENTER_GL(); func_glGetCompressedMultiTexImageEXT( texunit, target, lod, img ); @@ -3096,7 +4586,7 @@ static void WINAPI wine_glGetCompressedMultiTexImageEXT( GLenum texunit, GLenum } static void WINAPI wine_glGetCompressedTexImage( GLenum target, GLint level, GLvoid* img ) { - void (*func_glGetCompressedTexImage)( GLenum, GLint, GLvoid* ) = extension_funcs[380]; + void (*func_glGetCompressedTexImage)( GLenum, GLint, GLvoid* ) = extension_funcs[EXT_glGetCompressedTexImage]; TRACE("(%d, %d, %p)\n", target, level, img ); ENTER_GL(); func_glGetCompressedTexImage( target, level, img ); @@ -3104,7 +4594,7 @@ static void WINAPI wine_glGetCompressedTexImage( GLenum target, GLint level, GLv } static void WINAPI wine_glGetCompressedTexImageARB( GLenum target, GLint level, GLvoid* img ) { - void (*func_glGetCompressedTexImageARB)( GLenum, GLint, GLvoid* ) = extension_funcs[381]; + void (*func_glGetCompressedTexImageARB)( GLenum, GLint, GLvoid* ) = extension_funcs[EXT_glGetCompressedTexImageARB]; TRACE("(%d, %d, %p)\n", target, level, img ); ENTER_GL(); func_glGetCompressedTexImageARB( target, level, img ); @@ -3112,7 +4602,7 @@ static void WINAPI wine_glGetCompressedTexImageARB( GLenum target, GLint level, } static void WINAPI wine_glGetCompressedTextureImageEXT( GLuint texture, GLenum target, GLint lod, GLvoid* img ) { - void (*func_glGetCompressedTextureImageEXT)( GLuint, GLenum, GLint, GLvoid* ) = extension_funcs[382]; + void (*func_glGetCompressedTextureImageEXT)( GLuint, GLenum, GLint, GLvoid* ) = extension_funcs[EXT_glGetCompressedTextureImageEXT]; TRACE("(%d, %d, %d, %p)\n", texture, target, lod, img ); ENTER_GL(); func_glGetCompressedTextureImageEXT( texture, target, lod, img ); @@ -3120,7 +4610,7 @@ static void WINAPI wine_glGetCompressedTextureImageEXT( GLuint texture, GLenum t } static void WINAPI wine_glGetConvolutionFilterEXT( GLenum target, GLenum format, GLenum type, GLvoid* image ) { - void (*func_glGetConvolutionFilterEXT)( GLenum, GLenum, GLenum, GLvoid* ) = extension_funcs[383]; + void (*func_glGetConvolutionFilterEXT)( GLenum, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glGetConvolutionFilterEXT]; TRACE("(%d, %d, %d, %p)\n", target, format, type, image ); ENTER_GL(); func_glGetConvolutionFilterEXT( target, format, type, image ); @@ -3128,7 +4618,7 @@ static void WINAPI wine_glGetConvolutionFilterEXT( GLenum target, GLenum format, } static void WINAPI wine_glGetConvolutionParameterfvEXT( GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glGetConvolutionParameterfvEXT)( GLenum, GLenum, GLfloat* ) = extension_funcs[384]; + void (*func_glGetConvolutionParameterfvEXT)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetConvolutionParameterfvEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetConvolutionParameterfvEXT( target, pname, params ); @@ -3136,7 +4626,7 @@ static void WINAPI wine_glGetConvolutionParameterfvEXT( GLenum target, GLenum pn } static void WINAPI wine_glGetConvolutionParameterivEXT( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetConvolutionParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[385]; + void (*func_glGetConvolutionParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetConvolutionParameterivEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetConvolutionParameterivEXT( target, pname, params ); @@ -3144,7 +4634,7 @@ static void WINAPI wine_glGetConvolutionParameterivEXT( GLenum target, GLenum pn } static void WINAPI wine_glGetDetailTexFuncSGIS( GLenum target, GLfloat* points ) { - void (*func_glGetDetailTexFuncSGIS)( GLenum, GLfloat* ) = extension_funcs[386]; + void (*func_glGetDetailTexFuncSGIS)( GLenum, GLfloat* ) = extension_funcs[EXT_glGetDetailTexFuncSGIS]; TRACE("(%d, %p)\n", target, points ); ENTER_GL(); func_glGetDetailTexFuncSGIS( target, points ); @@ -3152,7 +4642,7 @@ static void WINAPI wine_glGetDetailTexFuncSGIS( GLenum target, GLfloat* points ) } static void WINAPI wine_glGetDoubleIndexedvEXT( GLenum target, GLuint index, GLdouble* data ) { - void (*func_glGetDoubleIndexedvEXT)( GLenum, GLuint, GLdouble* ) = extension_funcs[387]; + void (*func_glGetDoubleIndexedvEXT)( GLenum, GLuint, GLdouble* ) = extension_funcs[EXT_glGetDoubleIndexedvEXT]; TRACE("(%d, %d, %p)\n", target, index, data ); ENTER_GL(); func_glGetDoubleIndexedvEXT( target, index, data ); @@ -3160,7 +4650,7 @@ static void WINAPI wine_glGetDoubleIndexedvEXT( GLenum target, GLuint index, GLd } static void WINAPI wine_glGetFenceivNV( GLuint fence, GLenum pname, GLint* params ) { - void (*func_glGetFenceivNV)( GLuint, GLenum, GLint* ) = extension_funcs[388]; + void (*func_glGetFenceivNV)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetFenceivNV]; TRACE("(%d, %d, %p)\n", fence, pname, params ); ENTER_GL(); func_glGetFenceivNV( fence, pname, params ); @@ -3168,7 +4658,7 @@ static void WINAPI wine_glGetFenceivNV( GLuint fence, GLenum pname, GLint* param } static void WINAPI wine_glGetFinalCombinerInputParameterfvNV( GLenum variable, GLenum pname, GLfloat* params ) { - void (*func_glGetFinalCombinerInputParameterfvNV)( GLenum, GLenum, GLfloat* ) = extension_funcs[389]; + void (*func_glGetFinalCombinerInputParameterfvNV)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetFinalCombinerInputParameterfvNV]; TRACE("(%d, %d, %p)\n", variable, pname, params ); ENTER_GL(); func_glGetFinalCombinerInputParameterfvNV( variable, pname, params ); @@ -3176,7 +4666,7 @@ static void WINAPI wine_glGetFinalCombinerInputParameterfvNV( GLenum variable, G } static void WINAPI wine_glGetFinalCombinerInputParameterivNV( GLenum variable, GLenum pname, GLint* params ) { - void (*func_glGetFinalCombinerInputParameterivNV)( GLenum, GLenum, GLint* ) = extension_funcs[390]; + void (*func_glGetFinalCombinerInputParameterivNV)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetFinalCombinerInputParameterivNV]; TRACE("(%d, %d, %p)\n", variable, pname, params ); ENTER_GL(); func_glGetFinalCombinerInputParameterivNV( variable, pname, params ); @@ -3184,7 +4674,7 @@ static void WINAPI wine_glGetFinalCombinerInputParameterivNV( GLenum variable, G } static void WINAPI wine_glGetFloatIndexedvEXT( GLenum target, GLuint index, GLfloat* data ) { - void (*func_glGetFloatIndexedvEXT)( GLenum, GLuint, GLfloat* ) = extension_funcs[391]; + void (*func_glGetFloatIndexedvEXT)( GLenum, GLuint, GLfloat* ) = extension_funcs[EXT_glGetFloatIndexedvEXT]; TRACE("(%d, %d, %p)\n", target, index, data ); ENTER_GL(); func_glGetFloatIndexedvEXT( target, index, data ); @@ -3192,7 +4682,7 @@ static void WINAPI wine_glGetFloatIndexedvEXT( GLenum target, GLuint index, GLfl } static void WINAPI wine_glGetFogFuncSGIS( GLfloat* points ) { - void (*func_glGetFogFuncSGIS)( GLfloat* ) = extension_funcs[392]; + void (*func_glGetFogFuncSGIS)( GLfloat* ) = extension_funcs[EXT_glGetFogFuncSGIS]; TRACE("(%p)\n", points ); ENTER_GL(); func_glGetFogFuncSGIS( points ); @@ -3201,7 +4691,7 @@ static void WINAPI wine_glGetFogFuncSGIS( GLfloat* points ) { static GLint WINAPI wine_glGetFragDataLocation( GLuint program, char* name ) { GLint ret_value; - GLint (*func_glGetFragDataLocation)( GLuint, char* ) = extension_funcs[393]; + GLint (*func_glGetFragDataLocation)( GLuint, char* ) = extension_funcs[EXT_glGetFragDataLocation]; TRACE("(%d, %p)\n", program, name ); ENTER_GL(); ret_value = func_glGetFragDataLocation( program, name ); @@ -3211,7 +4701,7 @@ static GLint WINAPI wine_glGetFragDataLocation( GLuint program, char* name ) { static GLint WINAPI wine_glGetFragDataLocationEXT( GLuint program, char* name ) { GLint ret_value; - GLint (*func_glGetFragDataLocationEXT)( GLuint, char* ) = extension_funcs[394]; + GLint (*func_glGetFragDataLocationEXT)( GLuint, char* ) = extension_funcs[EXT_glGetFragDataLocationEXT]; TRACE("(%d, %p)\n", program, name ); ENTER_GL(); ret_value = func_glGetFragDataLocationEXT( program, name ); @@ -3220,7 +4710,7 @@ static GLint WINAPI wine_glGetFragDataLocationEXT( GLuint program, char* name ) } static void WINAPI wine_glGetFragmentLightfvSGIX( GLenum light, GLenum pname, GLfloat* params ) { - void (*func_glGetFragmentLightfvSGIX)( GLenum, GLenum, GLfloat* ) = extension_funcs[395]; + void (*func_glGetFragmentLightfvSGIX)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetFragmentLightfvSGIX]; TRACE("(%d, %d, %p)\n", light, pname, params ); ENTER_GL(); func_glGetFragmentLightfvSGIX( light, pname, params ); @@ -3228,7 +4718,7 @@ static void WINAPI wine_glGetFragmentLightfvSGIX( GLenum light, GLenum pname, GL } static void WINAPI wine_glGetFragmentLightivSGIX( GLenum light, GLenum pname, GLint* params ) { - void (*func_glGetFragmentLightivSGIX)( GLenum, GLenum, GLint* ) = extension_funcs[396]; + void (*func_glGetFragmentLightivSGIX)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetFragmentLightivSGIX]; TRACE("(%d, %d, %p)\n", light, pname, params ); ENTER_GL(); func_glGetFragmentLightivSGIX( light, pname, params ); @@ -3236,7 +4726,7 @@ static void WINAPI wine_glGetFragmentLightivSGIX( GLenum light, GLenum pname, GL } static void WINAPI wine_glGetFragmentMaterialfvSGIX( GLenum face, GLenum pname, GLfloat* params ) { - void (*func_glGetFragmentMaterialfvSGIX)( GLenum, GLenum, GLfloat* ) = extension_funcs[397]; + void (*func_glGetFragmentMaterialfvSGIX)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetFragmentMaterialfvSGIX]; TRACE("(%d, %d, %p)\n", face, pname, params ); ENTER_GL(); func_glGetFragmentMaterialfvSGIX( face, pname, params ); @@ -3244,7 +4734,7 @@ static void WINAPI wine_glGetFragmentMaterialfvSGIX( GLenum face, GLenum pname, } static void WINAPI wine_glGetFragmentMaterialivSGIX( GLenum face, GLenum pname, GLint* params ) { - void (*func_glGetFragmentMaterialivSGIX)( GLenum, GLenum, GLint* ) = extension_funcs[398]; + void (*func_glGetFragmentMaterialivSGIX)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetFragmentMaterialivSGIX]; TRACE("(%d, %d, %p)\n", face, pname, params ); ENTER_GL(); func_glGetFragmentMaterialivSGIX( face, pname, params ); @@ -3252,7 +4742,7 @@ static void WINAPI wine_glGetFragmentMaterialivSGIX( GLenum face, GLenum pname, } static void WINAPI wine_glGetFramebufferAttachmentParameteriv( GLenum target, GLenum attachment, GLenum pname, GLint* params ) { - void (*func_glGetFramebufferAttachmentParameteriv)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[399]; + void (*func_glGetFramebufferAttachmentParameteriv)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetFramebufferAttachmentParameteriv]; TRACE("(%d, %d, %d, %p)\n", target, attachment, pname, params ); ENTER_GL(); func_glGetFramebufferAttachmentParameteriv( target, attachment, pname, params ); @@ -3260,7 +4750,7 @@ static void WINAPI wine_glGetFramebufferAttachmentParameteriv( GLenum target, GL } static void WINAPI wine_glGetFramebufferAttachmentParameterivEXT( GLenum target, GLenum attachment, GLenum pname, GLint* params ) { - void (*func_glGetFramebufferAttachmentParameterivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[400]; + void (*func_glGetFramebufferAttachmentParameterivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetFramebufferAttachmentParameterivEXT]; TRACE("(%d, %d, %d, %p)\n", target, attachment, pname, params ); ENTER_GL(); func_glGetFramebufferAttachmentParameterivEXT( target, attachment, pname, params ); @@ -3268,7 +4758,7 @@ static void WINAPI wine_glGetFramebufferAttachmentParameterivEXT( GLenum target, } static void WINAPI wine_glGetFramebufferParameterivEXT( GLuint framebuffer, GLenum pname, GLint* params ) { - void (*func_glGetFramebufferParameterivEXT)( GLuint, GLenum, GLint* ) = extension_funcs[401]; + void (*func_glGetFramebufferParameterivEXT)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetFramebufferParameterivEXT]; TRACE("(%d, %d, %p)\n", framebuffer, pname, params ); ENTER_GL(); func_glGetFramebufferParameterivEXT( framebuffer, pname, params ); @@ -3277,7 +4767,7 @@ static void WINAPI wine_glGetFramebufferParameterivEXT( GLuint framebuffer, GLen static unsigned int WINAPI wine_glGetHandleARB( GLenum pname ) { unsigned int ret_value; - unsigned int (*func_glGetHandleARB)( GLenum ) = extension_funcs[402]; + unsigned int (*func_glGetHandleARB)( GLenum ) = extension_funcs[EXT_glGetHandleARB]; TRACE("(%d)\n", pname ); ENTER_GL(); ret_value = func_glGetHandleARB( pname ); @@ -3286,7 +4776,7 @@ static unsigned int WINAPI wine_glGetHandleARB( GLenum pname ) { } static void WINAPI wine_glGetHistogramEXT( GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid* values ) { - void (*func_glGetHistogramEXT)( GLenum, GLboolean, GLenum, GLenum, GLvoid* ) = extension_funcs[403]; + void (*func_glGetHistogramEXT)( GLenum, GLboolean, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glGetHistogramEXT]; TRACE("(%d, %d, %d, %d, %p)\n", target, reset, format, type, values ); ENTER_GL(); func_glGetHistogramEXT( target, reset, format, type, values ); @@ -3294,7 +4784,7 @@ static void WINAPI wine_glGetHistogramEXT( GLenum target, GLboolean reset, GLenu } static void WINAPI wine_glGetHistogramParameterfvEXT( GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glGetHistogramParameterfvEXT)( GLenum, GLenum, GLfloat* ) = extension_funcs[404]; + void (*func_glGetHistogramParameterfvEXT)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetHistogramParameterfvEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetHistogramParameterfvEXT( target, pname, params ); @@ -3302,7 +4792,7 @@ static void WINAPI wine_glGetHistogramParameterfvEXT( GLenum target, GLenum pnam } static void WINAPI wine_glGetHistogramParameterivEXT( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetHistogramParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[405]; + void (*func_glGetHistogramParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetHistogramParameterivEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetHistogramParameterivEXT( target, pname, params ); @@ -3310,7 +4800,7 @@ static void WINAPI wine_glGetHistogramParameterivEXT( GLenum target, GLenum pnam } static void WINAPI wine_glGetImageTransformParameterfvHP( GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glGetImageTransformParameterfvHP)( GLenum, GLenum, GLfloat* ) = extension_funcs[406]; + void (*func_glGetImageTransformParameterfvHP)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetImageTransformParameterfvHP]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetImageTransformParameterfvHP( target, pname, params ); @@ -3318,7 +4808,7 @@ static void WINAPI wine_glGetImageTransformParameterfvHP( GLenum target, GLenum } static void WINAPI wine_glGetImageTransformParameterivHP( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetImageTransformParameterivHP)( GLenum, GLenum, GLint* ) = extension_funcs[407]; + void (*func_glGetImageTransformParameterivHP)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetImageTransformParameterivHP]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetImageTransformParameterivHP( target, pname, params ); @@ -3326,7 +4816,7 @@ static void WINAPI wine_glGetImageTransformParameterivHP( GLenum target, GLenum } static void WINAPI wine_glGetInfoLogARB( unsigned int obj, GLsizei maxLength, GLsizei* length, char* infoLog ) { - void (*func_glGetInfoLogARB)( unsigned int, GLsizei, GLsizei*, char* ) = extension_funcs[408]; + void (*func_glGetInfoLogARB)( unsigned int, GLsizei, GLsizei*, char* ) = extension_funcs[EXT_glGetInfoLogARB]; TRACE("(%d, %d, %p, %p)\n", obj, maxLength, length, infoLog ); ENTER_GL(); func_glGetInfoLogARB( obj, maxLength, length, infoLog ); @@ -3335,7 +4825,7 @@ static void WINAPI wine_glGetInfoLogARB( unsigned int obj, GLsizei maxLength, GL static GLint WINAPI wine_glGetInstrumentsSGIX( void ) { GLint ret_value; - GLint (*func_glGetInstrumentsSGIX)( void ) = extension_funcs[409]; + GLint (*func_glGetInstrumentsSGIX)( void ) = extension_funcs[EXT_glGetInstrumentsSGIX]; TRACE("()\n"); ENTER_GL(); ret_value = func_glGetInstrumentsSGIX( ); @@ -3344,7 +4834,7 @@ static GLint WINAPI wine_glGetInstrumentsSGIX( void ) { } static void WINAPI wine_glGetIntegerIndexedvEXT( GLenum target, GLuint index, GLint* data ) { - void (*func_glGetIntegerIndexedvEXT)( GLenum, GLuint, GLint* ) = extension_funcs[410]; + void (*func_glGetIntegerIndexedvEXT)( GLenum, GLuint, GLint* ) = extension_funcs[EXT_glGetIntegerIndexedvEXT]; TRACE("(%d, %d, %p)\n", target, index, data ); ENTER_GL(); func_glGetIntegerIndexedvEXT( target, index, data ); @@ -3352,7 +4842,7 @@ static void WINAPI wine_glGetIntegerIndexedvEXT( GLenum target, GLuint index, GL } static void WINAPI wine_glGetIntegeri_v( GLenum target, GLuint index, GLint* data ) { - void (*func_glGetIntegeri_v)( GLenum, GLuint, GLint* ) = extension_funcs[411]; + void (*func_glGetIntegeri_v)( GLenum, GLuint, GLint* ) = extension_funcs[EXT_glGetIntegeri_v]; TRACE("(%d, %d, %p)\n", target, index, data ); ENTER_GL(); func_glGetIntegeri_v( target, index, data ); @@ -3360,7 +4850,7 @@ static void WINAPI wine_glGetIntegeri_v( GLenum target, GLuint index, GLint* dat } static void WINAPI wine_glGetInvariantBooleanvEXT( GLuint id, GLenum value, GLboolean* data ) { - void (*func_glGetInvariantBooleanvEXT)( GLuint, GLenum, GLboolean* ) = extension_funcs[412]; + void (*func_glGetInvariantBooleanvEXT)( GLuint, GLenum, GLboolean* ) = extension_funcs[EXT_glGetInvariantBooleanvEXT]; TRACE("(%d, %d, %p)\n", id, value, data ); ENTER_GL(); func_glGetInvariantBooleanvEXT( id, value, data ); @@ -3368,7 +4858,7 @@ static void WINAPI wine_glGetInvariantBooleanvEXT( GLuint id, GLenum value, GLbo } static void WINAPI wine_glGetInvariantFloatvEXT( GLuint id, GLenum value, GLfloat* data ) { - void (*func_glGetInvariantFloatvEXT)( GLuint, GLenum, GLfloat* ) = extension_funcs[413]; + void (*func_glGetInvariantFloatvEXT)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetInvariantFloatvEXT]; TRACE("(%d, %d, %p)\n", id, value, data ); ENTER_GL(); func_glGetInvariantFloatvEXT( id, value, data ); @@ -3376,7 +4866,7 @@ static void WINAPI wine_glGetInvariantFloatvEXT( GLuint id, GLenum value, GLfloa } static void WINAPI wine_glGetInvariantIntegervEXT( GLuint id, GLenum value, GLint* data ) { - void (*func_glGetInvariantIntegervEXT)( GLuint, GLenum, GLint* ) = extension_funcs[414]; + void (*func_glGetInvariantIntegervEXT)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetInvariantIntegervEXT]; TRACE("(%d, %d, %p)\n", id, value, data ); ENTER_GL(); func_glGetInvariantIntegervEXT( id, value, data ); @@ -3384,7 +4874,7 @@ static void WINAPI wine_glGetInvariantIntegervEXT( GLuint id, GLenum value, GLin } static void WINAPI wine_glGetListParameterfvSGIX( GLuint list, GLenum pname, GLfloat* params ) { - void (*func_glGetListParameterfvSGIX)( GLuint, GLenum, GLfloat* ) = extension_funcs[415]; + void (*func_glGetListParameterfvSGIX)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetListParameterfvSGIX]; TRACE("(%d, %d, %p)\n", list, pname, params ); ENTER_GL(); func_glGetListParameterfvSGIX( list, pname, params ); @@ -3392,7 +4882,7 @@ static void WINAPI wine_glGetListParameterfvSGIX( GLuint list, GLenum pname, GLf } static void WINAPI wine_glGetListParameterivSGIX( GLuint list, GLenum pname, GLint* params ) { - void (*func_glGetListParameterivSGIX)( GLuint, GLenum, GLint* ) = extension_funcs[416]; + void (*func_glGetListParameterivSGIX)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetListParameterivSGIX]; TRACE("(%d, %d, %p)\n", list, pname, params ); ENTER_GL(); func_glGetListParameterivSGIX( list, pname, params ); @@ -3400,7 +4890,7 @@ static void WINAPI wine_glGetListParameterivSGIX( GLuint list, GLenum pname, GLi } static void WINAPI wine_glGetLocalConstantBooleanvEXT( GLuint id, GLenum value, GLboolean* data ) { - void (*func_glGetLocalConstantBooleanvEXT)( GLuint, GLenum, GLboolean* ) = extension_funcs[417]; + void (*func_glGetLocalConstantBooleanvEXT)( GLuint, GLenum, GLboolean* ) = extension_funcs[EXT_glGetLocalConstantBooleanvEXT]; TRACE("(%d, %d, %p)\n", id, value, data ); ENTER_GL(); func_glGetLocalConstantBooleanvEXT( id, value, data ); @@ -3408,7 +4898,7 @@ static void WINAPI wine_glGetLocalConstantBooleanvEXT( GLuint id, GLenum value, } static void WINAPI wine_glGetLocalConstantFloatvEXT( GLuint id, GLenum value, GLfloat* data ) { - void (*func_glGetLocalConstantFloatvEXT)( GLuint, GLenum, GLfloat* ) = extension_funcs[418]; + void (*func_glGetLocalConstantFloatvEXT)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetLocalConstantFloatvEXT]; TRACE("(%d, %d, %p)\n", id, value, data ); ENTER_GL(); func_glGetLocalConstantFloatvEXT( id, value, data ); @@ -3416,7 +4906,7 @@ static void WINAPI wine_glGetLocalConstantFloatvEXT( GLuint id, GLenum value, GL } static void WINAPI wine_glGetLocalConstantIntegervEXT( GLuint id, GLenum value, GLint* data ) { - void (*func_glGetLocalConstantIntegervEXT)( GLuint, GLenum, GLint* ) = extension_funcs[419]; + void (*func_glGetLocalConstantIntegervEXT)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetLocalConstantIntegervEXT]; TRACE("(%d, %d, %p)\n", id, value, data ); ENTER_GL(); func_glGetLocalConstantIntegervEXT( id, value, data ); @@ -3424,7 +4914,7 @@ static void WINAPI wine_glGetLocalConstantIntegervEXT( GLuint id, GLenum value, } static void WINAPI wine_glGetMapAttribParameterfvNV( GLenum target, GLuint index, GLenum pname, GLfloat* params ) { - void (*func_glGetMapAttribParameterfvNV)( GLenum, GLuint, GLenum, GLfloat* ) = extension_funcs[420]; + void (*func_glGetMapAttribParameterfvNV)( GLenum, GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetMapAttribParameterfvNV]; TRACE("(%d, %d, %d, %p)\n", target, index, pname, params ); ENTER_GL(); func_glGetMapAttribParameterfvNV( target, index, pname, params ); @@ -3432,7 +4922,7 @@ static void WINAPI wine_glGetMapAttribParameterfvNV( GLenum target, GLuint index } static void WINAPI wine_glGetMapAttribParameterivNV( GLenum target, GLuint index, GLenum pname, GLint* params ) { - void (*func_glGetMapAttribParameterivNV)( GLenum, GLuint, GLenum, GLint* ) = extension_funcs[421]; + void (*func_glGetMapAttribParameterivNV)( GLenum, GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetMapAttribParameterivNV]; TRACE("(%d, %d, %d, %p)\n", target, index, pname, params ); ENTER_GL(); func_glGetMapAttribParameterivNV( target, index, pname, params ); @@ -3440,7 +4930,7 @@ static void WINAPI wine_glGetMapAttribParameterivNV( GLenum target, GLuint index } static void WINAPI wine_glGetMapControlPointsNV( GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid* points ) { - void (*func_glGetMapControlPointsNV)( GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid* ) = extension_funcs[422]; + void (*func_glGetMapControlPointsNV)( GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid* ) = extension_funcs[EXT_glGetMapControlPointsNV]; TRACE("(%d, %d, %d, %d, %d, %d, %p)\n", target, index, type, ustride, vstride, packed, points ); ENTER_GL(); func_glGetMapControlPointsNV( target, index, type, ustride, vstride, packed, points ); @@ -3448,7 +4938,7 @@ static void WINAPI wine_glGetMapControlPointsNV( GLenum target, GLuint index, GL } static void WINAPI wine_glGetMapParameterfvNV( GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glGetMapParameterfvNV)( GLenum, GLenum, GLfloat* ) = extension_funcs[423]; + void (*func_glGetMapParameterfvNV)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetMapParameterfvNV]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetMapParameterfvNV( target, pname, params ); @@ -3456,7 +4946,7 @@ static void WINAPI wine_glGetMapParameterfvNV( GLenum target, GLenum pname, GLfl } static void WINAPI wine_glGetMapParameterivNV( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetMapParameterivNV)( GLenum, GLenum, GLint* ) = extension_funcs[424]; + void (*func_glGetMapParameterivNV)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetMapParameterivNV]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetMapParameterivNV( target, pname, params ); @@ -3464,7 +4954,7 @@ static void WINAPI wine_glGetMapParameterivNV( GLenum target, GLenum pname, GLin } static void WINAPI wine_glGetMinmaxEXT( GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid* values ) { - void (*func_glGetMinmaxEXT)( GLenum, GLboolean, GLenum, GLenum, GLvoid* ) = extension_funcs[425]; + void (*func_glGetMinmaxEXT)( GLenum, GLboolean, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glGetMinmaxEXT]; TRACE("(%d, %d, %d, %d, %p)\n", target, reset, format, type, values ); ENTER_GL(); func_glGetMinmaxEXT( target, reset, format, type, values ); @@ -3472,7 +4962,7 @@ static void WINAPI wine_glGetMinmaxEXT( GLenum target, GLboolean reset, GLenum f } static void WINAPI wine_glGetMinmaxParameterfvEXT( GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glGetMinmaxParameterfvEXT)( GLenum, GLenum, GLfloat* ) = extension_funcs[426]; + void (*func_glGetMinmaxParameterfvEXT)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetMinmaxParameterfvEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetMinmaxParameterfvEXT( target, pname, params ); @@ -3480,7 +4970,7 @@ static void WINAPI wine_glGetMinmaxParameterfvEXT( GLenum target, GLenum pname, } static void WINAPI wine_glGetMinmaxParameterivEXT( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetMinmaxParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[427]; + void (*func_glGetMinmaxParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetMinmaxParameterivEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetMinmaxParameterivEXT( target, pname, params ); @@ -3488,7 +4978,7 @@ static void WINAPI wine_glGetMinmaxParameterivEXT( GLenum target, GLenum pname, } static void WINAPI wine_glGetMultiTexEnvfvEXT( GLenum texunit, GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glGetMultiTexEnvfvEXT)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[428]; + void (*func_glGetMultiTexEnvfvEXT)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetMultiTexEnvfvEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, target, pname, params ); ENTER_GL(); func_glGetMultiTexEnvfvEXT( texunit, target, pname, params ); @@ -3496,7 +4986,7 @@ static void WINAPI wine_glGetMultiTexEnvfvEXT( GLenum texunit, GLenum target, GL } static void WINAPI wine_glGetMultiTexEnvivEXT( GLenum texunit, GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetMultiTexEnvivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[429]; + void (*func_glGetMultiTexEnvivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetMultiTexEnvivEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, target, pname, params ); ENTER_GL(); func_glGetMultiTexEnvivEXT( texunit, target, pname, params ); @@ -3504,7 +4994,7 @@ static void WINAPI wine_glGetMultiTexEnvivEXT( GLenum texunit, GLenum target, GL } static void WINAPI wine_glGetMultiTexGendvEXT( GLenum texunit, GLenum coord, GLenum pname, GLdouble* params ) { - void (*func_glGetMultiTexGendvEXT)( GLenum, GLenum, GLenum, GLdouble* ) = extension_funcs[430]; + void (*func_glGetMultiTexGendvEXT)( GLenum, GLenum, GLenum, GLdouble* ) = extension_funcs[EXT_glGetMultiTexGendvEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, coord, pname, params ); ENTER_GL(); func_glGetMultiTexGendvEXT( texunit, coord, pname, params ); @@ -3512,7 +5002,7 @@ static void WINAPI wine_glGetMultiTexGendvEXT( GLenum texunit, GLenum coord, GLe } static void WINAPI wine_glGetMultiTexGenfvEXT( GLenum texunit, GLenum coord, GLenum pname, GLfloat* params ) { - void (*func_glGetMultiTexGenfvEXT)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[431]; + void (*func_glGetMultiTexGenfvEXT)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetMultiTexGenfvEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, coord, pname, params ); ENTER_GL(); func_glGetMultiTexGenfvEXT( texunit, coord, pname, params ); @@ -3520,7 +5010,7 @@ static void WINAPI wine_glGetMultiTexGenfvEXT( GLenum texunit, GLenum coord, GLe } static void WINAPI wine_glGetMultiTexGenivEXT( GLenum texunit, GLenum coord, GLenum pname, GLint* params ) { - void (*func_glGetMultiTexGenivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[432]; + void (*func_glGetMultiTexGenivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetMultiTexGenivEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, coord, pname, params ); ENTER_GL(); func_glGetMultiTexGenivEXT( texunit, coord, pname, params ); @@ -3528,7 +5018,7 @@ static void WINAPI wine_glGetMultiTexGenivEXT( GLenum texunit, GLenum coord, GLe } static void WINAPI wine_glGetMultiTexImageEXT( GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glGetMultiTexImageEXT)( GLenum, GLenum, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[433]; + void (*func_glGetMultiTexImageEXT)( GLenum, GLenum, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glGetMultiTexImageEXT]; TRACE("(%d, %d, %d, %d, %d, %p)\n", texunit, target, level, format, type, pixels ); ENTER_GL(); func_glGetMultiTexImageEXT( texunit, target, level, format, type, pixels ); @@ -3536,7 +5026,7 @@ static void WINAPI wine_glGetMultiTexImageEXT( GLenum texunit, GLenum target, GL } static void WINAPI wine_glGetMultiTexLevelParameterfvEXT( GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat* params ) { - void (*func_glGetMultiTexLevelParameterfvEXT)( GLenum, GLenum, GLint, GLenum, GLfloat* ) = extension_funcs[434]; + void (*func_glGetMultiTexLevelParameterfvEXT)( GLenum, GLenum, GLint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetMultiTexLevelParameterfvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", texunit, target, level, pname, params ); ENTER_GL(); func_glGetMultiTexLevelParameterfvEXT( texunit, target, level, pname, params ); @@ -3544,7 +5034,7 @@ static void WINAPI wine_glGetMultiTexLevelParameterfvEXT( GLenum texunit, GLenum } static void WINAPI wine_glGetMultiTexLevelParameterivEXT( GLenum texunit, GLenum target, GLint level, GLenum pname, GLint* params ) { - void (*func_glGetMultiTexLevelParameterivEXT)( GLenum, GLenum, GLint, GLenum, GLint* ) = extension_funcs[435]; + void (*func_glGetMultiTexLevelParameterivEXT)( GLenum, GLenum, GLint, GLenum, GLint* ) = extension_funcs[EXT_glGetMultiTexLevelParameterivEXT]; TRACE("(%d, %d, %d, %d, %p)\n", texunit, target, level, pname, params ); ENTER_GL(); func_glGetMultiTexLevelParameterivEXT( texunit, target, level, pname, params ); @@ -3552,7 +5042,7 @@ static void WINAPI wine_glGetMultiTexLevelParameterivEXT( GLenum texunit, GLenum } static void WINAPI wine_glGetMultiTexParameterIivEXT( GLenum texunit, GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetMultiTexParameterIivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[436]; + void (*func_glGetMultiTexParameterIivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetMultiTexParameterIivEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, target, pname, params ); ENTER_GL(); func_glGetMultiTexParameterIivEXT( texunit, target, pname, params ); @@ -3560,7 +5050,7 @@ static void WINAPI wine_glGetMultiTexParameterIivEXT( GLenum texunit, GLenum tar } static void WINAPI wine_glGetMultiTexParameterIuivEXT( GLenum texunit, GLenum target, GLenum pname, GLuint* params ) { - void (*func_glGetMultiTexParameterIuivEXT)( GLenum, GLenum, GLenum, GLuint* ) = extension_funcs[437]; + void (*func_glGetMultiTexParameterIuivEXT)( GLenum, GLenum, GLenum, GLuint* ) = extension_funcs[EXT_glGetMultiTexParameterIuivEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, target, pname, params ); ENTER_GL(); func_glGetMultiTexParameterIuivEXT( texunit, target, pname, params ); @@ -3568,7 +5058,7 @@ static void WINAPI wine_glGetMultiTexParameterIuivEXT( GLenum texunit, GLenum ta } static void WINAPI wine_glGetMultiTexParameterfvEXT( GLenum texunit, GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glGetMultiTexParameterfvEXT)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[438]; + void (*func_glGetMultiTexParameterfvEXT)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetMultiTexParameterfvEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, target, pname, params ); ENTER_GL(); func_glGetMultiTexParameterfvEXT( texunit, target, pname, params ); @@ -3576,7 +5066,7 @@ static void WINAPI wine_glGetMultiTexParameterfvEXT( GLenum texunit, GLenum targ } static void WINAPI wine_glGetMultiTexParameterivEXT( GLenum texunit, GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetMultiTexParameterivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[439]; + void (*func_glGetMultiTexParameterivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetMultiTexParameterivEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, target, pname, params ); ENTER_GL(); func_glGetMultiTexParameterivEXT( texunit, target, pname, params ); @@ -3584,7 +5074,7 @@ static void WINAPI wine_glGetMultiTexParameterivEXT( GLenum texunit, GLenum targ } static void WINAPI wine_glGetNamedBufferParameterivEXT( GLuint buffer, GLenum pname, GLint* params ) { - void (*func_glGetNamedBufferParameterivEXT)( GLuint, GLenum, GLint* ) = extension_funcs[440]; + void (*func_glGetNamedBufferParameterivEXT)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetNamedBufferParameterivEXT]; TRACE("(%d, %d, %p)\n", buffer, pname, params ); ENTER_GL(); func_glGetNamedBufferParameterivEXT( buffer, pname, params ); @@ -3592,7 +5082,7 @@ static void WINAPI wine_glGetNamedBufferParameterivEXT( GLuint buffer, GLenum pn } static void WINAPI wine_glGetNamedBufferPointervEXT( GLuint buffer, GLenum pname, GLvoid** params ) { - void (*func_glGetNamedBufferPointervEXT)( GLuint, GLenum, GLvoid** ) = extension_funcs[441]; + void (*func_glGetNamedBufferPointervEXT)( GLuint, GLenum, GLvoid** ) = extension_funcs[EXT_glGetNamedBufferPointervEXT]; TRACE("(%d, %d, %p)\n", buffer, pname, params ); ENTER_GL(); func_glGetNamedBufferPointervEXT( buffer, pname, params ); @@ -3600,7 +5090,7 @@ static void WINAPI wine_glGetNamedBufferPointervEXT( GLuint buffer, GLenum pname } static void WINAPI wine_glGetNamedBufferSubDataEXT( GLuint buffer, ptrdiff_t offset, ptrdiff_t size, GLvoid* data ) { - void (*func_glGetNamedBufferSubDataEXT)( GLuint, ptrdiff_t, ptrdiff_t, GLvoid* ) = extension_funcs[442]; + void (*func_glGetNamedBufferSubDataEXT)( GLuint, ptrdiff_t, ptrdiff_t, GLvoid* ) = extension_funcs[EXT_glGetNamedBufferSubDataEXT]; TRACE("(%d, %d, %d, %p)\n", buffer, offset, size, data ); ENTER_GL(); func_glGetNamedBufferSubDataEXT( buffer, offset, size, data ); @@ -3608,7 +5098,7 @@ static void WINAPI wine_glGetNamedBufferSubDataEXT( GLuint buffer, ptrdiff_t off } static void WINAPI wine_glGetNamedFramebufferAttachmentParameterivEXT( GLuint framebuffer, GLenum attachment, GLenum pname, GLint* params ) { - void (*func_glGetNamedFramebufferAttachmentParameterivEXT)( GLuint, GLenum, GLenum, GLint* ) = extension_funcs[443]; + void (*func_glGetNamedFramebufferAttachmentParameterivEXT)( GLuint, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetNamedFramebufferAttachmentParameterivEXT]; TRACE("(%d, %d, %d, %p)\n", framebuffer, attachment, pname, params ); ENTER_GL(); func_glGetNamedFramebufferAttachmentParameterivEXT( framebuffer, attachment, pname, params ); @@ -3616,7 +5106,7 @@ static void WINAPI wine_glGetNamedFramebufferAttachmentParameterivEXT( GLuint fr } static void WINAPI wine_glGetNamedProgramLocalParameterIivEXT( GLuint program, GLenum target, GLuint index, GLint* params ) { - void (*func_glGetNamedProgramLocalParameterIivEXT)( GLuint, GLenum, GLuint, GLint* ) = extension_funcs[444]; + void (*func_glGetNamedProgramLocalParameterIivEXT)( GLuint, GLenum, GLuint, GLint* ) = extension_funcs[EXT_glGetNamedProgramLocalParameterIivEXT]; TRACE("(%d, %d, %d, %p)\n", program, target, index, params ); ENTER_GL(); func_glGetNamedProgramLocalParameterIivEXT( program, target, index, params ); @@ -3624,7 +5114,7 @@ static void WINAPI wine_glGetNamedProgramLocalParameterIivEXT( GLuint program, G } static void WINAPI wine_glGetNamedProgramLocalParameterIuivEXT( GLuint program, GLenum target, GLuint index, GLuint* params ) { - void (*func_glGetNamedProgramLocalParameterIuivEXT)( GLuint, GLenum, GLuint, GLuint* ) = extension_funcs[445]; + void (*func_glGetNamedProgramLocalParameterIuivEXT)( GLuint, GLenum, GLuint, GLuint* ) = extension_funcs[EXT_glGetNamedProgramLocalParameterIuivEXT]; TRACE("(%d, %d, %d, %p)\n", program, target, index, params ); ENTER_GL(); func_glGetNamedProgramLocalParameterIuivEXT( program, target, index, params ); @@ -3632,7 +5122,7 @@ static void WINAPI wine_glGetNamedProgramLocalParameterIuivEXT( GLuint program, } static void WINAPI wine_glGetNamedProgramLocalParameterdvEXT( GLuint program, GLenum target, GLuint index, GLdouble* params ) { - void (*func_glGetNamedProgramLocalParameterdvEXT)( GLuint, GLenum, GLuint, GLdouble* ) = extension_funcs[446]; + void (*func_glGetNamedProgramLocalParameterdvEXT)( GLuint, GLenum, GLuint, GLdouble* ) = extension_funcs[EXT_glGetNamedProgramLocalParameterdvEXT]; TRACE("(%d, %d, %d, %p)\n", program, target, index, params ); ENTER_GL(); func_glGetNamedProgramLocalParameterdvEXT( program, target, index, params ); @@ -3640,7 +5130,7 @@ static void WINAPI wine_glGetNamedProgramLocalParameterdvEXT( GLuint program, GL } static void WINAPI wine_glGetNamedProgramLocalParameterfvEXT( GLuint program, GLenum target, GLuint index, GLfloat* params ) { - void (*func_glGetNamedProgramLocalParameterfvEXT)( GLuint, GLenum, GLuint, GLfloat* ) = extension_funcs[447]; + void (*func_glGetNamedProgramLocalParameterfvEXT)( GLuint, GLenum, GLuint, GLfloat* ) = extension_funcs[EXT_glGetNamedProgramLocalParameterfvEXT]; TRACE("(%d, %d, %d, %p)\n", program, target, index, params ); ENTER_GL(); func_glGetNamedProgramLocalParameterfvEXT( program, target, index, params ); @@ -3648,7 +5138,7 @@ static void WINAPI wine_glGetNamedProgramLocalParameterfvEXT( GLuint program, GL } static void WINAPI wine_glGetNamedProgramStringEXT( GLuint program, GLenum target, GLenum pname, GLvoid* string ) { - void (*func_glGetNamedProgramStringEXT)( GLuint, GLenum, GLenum, GLvoid* ) = extension_funcs[448]; + void (*func_glGetNamedProgramStringEXT)( GLuint, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glGetNamedProgramStringEXT]; TRACE("(%d, %d, %d, %p)\n", program, target, pname, string ); ENTER_GL(); func_glGetNamedProgramStringEXT( program, target, pname, string ); @@ -3656,7 +5146,7 @@ static void WINAPI wine_glGetNamedProgramStringEXT( GLuint program, GLenum targe } static void WINAPI wine_glGetNamedProgramivEXT( GLuint program, GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetNamedProgramivEXT)( GLuint, GLenum, GLenum, GLint* ) = extension_funcs[449]; + void (*func_glGetNamedProgramivEXT)( GLuint, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetNamedProgramivEXT]; TRACE("(%d, %d, %d, %p)\n", program, target, pname, params ); ENTER_GL(); func_glGetNamedProgramivEXT( program, target, pname, params ); @@ -3664,7 +5154,7 @@ static void WINAPI wine_glGetNamedProgramivEXT( GLuint program, GLenum target, G } static void WINAPI wine_glGetNamedRenderbufferParameterivEXT( GLuint renderbuffer, GLenum pname, GLint* params ) { - void (*func_glGetNamedRenderbufferParameterivEXT)( GLuint, GLenum, GLint* ) = extension_funcs[450]; + void (*func_glGetNamedRenderbufferParameterivEXT)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetNamedRenderbufferParameterivEXT]; TRACE("(%d, %d, %p)\n", renderbuffer, pname, params ); ENTER_GL(); func_glGetNamedRenderbufferParameterivEXT( renderbuffer, pname, params ); @@ -3672,7 +5162,7 @@ static void WINAPI wine_glGetNamedRenderbufferParameterivEXT( GLuint renderbuffe } static void WINAPI wine_glGetObjectBufferfvATI( GLuint buffer, GLenum pname, GLfloat* params ) { - void (*func_glGetObjectBufferfvATI)( GLuint, GLenum, GLfloat* ) = extension_funcs[451]; + void (*func_glGetObjectBufferfvATI)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetObjectBufferfvATI]; TRACE("(%d, %d, %p)\n", buffer, pname, params ); ENTER_GL(); func_glGetObjectBufferfvATI( buffer, pname, params ); @@ -3680,7 +5170,7 @@ static void WINAPI wine_glGetObjectBufferfvATI( GLuint buffer, GLenum pname, GLf } static void WINAPI wine_glGetObjectBufferivATI( GLuint buffer, GLenum pname, GLint* params ) { - void (*func_glGetObjectBufferivATI)( GLuint, GLenum, GLint* ) = extension_funcs[452]; + void (*func_glGetObjectBufferivATI)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetObjectBufferivATI]; TRACE("(%d, %d, %p)\n", buffer, pname, params ); ENTER_GL(); func_glGetObjectBufferivATI( buffer, pname, params ); @@ -3688,7 +5178,7 @@ static void WINAPI wine_glGetObjectBufferivATI( GLuint buffer, GLenum pname, GLi } static void WINAPI wine_glGetObjectParameterfvARB( unsigned int obj, GLenum pname, GLfloat* params ) { - void (*func_glGetObjectParameterfvARB)( unsigned int, GLenum, GLfloat* ) = extension_funcs[453]; + void (*func_glGetObjectParameterfvARB)( unsigned int, GLenum, GLfloat* ) = extension_funcs[EXT_glGetObjectParameterfvARB]; TRACE("(%d, %d, %p)\n", obj, pname, params ); ENTER_GL(); func_glGetObjectParameterfvARB( obj, pname, params ); @@ -3696,7 +5186,7 @@ static void WINAPI wine_glGetObjectParameterfvARB( unsigned int obj, GLenum pnam } static void WINAPI wine_glGetObjectParameterivARB( unsigned int obj, GLenum pname, GLint* params ) { - void (*func_glGetObjectParameterivARB)( unsigned int, GLenum, GLint* ) = extension_funcs[454]; + void (*func_glGetObjectParameterivARB)( unsigned int, GLenum, GLint* ) = extension_funcs[EXT_glGetObjectParameterivARB]; TRACE("(%d, %d, %p)\n", obj, pname, params ); ENTER_GL(); func_glGetObjectParameterivARB( obj, pname, params ); @@ -3704,7 +5194,7 @@ static void WINAPI wine_glGetObjectParameterivARB( unsigned int obj, GLenum pnam } static void WINAPI wine_glGetOcclusionQueryivNV( GLuint id, GLenum pname, GLint* params ) { - void (*func_glGetOcclusionQueryivNV)( GLuint, GLenum, GLint* ) = extension_funcs[455]; + void (*func_glGetOcclusionQueryivNV)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetOcclusionQueryivNV]; TRACE("(%d, %d, %p)\n", id, pname, params ); ENTER_GL(); func_glGetOcclusionQueryivNV( id, pname, params ); @@ -3712,7 +5202,7 @@ static void WINAPI wine_glGetOcclusionQueryivNV( GLuint id, GLenum pname, GLint* } static void WINAPI wine_glGetOcclusionQueryuivNV( GLuint id, GLenum pname, GLuint* params ) { - void (*func_glGetOcclusionQueryuivNV)( GLuint, GLenum, GLuint* ) = extension_funcs[456]; + void (*func_glGetOcclusionQueryuivNV)( GLuint, GLenum, GLuint* ) = extension_funcs[EXT_glGetOcclusionQueryuivNV]; TRACE("(%d, %d, %p)\n", id, pname, params ); ENTER_GL(); func_glGetOcclusionQueryuivNV( id, pname, params ); @@ -3720,7 +5210,7 @@ static void WINAPI wine_glGetOcclusionQueryuivNV( GLuint id, GLenum pname, GLuin } static void WINAPI wine_glGetPixelTexGenParameterfvSGIS( GLenum pname, GLfloat* params ) { - void (*func_glGetPixelTexGenParameterfvSGIS)( GLenum, GLfloat* ) = extension_funcs[457]; + void (*func_glGetPixelTexGenParameterfvSGIS)( GLenum, GLfloat* ) = extension_funcs[EXT_glGetPixelTexGenParameterfvSGIS]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glGetPixelTexGenParameterfvSGIS( pname, params ); @@ -3728,7 +5218,7 @@ static void WINAPI wine_glGetPixelTexGenParameterfvSGIS( GLenum pname, GLfloat* } static void WINAPI wine_glGetPixelTexGenParameterivSGIS( GLenum pname, GLint* params ) { - void (*func_glGetPixelTexGenParameterivSGIS)( GLenum, GLint* ) = extension_funcs[458]; + void (*func_glGetPixelTexGenParameterivSGIS)( GLenum, GLint* ) = extension_funcs[EXT_glGetPixelTexGenParameterivSGIS]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glGetPixelTexGenParameterivSGIS( pname, params ); @@ -3736,7 +5226,7 @@ static void WINAPI wine_glGetPixelTexGenParameterivSGIS( GLenum pname, GLint* pa } static void WINAPI wine_glGetPointerIndexedvEXT( GLenum target, GLuint index, GLvoid** data ) { - void (*func_glGetPointerIndexedvEXT)( GLenum, GLuint, GLvoid** ) = extension_funcs[459]; + void (*func_glGetPointerIndexedvEXT)( GLenum, GLuint, GLvoid** ) = extension_funcs[EXT_glGetPointerIndexedvEXT]; TRACE("(%d, %d, %p)\n", target, index, data ); ENTER_GL(); func_glGetPointerIndexedvEXT( target, index, data ); @@ -3744,7 +5234,7 @@ static void WINAPI wine_glGetPointerIndexedvEXT( GLenum target, GLuint index, GL } static void WINAPI wine_glGetPointervEXT( GLenum pname, GLvoid** params ) { - void (*func_glGetPointervEXT)( GLenum, GLvoid** ) = extension_funcs[460]; + void (*func_glGetPointervEXT)( GLenum, GLvoid** ) = extension_funcs[EXT_glGetPointervEXT]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glGetPointervEXT( pname, params ); @@ -3752,7 +5242,7 @@ static void WINAPI wine_glGetPointervEXT( GLenum pname, GLvoid** params ) { } static void WINAPI wine_glGetProgramEnvParameterIivNV( GLenum target, GLuint index, GLint* params ) { - void (*func_glGetProgramEnvParameterIivNV)( GLenum, GLuint, GLint* ) = extension_funcs[461]; + void (*func_glGetProgramEnvParameterIivNV)( GLenum, GLuint, GLint* ) = extension_funcs[EXT_glGetProgramEnvParameterIivNV]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glGetProgramEnvParameterIivNV( target, index, params ); @@ -3760,7 +5250,7 @@ static void WINAPI wine_glGetProgramEnvParameterIivNV( GLenum target, GLuint ind } static void WINAPI wine_glGetProgramEnvParameterIuivNV( GLenum target, GLuint index, GLuint* params ) { - void (*func_glGetProgramEnvParameterIuivNV)( GLenum, GLuint, GLuint* ) = extension_funcs[462]; + void (*func_glGetProgramEnvParameterIuivNV)( GLenum, GLuint, GLuint* ) = extension_funcs[EXT_glGetProgramEnvParameterIuivNV]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glGetProgramEnvParameterIuivNV( target, index, params ); @@ -3768,7 +5258,7 @@ static void WINAPI wine_glGetProgramEnvParameterIuivNV( GLenum target, GLuint in } static void WINAPI wine_glGetProgramEnvParameterdvARB( GLenum target, GLuint index, GLdouble* params ) { - void (*func_glGetProgramEnvParameterdvARB)( GLenum, GLuint, GLdouble* ) = extension_funcs[463]; + void (*func_glGetProgramEnvParameterdvARB)( GLenum, GLuint, GLdouble* ) = extension_funcs[EXT_glGetProgramEnvParameterdvARB]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glGetProgramEnvParameterdvARB( target, index, params ); @@ -3776,7 +5266,7 @@ static void WINAPI wine_glGetProgramEnvParameterdvARB( GLenum target, GLuint ind } static void WINAPI wine_glGetProgramEnvParameterfvARB( GLenum target, GLuint index, GLfloat* params ) { - void (*func_glGetProgramEnvParameterfvARB)( GLenum, GLuint, GLfloat* ) = extension_funcs[464]; + void (*func_glGetProgramEnvParameterfvARB)( GLenum, GLuint, GLfloat* ) = extension_funcs[EXT_glGetProgramEnvParameterfvARB]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glGetProgramEnvParameterfvARB( target, index, params ); @@ -3784,7 +5274,7 @@ static void WINAPI wine_glGetProgramEnvParameterfvARB( GLenum target, GLuint ind } static void WINAPI wine_glGetProgramInfoLog( GLuint program, GLsizei bufSize, GLsizei* length, char* infoLog ) { - void (*func_glGetProgramInfoLog)( GLuint, GLsizei, GLsizei*, char* ) = extension_funcs[465]; + void (*func_glGetProgramInfoLog)( GLuint, GLsizei, GLsizei*, char* ) = extension_funcs[EXT_glGetProgramInfoLog]; TRACE("(%d, %d, %p, %p)\n", program, bufSize, length, infoLog ); ENTER_GL(); func_glGetProgramInfoLog( program, bufSize, length, infoLog ); @@ -3792,7 +5282,7 @@ static void WINAPI wine_glGetProgramInfoLog( GLuint program, GLsizei bufSize, GL } static void WINAPI wine_glGetProgramLocalParameterIivNV( GLenum target, GLuint index, GLint* params ) { - void (*func_glGetProgramLocalParameterIivNV)( GLenum, GLuint, GLint* ) = extension_funcs[466]; + void (*func_glGetProgramLocalParameterIivNV)( GLenum, GLuint, GLint* ) = extension_funcs[EXT_glGetProgramLocalParameterIivNV]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glGetProgramLocalParameterIivNV( target, index, params ); @@ -3800,7 +5290,7 @@ static void WINAPI wine_glGetProgramLocalParameterIivNV( GLenum target, GLuint i } static void WINAPI wine_glGetProgramLocalParameterIuivNV( GLenum target, GLuint index, GLuint* params ) { - void (*func_glGetProgramLocalParameterIuivNV)( GLenum, GLuint, GLuint* ) = extension_funcs[467]; + void (*func_glGetProgramLocalParameterIuivNV)( GLenum, GLuint, GLuint* ) = extension_funcs[EXT_glGetProgramLocalParameterIuivNV]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glGetProgramLocalParameterIuivNV( target, index, params ); @@ -3808,7 +5298,7 @@ static void WINAPI wine_glGetProgramLocalParameterIuivNV( GLenum target, GLuint } static void WINAPI wine_glGetProgramLocalParameterdvARB( GLenum target, GLuint index, GLdouble* params ) { - void (*func_glGetProgramLocalParameterdvARB)( GLenum, GLuint, GLdouble* ) = extension_funcs[468]; + void (*func_glGetProgramLocalParameterdvARB)( GLenum, GLuint, GLdouble* ) = extension_funcs[EXT_glGetProgramLocalParameterdvARB]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glGetProgramLocalParameterdvARB( target, index, params ); @@ -3816,7 +5306,7 @@ static void WINAPI wine_glGetProgramLocalParameterdvARB( GLenum target, GLuint i } static void WINAPI wine_glGetProgramLocalParameterfvARB( GLenum target, GLuint index, GLfloat* params ) { - void (*func_glGetProgramLocalParameterfvARB)( GLenum, GLuint, GLfloat* ) = extension_funcs[469]; + void (*func_glGetProgramLocalParameterfvARB)( GLenum, GLuint, GLfloat* ) = extension_funcs[EXT_glGetProgramLocalParameterfvARB]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glGetProgramLocalParameterfvARB( target, index, params ); @@ -3824,7 +5314,7 @@ static void WINAPI wine_glGetProgramLocalParameterfvARB( GLenum target, GLuint i } static void WINAPI wine_glGetProgramNamedParameterdvNV( GLuint id, GLsizei len, GLubyte* name, GLdouble* params ) { - void (*func_glGetProgramNamedParameterdvNV)( GLuint, GLsizei, GLubyte*, GLdouble* ) = extension_funcs[470]; + void (*func_glGetProgramNamedParameterdvNV)( GLuint, GLsizei, GLubyte*, GLdouble* ) = extension_funcs[EXT_glGetProgramNamedParameterdvNV]; TRACE("(%d, %d, %p, %p)\n", id, len, name, params ); ENTER_GL(); func_glGetProgramNamedParameterdvNV( id, len, name, params ); @@ -3832,7 +5322,7 @@ static void WINAPI wine_glGetProgramNamedParameterdvNV( GLuint id, GLsizei len, } static void WINAPI wine_glGetProgramNamedParameterfvNV( GLuint id, GLsizei len, GLubyte* name, GLfloat* params ) { - void (*func_glGetProgramNamedParameterfvNV)( GLuint, GLsizei, GLubyte*, GLfloat* ) = extension_funcs[471]; + void (*func_glGetProgramNamedParameterfvNV)( GLuint, GLsizei, GLubyte*, GLfloat* ) = extension_funcs[EXT_glGetProgramNamedParameterfvNV]; TRACE("(%d, %d, %p, %p)\n", id, len, name, params ); ENTER_GL(); func_glGetProgramNamedParameterfvNV( id, len, name, params ); @@ -3840,7 +5330,7 @@ static void WINAPI wine_glGetProgramNamedParameterfvNV( GLuint id, GLsizei len, } static void WINAPI wine_glGetProgramParameterdvNV( GLenum target, GLuint index, GLenum pname, GLdouble* params ) { - void (*func_glGetProgramParameterdvNV)( GLenum, GLuint, GLenum, GLdouble* ) = extension_funcs[472]; + void (*func_glGetProgramParameterdvNV)( GLenum, GLuint, GLenum, GLdouble* ) = extension_funcs[EXT_glGetProgramParameterdvNV]; TRACE("(%d, %d, %d, %p)\n", target, index, pname, params ); ENTER_GL(); func_glGetProgramParameterdvNV( target, index, pname, params ); @@ -3848,7 +5338,7 @@ static void WINAPI wine_glGetProgramParameterdvNV( GLenum target, GLuint index, } static void WINAPI wine_glGetProgramParameterfvNV( GLenum target, GLuint index, GLenum pname, GLfloat* params ) { - void (*func_glGetProgramParameterfvNV)( GLenum, GLuint, GLenum, GLfloat* ) = extension_funcs[473]; + void (*func_glGetProgramParameterfvNV)( GLenum, GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetProgramParameterfvNV]; TRACE("(%d, %d, %d, %p)\n", target, index, pname, params ); ENTER_GL(); func_glGetProgramParameterfvNV( target, index, pname, params ); @@ -3856,7 +5346,7 @@ static void WINAPI wine_glGetProgramParameterfvNV( GLenum target, GLuint index, } static void WINAPI wine_glGetProgramStringARB( GLenum target, GLenum pname, GLvoid* string ) { - void (*func_glGetProgramStringARB)( GLenum, GLenum, GLvoid* ) = extension_funcs[474]; + void (*func_glGetProgramStringARB)( GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glGetProgramStringARB]; TRACE("(%d, %d, %p)\n", target, pname, string ); ENTER_GL(); func_glGetProgramStringARB( target, pname, string ); @@ -3864,7 +5354,7 @@ static void WINAPI wine_glGetProgramStringARB( GLenum target, GLenum pname, GLvo } static void WINAPI wine_glGetProgramStringNV( GLuint id, GLenum pname, GLubyte* program ) { - void (*func_glGetProgramStringNV)( GLuint, GLenum, GLubyte* ) = extension_funcs[475]; + void (*func_glGetProgramStringNV)( GLuint, GLenum, GLubyte* ) = extension_funcs[EXT_glGetProgramStringNV]; TRACE("(%d, %d, %p)\n", id, pname, program ); ENTER_GL(); func_glGetProgramStringNV( id, pname, program ); @@ -3872,7 +5362,7 @@ static void WINAPI wine_glGetProgramStringNV( GLuint id, GLenum pname, GLubyte* } static void WINAPI wine_glGetProgramiv( GLuint program, GLenum pname, GLint* params ) { - void (*func_glGetProgramiv)( GLuint, GLenum, GLint* ) = extension_funcs[476]; + void (*func_glGetProgramiv)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetProgramiv]; TRACE("(%d, %d, %p)\n", program, pname, params ); ENTER_GL(); func_glGetProgramiv( program, pname, params ); @@ -3880,7 +5370,7 @@ static void WINAPI wine_glGetProgramiv( GLuint program, GLenum pname, GLint* par } static void WINAPI wine_glGetProgramivARB( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetProgramivARB)( GLenum, GLenum, GLint* ) = extension_funcs[477]; + void (*func_glGetProgramivARB)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetProgramivARB]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetProgramivARB( target, pname, params ); @@ -3888,7 +5378,7 @@ static void WINAPI wine_glGetProgramivARB( GLenum target, GLenum pname, GLint* p } static void WINAPI wine_glGetProgramivNV( GLuint id, GLenum pname, GLint* params ) { - void (*func_glGetProgramivNV)( GLuint, GLenum, GLint* ) = extension_funcs[478]; + void (*func_glGetProgramivNV)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetProgramivNV]; TRACE("(%d, %d, %p)\n", id, pname, params ); ENTER_GL(); func_glGetProgramivNV( id, pname, params ); @@ -3896,7 +5386,7 @@ static void WINAPI wine_glGetProgramivNV( GLuint id, GLenum pname, GLint* params } static void WINAPI wine_glGetQueryObjecti64vEXT( GLuint id, GLenum pname, INT64* params ) { - void (*func_glGetQueryObjecti64vEXT)( GLuint, GLenum, INT64* ) = extension_funcs[479]; + void (*func_glGetQueryObjecti64vEXT)( GLuint, GLenum, INT64* ) = extension_funcs[EXT_glGetQueryObjecti64vEXT]; TRACE("(%d, %d, %p)\n", id, pname, params ); ENTER_GL(); func_glGetQueryObjecti64vEXT( id, pname, params ); @@ -3904,7 +5394,7 @@ static void WINAPI wine_glGetQueryObjecti64vEXT( GLuint id, GLenum pname, INT64* } static void WINAPI wine_glGetQueryObjectiv( GLuint id, GLenum pname, GLint* params ) { - void (*func_glGetQueryObjectiv)( GLuint, GLenum, GLint* ) = extension_funcs[480]; + void (*func_glGetQueryObjectiv)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetQueryObjectiv]; TRACE("(%d, %d, %p)\n", id, pname, params ); ENTER_GL(); func_glGetQueryObjectiv( id, pname, params ); @@ -3912,7 +5402,7 @@ static void WINAPI wine_glGetQueryObjectiv( GLuint id, GLenum pname, GLint* para } static void WINAPI wine_glGetQueryObjectivARB( GLuint id, GLenum pname, GLint* params ) { - void (*func_glGetQueryObjectivARB)( GLuint, GLenum, GLint* ) = extension_funcs[481]; + void (*func_glGetQueryObjectivARB)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetQueryObjectivARB]; TRACE("(%d, %d, %p)\n", id, pname, params ); ENTER_GL(); func_glGetQueryObjectivARB( id, pname, params ); @@ -3920,7 +5410,7 @@ static void WINAPI wine_glGetQueryObjectivARB( GLuint id, GLenum pname, GLint* p } static void WINAPI wine_glGetQueryObjectui64vEXT( GLuint id, GLenum pname, UINT64* params ) { - void (*func_glGetQueryObjectui64vEXT)( GLuint, GLenum, UINT64* ) = extension_funcs[482]; + void (*func_glGetQueryObjectui64vEXT)( GLuint, GLenum, UINT64* ) = extension_funcs[EXT_glGetQueryObjectui64vEXT]; TRACE("(%d, %d, %p)\n", id, pname, params ); ENTER_GL(); func_glGetQueryObjectui64vEXT( id, pname, params ); @@ -3928,7 +5418,7 @@ static void WINAPI wine_glGetQueryObjectui64vEXT( GLuint id, GLenum pname, UINT6 } static void WINAPI wine_glGetQueryObjectuiv( GLuint id, GLenum pname, GLuint* params ) { - void (*func_glGetQueryObjectuiv)( GLuint, GLenum, GLuint* ) = extension_funcs[483]; + void (*func_glGetQueryObjectuiv)( GLuint, GLenum, GLuint* ) = extension_funcs[EXT_glGetQueryObjectuiv]; TRACE("(%d, %d, %p)\n", id, pname, params ); ENTER_GL(); func_glGetQueryObjectuiv( id, pname, params ); @@ -3936,7 +5426,7 @@ static void WINAPI wine_glGetQueryObjectuiv( GLuint id, GLenum pname, GLuint* pa } static void WINAPI wine_glGetQueryObjectuivARB( GLuint id, GLenum pname, GLuint* params ) { - void (*func_glGetQueryObjectuivARB)( GLuint, GLenum, GLuint* ) = extension_funcs[484]; + void (*func_glGetQueryObjectuivARB)( GLuint, GLenum, GLuint* ) = extension_funcs[EXT_glGetQueryObjectuivARB]; TRACE("(%d, %d, %p)\n", id, pname, params ); ENTER_GL(); func_glGetQueryObjectuivARB( id, pname, params ); @@ -3944,7 +5434,7 @@ static void WINAPI wine_glGetQueryObjectuivARB( GLuint id, GLenum pname, GLuint* } static void WINAPI wine_glGetQueryiv( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetQueryiv)( GLenum, GLenum, GLint* ) = extension_funcs[485]; + void (*func_glGetQueryiv)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetQueryiv]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetQueryiv( target, pname, params ); @@ -3952,7 +5442,7 @@ static void WINAPI wine_glGetQueryiv( GLenum target, GLenum pname, GLint* params } static void WINAPI wine_glGetQueryivARB( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetQueryivARB)( GLenum, GLenum, GLint* ) = extension_funcs[486]; + void (*func_glGetQueryivARB)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetQueryivARB]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetQueryivARB( target, pname, params ); @@ -3960,7 +5450,7 @@ static void WINAPI wine_glGetQueryivARB( GLenum target, GLenum pname, GLint* par } static void WINAPI wine_glGetRenderbufferParameteriv( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetRenderbufferParameteriv)( GLenum, GLenum, GLint* ) = extension_funcs[487]; + void (*func_glGetRenderbufferParameteriv)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetRenderbufferParameteriv]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetRenderbufferParameteriv( target, pname, params ); @@ -3968,7 +5458,7 @@ static void WINAPI wine_glGetRenderbufferParameteriv( GLenum target, GLenum pnam } static void WINAPI wine_glGetRenderbufferParameterivEXT( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetRenderbufferParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[488]; + void (*func_glGetRenderbufferParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetRenderbufferParameterivEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetRenderbufferParameterivEXT( target, pname, params ); @@ -3976,7 +5466,7 @@ static void WINAPI wine_glGetRenderbufferParameterivEXT( GLenum target, GLenum p } static void WINAPI wine_glGetSeparableFilterEXT( GLenum target, GLenum format, GLenum type, GLvoid* row, GLvoid* column, GLvoid* span ) { - void (*func_glGetSeparableFilterEXT)( GLenum, GLenum, GLenum, GLvoid*, GLvoid*, GLvoid* ) = extension_funcs[489]; + void (*func_glGetSeparableFilterEXT)( GLenum, GLenum, GLenum, GLvoid*, GLvoid*, GLvoid* ) = extension_funcs[EXT_glGetSeparableFilterEXT]; TRACE("(%d, %d, %d, %p, %p, %p)\n", target, format, type, row, column, span ); ENTER_GL(); func_glGetSeparableFilterEXT( target, format, type, row, column, span ); @@ -3984,7 +5474,7 @@ static void WINAPI wine_glGetSeparableFilterEXT( GLenum target, GLenum format, G } static void WINAPI wine_glGetShaderInfoLog( GLuint shader, GLsizei bufSize, GLsizei* length, char* infoLog ) { - void (*func_glGetShaderInfoLog)( GLuint, GLsizei, GLsizei*, char* ) = extension_funcs[490]; + void (*func_glGetShaderInfoLog)( GLuint, GLsizei, GLsizei*, char* ) = extension_funcs[EXT_glGetShaderInfoLog]; TRACE("(%d, %d, %p, %p)\n", shader, bufSize, length, infoLog ); ENTER_GL(); func_glGetShaderInfoLog( shader, bufSize, length, infoLog ); @@ -3992,7 +5482,7 @@ static void WINAPI wine_glGetShaderInfoLog( GLuint shader, GLsizei bufSize, GLsi } static void WINAPI wine_glGetShaderSource( GLuint shader, GLsizei bufSize, GLsizei* length, char* source ) { - void (*func_glGetShaderSource)( GLuint, GLsizei, GLsizei*, char* ) = extension_funcs[491]; + void (*func_glGetShaderSource)( GLuint, GLsizei, GLsizei*, char* ) = extension_funcs[EXT_glGetShaderSource]; TRACE("(%d, %d, %p, %p)\n", shader, bufSize, length, source ); ENTER_GL(); func_glGetShaderSource( shader, bufSize, length, source ); @@ -4000,7 +5490,7 @@ static void WINAPI wine_glGetShaderSource( GLuint shader, GLsizei bufSize, GLsiz } static void WINAPI wine_glGetShaderSourceARB( unsigned int obj, GLsizei maxLength, GLsizei* length, char* source ) { - void (*func_glGetShaderSourceARB)( unsigned int, GLsizei, GLsizei*, char* ) = extension_funcs[492]; + void (*func_glGetShaderSourceARB)( unsigned int, GLsizei, GLsizei*, char* ) = extension_funcs[EXT_glGetShaderSourceARB]; TRACE("(%d, %d, %p, %p)\n", obj, maxLength, length, source ); ENTER_GL(); func_glGetShaderSourceARB( obj, maxLength, length, source ); @@ -4008,7 +5498,7 @@ static void WINAPI wine_glGetShaderSourceARB( unsigned int obj, GLsizei maxLengt } static void WINAPI wine_glGetShaderiv( GLuint shader, GLenum pname, GLint* params ) { - void (*func_glGetShaderiv)( GLuint, GLenum, GLint* ) = extension_funcs[493]; + void (*func_glGetShaderiv)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetShaderiv]; TRACE("(%d, %d, %p)\n", shader, pname, params ); ENTER_GL(); func_glGetShaderiv( shader, pname, params ); @@ -4016,7 +5506,7 @@ static void WINAPI wine_glGetShaderiv( GLuint shader, GLenum pname, GLint* param } static void WINAPI wine_glGetSharpenTexFuncSGIS( GLenum target, GLfloat* points ) { - void (*func_glGetSharpenTexFuncSGIS)( GLenum, GLfloat* ) = extension_funcs[494]; + void (*func_glGetSharpenTexFuncSGIS)( GLenum, GLfloat* ) = extension_funcs[EXT_glGetSharpenTexFuncSGIS]; TRACE("(%d, %p)\n", target, points ); ENTER_GL(); func_glGetSharpenTexFuncSGIS( target, points ); @@ -4025,7 +5515,7 @@ static void WINAPI wine_glGetSharpenTexFuncSGIS( GLenum target, GLfloat* points static const GLubyte * WINAPI wine_glGetStringi( GLenum name, GLuint index ) { const GLubyte * ret_value; - const GLubyte * (*func_glGetStringi)( GLenum, GLuint ) = extension_funcs[495]; + const GLubyte * (*func_glGetStringi)( GLenum, GLuint ) = extension_funcs[EXT_glGetStringi]; TRACE("(%d, %d)\n", name, index ); ENTER_GL(); ret_value = func_glGetStringi( name, index ); @@ -4034,7 +5524,7 @@ static const GLubyte * WINAPI wine_glGetStringi( GLenum name, GLuint index ) { } static void WINAPI wine_glGetTexBumpParameterfvATI( GLenum pname, GLfloat* param ) { - void (*func_glGetTexBumpParameterfvATI)( GLenum, GLfloat* ) = extension_funcs[496]; + void (*func_glGetTexBumpParameterfvATI)( GLenum, GLfloat* ) = extension_funcs[EXT_glGetTexBumpParameterfvATI]; TRACE("(%d, %p)\n", pname, param ); ENTER_GL(); func_glGetTexBumpParameterfvATI( pname, param ); @@ -4042,7 +5532,7 @@ static void WINAPI wine_glGetTexBumpParameterfvATI( GLenum pname, GLfloat* param } static void WINAPI wine_glGetTexBumpParameterivATI( GLenum pname, GLint* param ) { - void (*func_glGetTexBumpParameterivATI)( GLenum, GLint* ) = extension_funcs[497]; + void (*func_glGetTexBumpParameterivATI)( GLenum, GLint* ) = extension_funcs[EXT_glGetTexBumpParameterivATI]; TRACE("(%d, %p)\n", pname, param ); ENTER_GL(); func_glGetTexBumpParameterivATI( pname, param ); @@ -4050,7 +5540,7 @@ static void WINAPI wine_glGetTexBumpParameterivATI( GLenum pname, GLint* param ) } static void WINAPI wine_glGetTexFilterFuncSGIS( GLenum target, GLenum filter, GLfloat* weights ) { - void (*func_glGetTexFilterFuncSGIS)( GLenum, GLenum, GLfloat* ) = extension_funcs[498]; + void (*func_glGetTexFilterFuncSGIS)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetTexFilterFuncSGIS]; TRACE("(%d, %d, %p)\n", target, filter, weights ); ENTER_GL(); func_glGetTexFilterFuncSGIS( target, filter, weights ); @@ -4058,7 +5548,7 @@ static void WINAPI wine_glGetTexFilterFuncSGIS( GLenum target, GLenum filter, GL } static void WINAPI wine_glGetTexParameterIiv( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetTexParameterIiv)( GLenum, GLenum, GLint* ) = extension_funcs[499]; + void (*func_glGetTexParameterIiv)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetTexParameterIiv]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetTexParameterIiv( target, pname, params ); @@ -4066,7 +5556,7 @@ static void WINAPI wine_glGetTexParameterIiv( GLenum target, GLenum pname, GLint } static void WINAPI wine_glGetTexParameterIivEXT( GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetTexParameterIivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[500]; + void (*func_glGetTexParameterIivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetTexParameterIivEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetTexParameterIivEXT( target, pname, params ); @@ -4074,7 +5564,7 @@ static void WINAPI wine_glGetTexParameterIivEXT( GLenum target, GLenum pname, GL } static void WINAPI wine_glGetTexParameterIuiv( GLenum target, GLenum pname, GLuint* params ) { - void (*func_glGetTexParameterIuiv)( GLenum, GLenum, GLuint* ) = extension_funcs[501]; + void (*func_glGetTexParameterIuiv)( GLenum, GLenum, GLuint* ) = extension_funcs[EXT_glGetTexParameterIuiv]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetTexParameterIuiv( target, pname, params ); @@ -4082,7 +5572,7 @@ static void WINAPI wine_glGetTexParameterIuiv( GLenum target, GLenum pname, GLui } static void WINAPI wine_glGetTexParameterIuivEXT( GLenum target, GLenum pname, GLuint* params ) { - void (*func_glGetTexParameterIuivEXT)( GLenum, GLenum, GLuint* ) = extension_funcs[502]; + void (*func_glGetTexParameterIuivEXT)( GLenum, GLenum, GLuint* ) = extension_funcs[EXT_glGetTexParameterIuivEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glGetTexParameterIuivEXT( target, pname, params ); @@ -4090,7 +5580,7 @@ static void WINAPI wine_glGetTexParameterIuivEXT( GLenum target, GLenum pname, G } static void WINAPI wine_glGetTextureImageEXT( GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glGetTextureImageEXT)( GLuint, GLenum, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[503]; + void (*func_glGetTextureImageEXT)( GLuint, GLenum, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glGetTextureImageEXT]; TRACE("(%d, %d, %d, %d, %d, %p)\n", texture, target, level, format, type, pixels ); ENTER_GL(); func_glGetTextureImageEXT( texture, target, level, format, type, pixels ); @@ -4098,7 +5588,7 @@ static void WINAPI wine_glGetTextureImageEXT( GLuint texture, GLenum target, GLi } static void WINAPI wine_glGetTextureLevelParameterfvEXT( GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat* params ) { - void (*func_glGetTextureLevelParameterfvEXT)( GLuint, GLenum, GLint, GLenum, GLfloat* ) = extension_funcs[504]; + void (*func_glGetTextureLevelParameterfvEXT)( GLuint, GLenum, GLint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetTextureLevelParameterfvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", texture, target, level, pname, params ); ENTER_GL(); func_glGetTextureLevelParameterfvEXT( texture, target, level, pname, params ); @@ -4106,7 +5596,7 @@ static void WINAPI wine_glGetTextureLevelParameterfvEXT( GLuint texture, GLenum } static void WINAPI wine_glGetTextureLevelParameterivEXT( GLuint texture, GLenum target, GLint level, GLenum pname, GLint* params ) { - void (*func_glGetTextureLevelParameterivEXT)( GLuint, GLenum, GLint, GLenum, GLint* ) = extension_funcs[505]; + void (*func_glGetTextureLevelParameterivEXT)( GLuint, GLenum, GLint, GLenum, GLint* ) = extension_funcs[EXT_glGetTextureLevelParameterivEXT]; TRACE("(%d, %d, %d, %d, %p)\n", texture, target, level, pname, params ); ENTER_GL(); func_glGetTextureLevelParameterivEXT( texture, target, level, pname, params ); @@ -4114,7 +5604,7 @@ static void WINAPI wine_glGetTextureLevelParameterivEXT( GLuint texture, GLenum } static void WINAPI wine_glGetTextureParameterIivEXT( GLuint texture, GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetTextureParameterIivEXT)( GLuint, GLenum, GLenum, GLint* ) = extension_funcs[506]; + void (*func_glGetTextureParameterIivEXT)( GLuint, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetTextureParameterIivEXT]; TRACE("(%d, %d, %d, %p)\n", texture, target, pname, params ); ENTER_GL(); func_glGetTextureParameterIivEXT( texture, target, pname, params ); @@ -4122,7 +5612,7 @@ static void WINAPI wine_glGetTextureParameterIivEXT( GLuint texture, GLenum targ } static void WINAPI wine_glGetTextureParameterIuivEXT( GLuint texture, GLenum target, GLenum pname, GLuint* params ) { - void (*func_glGetTextureParameterIuivEXT)( GLuint, GLenum, GLenum, GLuint* ) = extension_funcs[507]; + void (*func_glGetTextureParameterIuivEXT)( GLuint, GLenum, GLenum, GLuint* ) = extension_funcs[EXT_glGetTextureParameterIuivEXT]; TRACE("(%d, %d, %d, %p)\n", texture, target, pname, params ); ENTER_GL(); func_glGetTextureParameterIuivEXT( texture, target, pname, params ); @@ -4130,7 +5620,7 @@ static void WINAPI wine_glGetTextureParameterIuivEXT( GLuint texture, GLenum tar } static void WINAPI wine_glGetTextureParameterfvEXT( GLuint texture, GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glGetTextureParameterfvEXT)( GLuint, GLenum, GLenum, GLfloat* ) = extension_funcs[508]; + void (*func_glGetTextureParameterfvEXT)( GLuint, GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glGetTextureParameterfvEXT]; TRACE("(%d, %d, %d, %p)\n", texture, target, pname, params ); ENTER_GL(); func_glGetTextureParameterfvEXT( texture, target, pname, params ); @@ -4138,7 +5628,7 @@ static void WINAPI wine_glGetTextureParameterfvEXT( GLuint texture, GLenum targe } static void WINAPI wine_glGetTextureParameterivEXT( GLuint texture, GLenum target, GLenum pname, GLint* params ) { - void (*func_glGetTextureParameterivEXT)( GLuint, GLenum, GLenum, GLint* ) = extension_funcs[509]; + void (*func_glGetTextureParameterivEXT)( GLuint, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glGetTextureParameterivEXT]; TRACE("(%d, %d, %d, %p)\n", texture, target, pname, params ); ENTER_GL(); func_glGetTextureParameterivEXT( texture, target, pname, params ); @@ -4146,7 +5636,7 @@ static void WINAPI wine_glGetTextureParameterivEXT( GLuint texture, GLenum targe } static void WINAPI wine_glGetTrackMatrixivNV( GLenum target, GLuint address, GLenum pname, GLint* params ) { - void (*func_glGetTrackMatrixivNV)( GLenum, GLuint, GLenum, GLint* ) = extension_funcs[510]; + void (*func_glGetTrackMatrixivNV)( GLenum, GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetTrackMatrixivNV]; TRACE("(%d, %d, %d, %p)\n", target, address, pname, params ); ENTER_GL(); func_glGetTrackMatrixivNV( target, address, pname, params ); @@ -4154,7 +5644,7 @@ static void WINAPI wine_glGetTrackMatrixivNV( GLenum target, GLuint address, GLe } static void WINAPI wine_glGetTransformFeedbackVarying( GLuint program, GLuint index, GLint* location ) { - void (*func_glGetTransformFeedbackVarying)( GLuint, GLuint, GLint* ) = extension_funcs[511]; + void (*func_glGetTransformFeedbackVarying)( GLuint, GLuint, GLint* ) = extension_funcs[EXT_glGetTransformFeedbackVarying]; TRACE("(%d, %d, %p)\n", program, index, location ); ENTER_GL(); func_glGetTransformFeedbackVarying( program, index, location ); @@ -4162,7 +5652,7 @@ static void WINAPI wine_glGetTransformFeedbackVarying( GLuint program, GLuint in } static void WINAPI wine_glGetTransformFeedbackVaryingEXT( GLuint program, GLuint index, GLint* location ) { - void (*func_glGetTransformFeedbackVaryingEXT)( GLuint, GLuint, GLint* ) = extension_funcs[512]; + void (*func_glGetTransformFeedbackVaryingEXT)( GLuint, GLuint, GLint* ) = extension_funcs[EXT_glGetTransformFeedbackVaryingEXT]; TRACE("(%d, %d, %p)\n", program, index, location ); ENTER_GL(); func_glGetTransformFeedbackVaryingEXT( program, index, location ); @@ -4170,7 +5660,7 @@ static void WINAPI wine_glGetTransformFeedbackVaryingEXT( GLuint program, GLuint } static void WINAPI wine_glGetTransformFeedbackVaryingNV( GLuint program, GLuint index, GLint* location ) { - void (*func_glGetTransformFeedbackVaryingNV)( GLuint, GLuint, GLint* ) = extension_funcs[513]; + void (*func_glGetTransformFeedbackVaryingNV)( GLuint, GLuint, GLint* ) = extension_funcs[EXT_glGetTransformFeedbackVaryingNV]; TRACE("(%d, %d, %p)\n", program, index, location ); ENTER_GL(); func_glGetTransformFeedbackVaryingNV( program, index, location ); @@ -4179,7 +5669,7 @@ static void WINAPI wine_glGetTransformFeedbackVaryingNV( GLuint program, GLuint static GLint WINAPI wine_glGetUniformBufferSizeEXT( GLuint program, GLint location ) { GLint ret_value; - GLint (*func_glGetUniformBufferSizeEXT)( GLuint, GLint ) = extension_funcs[514]; + GLint (*func_glGetUniformBufferSizeEXT)( GLuint, GLint ) = extension_funcs[EXT_glGetUniformBufferSizeEXT]; TRACE("(%d, %d)\n", program, location ); ENTER_GL(); ret_value = func_glGetUniformBufferSizeEXT( program, location ); @@ -4189,7 +5679,7 @@ static GLint WINAPI wine_glGetUniformBufferSizeEXT( GLuint program, GLint locati static GLint WINAPI wine_glGetUniformLocation( GLuint program, char* name ) { GLint ret_value; - GLint (*func_glGetUniformLocation)( GLuint, char* ) = extension_funcs[515]; + GLint (*func_glGetUniformLocation)( GLuint, char* ) = extension_funcs[EXT_glGetUniformLocation]; TRACE("(%d, %p)\n", program, name ); ENTER_GL(); ret_value = func_glGetUniformLocation( program, name ); @@ -4199,7 +5689,7 @@ static GLint WINAPI wine_glGetUniformLocation( GLuint program, char* name ) { static GLint WINAPI wine_glGetUniformLocationARB( unsigned int programObj, char* name ) { GLint ret_value; - GLint (*func_glGetUniformLocationARB)( unsigned int, char* ) = extension_funcs[516]; + GLint (*func_glGetUniformLocationARB)( unsigned int, char* ) = extension_funcs[EXT_glGetUniformLocationARB]; TRACE("(%d, %p)\n", programObj, name ); ENTER_GL(); ret_value = func_glGetUniformLocationARB( programObj, name ); @@ -4209,7 +5699,7 @@ static GLint WINAPI wine_glGetUniformLocationARB( unsigned int programObj, char* static ptrdiff_t WINAPI wine_glGetUniformOffsetEXT( GLuint program, GLint location ) { ptrdiff_t ret_value; - ptrdiff_t (*func_glGetUniformOffsetEXT)( GLuint, GLint ) = extension_funcs[517]; + ptrdiff_t (*func_glGetUniformOffsetEXT)( GLuint, GLint ) = extension_funcs[EXT_glGetUniformOffsetEXT]; TRACE("(%d, %d)\n", program, location ); ENTER_GL(); ret_value = func_glGetUniformOffsetEXT( program, location ); @@ -4218,7 +5708,7 @@ static ptrdiff_t WINAPI wine_glGetUniformOffsetEXT( GLuint program, GLint locati } static void WINAPI wine_glGetUniformfv( GLuint program, GLint location, GLfloat* params ) { - void (*func_glGetUniformfv)( GLuint, GLint, GLfloat* ) = extension_funcs[518]; + void (*func_glGetUniformfv)( GLuint, GLint, GLfloat* ) = extension_funcs[EXT_glGetUniformfv]; TRACE("(%d, %d, %p)\n", program, location, params ); ENTER_GL(); func_glGetUniformfv( program, location, params ); @@ -4226,7 +5716,7 @@ static void WINAPI wine_glGetUniformfv( GLuint program, GLint location, GLfloat* } static void WINAPI wine_glGetUniformfvARB( unsigned int programObj, GLint location, GLfloat* params ) { - void (*func_glGetUniformfvARB)( unsigned int, GLint, GLfloat* ) = extension_funcs[519]; + void (*func_glGetUniformfvARB)( unsigned int, GLint, GLfloat* ) = extension_funcs[EXT_glGetUniformfvARB]; TRACE("(%d, %d, %p)\n", programObj, location, params ); ENTER_GL(); func_glGetUniformfvARB( programObj, location, params ); @@ -4234,7 +5724,7 @@ static void WINAPI wine_glGetUniformfvARB( unsigned int programObj, GLint locati } static void WINAPI wine_glGetUniformiv( GLuint program, GLint location, GLint* params ) { - void (*func_glGetUniformiv)( GLuint, GLint, GLint* ) = extension_funcs[520]; + void (*func_glGetUniformiv)( GLuint, GLint, GLint* ) = extension_funcs[EXT_glGetUniformiv]; TRACE("(%d, %d, %p)\n", program, location, params ); ENTER_GL(); func_glGetUniformiv( program, location, params ); @@ -4242,7 +5732,7 @@ static void WINAPI wine_glGetUniformiv( GLuint program, GLint location, GLint* p } static void WINAPI wine_glGetUniformivARB( unsigned int programObj, GLint location, GLint* params ) { - void (*func_glGetUniformivARB)( unsigned int, GLint, GLint* ) = extension_funcs[521]; + void (*func_glGetUniformivARB)( unsigned int, GLint, GLint* ) = extension_funcs[EXT_glGetUniformivARB]; TRACE("(%d, %d, %p)\n", programObj, location, params ); ENTER_GL(); func_glGetUniformivARB( programObj, location, params ); @@ -4250,7 +5740,7 @@ static void WINAPI wine_glGetUniformivARB( unsigned int programObj, GLint locati } static void WINAPI wine_glGetUniformuiv( GLuint program, GLint location, GLuint* params ) { - void (*func_glGetUniformuiv)( GLuint, GLint, GLuint* ) = extension_funcs[522]; + void (*func_glGetUniformuiv)( GLuint, GLint, GLuint* ) = extension_funcs[EXT_glGetUniformuiv]; TRACE("(%d, %d, %p)\n", program, location, params ); ENTER_GL(); func_glGetUniformuiv( program, location, params ); @@ -4258,7 +5748,7 @@ static void WINAPI wine_glGetUniformuiv( GLuint program, GLint location, GLuint* } static void WINAPI wine_glGetUniformuivEXT( GLuint program, GLint location, GLuint* params ) { - void (*func_glGetUniformuivEXT)( GLuint, GLint, GLuint* ) = extension_funcs[523]; + void (*func_glGetUniformuivEXT)( GLuint, GLint, GLuint* ) = extension_funcs[EXT_glGetUniformuivEXT]; TRACE("(%d, %d, %p)\n", program, location, params ); ENTER_GL(); func_glGetUniformuivEXT( program, location, params ); @@ -4266,7 +5756,7 @@ static void WINAPI wine_glGetUniformuivEXT( GLuint program, GLint location, GLui } static void WINAPI wine_glGetVariantArrayObjectfvATI( GLuint id, GLenum pname, GLfloat* params ) { - void (*func_glGetVariantArrayObjectfvATI)( GLuint, GLenum, GLfloat* ) = extension_funcs[524]; + void (*func_glGetVariantArrayObjectfvATI)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetVariantArrayObjectfvATI]; TRACE("(%d, %d, %p)\n", id, pname, params ); ENTER_GL(); func_glGetVariantArrayObjectfvATI( id, pname, params ); @@ -4274,7 +5764,7 @@ static void WINAPI wine_glGetVariantArrayObjectfvATI( GLuint id, GLenum pname, G } static void WINAPI wine_glGetVariantArrayObjectivATI( GLuint id, GLenum pname, GLint* params ) { - void (*func_glGetVariantArrayObjectivATI)( GLuint, GLenum, GLint* ) = extension_funcs[525]; + void (*func_glGetVariantArrayObjectivATI)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetVariantArrayObjectivATI]; TRACE("(%d, %d, %p)\n", id, pname, params ); ENTER_GL(); func_glGetVariantArrayObjectivATI( id, pname, params ); @@ -4282,7 +5772,7 @@ static void WINAPI wine_glGetVariantArrayObjectivATI( GLuint id, GLenum pname, G } static void WINAPI wine_glGetVariantBooleanvEXT( GLuint id, GLenum value, GLboolean* data ) { - void (*func_glGetVariantBooleanvEXT)( GLuint, GLenum, GLboolean* ) = extension_funcs[526]; + void (*func_glGetVariantBooleanvEXT)( GLuint, GLenum, GLboolean* ) = extension_funcs[EXT_glGetVariantBooleanvEXT]; TRACE("(%d, %d, %p)\n", id, value, data ); ENTER_GL(); func_glGetVariantBooleanvEXT( id, value, data ); @@ -4290,7 +5780,7 @@ static void WINAPI wine_glGetVariantBooleanvEXT( GLuint id, GLenum value, GLbool } static void WINAPI wine_glGetVariantFloatvEXT( GLuint id, GLenum value, GLfloat* data ) { - void (*func_glGetVariantFloatvEXT)( GLuint, GLenum, GLfloat* ) = extension_funcs[527]; + void (*func_glGetVariantFloatvEXT)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetVariantFloatvEXT]; TRACE("(%d, %d, %p)\n", id, value, data ); ENTER_GL(); func_glGetVariantFloatvEXT( id, value, data ); @@ -4298,7 +5788,7 @@ static void WINAPI wine_glGetVariantFloatvEXT( GLuint id, GLenum value, GLfloat* } static void WINAPI wine_glGetVariantIntegervEXT( GLuint id, GLenum value, GLint* data ) { - void (*func_glGetVariantIntegervEXT)( GLuint, GLenum, GLint* ) = extension_funcs[528]; + void (*func_glGetVariantIntegervEXT)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetVariantIntegervEXT]; TRACE("(%d, %d, %p)\n", id, value, data ); ENTER_GL(); func_glGetVariantIntegervEXT( id, value, data ); @@ -4306,7 +5796,7 @@ static void WINAPI wine_glGetVariantIntegervEXT( GLuint id, GLenum value, GLint* } static void WINAPI wine_glGetVariantPointervEXT( GLuint id, GLenum value, GLvoid** data ) { - void (*func_glGetVariantPointervEXT)( GLuint, GLenum, GLvoid** ) = extension_funcs[529]; + void (*func_glGetVariantPointervEXT)( GLuint, GLenum, GLvoid** ) = extension_funcs[EXT_glGetVariantPointervEXT]; TRACE("(%d, %d, %p)\n", id, value, data ); ENTER_GL(); func_glGetVariantPointervEXT( id, value, data ); @@ -4315,7 +5805,7 @@ static void WINAPI wine_glGetVariantPointervEXT( GLuint id, GLenum value, GLvoid static GLint WINAPI wine_glGetVaryingLocationNV( GLuint program, char* name ) { GLint ret_value; - GLint (*func_glGetVaryingLocationNV)( GLuint, char* ) = extension_funcs[530]; + GLint (*func_glGetVaryingLocationNV)( GLuint, char* ) = extension_funcs[EXT_glGetVaryingLocationNV]; TRACE("(%d, %p)\n", program, name ); ENTER_GL(); ret_value = func_glGetVaryingLocationNV( program, name ); @@ -4324,7 +5814,7 @@ static GLint WINAPI wine_glGetVaryingLocationNV( GLuint program, char* name ) { } static void WINAPI wine_glGetVertexAttribArrayObjectfvATI( GLuint index, GLenum pname, GLfloat* params ) { - void (*func_glGetVertexAttribArrayObjectfvATI)( GLuint, GLenum, GLfloat* ) = extension_funcs[531]; + void (*func_glGetVertexAttribArrayObjectfvATI)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetVertexAttribArrayObjectfvATI]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribArrayObjectfvATI( index, pname, params ); @@ -4332,7 +5822,7 @@ static void WINAPI wine_glGetVertexAttribArrayObjectfvATI( GLuint index, GLenum } static void WINAPI wine_glGetVertexAttribArrayObjectivATI( GLuint index, GLenum pname, GLint* params ) { - void (*func_glGetVertexAttribArrayObjectivATI)( GLuint, GLenum, GLint* ) = extension_funcs[532]; + void (*func_glGetVertexAttribArrayObjectivATI)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetVertexAttribArrayObjectivATI]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribArrayObjectivATI( index, pname, params ); @@ -4340,7 +5830,7 @@ static void WINAPI wine_glGetVertexAttribArrayObjectivATI( GLuint index, GLenum } static void WINAPI wine_glGetVertexAttribIiv( GLuint index, GLenum pname, GLint* params ) { - void (*func_glGetVertexAttribIiv)( GLuint, GLenum, GLint* ) = extension_funcs[533]; + void (*func_glGetVertexAttribIiv)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetVertexAttribIiv]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribIiv( index, pname, params ); @@ -4348,7 +5838,7 @@ static void WINAPI wine_glGetVertexAttribIiv( GLuint index, GLenum pname, GLint* } static void WINAPI wine_glGetVertexAttribIivEXT( GLuint index, GLenum pname, GLint* params ) { - void (*func_glGetVertexAttribIivEXT)( GLuint, GLenum, GLint* ) = extension_funcs[534]; + void (*func_glGetVertexAttribIivEXT)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetVertexAttribIivEXT]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribIivEXT( index, pname, params ); @@ -4356,7 +5846,7 @@ static void WINAPI wine_glGetVertexAttribIivEXT( GLuint index, GLenum pname, GLi } static void WINAPI wine_glGetVertexAttribIuiv( GLuint index, GLenum pname, GLuint* params ) { - void (*func_glGetVertexAttribIuiv)( GLuint, GLenum, GLuint* ) = extension_funcs[535]; + void (*func_glGetVertexAttribIuiv)( GLuint, GLenum, GLuint* ) = extension_funcs[EXT_glGetVertexAttribIuiv]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribIuiv( index, pname, params ); @@ -4364,7 +5854,7 @@ static void WINAPI wine_glGetVertexAttribIuiv( GLuint index, GLenum pname, GLuin } static void WINAPI wine_glGetVertexAttribIuivEXT( GLuint index, GLenum pname, GLuint* params ) { - void (*func_glGetVertexAttribIuivEXT)( GLuint, GLenum, GLuint* ) = extension_funcs[536]; + void (*func_glGetVertexAttribIuivEXT)( GLuint, GLenum, GLuint* ) = extension_funcs[EXT_glGetVertexAttribIuivEXT]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribIuivEXT( index, pname, params ); @@ -4372,7 +5862,7 @@ static void WINAPI wine_glGetVertexAttribIuivEXT( GLuint index, GLenum pname, GL } static void WINAPI wine_glGetVertexAttribPointerv( GLuint index, GLenum pname, GLvoid** pointer ) { - void (*func_glGetVertexAttribPointerv)( GLuint, GLenum, GLvoid** ) = extension_funcs[537]; + void (*func_glGetVertexAttribPointerv)( GLuint, GLenum, GLvoid** ) = extension_funcs[EXT_glGetVertexAttribPointerv]; TRACE("(%d, %d, %p)\n", index, pname, pointer ); ENTER_GL(); func_glGetVertexAttribPointerv( index, pname, pointer ); @@ -4380,7 +5870,7 @@ static void WINAPI wine_glGetVertexAttribPointerv( GLuint index, GLenum pname, G } static void WINAPI wine_glGetVertexAttribPointervARB( GLuint index, GLenum pname, GLvoid** pointer ) { - void (*func_glGetVertexAttribPointervARB)( GLuint, GLenum, GLvoid** ) = extension_funcs[538]; + void (*func_glGetVertexAttribPointervARB)( GLuint, GLenum, GLvoid** ) = extension_funcs[EXT_glGetVertexAttribPointervARB]; TRACE("(%d, %d, %p)\n", index, pname, pointer ); ENTER_GL(); func_glGetVertexAttribPointervARB( index, pname, pointer ); @@ -4388,7 +5878,7 @@ static void WINAPI wine_glGetVertexAttribPointervARB( GLuint index, GLenum pname } static void WINAPI wine_glGetVertexAttribPointervNV( GLuint index, GLenum pname, GLvoid** pointer ) { - void (*func_glGetVertexAttribPointervNV)( GLuint, GLenum, GLvoid** ) = extension_funcs[539]; + void (*func_glGetVertexAttribPointervNV)( GLuint, GLenum, GLvoid** ) = extension_funcs[EXT_glGetVertexAttribPointervNV]; TRACE("(%d, %d, %p)\n", index, pname, pointer ); ENTER_GL(); func_glGetVertexAttribPointervNV( index, pname, pointer ); @@ -4396,7 +5886,7 @@ static void WINAPI wine_glGetVertexAttribPointervNV( GLuint index, GLenum pname, } static void WINAPI wine_glGetVertexAttribdv( GLuint index, GLenum pname, GLdouble* params ) { - void (*func_glGetVertexAttribdv)( GLuint, GLenum, GLdouble* ) = extension_funcs[540]; + void (*func_glGetVertexAttribdv)( GLuint, GLenum, GLdouble* ) = extension_funcs[EXT_glGetVertexAttribdv]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribdv( index, pname, params ); @@ -4404,7 +5894,7 @@ static void WINAPI wine_glGetVertexAttribdv( GLuint index, GLenum pname, GLdoubl } static void WINAPI wine_glGetVertexAttribdvARB( GLuint index, GLenum pname, GLdouble* params ) { - void (*func_glGetVertexAttribdvARB)( GLuint, GLenum, GLdouble* ) = extension_funcs[541]; + void (*func_glGetVertexAttribdvARB)( GLuint, GLenum, GLdouble* ) = extension_funcs[EXT_glGetVertexAttribdvARB]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribdvARB( index, pname, params ); @@ -4412,7 +5902,7 @@ static void WINAPI wine_glGetVertexAttribdvARB( GLuint index, GLenum pname, GLdo } static void WINAPI wine_glGetVertexAttribdvNV( GLuint index, GLenum pname, GLdouble* params ) { - void (*func_glGetVertexAttribdvNV)( GLuint, GLenum, GLdouble* ) = extension_funcs[542]; + void (*func_glGetVertexAttribdvNV)( GLuint, GLenum, GLdouble* ) = extension_funcs[EXT_glGetVertexAttribdvNV]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribdvNV( index, pname, params ); @@ -4420,7 +5910,7 @@ static void WINAPI wine_glGetVertexAttribdvNV( GLuint index, GLenum pname, GLdou } static void WINAPI wine_glGetVertexAttribfv( GLuint index, GLenum pname, GLfloat* params ) { - void (*func_glGetVertexAttribfv)( GLuint, GLenum, GLfloat* ) = extension_funcs[543]; + void (*func_glGetVertexAttribfv)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetVertexAttribfv]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribfv( index, pname, params ); @@ -4428,7 +5918,7 @@ static void WINAPI wine_glGetVertexAttribfv( GLuint index, GLenum pname, GLfloat } static void WINAPI wine_glGetVertexAttribfvARB( GLuint index, GLenum pname, GLfloat* params ) { - void (*func_glGetVertexAttribfvARB)( GLuint, GLenum, GLfloat* ) = extension_funcs[544]; + void (*func_glGetVertexAttribfvARB)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetVertexAttribfvARB]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribfvARB( index, pname, params ); @@ -4436,7 +5926,7 @@ static void WINAPI wine_glGetVertexAttribfvARB( GLuint index, GLenum pname, GLfl } static void WINAPI wine_glGetVertexAttribfvNV( GLuint index, GLenum pname, GLfloat* params ) { - void (*func_glGetVertexAttribfvNV)( GLuint, GLenum, GLfloat* ) = extension_funcs[545]; + void (*func_glGetVertexAttribfvNV)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glGetVertexAttribfvNV]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribfvNV( index, pname, params ); @@ -4444,7 +5934,7 @@ static void WINAPI wine_glGetVertexAttribfvNV( GLuint index, GLenum pname, GLflo } static void WINAPI wine_glGetVertexAttribiv( GLuint index, GLenum pname, GLint* params ) { - void (*func_glGetVertexAttribiv)( GLuint, GLenum, GLint* ) = extension_funcs[546]; + void (*func_glGetVertexAttribiv)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetVertexAttribiv]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribiv( index, pname, params ); @@ -4452,7 +5942,7 @@ static void WINAPI wine_glGetVertexAttribiv( GLuint index, GLenum pname, GLint* } static void WINAPI wine_glGetVertexAttribivARB( GLuint index, GLenum pname, GLint* params ) { - void (*func_glGetVertexAttribivARB)( GLuint, GLenum, GLint* ) = extension_funcs[547]; + void (*func_glGetVertexAttribivARB)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetVertexAttribivARB]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribivARB( index, pname, params ); @@ -4460,7 +5950,7 @@ static void WINAPI wine_glGetVertexAttribivARB( GLuint index, GLenum pname, GLin } static void WINAPI wine_glGetVertexAttribivNV( GLuint index, GLenum pname, GLint* params ) { - void (*func_glGetVertexAttribivNV)( GLuint, GLenum, GLint* ) = extension_funcs[548]; + void (*func_glGetVertexAttribivNV)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glGetVertexAttribivNV]; TRACE("(%d, %d, %p)\n", index, pname, params ); ENTER_GL(); func_glGetVertexAttribivNV( index, pname, params ); @@ -4468,7 +5958,7 @@ static void WINAPI wine_glGetVertexAttribivNV( GLuint index, GLenum pname, GLint } static void WINAPI wine_glGlobalAlphaFactorbSUN( GLbyte factor ) { - void (*func_glGlobalAlphaFactorbSUN)( GLbyte ) = extension_funcs[549]; + void (*func_glGlobalAlphaFactorbSUN)( GLbyte ) = extension_funcs[EXT_glGlobalAlphaFactorbSUN]; TRACE("(%d)\n", factor ); ENTER_GL(); func_glGlobalAlphaFactorbSUN( factor ); @@ -4476,7 +5966,7 @@ static void WINAPI wine_glGlobalAlphaFactorbSUN( GLbyte factor ) { } static void WINAPI wine_glGlobalAlphaFactordSUN( GLdouble factor ) { - void (*func_glGlobalAlphaFactordSUN)( GLdouble ) = extension_funcs[550]; + void (*func_glGlobalAlphaFactordSUN)( GLdouble ) = extension_funcs[EXT_glGlobalAlphaFactordSUN]; TRACE("(%f)\n", factor ); ENTER_GL(); func_glGlobalAlphaFactordSUN( factor ); @@ -4484,7 +5974,7 @@ static void WINAPI wine_glGlobalAlphaFactordSUN( GLdouble factor ) { } static void WINAPI wine_glGlobalAlphaFactorfSUN( GLfloat factor ) { - void (*func_glGlobalAlphaFactorfSUN)( GLfloat ) = extension_funcs[551]; + void (*func_glGlobalAlphaFactorfSUN)( GLfloat ) = extension_funcs[EXT_glGlobalAlphaFactorfSUN]; TRACE("(%f)\n", factor ); ENTER_GL(); func_glGlobalAlphaFactorfSUN( factor ); @@ -4492,7 +5982,7 @@ static void WINAPI wine_glGlobalAlphaFactorfSUN( GLfloat factor ) { } static void WINAPI wine_glGlobalAlphaFactoriSUN( GLint factor ) { - void (*func_glGlobalAlphaFactoriSUN)( GLint ) = extension_funcs[552]; + void (*func_glGlobalAlphaFactoriSUN)( GLint ) = extension_funcs[EXT_glGlobalAlphaFactoriSUN]; TRACE("(%d)\n", factor ); ENTER_GL(); func_glGlobalAlphaFactoriSUN( factor ); @@ -4500,7 +5990,7 @@ static void WINAPI wine_glGlobalAlphaFactoriSUN( GLint factor ) { } static void WINAPI wine_glGlobalAlphaFactorsSUN( GLshort factor ) { - void (*func_glGlobalAlphaFactorsSUN)( GLshort ) = extension_funcs[553]; + void (*func_glGlobalAlphaFactorsSUN)( GLshort ) = extension_funcs[EXT_glGlobalAlphaFactorsSUN]; TRACE("(%d)\n", factor ); ENTER_GL(); func_glGlobalAlphaFactorsSUN( factor ); @@ -4508,7 +5998,7 @@ static void WINAPI wine_glGlobalAlphaFactorsSUN( GLshort factor ) { } static void WINAPI wine_glGlobalAlphaFactorubSUN( GLubyte factor ) { - void (*func_glGlobalAlphaFactorubSUN)( GLubyte ) = extension_funcs[554]; + void (*func_glGlobalAlphaFactorubSUN)( GLubyte ) = extension_funcs[EXT_glGlobalAlphaFactorubSUN]; TRACE("(%d)\n", factor ); ENTER_GL(); func_glGlobalAlphaFactorubSUN( factor ); @@ -4516,7 +6006,7 @@ static void WINAPI wine_glGlobalAlphaFactorubSUN( GLubyte factor ) { } static void WINAPI wine_glGlobalAlphaFactoruiSUN( GLuint factor ) { - void (*func_glGlobalAlphaFactoruiSUN)( GLuint ) = extension_funcs[555]; + void (*func_glGlobalAlphaFactoruiSUN)( GLuint ) = extension_funcs[EXT_glGlobalAlphaFactoruiSUN]; TRACE("(%d)\n", factor ); ENTER_GL(); func_glGlobalAlphaFactoruiSUN( factor ); @@ -4524,7 +6014,7 @@ static void WINAPI wine_glGlobalAlphaFactoruiSUN( GLuint factor ) { } static void WINAPI wine_glGlobalAlphaFactorusSUN( GLushort factor ) { - void (*func_glGlobalAlphaFactorusSUN)( GLushort ) = extension_funcs[556]; + void (*func_glGlobalAlphaFactorusSUN)( GLushort ) = extension_funcs[EXT_glGlobalAlphaFactorusSUN]; TRACE("(%d)\n", factor ); ENTER_GL(); func_glGlobalAlphaFactorusSUN( factor ); @@ -4532,7 +6022,7 @@ static void WINAPI wine_glGlobalAlphaFactorusSUN( GLushort factor ) { } static void WINAPI wine_glHintPGI( GLenum target, GLint mode ) { - void (*func_glHintPGI)( GLenum, GLint ) = extension_funcs[557]; + void (*func_glHintPGI)( GLenum, GLint ) = extension_funcs[EXT_glHintPGI]; TRACE("(%d, %d)\n", target, mode ); ENTER_GL(); func_glHintPGI( target, mode ); @@ -4540,7 +6030,7 @@ static void WINAPI wine_glHintPGI( GLenum target, GLint mode ) { } static void WINAPI wine_glHistogramEXT( GLenum target, GLsizei width, GLenum internalformat, GLboolean sink ) { - void (*func_glHistogramEXT)( GLenum, GLsizei, GLenum, GLboolean ) = extension_funcs[558]; + void (*func_glHistogramEXT)( GLenum, GLsizei, GLenum, GLboolean ) = extension_funcs[EXT_glHistogramEXT]; TRACE("(%d, %d, %d, %d)\n", target, width, internalformat, sink ); ENTER_GL(); func_glHistogramEXT( target, width, internalformat, sink ); @@ -4548,7 +6038,7 @@ static void WINAPI wine_glHistogramEXT( GLenum target, GLsizei width, GLenum int } static void WINAPI wine_glIglooInterfaceSGIX( GLenum pname, GLvoid* params ) { - void (*func_glIglooInterfaceSGIX)( GLenum, GLvoid* ) = extension_funcs[559]; + void (*func_glIglooInterfaceSGIX)( GLenum, GLvoid* ) = extension_funcs[EXT_glIglooInterfaceSGIX]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glIglooInterfaceSGIX( pname, params ); @@ -4556,7 +6046,7 @@ static void WINAPI wine_glIglooInterfaceSGIX( GLenum pname, GLvoid* params ) { } static void WINAPI wine_glImageTransformParameterfHP( GLenum target, GLenum pname, GLfloat param ) { - void (*func_glImageTransformParameterfHP)( GLenum, GLenum, GLfloat ) = extension_funcs[560]; + void (*func_glImageTransformParameterfHP)( GLenum, GLenum, GLfloat ) = extension_funcs[EXT_glImageTransformParameterfHP]; TRACE("(%d, %d, %f)\n", target, pname, param ); ENTER_GL(); func_glImageTransformParameterfHP( target, pname, param ); @@ -4564,7 +6054,7 @@ static void WINAPI wine_glImageTransformParameterfHP( GLenum target, GLenum pnam } static void WINAPI wine_glImageTransformParameterfvHP( GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glImageTransformParameterfvHP)( GLenum, GLenum, GLfloat* ) = extension_funcs[561]; + void (*func_glImageTransformParameterfvHP)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glImageTransformParameterfvHP]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glImageTransformParameterfvHP( target, pname, params ); @@ -4572,7 +6062,7 @@ static void WINAPI wine_glImageTransformParameterfvHP( GLenum target, GLenum pna } static void WINAPI wine_glImageTransformParameteriHP( GLenum target, GLenum pname, GLint param ) { - void (*func_glImageTransformParameteriHP)( GLenum, GLenum, GLint ) = extension_funcs[562]; + void (*func_glImageTransformParameteriHP)( GLenum, GLenum, GLint ) = extension_funcs[EXT_glImageTransformParameteriHP]; TRACE("(%d, %d, %d)\n", target, pname, param ); ENTER_GL(); func_glImageTransformParameteriHP( target, pname, param ); @@ -4580,7 +6070,7 @@ static void WINAPI wine_glImageTransformParameteriHP( GLenum target, GLenum pnam } static void WINAPI wine_glImageTransformParameterivHP( GLenum target, GLenum pname, GLint* params ) { - void (*func_glImageTransformParameterivHP)( GLenum, GLenum, GLint* ) = extension_funcs[563]; + void (*func_glImageTransformParameterivHP)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glImageTransformParameterivHP]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glImageTransformParameterivHP( target, pname, params ); @@ -4588,7 +6078,7 @@ static void WINAPI wine_glImageTransformParameterivHP( GLenum target, GLenum pna } static void WINAPI wine_glIndexFuncEXT( GLenum func, GLclampf ref ) { - void (*func_glIndexFuncEXT)( GLenum, GLclampf ) = extension_funcs[564]; + void (*func_glIndexFuncEXT)( GLenum, GLclampf ) = extension_funcs[EXT_glIndexFuncEXT]; TRACE("(%d, %f)\n", func, ref ); ENTER_GL(); func_glIndexFuncEXT( func, ref ); @@ -4596,7 +6086,7 @@ static void WINAPI wine_glIndexFuncEXT( GLenum func, GLclampf ref ) { } static void WINAPI wine_glIndexMaterialEXT( GLenum face, GLenum mode ) { - void (*func_glIndexMaterialEXT)( GLenum, GLenum ) = extension_funcs[565]; + void (*func_glIndexMaterialEXT)( GLenum, GLenum ) = extension_funcs[EXT_glIndexMaterialEXT]; TRACE("(%d, %d)\n", face, mode ); ENTER_GL(); func_glIndexMaterialEXT( face, mode ); @@ -4604,7 +6094,7 @@ static void WINAPI wine_glIndexMaterialEXT( GLenum face, GLenum mode ) { } static void WINAPI wine_glIndexPointerEXT( GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer ) { - void (*func_glIndexPointerEXT)( GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[566]; + void (*func_glIndexPointerEXT)( GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[EXT_glIndexPointerEXT]; TRACE("(%d, %d, %d, %p)\n", type, stride, count, pointer ); ENTER_GL(); func_glIndexPointerEXT( type, stride, count, pointer ); @@ -4612,7 +6102,7 @@ static void WINAPI wine_glIndexPointerEXT( GLenum type, GLsizei stride, GLsizei } static void WINAPI wine_glIndexPointerListIBM( GLenum type, GLint stride, GLvoid** pointer, GLint ptrstride ) { - void (*func_glIndexPointerListIBM)( GLenum, GLint, GLvoid**, GLint ) = extension_funcs[567]; + void (*func_glIndexPointerListIBM)( GLenum, GLint, GLvoid**, GLint ) = extension_funcs[EXT_glIndexPointerListIBM]; TRACE("(%d, %d, %p, %d)\n", type, stride, pointer, ptrstride ); ENTER_GL(); func_glIndexPointerListIBM( type, stride, pointer, ptrstride ); @@ -4620,7 +6110,7 @@ static void WINAPI wine_glIndexPointerListIBM( GLenum type, GLint stride, GLvoid } static void WINAPI wine_glInsertComponentEXT( GLuint res, GLuint src, GLuint num ) { - void (*func_glInsertComponentEXT)( GLuint, GLuint, GLuint ) = extension_funcs[568]; + void (*func_glInsertComponentEXT)( GLuint, GLuint, GLuint ) = extension_funcs[EXT_glInsertComponentEXT]; TRACE("(%d, %d, %d)\n", res, src, num ); ENTER_GL(); func_glInsertComponentEXT( res, src, num ); @@ -4628,7 +6118,7 @@ static void WINAPI wine_glInsertComponentEXT( GLuint res, GLuint src, GLuint num } static void WINAPI wine_glInstrumentsBufferSGIX( GLsizei size, GLint* buffer ) { - void (*func_glInstrumentsBufferSGIX)( GLsizei, GLint* ) = extension_funcs[569]; + void (*func_glInstrumentsBufferSGIX)( GLsizei, GLint* ) = extension_funcs[EXT_glInstrumentsBufferSGIX]; TRACE("(%d, %p)\n", size, buffer ); ENTER_GL(); func_glInstrumentsBufferSGIX( size, buffer ); @@ -4637,7 +6127,7 @@ static void WINAPI wine_glInstrumentsBufferSGIX( GLsizei size, GLint* buffer ) { static GLboolean WINAPI wine_glIsAsyncMarkerSGIX( GLuint marker ) { GLboolean ret_value; - GLboolean (*func_glIsAsyncMarkerSGIX)( GLuint ) = extension_funcs[570]; + GLboolean (*func_glIsAsyncMarkerSGIX)( GLuint ) = extension_funcs[EXT_glIsAsyncMarkerSGIX]; TRACE("(%d)\n", marker ); ENTER_GL(); ret_value = func_glIsAsyncMarkerSGIX( marker ); @@ -4647,7 +6137,7 @@ static GLboolean WINAPI wine_glIsAsyncMarkerSGIX( GLuint marker ) { static GLboolean WINAPI wine_glIsBuffer( GLuint buffer ) { GLboolean ret_value; - GLboolean (*func_glIsBuffer)( GLuint ) = extension_funcs[571]; + GLboolean (*func_glIsBuffer)( GLuint ) = extension_funcs[EXT_glIsBuffer]; TRACE("(%d)\n", buffer ); ENTER_GL(); ret_value = func_glIsBuffer( buffer ); @@ -4657,7 +6147,7 @@ static GLboolean WINAPI wine_glIsBuffer( GLuint buffer ) { static GLboolean WINAPI wine_glIsBufferARB( GLuint buffer ) { GLboolean ret_value; - GLboolean (*func_glIsBufferARB)( GLuint ) = extension_funcs[572]; + GLboolean (*func_glIsBufferARB)( GLuint ) = extension_funcs[EXT_glIsBufferARB]; TRACE("(%d)\n", buffer ); ENTER_GL(); ret_value = func_glIsBufferARB( buffer ); @@ -4667,7 +6157,7 @@ static GLboolean WINAPI wine_glIsBufferARB( GLuint buffer ) { static GLboolean WINAPI wine_glIsEnabledIndexedEXT( GLenum target, GLuint index ) { GLboolean ret_value; - GLboolean (*func_glIsEnabledIndexedEXT)( GLenum, GLuint ) = extension_funcs[573]; + GLboolean (*func_glIsEnabledIndexedEXT)( GLenum, GLuint ) = extension_funcs[EXT_glIsEnabledIndexedEXT]; TRACE("(%d, %d)\n", target, index ); ENTER_GL(); ret_value = func_glIsEnabledIndexedEXT( target, index ); @@ -4677,7 +6167,7 @@ static GLboolean WINAPI wine_glIsEnabledIndexedEXT( GLenum target, GLuint index static GLboolean WINAPI wine_glIsEnabledi( GLenum target, GLuint index ) { GLboolean ret_value; - GLboolean (*func_glIsEnabledi)( GLenum, GLuint ) = extension_funcs[574]; + GLboolean (*func_glIsEnabledi)( GLenum, GLuint ) = extension_funcs[EXT_glIsEnabledi]; TRACE("(%d, %d)\n", target, index ); ENTER_GL(); ret_value = func_glIsEnabledi( target, index ); @@ -4687,7 +6177,7 @@ static GLboolean WINAPI wine_glIsEnabledi( GLenum target, GLuint index ) { static GLboolean WINAPI wine_glIsFenceAPPLE( GLuint fence ) { GLboolean ret_value; - GLboolean (*func_glIsFenceAPPLE)( GLuint ) = extension_funcs[575]; + GLboolean (*func_glIsFenceAPPLE)( GLuint ) = extension_funcs[EXT_glIsFenceAPPLE]; TRACE("(%d)\n", fence ); ENTER_GL(); ret_value = func_glIsFenceAPPLE( fence ); @@ -4697,7 +6187,7 @@ static GLboolean WINAPI wine_glIsFenceAPPLE( GLuint fence ) { static GLboolean WINAPI wine_glIsFenceNV( GLuint fence ) { GLboolean ret_value; - GLboolean (*func_glIsFenceNV)( GLuint ) = extension_funcs[576]; + GLboolean (*func_glIsFenceNV)( GLuint ) = extension_funcs[EXT_glIsFenceNV]; TRACE("(%d)\n", fence ); ENTER_GL(); ret_value = func_glIsFenceNV( fence ); @@ -4707,7 +6197,7 @@ static GLboolean WINAPI wine_glIsFenceNV( GLuint fence ) { static GLboolean WINAPI wine_glIsFramebuffer( GLuint framebuffer ) { GLboolean ret_value; - GLboolean (*func_glIsFramebuffer)( GLuint ) = extension_funcs[577]; + GLboolean (*func_glIsFramebuffer)( GLuint ) = extension_funcs[EXT_glIsFramebuffer]; TRACE("(%d)\n", framebuffer ); ENTER_GL(); ret_value = func_glIsFramebuffer( framebuffer ); @@ -4717,7 +6207,7 @@ static GLboolean WINAPI wine_glIsFramebuffer( GLuint framebuffer ) { static GLboolean WINAPI wine_glIsFramebufferEXT( GLuint framebuffer ) { GLboolean ret_value; - GLboolean (*func_glIsFramebufferEXT)( GLuint ) = extension_funcs[578]; + GLboolean (*func_glIsFramebufferEXT)( GLuint ) = extension_funcs[EXT_glIsFramebufferEXT]; TRACE("(%d)\n", framebuffer ); ENTER_GL(); ret_value = func_glIsFramebufferEXT( framebuffer ); @@ -4727,7 +6217,7 @@ static GLboolean WINAPI wine_glIsFramebufferEXT( GLuint framebuffer ) { static GLboolean WINAPI wine_glIsObjectBufferATI( GLuint buffer ) { GLboolean ret_value; - GLboolean (*func_glIsObjectBufferATI)( GLuint ) = extension_funcs[579]; + GLboolean (*func_glIsObjectBufferATI)( GLuint ) = extension_funcs[EXT_glIsObjectBufferATI]; TRACE("(%d)\n", buffer ); ENTER_GL(); ret_value = func_glIsObjectBufferATI( buffer ); @@ -4737,7 +6227,7 @@ static GLboolean WINAPI wine_glIsObjectBufferATI( GLuint buffer ) { static GLboolean WINAPI wine_glIsOcclusionQueryNV( GLuint id ) { GLboolean ret_value; - GLboolean (*func_glIsOcclusionQueryNV)( GLuint ) = extension_funcs[580]; + GLboolean (*func_glIsOcclusionQueryNV)( GLuint ) = extension_funcs[EXT_glIsOcclusionQueryNV]; TRACE("(%d)\n", id ); ENTER_GL(); ret_value = func_glIsOcclusionQueryNV( id ); @@ -4747,7 +6237,7 @@ static GLboolean WINAPI wine_glIsOcclusionQueryNV( GLuint id ) { static GLboolean WINAPI wine_glIsProgram( GLuint program ) { GLboolean ret_value; - GLboolean (*func_glIsProgram)( GLuint ) = extension_funcs[581]; + GLboolean (*func_glIsProgram)( GLuint ) = extension_funcs[EXT_glIsProgram]; TRACE("(%d)\n", program ); ENTER_GL(); ret_value = func_glIsProgram( program ); @@ -4757,7 +6247,7 @@ static GLboolean WINAPI wine_glIsProgram( GLuint program ) { static GLboolean WINAPI wine_glIsProgramARB( GLuint program ) { GLboolean ret_value; - GLboolean (*func_glIsProgramARB)( GLuint ) = extension_funcs[582]; + GLboolean (*func_glIsProgramARB)( GLuint ) = extension_funcs[EXT_glIsProgramARB]; TRACE("(%d)\n", program ); ENTER_GL(); ret_value = func_glIsProgramARB( program ); @@ -4767,7 +6257,7 @@ static GLboolean WINAPI wine_glIsProgramARB( GLuint program ) { static GLboolean WINAPI wine_glIsProgramNV( GLuint id ) { GLboolean ret_value; - GLboolean (*func_glIsProgramNV)( GLuint ) = extension_funcs[583]; + GLboolean (*func_glIsProgramNV)( GLuint ) = extension_funcs[EXT_glIsProgramNV]; TRACE("(%d)\n", id ); ENTER_GL(); ret_value = func_glIsProgramNV( id ); @@ -4777,7 +6267,7 @@ static GLboolean WINAPI wine_glIsProgramNV( GLuint id ) { static GLboolean WINAPI wine_glIsQuery( GLuint id ) { GLboolean ret_value; - GLboolean (*func_glIsQuery)( GLuint ) = extension_funcs[584]; + GLboolean (*func_glIsQuery)( GLuint ) = extension_funcs[EXT_glIsQuery]; TRACE("(%d)\n", id ); ENTER_GL(); ret_value = func_glIsQuery( id ); @@ -4787,7 +6277,7 @@ static GLboolean WINAPI wine_glIsQuery( GLuint id ) { static GLboolean WINAPI wine_glIsQueryARB( GLuint id ) { GLboolean ret_value; - GLboolean (*func_glIsQueryARB)( GLuint ) = extension_funcs[585]; + GLboolean (*func_glIsQueryARB)( GLuint ) = extension_funcs[EXT_glIsQueryARB]; TRACE("(%d)\n", id ); ENTER_GL(); ret_value = func_glIsQueryARB( id ); @@ -4797,7 +6287,7 @@ static GLboolean WINAPI wine_glIsQueryARB( GLuint id ) { static GLboolean WINAPI wine_glIsRenderbuffer( GLuint renderbuffer ) { GLboolean ret_value; - GLboolean (*func_glIsRenderbuffer)( GLuint ) = extension_funcs[586]; + GLboolean (*func_glIsRenderbuffer)( GLuint ) = extension_funcs[EXT_glIsRenderbuffer]; TRACE("(%d)\n", renderbuffer ); ENTER_GL(); ret_value = func_glIsRenderbuffer( renderbuffer ); @@ -4807,7 +6297,7 @@ static GLboolean WINAPI wine_glIsRenderbuffer( GLuint renderbuffer ) { static GLboolean WINAPI wine_glIsRenderbufferEXT( GLuint renderbuffer ) { GLboolean ret_value; - GLboolean (*func_glIsRenderbufferEXT)( GLuint ) = extension_funcs[587]; + GLboolean (*func_glIsRenderbufferEXT)( GLuint ) = extension_funcs[EXT_glIsRenderbufferEXT]; TRACE("(%d)\n", renderbuffer ); ENTER_GL(); ret_value = func_glIsRenderbufferEXT( renderbuffer ); @@ -4817,7 +6307,7 @@ static GLboolean WINAPI wine_glIsRenderbufferEXT( GLuint renderbuffer ) { static GLboolean WINAPI wine_glIsShader( GLuint shader ) { GLboolean ret_value; - GLboolean (*func_glIsShader)( GLuint ) = extension_funcs[588]; + GLboolean (*func_glIsShader)( GLuint ) = extension_funcs[EXT_glIsShader]; TRACE("(%d)\n", shader ); ENTER_GL(); ret_value = func_glIsShader( shader ); @@ -4827,7 +6317,7 @@ static GLboolean WINAPI wine_glIsShader( GLuint shader ) { static GLboolean WINAPI wine_glIsTextureEXT( GLuint texture ) { GLboolean ret_value; - GLboolean (*func_glIsTextureEXT)( GLuint ) = extension_funcs[589]; + GLboolean (*func_glIsTextureEXT)( GLuint ) = extension_funcs[EXT_glIsTextureEXT]; TRACE("(%d)\n", texture ); ENTER_GL(); ret_value = func_glIsTextureEXT( texture ); @@ -4837,7 +6327,7 @@ static GLboolean WINAPI wine_glIsTextureEXT( GLuint texture ) { static GLboolean WINAPI wine_glIsVariantEnabledEXT( GLuint id, GLenum cap ) { GLboolean ret_value; - GLboolean (*func_glIsVariantEnabledEXT)( GLuint, GLenum ) = extension_funcs[590]; + GLboolean (*func_glIsVariantEnabledEXT)( GLuint, GLenum ) = extension_funcs[EXT_glIsVariantEnabledEXT]; TRACE("(%d, %d)\n", id, cap ); ENTER_GL(); ret_value = func_glIsVariantEnabledEXT( id, cap ); @@ -4847,7 +6337,7 @@ static GLboolean WINAPI wine_glIsVariantEnabledEXT( GLuint id, GLenum cap ) { static GLboolean WINAPI wine_glIsVertexArray( GLuint array ) { GLboolean ret_value; - GLboolean (*func_glIsVertexArray)( GLuint ) = extension_funcs[591]; + GLboolean (*func_glIsVertexArray)( GLuint ) = extension_funcs[EXT_glIsVertexArray]; TRACE("(%d)\n", array ); ENTER_GL(); ret_value = func_glIsVertexArray( array ); @@ -4857,7 +6347,7 @@ static GLboolean WINAPI wine_glIsVertexArray( GLuint array ) { static GLboolean WINAPI wine_glIsVertexArrayAPPLE( GLuint array ) { GLboolean ret_value; - GLboolean (*func_glIsVertexArrayAPPLE)( GLuint ) = extension_funcs[592]; + GLboolean (*func_glIsVertexArrayAPPLE)( GLuint ) = extension_funcs[EXT_glIsVertexArrayAPPLE]; TRACE("(%d)\n", array ); ENTER_GL(); ret_value = func_glIsVertexArrayAPPLE( array ); @@ -4866,7 +6356,7 @@ static GLboolean WINAPI wine_glIsVertexArrayAPPLE( GLuint array ) { } static void WINAPI wine_glLightEnviSGIX( GLenum pname, GLint param ) { - void (*func_glLightEnviSGIX)( GLenum, GLint ) = extension_funcs[593]; + void (*func_glLightEnviSGIX)( GLenum, GLint ) = extension_funcs[EXT_glLightEnviSGIX]; TRACE("(%d, %d)\n", pname, param ); ENTER_GL(); func_glLightEnviSGIX( pname, param ); @@ -4874,7 +6364,7 @@ static void WINAPI wine_glLightEnviSGIX( GLenum pname, GLint param ) { } static void WINAPI wine_glLinkProgram( GLuint program ) { - void (*func_glLinkProgram)( GLuint ) = extension_funcs[594]; + void (*func_glLinkProgram)( GLuint ) = extension_funcs[EXT_glLinkProgram]; TRACE("(%d)\n", program ); ENTER_GL(); func_glLinkProgram( program ); @@ -4882,7 +6372,7 @@ static void WINAPI wine_glLinkProgram( GLuint program ) { } static void WINAPI wine_glLinkProgramARB( unsigned int programObj ) { - void (*func_glLinkProgramARB)( unsigned int ) = extension_funcs[595]; + void (*func_glLinkProgramARB)( unsigned int ) = extension_funcs[EXT_glLinkProgramARB]; TRACE("(%d)\n", programObj ); ENTER_GL(); func_glLinkProgramARB( programObj ); @@ -4890,7 +6380,7 @@ static void WINAPI wine_glLinkProgramARB( unsigned int programObj ) { } static void WINAPI wine_glListParameterfSGIX( GLuint list, GLenum pname, GLfloat param ) { - void (*func_glListParameterfSGIX)( GLuint, GLenum, GLfloat ) = extension_funcs[596]; + void (*func_glListParameterfSGIX)( GLuint, GLenum, GLfloat ) = extension_funcs[EXT_glListParameterfSGIX]; TRACE("(%d, %d, %f)\n", list, pname, param ); ENTER_GL(); func_glListParameterfSGIX( list, pname, param ); @@ -4898,7 +6388,7 @@ static void WINAPI wine_glListParameterfSGIX( GLuint list, GLenum pname, GLfloat } static void WINAPI wine_glListParameterfvSGIX( GLuint list, GLenum pname, GLfloat* params ) { - void (*func_glListParameterfvSGIX)( GLuint, GLenum, GLfloat* ) = extension_funcs[597]; + void (*func_glListParameterfvSGIX)( GLuint, GLenum, GLfloat* ) = extension_funcs[EXT_glListParameterfvSGIX]; TRACE("(%d, %d, %p)\n", list, pname, params ); ENTER_GL(); func_glListParameterfvSGIX( list, pname, params ); @@ -4906,7 +6396,7 @@ static void WINAPI wine_glListParameterfvSGIX( GLuint list, GLenum pname, GLfloa } static void WINAPI wine_glListParameteriSGIX( GLuint list, GLenum pname, GLint param ) { - void (*func_glListParameteriSGIX)( GLuint, GLenum, GLint ) = extension_funcs[598]; + void (*func_glListParameteriSGIX)( GLuint, GLenum, GLint ) = extension_funcs[EXT_glListParameteriSGIX]; TRACE("(%d, %d, %d)\n", list, pname, param ); ENTER_GL(); func_glListParameteriSGIX( list, pname, param ); @@ -4914,7 +6404,7 @@ static void WINAPI wine_glListParameteriSGIX( GLuint list, GLenum pname, GLint p } static void WINAPI wine_glListParameterivSGIX( GLuint list, GLenum pname, GLint* params ) { - void (*func_glListParameterivSGIX)( GLuint, GLenum, GLint* ) = extension_funcs[599]; + void (*func_glListParameterivSGIX)( GLuint, GLenum, GLint* ) = extension_funcs[EXT_glListParameterivSGIX]; TRACE("(%d, %d, %p)\n", list, pname, params ); ENTER_GL(); func_glListParameterivSGIX( list, pname, params ); @@ -4922,7 +6412,7 @@ static void WINAPI wine_glListParameterivSGIX( GLuint list, GLenum pname, GLint* } static void WINAPI wine_glLoadIdentityDeformationMapSGIX( GLbitfield mask ) { - void (*func_glLoadIdentityDeformationMapSGIX)( GLbitfield ) = extension_funcs[600]; + void (*func_glLoadIdentityDeformationMapSGIX)( GLbitfield ) = extension_funcs[EXT_glLoadIdentityDeformationMapSGIX]; TRACE("(%d)\n", mask ); ENTER_GL(); func_glLoadIdentityDeformationMapSGIX( mask ); @@ -4930,7 +6420,7 @@ static void WINAPI wine_glLoadIdentityDeformationMapSGIX( GLbitfield mask ) { } static void WINAPI wine_glLoadProgramNV( GLenum target, GLuint id, GLsizei len, GLubyte* program ) { - void (*func_glLoadProgramNV)( GLenum, GLuint, GLsizei, GLubyte* ) = extension_funcs[601]; + void (*func_glLoadProgramNV)( GLenum, GLuint, GLsizei, GLubyte* ) = extension_funcs[EXT_glLoadProgramNV]; TRACE("(%d, %d, %d, %p)\n", target, id, len, program ); ENTER_GL(); func_glLoadProgramNV( target, id, len, program ); @@ -4938,7 +6428,7 @@ static void WINAPI wine_glLoadProgramNV( GLenum target, GLuint id, GLsizei len, } static void WINAPI wine_glLoadTransposeMatrixd( GLdouble* m ) { - void (*func_glLoadTransposeMatrixd)( GLdouble* ) = extension_funcs[602]; + void (*func_glLoadTransposeMatrixd)( GLdouble* ) = extension_funcs[EXT_glLoadTransposeMatrixd]; TRACE("(%p)\n", m ); ENTER_GL(); func_glLoadTransposeMatrixd( m ); @@ -4946,7 +6436,7 @@ static void WINAPI wine_glLoadTransposeMatrixd( GLdouble* m ) { } static void WINAPI wine_glLoadTransposeMatrixdARB( GLdouble* m ) { - void (*func_glLoadTransposeMatrixdARB)( GLdouble* ) = extension_funcs[603]; + void (*func_glLoadTransposeMatrixdARB)( GLdouble* ) = extension_funcs[EXT_glLoadTransposeMatrixdARB]; TRACE("(%p)\n", m ); ENTER_GL(); func_glLoadTransposeMatrixdARB( m ); @@ -4954,7 +6444,7 @@ static void WINAPI wine_glLoadTransposeMatrixdARB( GLdouble* m ) { } static void WINAPI wine_glLoadTransposeMatrixf( GLfloat* m ) { - void (*func_glLoadTransposeMatrixf)( GLfloat* ) = extension_funcs[604]; + void (*func_glLoadTransposeMatrixf)( GLfloat* ) = extension_funcs[EXT_glLoadTransposeMatrixf]; TRACE("(%p)\n", m ); ENTER_GL(); func_glLoadTransposeMatrixf( m ); @@ -4962,7 +6452,7 @@ static void WINAPI wine_glLoadTransposeMatrixf( GLfloat* m ) { } static void WINAPI wine_glLoadTransposeMatrixfARB( GLfloat* m ) { - void (*func_glLoadTransposeMatrixfARB)( GLfloat* ) = extension_funcs[605]; + void (*func_glLoadTransposeMatrixfARB)( GLfloat* ) = extension_funcs[EXT_glLoadTransposeMatrixfARB]; TRACE("(%p)\n", m ); ENTER_GL(); func_glLoadTransposeMatrixfARB( m ); @@ -4970,7 +6460,7 @@ static void WINAPI wine_glLoadTransposeMatrixfARB( GLfloat* m ) { } static void WINAPI wine_glLockArraysEXT( GLint first, GLsizei count ) { - void (*func_glLockArraysEXT)( GLint, GLsizei ) = extension_funcs[606]; + void (*func_glLockArraysEXT)( GLint, GLsizei ) = extension_funcs[EXT_glLockArraysEXT]; TRACE("(%d, %d)\n", first, count ); ENTER_GL(); func_glLockArraysEXT( first, count ); @@ -4978,7 +6468,7 @@ static void WINAPI wine_glLockArraysEXT( GLint first, GLsizei count ) { } static void WINAPI wine_glMTexCoord2fSGIS( GLenum target, GLfloat s, GLfloat t ) { - void (*func_glMTexCoord2fSGIS)( GLenum, GLfloat, GLfloat ) = extension_funcs[607]; + void (*func_glMTexCoord2fSGIS)( GLenum, GLfloat, GLfloat ) = extension_funcs[EXT_glMTexCoord2fSGIS]; TRACE("(%d, %f, %f)\n", target, s, t ); ENTER_GL(); func_glMTexCoord2fSGIS( target, s, t ); @@ -4986,7 +6476,7 @@ static void WINAPI wine_glMTexCoord2fSGIS( GLenum target, GLfloat s, GLfloat t ) } static void WINAPI wine_glMTexCoord2fvSGIS( GLenum target, GLfloat * v ) { - void (*func_glMTexCoord2fvSGIS)( GLenum, GLfloat * ) = extension_funcs[608]; + void (*func_glMTexCoord2fvSGIS)( GLenum, GLfloat * ) = extension_funcs[EXT_glMTexCoord2fvSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMTexCoord2fvSGIS( target, v ); @@ -4995,7 +6485,7 @@ static void WINAPI wine_glMTexCoord2fvSGIS( GLenum target, GLfloat * v ) { static GLvoid* WINAPI wine_glMapBuffer( GLenum target, GLenum access ) { GLvoid* ret_value; - GLvoid* (*func_glMapBuffer)( GLenum, GLenum ) = extension_funcs[609]; + GLvoid* (*func_glMapBuffer)( GLenum, GLenum ) = extension_funcs[EXT_glMapBuffer]; TRACE("(%d, %d)\n", target, access ); ENTER_GL(); ret_value = func_glMapBuffer( target, access ); @@ -5005,7 +6495,7 @@ static GLvoid* WINAPI wine_glMapBuffer( GLenum target, GLenum access ) { static GLvoid* WINAPI wine_glMapBufferARB( GLenum target, GLenum access ) { GLvoid* ret_value; - GLvoid* (*func_glMapBufferARB)( GLenum, GLenum ) = extension_funcs[610]; + GLvoid* (*func_glMapBufferARB)( GLenum, GLenum ) = extension_funcs[EXT_glMapBufferARB]; TRACE("(%d, %d)\n", target, access ); ENTER_GL(); ret_value = func_glMapBufferARB( target, access ); @@ -5014,7 +6504,7 @@ static GLvoid* WINAPI wine_glMapBufferARB( GLenum target, GLenum access ) { } static void WINAPI wine_glMapBufferRange( GLenum target, ptrdiff_t offset, ptrdiff_t length, GLbitfield access ) { - void (*func_glMapBufferRange)( GLenum, ptrdiff_t, ptrdiff_t, GLbitfield ) = extension_funcs[611]; + void (*func_glMapBufferRange)( GLenum, ptrdiff_t, ptrdiff_t, GLbitfield ) = extension_funcs[EXT_glMapBufferRange]; TRACE("(%d, %d, %d, %d)\n", target, offset, length, access ); ENTER_GL(); func_glMapBufferRange( target, offset, length, access ); @@ -5022,7 +6512,7 @@ static void WINAPI wine_glMapBufferRange( GLenum target, ptrdiff_t offset, ptrdi } static void WINAPI wine_glMapControlPointsNV( GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, GLvoid* points ) { - void (*func_glMapControlPointsNV)( GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, GLvoid* ) = extension_funcs[612]; + void (*func_glMapControlPointsNV)( GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, GLvoid* ) = extension_funcs[EXT_glMapControlPointsNV]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %p)\n", target, index, type, ustride, vstride, uorder, vorder, packed, points ); ENTER_GL(); func_glMapControlPointsNV( target, index, type, ustride, vstride, uorder, vorder, packed, points ); @@ -5031,7 +6521,7 @@ static void WINAPI wine_glMapControlPointsNV( GLenum target, GLuint index, GLenu static GLvoid* WINAPI wine_glMapNamedBufferEXT( GLuint buffer, GLenum access ) { GLvoid* ret_value; - GLvoid* (*func_glMapNamedBufferEXT)( GLuint, GLenum ) = extension_funcs[613]; + GLvoid* (*func_glMapNamedBufferEXT)( GLuint, GLenum ) = extension_funcs[EXT_glMapNamedBufferEXT]; TRACE("(%d, %d)\n", buffer, access ); ENTER_GL(); ret_value = func_glMapNamedBufferEXT( buffer, access ); @@ -5041,7 +6531,7 @@ static GLvoid* WINAPI wine_glMapNamedBufferEXT( GLuint buffer, GLenum access ) { static GLvoid* WINAPI wine_glMapObjectBufferATI( GLuint buffer ) { GLvoid* ret_value; - GLvoid* (*func_glMapObjectBufferATI)( GLuint ) = extension_funcs[614]; + GLvoid* (*func_glMapObjectBufferATI)( GLuint ) = extension_funcs[EXT_glMapObjectBufferATI]; TRACE("(%d)\n", buffer ); ENTER_GL(); ret_value = func_glMapObjectBufferATI( buffer ); @@ -5050,7 +6540,7 @@ static GLvoid* WINAPI wine_glMapObjectBufferATI( GLuint buffer ) { } static void WINAPI wine_glMapParameterfvNV( GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glMapParameterfvNV)( GLenum, GLenum, GLfloat* ) = extension_funcs[615]; + void (*func_glMapParameterfvNV)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glMapParameterfvNV]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glMapParameterfvNV( target, pname, params ); @@ -5058,7 +6548,7 @@ static void WINAPI wine_glMapParameterfvNV( GLenum target, GLenum pname, GLfloat } static void WINAPI wine_glMapParameterivNV( GLenum target, GLenum pname, GLint* params ) { - void (*func_glMapParameterivNV)( GLenum, GLenum, GLint* ) = extension_funcs[616]; + void (*func_glMapParameterivNV)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glMapParameterivNV]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glMapParameterivNV( target, pname, params ); @@ -5066,7 +6556,7 @@ static void WINAPI wine_glMapParameterivNV( GLenum target, GLenum pname, GLint* } static void WINAPI wine_glMatrixFrustumEXT( GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar ) { - void (*func_glMatrixFrustumEXT)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[617]; + void (*func_glMatrixFrustumEXT)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glMatrixFrustumEXT]; TRACE("(%d, %f, %f, %f, %f, %f, %f)\n", mode, left, right, bottom, top, zNear, zFar ); ENTER_GL(); func_glMatrixFrustumEXT( mode, left, right, bottom, top, zNear, zFar ); @@ -5074,7 +6564,7 @@ static void WINAPI wine_glMatrixFrustumEXT( GLenum mode, GLdouble left, GLdouble } static void WINAPI wine_glMatrixIndexPointerARB( GLint size, GLenum type, GLsizei stride, GLvoid* pointer ) { - void (*func_glMatrixIndexPointerARB)( GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[618]; + void (*func_glMatrixIndexPointerARB)( GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glMatrixIndexPointerARB]; TRACE("(%d, %d, %d, %p)\n", size, type, stride, pointer ); ENTER_GL(); func_glMatrixIndexPointerARB( size, type, stride, pointer ); @@ -5082,7 +6572,7 @@ static void WINAPI wine_glMatrixIndexPointerARB( GLint size, GLenum type, GLsize } static void WINAPI wine_glMatrixIndexubvARB( GLint size, GLubyte* indices ) { - void (*func_glMatrixIndexubvARB)( GLint, GLubyte* ) = extension_funcs[619]; + void (*func_glMatrixIndexubvARB)( GLint, GLubyte* ) = extension_funcs[EXT_glMatrixIndexubvARB]; TRACE("(%d, %p)\n", size, indices ); ENTER_GL(); func_glMatrixIndexubvARB( size, indices ); @@ -5090,7 +6580,7 @@ static void WINAPI wine_glMatrixIndexubvARB( GLint size, GLubyte* indices ) { } static void WINAPI wine_glMatrixIndexuivARB( GLint size, GLuint* indices ) { - void (*func_glMatrixIndexuivARB)( GLint, GLuint* ) = extension_funcs[620]; + void (*func_glMatrixIndexuivARB)( GLint, GLuint* ) = extension_funcs[EXT_glMatrixIndexuivARB]; TRACE("(%d, %p)\n", size, indices ); ENTER_GL(); func_glMatrixIndexuivARB( size, indices ); @@ -5098,7 +6588,7 @@ static void WINAPI wine_glMatrixIndexuivARB( GLint size, GLuint* indices ) { } static void WINAPI wine_glMatrixIndexusvARB( GLint size, GLushort* indices ) { - void (*func_glMatrixIndexusvARB)( GLint, GLushort* ) = extension_funcs[621]; + void (*func_glMatrixIndexusvARB)( GLint, GLushort* ) = extension_funcs[EXT_glMatrixIndexusvARB]; TRACE("(%d, %p)\n", size, indices ); ENTER_GL(); func_glMatrixIndexusvARB( size, indices ); @@ -5106,7 +6596,7 @@ static void WINAPI wine_glMatrixIndexusvARB( GLint size, GLushort* indices ) { } static void WINAPI wine_glMatrixLoadIdentityEXT( GLenum mode ) { - void (*func_glMatrixLoadIdentityEXT)( GLenum ) = extension_funcs[622]; + void (*func_glMatrixLoadIdentityEXT)( GLenum ) = extension_funcs[EXT_glMatrixLoadIdentityEXT]; TRACE("(%d)\n", mode ); ENTER_GL(); func_glMatrixLoadIdentityEXT( mode ); @@ -5114,7 +6604,7 @@ static void WINAPI wine_glMatrixLoadIdentityEXT( GLenum mode ) { } static void WINAPI wine_glMatrixLoadTransposedEXT( GLenum mode, GLdouble* m ) { - void (*func_glMatrixLoadTransposedEXT)( GLenum, GLdouble* ) = extension_funcs[623]; + void (*func_glMatrixLoadTransposedEXT)( GLenum, GLdouble* ) = extension_funcs[EXT_glMatrixLoadTransposedEXT]; TRACE("(%d, %p)\n", mode, m ); ENTER_GL(); func_glMatrixLoadTransposedEXT( mode, m ); @@ -5122,7 +6612,7 @@ static void WINAPI wine_glMatrixLoadTransposedEXT( GLenum mode, GLdouble* m ) { } static void WINAPI wine_glMatrixLoadTransposefEXT( GLenum mode, GLfloat* m ) { - void (*func_glMatrixLoadTransposefEXT)( GLenum, GLfloat* ) = extension_funcs[624]; + void (*func_glMatrixLoadTransposefEXT)( GLenum, GLfloat* ) = extension_funcs[EXT_glMatrixLoadTransposefEXT]; TRACE("(%d, %p)\n", mode, m ); ENTER_GL(); func_glMatrixLoadTransposefEXT( mode, m ); @@ -5130,7 +6620,7 @@ static void WINAPI wine_glMatrixLoadTransposefEXT( GLenum mode, GLfloat* m ) { } static void WINAPI wine_glMatrixLoaddEXT( GLenum mode, GLdouble* m ) { - void (*func_glMatrixLoaddEXT)( GLenum, GLdouble* ) = extension_funcs[625]; + void (*func_glMatrixLoaddEXT)( GLenum, GLdouble* ) = extension_funcs[EXT_glMatrixLoaddEXT]; TRACE("(%d, %p)\n", mode, m ); ENTER_GL(); func_glMatrixLoaddEXT( mode, m ); @@ -5138,7 +6628,7 @@ static void WINAPI wine_glMatrixLoaddEXT( GLenum mode, GLdouble* m ) { } static void WINAPI wine_glMatrixLoadfEXT( GLenum mode, GLfloat* m ) { - void (*func_glMatrixLoadfEXT)( GLenum, GLfloat* ) = extension_funcs[626]; + void (*func_glMatrixLoadfEXT)( GLenum, GLfloat* ) = extension_funcs[EXT_glMatrixLoadfEXT]; TRACE("(%d, %p)\n", mode, m ); ENTER_GL(); func_glMatrixLoadfEXT( mode, m ); @@ -5146,7 +6636,7 @@ static void WINAPI wine_glMatrixLoadfEXT( GLenum mode, GLfloat* m ) { } static void WINAPI wine_glMatrixMultTransposedEXT( GLenum mode, GLdouble* m ) { - void (*func_glMatrixMultTransposedEXT)( GLenum, GLdouble* ) = extension_funcs[627]; + void (*func_glMatrixMultTransposedEXT)( GLenum, GLdouble* ) = extension_funcs[EXT_glMatrixMultTransposedEXT]; TRACE("(%d, %p)\n", mode, m ); ENTER_GL(); func_glMatrixMultTransposedEXT( mode, m ); @@ -5154,7 +6644,7 @@ static void WINAPI wine_glMatrixMultTransposedEXT( GLenum mode, GLdouble* m ) { } static void WINAPI wine_glMatrixMultTransposefEXT( GLenum mode, GLfloat* m ) { - void (*func_glMatrixMultTransposefEXT)( GLenum, GLfloat* ) = extension_funcs[628]; + void (*func_glMatrixMultTransposefEXT)( GLenum, GLfloat* ) = extension_funcs[EXT_glMatrixMultTransposefEXT]; TRACE("(%d, %p)\n", mode, m ); ENTER_GL(); func_glMatrixMultTransposefEXT( mode, m ); @@ -5162,7 +6652,7 @@ static void WINAPI wine_glMatrixMultTransposefEXT( GLenum mode, GLfloat* m ) { } static void WINAPI wine_glMatrixMultdEXT( GLenum mode, GLdouble* m ) { - void (*func_glMatrixMultdEXT)( GLenum, GLdouble* ) = extension_funcs[629]; + void (*func_glMatrixMultdEXT)( GLenum, GLdouble* ) = extension_funcs[EXT_glMatrixMultdEXT]; TRACE("(%d, %p)\n", mode, m ); ENTER_GL(); func_glMatrixMultdEXT( mode, m ); @@ -5170,7 +6660,7 @@ static void WINAPI wine_glMatrixMultdEXT( GLenum mode, GLdouble* m ) { } static void WINAPI wine_glMatrixMultfEXT( GLenum mode, GLfloat* m ) { - void (*func_glMatrixMultfEXT)( GLenum, GLfloat* ) = extension_funcs[630]; + void (*func_glMatrixMultfEXT)( GLenum, GLfloat* ) = extension_funcs[EXT_glMatrixMultfEXT]; TRACE("(%d, %p)\n", mode, m ); ENTER_GL(); func_glMatrixMultfEXT( mode, m ); @@ -5178,7 +6668,7 @@ static void WINAPI wine_glMatrixMultfEXT( GLenum mode, GLfloat* m ) { } static void WINAPI wine_glMatrixOrthoEXT( GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar ) { - void (*func_glMatrixOrthoEXT)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[631]; + void (*func_glMatrixOrthoEXT)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glMatrixOrthoEXT]; TRACE("(%d, %f, %f, %f, %f, %f, %f)\n", mode, left, right, bottom, top, zNear, zFar ); ENTER_GL(); func_glMatrixOrthoEXT( mode, left, right, bottom, top, zNear, zFar ); @@ -5186,7 +6676,7 @@ static void WINAPI wine_glMatrixOrthoEXT( GLenum mode, GLdouble left, GLdouble r } static void WINAPI wine_glMatrixPopEXT( GLenum mode ) { - void (*func_glMatrixPopEXT)( GLenum ) = extension_funcs[632]; + void (*func_glMatrixPopEXT)( GLenum ) = extension_funcs[EXT_glMatrixPopEXT]; TRACE("(%d)\n", mode ); ENTER_GL(); func_glMatrixPopEXT( mode ); @@ -5194,7 +6684,7 @@ static void WINAPI wine_glMatrixPopEXT( GLenum mode ) { } static void WINAPI wine_glMatrixPushEXT( GLenum mode ) { - void (*func_glMatrixPushEXT)( GLenum ) = extension_funcs[633]; + void (*func_glMatrixPushEXT)( GLenum ) = extension_funcs[EXT_glMatrixPushEXT]; TRACE("(%d)\n", mode ); ENTER_GL(); func_glMatrixPushEXT( mode ); @@ -5202,7 +6692,7 @@ static void WINAPI wine_glMatrixPushEXT( GLenum mode ) { } static void WINAPI wine_glMatrixRotatedEXT( GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z ) { - void (*func_glMatrixRotatedEXT)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[634]; + void (*func_glMatrixRotatedEXT)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glMatrixRotatedEXT]; TRACE("(%d, %f, %f, %f, %f)\n", mode, angle, x, y, z ); ENTER_GL(); func_glMatrixRotatedEXT( mode, angle, x, y, z ); @@ -5210,7 +6700,7 @@ static void WINAPI wine_glMatrixRotatedEXT( GLenum mode, GLdouble angle, GLdoubl } static void WINAPI wine_glMatrixRotatefEXT( GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glMatrixRotatefEXT)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[635]; + void (*func_glMatrixRotatefEXT)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glMatrixRotatefEXT]; TRACE("(%d, %f, %f, %f, %f)\n", mode, angle, x, y, z ); ENTER_GL(); func_glMatrixRotatefEXT( mode, angle, x, y, z ); @@ -5218,7 +6708,7 @@ static void WINAPI wine_glMatrixRotatefEXT( GLenum mode, GLfloat angle, GLfloat } static void WINAPI wine_glMatrixScaledEXT( GLenum mode, GLdouble x, GLdouble y, GLdouble z ) { - void (*func_glMatrixScaledEXT)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[636]; + void (*func_glMatrixScaledEXT)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glMatrixScaledEXT]; TRACE("(%d, %f, %f, %f)\n", mode, x, y, z ); ENTER_GL(); func_glMatrixScaledEXT( mode, x, y, z ); @@ -5226,7 +6716,7 @@ static void WINAPI wine_glMatrixScaledEXT( GLenum mode, GLdouble x, GLdouble y, } static void WINAPI wine_glMatrixScalefEXT( GLenum mode, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glMatrixScalefEXT)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[637]; + void (*func_glMatrixScalefEXT)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glMatrixScalefEXT]; TRACE("(%d, %f, %f, %f)\n", mode, x, y, z ); ENTER_GL(); func_glMatrixScalefEXT( mode, x, y, z ); @@ -5234,7 +6724,7 @@ static void WINAPI wine_glMatrixScalefEXT( GLenum mode, GLfloat x, GLfloat y, GL } static void WINAPI wine_glMatrixTranslatedEXT( GLenum mode, GLdouble x, GLdouble y, GLdouble z ) { - void (*func_glMatrixTranslatedEXT)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[638]; + void (*func_glMatrixTranslatedEXT)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glMatrixTranslatedEXT]; TRACE("(%d, %f, %f, %f)\n", mode, x, y, z ); ENTER_GL(); func_glMatrixTranslatedEXT( mode, x, y, z ); @@ -5242,7 +6732,7 @@ static void WINAPI wine_glMatrixTranslatedEXT( GLenum mode, GLdouble x, GLdouble } static void WINAPI wine_glMatrixTranslatefEXT( GLenum mode, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glMatrixTranslatefEXT)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[639]; + void (*func_glMatrixTranslatefEXT)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glMatrixTranslatefEXT]; TRACE("(%d, %f, %f, %f)\n", mode, x, y, z ); ENTER_GL(); func_glMatrixTranslatefEXT( mode, x, y, z ); @@ -5250,7 +6740,7 @@ static void WINAPI wine_glMatrixTranslatefEXT( GLenum mode, GLfloat x, GLfloat y } static void WINAPI wine_glMinmaxEXT( GLenum target, GLenum internalformat, GLboolean sink ) { - void (*func_glMinmaxEXT)( GLenum, GLenum, GLboolean ) = extension_funcs[640]; + void (*func_glMinmaxEXT)( GLenum, GLenum, GLboolean ) = extension_funcs[EXT_glMinmaxEXT]; TRACE("(%d, %d, %d)\n", target, internalformat, sink ); ENTER_GL(); func_glMinmaxEXT( target, internalformat, sink ); @@ -5258,7 +6748,7 @@ static void WINAPI wine_glMinmaxEXT( GLenum target, GLenum internalformat, GLboo } static void WINAPI wine_glMultTransposeMatrixd( GLdouble* m ) { - void (*func_glMultTransposeMatrixd)( GLdouble* ) = extension_funcs[641]; + void (*func_glMultTransposeMatrixd)( GLdouble* ) = extension_funcs[EXT_glMultTransposeMatrixd]; TRACE("(%p)\n", m ); ENTER_GL(); func_glMultTransposeMatrixd( m ); @@ -5266,7 +6756,7 @@ static void WINAPI wine_glMultTransposeMatrixd( GLdouble* m ) { } static void WINAPI wine_glMultTransposeMatrixdARB( GLdouble* m ) { - void (*func_glMultTransposeMatrixdARB)( GLdouble* ) = extension_funcs[642]; + void (*func_glMultTransposeMatrixdARB)( GLdouble* ) = extension_funcs[EXT_glMultTransposeMatrixdARB]; TRACE("(%p)\n", m ); ENTER_GL(); func_glMultTransposeMatrixdARB( m ); @@ -5274,7 +6764,7 @@ static void WINAPI wine_glMultTransposeMatrixdARB( GLdouble* m ) { } static void WINAPI wine_glMultTransposeMatrixf( GLfloat* m ) { - void (*func_glMultTransposeMatrixf)( GLfloat* ) = extension_funcs[643]; + void (*func_glMultTransposeMatrixf)( GLfloat* ) = extension_funcs[EXT_glMultTransposeMatrixf]; TRACE("(%p)\n", m ); ENTER_GL(); func_glMultTransposeMatrixf( m ); @@ -5282,7 +6772,7 @@ static void WINAPI wine_glMultTransposeMatrixf( GLfloat* m ) { } static void WINAPI wine_glMultTransposeMatrixfARB( GLfloat* m ) { - void (*func_glMultTransposeMatrixfARB)( GLfloat* ) = extension_funcs[644]; + void (*func_glMultTransposeMatrixfARB)( GLfloat* ) = extension_funcs[EXT_glMultTransposeMatrixfARB]; TRACE("(%p)\n", m ); ENTER_GL(); func_glMultTransposeMatrixfARB( m ); @@ -5290,7 +6780,7 @@ static void WINAPI wine_glMultTransposeMatrixfARB( GLfloat* m ) { } static void WINAPI wine_glMultiDrawArrays( GLenum mode, GLint* first, GLsizei* count, GLsizei primcount ) { - void (*func_glMultiDrawArrays)( GLenum, GLint*, GLsizei*, GLsizei ) = extension_funcs[645]; + void (*func_glMultiDrawArrays)( GLenum, GLint*, GLsizei*, GLsizei ) = extension_funcs[EXT_glMultiDrawArrays]; TRACE("(%d, %p, %p, %d)\n", mode, first, count, primcount ); ENTER_GL(); func_glMultiDrawArrays( mode, first, count, primcount ); @@ -5298,7 +6788,7 @@ static void WINAPI wine_glMultiDrawArrays( GLenum mode, GLint* first, GLsizei* c } static void WINAPI wine_glMultiDrawArraysEXT( GLenum mode, GLint* first, GLsizei* count, GLsizei primcount ) { - void (*func_glMultiDrawArraysEXT)( GLenum, GLint*, GLsizei*, GLsizei ) = extension_funcs[646]; + void (*func_glMultiDrawArraysEXT)( GLenum, GLint*, GLsizei*, GLsizei ) = extension_funcs[EXT_glMultiDrawArraysEXT]; TRACE("(%d, %p, %p, %d)\n", mode, first, count, primcount ); ENTER_GL(); func_glMultiDrawArraysEXT( mode, first, count, primcount ); @@ -5306,7 +6796,7 @@ static void WINAPI wine_glMultiDrawArraysEXT( GLenum mode, GLint* first, GLsizei } static void WINAPI wine_glMultiDrawElementArrayAPPLE( GLenum mode, GLint* first, GLsizei* count, GLsizei primcount ) { - void (*func_glMultiDrawElementArrayAPPLE)( GLenum, GLint*, GLsizei*, GLsizei ) = extension_funcs[647]; + void (*func_glMultiDrawElementArrayAPPLE)( GLenum, GLint*, GLsizei*, GLsizei ) = extension_funcs[EXT_glMultiDrawElementArrayAPPLE]; TRACE("(%d, %p, %p, %d)\n", mode, first, count, primcount ); ENTER_GL(); func_glMultiDrawElementArrayAPPLE( mode, first, count, primcount ); @@ -5314,7 +6804,7 @@ static void WINAPI wine_glMultiDrawElementArrayAPPLE( GLenum mode, GLint* first, } static void WINAPI wine_glMultiDrawElements( GLenum mode, GLsizei* count, GLenum type, GLvoid** indices, GLsizei primcount ) { - void (*func_glMultiDrawElements)( GLenum, GLsizei*, GLenum, GLvoid**, GLsizei ) = extension_funcs[648]; + void (*func_glMultiDrawElements)( GLenum, GLsizei*, GLenum, GLvoid**, GLsizei ) = extension_funcs[EXT_glMultiDrawElements]; TRACE("(%d, %p, %d, %p, %d)\n", mode, count, type, indices, primcount ); ENTER_GL(); func_glMultiDrawElements( mode, count, type, indices, primcount ); @@ -5322,7 +6812,7 @@ static void WINAPI wine_glMultiDrawElements( GLenum mode, GLsizei* count, GLenum } static void WINAPI wine_glMultiDrawElementsEXT( GLenum mode, GLsizei* count, GLenum type, GLvoid** indices, GLsizei primcount ) { - void (*func_glMultiDrawElementsEXT)( GLenum, GLsizei*, GLenum, GLvoid**, GLsizei ) = extension_funcs[649]; + void (*func_glMultiDrawElementsEXT)( GLenum, GLsizei*, GLenum, GLvoid**, GLsizei ) = extension_funcs[EXT_glMultiDrawElementsEXT]; TRACE("(%d, %p, %d, %p, %d)\n", mode, count, type, indices, primcount ); ENTER_GL(); func_glMultiDrawElementsEXT( mode, count, type, indices, primcount ); @@ -5330,7 +6820,7 @@ static void WINAPI wine_glMultiDrawElementsEXT( GLenum mode, GLsizei* count, GLe } static void WINAPI wine_glMultiDrawRangeElementArrayAPPLE( GLenum mode, GLuint start, GLuint end, GLint* first, GLsizei* count, GLsizei primcount ) { - void (*func_glMultiDrawRangeElementArrayAPPLE)( GLenum, GLuint, GLuint, GLint*, GLsizei*, GLsizei ) = extension_funcs[650]; + void (*func_glMultiDrawRangeElementArrayAPPLE)( GLenum, GLuint, GLuint, GLint*, GLsizei*, GLsizei ) = extension_funcs[EXT_glMultiDrawRangeElementArrayAPPLE]; TRACE("(%d, %d, %d, %p, %p, %d)\n", mode, start, end, first, count, primcount ); ENTER_GL(); func_glMultiDrawRangeElementArrayAPPLE( mode, start, end, first, count, primcount ); @@ -5338,7 +6828,7 @@ static void WINAPI wine_glMultiDrawRangeElementArrayAPPLE( GLenum mode, GLuint s } static void WINAPI wine_glMultiModeDrawArraysIBM( GLenum* mode, GLint* first, GLsizei* count, GLsizei primcount, GLint modestride ) { - void (*func_glMultiModeDrawArraysIBM)( GLenum*, GLint*, GLsizei*, GLsizei, GLint ) = extension_funcs[651]; + void (*func_glMultiModeDrawArraysIBM)( GLenum*, GLint*, GLsizei*, GLsizei, GLint ) = extension_funcs[EXT_glMultiModeDrawArraysIBM]; TRACE("(%p, %p, %p, %d, %d)\n", mode, first, count, primcount, modestride ); ENTER_GL(); func_glMultiModeDrawArraysIBM( mode, first, count, primcount, modestride ); @@ -5346,7 +6836,7 @@ static void WINAPI wine_glMultiModeDrawArraysIBM( GLenum* mode, GLint* first, GL } static void WINAPI wine_glMultiModeDrawElementsIBM( GLenum* mode, GLsizei* count, GLenum type, GLvoid* const* indices, GLsizei primcount, GLint modestride ) { - void (*func_glMultiModeDrawElementsIBM)( GLenum*, GLsizei*, GLenum, GLvoid* const*, GLsizei, GLint ) = extension_funcs[652]; + void (*func_glMultiModeDrawElementsIBM)( GLenum*, GLsizei*, GLenum, GLvoid* const*, GLsizei, GLint ) = extension_funcs[EXT_glMultiModeDrawElementsIBM]; TRACE("(%p, %p, %d, %p, %d, %d)\n", mode, count, type, indices, primcount, modestride ); ENTER_GL(); func_glMultiModeDrawElementsIBM( mode, count, type, indices, primcount, modestride ); @@ -5354,7 +6844,7 @@ static void WINAPI wine_glMultiModeDrawElementsIBM( GLenum* mode, GLsizei* count } static void WINAPI wine_glMultiTexBufferEXT( GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer ) { - void (*func_glMultiTexBufferEXT)( GLenum, GLenum, GLenum, GLuint ) = extension_funcs[653]; + void (*func_glMultiTexBufferEXT)( GLenum, GLenum, GLenum, GLuint ) = extension_funcs[EXT_glMultiTexBufferEXT]; TRACE("(%d, %d, %d, %d)\n", texunit, target, internalformat, buffer ); ENTER_GL(); func_glMultiTexBufferEXT( texunit, target, internalformat, buffer ); @@ -5362,7 +6852,7 @@ static void WINAPI wine_glMultiTexBufferEXT( GLenum texunit, GLenum target, GLen } static void WINAPI wine_glMultiTexCoord1d( GLenum target, GLdouble s ) { - void (*func_glMultiTexCoord1d)( GLenum, GLdouble ) = extension_funcs[654]; + void (*func_glMultiTexCoord1d)( GLenum, GLdouble ) = extension_funcs[EXT_glMultiTexCoord1d]; TRACE("(%d, %f)\n", target, s ); ENTER_GL(); func_glMultiTexCoord1d( target, s ); @@ -5370,7 +6860,7 @@ static void WINAPI wine_glMultiTexCoord1d( GLenum target, GLdouble s ) { } static void WINAPI wine_glMultiTexCoord1dARB( GLenum target, GLdouble s ) { - void (*func_glMultiTexCoord1dARB)( GLenum, GLdouble ) = extension_funcs[655]; + void (*func_glMultiTexCoord1dARB)( GLenum, GLdouble ) = extension_funcs[EXT_glMultiTexCoord1dARB]; TRACE("(%d, %f)\n", target, s ); ENTER_GL(); func_glMultiTexCoord1dARB( target, s ); @@ -5378,7 +6868,7 @@ static void WINAPI wine_glMultiTexCoord1dARB( GLenum target, GLdouble s ) { } static void WINAPI wine_glMultiTexCoord1dSGIS( GLenum target, GLdouble s ) { - void (*func_glMultiTexCoord1dSGIS)( GLenum, GLdouble ) = extension_funcs[656]; + void (*func_glMultiTexCoord1dSGIS)( GLenum, GLdouble ) = extension_funcs[EXT_glMultiTexCoord1dSGIS]; TRACE("(%d, %f)\n", target, s ); ENTER_GL(); func_glMultiTexCoord1dSGIS( target, s ); @@ -5386,7 +6876,7 @@ static void WINAPI wine_glMultiTexCoord1dSGIS( GLenum target, GLdouble s ) { } static void WINAPI wine_glMultiTexCoord1dv( GLenum target, GLdouble* v ) { - void (*func_glMultiTexCoord1dv)( GLenum, GLdouble* ) = extension_funcs[657]; + void (*func_glMultiTexCoord1dv)( GLenum, GLdouble* ) = extension_funcs[EXT_glMultiTexCoord1dv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord1dv( target, v ); @@ -5394,7 +6884,7 @@ static void WINAPI wine_glMultiTexCoord1dv( GLenum target, GLdouble* v ) { } static void WINAPI wine_glMultiTexCoord1dvARB( GLenum target, GLdouble* v ) { - void (*func_glMultiTexCoord1dvARB)( GLenum, GLdouble* ) = extension_funcs[658]; + void (*func_glMultiTexCoord1dvARB)( GLenum, GLdouble* ) = extension_funcs[EXT_glMultiTexCoord1dvARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord1dvARB( target, v ); @@ -5402,7 +6892,7 @@ static void WINAPI wine_glMultiTexCoord1dvARB( GLenum target, GLdouble* v ) { } static void WINAPI wine_glMultiTexCoord1dvSGIS( GLenum target, GLdouble * v ) { - void (*func_glMultiTexCoord1dvSGIS)( GLenum, GLdouble * ) = extension_funcs[659]; + void (*func_glMultiTexCoord1dvSGIS)( GLenum, GLdouble * ) = extension_funcs[EXT_glMultiTexCoord1dvSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord1dvSGIS( target, v ); @@ -5410,7 +6900,7 @@ static void WINAPI wine_glMultiTexCoord1dvSGIS( GLenum target, GLdouble * v ) { } static void WINAPI wine_glMultiTexCoord1f( GLenum target, GLfloat s ) { - void (*func_glMultiTexCoord1f)( GLenum, GLfloat ) = extension_funcs[660]; + void (*func_glMultiTexCoord1f)( GLenum, GLfloat ) = extension_funcs[EXT_glMultiTexCoord1f]; TRACE("(%d, %f)\n", target, s ); ENTER_GL(); func_glMultiTexCoord1f( target, s ); @@ -5418,7 +6908,7 @@ static void WINAPI wine_glMultiTexCoord1f( GLenum target, GLfloat s ) { } static void WINAPI wine_glMultiTexCoord1fARB( GLenum target, GLfloat s ) { - void (*func_glMultiTexCoord1fARB)( GLenum, GLfloat ) = extension_funcs[661]; + void (*func_glMultiTexCoord1fARB)( GLenum, GLfloat ) = extension_funcs[EXT_glMultiTexCoord1fARB]; TRACE("(%d, %f)\n", target, s ); ENTER_GL(); func_glMultiTexCoord1fARB( target, s ); @@ -5426,7 +6916,7 @@ static void WINAPI wine_glMultiTexCoord1fARB( GLenum target, GLfloat s ) { } static void WINAPI wine_glMultiTexCoord1fSGIS( GLenum target, GLfloat s ) { - void (*func_glMultiTexCoord1fSGIS)( GLenum, GLfloat ) = extension_funcs[662]; + void (*func_glMultiTexCoord1fSGIS)( GLenum, GLfloat ) = extension_funcs[EXT_glMultiTexCoord1fSGIS]; TRACE("(%d, %f)\n", target, s ); ENTER_GL(); func_glMultiTexCoord1fSGIS( target, s ); @@ -5434,7 +6924,7 @@ static void WINAPI wine_glMultiTexCoord1fSGIS( GLenum target, GLfloat s ) { } static void WINAPI wine_glMultiTexCoord1fv( GLenum target, GLfloat* v ) { - void (*func_glMultiTexCoord1fv)( GLenum, GLfloat* ) = extension_funcs[663]; + void (*func_glMultiTexCoord1fv)( GLenum, GLfloat* ) = extension_funcs[EXT_glMultiTexCoord1fv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord1fv( target, v ); @@ -5442,7 +6932,7 @@ static void WINAPI wine_glMultiTexCoord1fv( GLenum target, GLfloat* v ) { } static void WINAPI wine_glMultiTexCoord1fvARB( GLenum target, GLfloat* v ) { - void (*func_glMultiTexCoord1fvARB)( GLenum, GLfloat* ) = extension_funcs[664]; + void (*func_glMultiTexCoord1fvARB)( GLenum, GLfloat* ) = extension_funcs[EXT_glMultiTexCoord1fvARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord1fvARB( target, v ); @@ -5450,7 +6940,7 @@ static void WINAPI wine_glMultiTexCoord1fvARB( GLenum target, GLfloat* v ) { } static void WINAPI wine_glMultiTexCoord1fvSGIS( GLenum target, const GLfloat * v ) { - void (*func_glMultiTexCoord1fvSGIS)( GLenum, const GLfloat * ) = extension_funcs[665]; + void (*func_glMultiTexCoord1fvSGIS)( GLenum, const GLfloat * ) = extension_funcs[EXT_glMultiTexCoord1fvSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord1fvSGIS( target, v ); @@ -5458,7 +6948,7 @@ static void WINAPI wine_glMultiTexCoord1fvSGIS( GLenum target, const GLfloat * v } static void WINAPI wine_glMultiTexCoord1hNV( GLenum target, unsigned short s ) { - void (*func_glMultiTexCoord1hNV)( GLenum, unsigned short ) = extension_funcs[666]; + void (*func_glMultiTexCoord1hNV)( GLenum, unsigned short ) = extension_funcs[EXT_glMultiTexCoord1hNV]; TRACE("(%d, %d)\n", target, s ); ENTER_GL(); func_glMultiTexCoord1hNV( target, s ); @@ -5466,7 +6956,7 @@ static void WINAPI wine_glMultiTexCoord1hNV( GLenum target, unsigned short s ) { } static void WINAPI wine_glMultiTexCoord1hvNV( GLenum target, unsigned short* v ) { - void (*func_glMultiTexCoord1hvNV)( GLenum, unsigned short* ) = extension_funcs[667]; + void (*func_glMultiTexCoord1hvNV)( GLenum, unsigned short* ) = extension_funcs[EXT_glMultiTexCoord1hvNV]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord1hvNV( target, v ); @@ -5474,7 +6964,7 @@ static void WINAPI wine_glMultiTexCoord1hvNV( GLenum target, unsigned short* v ) } static void WINAPI wine_glMultiTexCoord1i( GLenum target, GLint s ) { - void (*func_glMultiTexCoord1i)( GLenum, GLint ) = extension_funcs[668]; + void (*func_glMultiTexCoord1i)( GLenum, GLint ) = extension_funcs[EXT_glMultiTexCoord1i]; TRACE("(%d, %d)\n", target, s ); ENTER_GL(); func_glMultiTexCoord1i( target, s ); @@ -5482,7 +6972,7 @@ static void WINAPI wine_glMultiTexCoord1i( GLenum target, GLint s ) { } static void WINAPI wine_glMultiTexCoord1iARB( GLenum target, GLint s ) { - void (*func_glMultiTexCoord1iARB)( GLenum, GLint ) = extension_funcs[669]; + void (*func_glMultiTexCoord1iARB)( GLenum, GLint ) = extension_funcs[EXT_glMultiTexCoord1iARB]; TRACE("(%d, %d)\n", target, s ); ENTER_GL(); func_glMultiTexCoord1iARB( target, s ); @@ -5490,7 +6980,7 @@ static void WINAPI wine_glMultiTexCoord1iARB( GLenum target, GLint s ) { } static void WINAPI wine_glMultiTexCoord1iSGIS( GLenum target, GLint s ) { - void (*func_glMultiTexCoord1iSGIS)( GLenum, GLint ) = extension_funcs[670]; + void (*func_glMultiTexCoord1iSGIS)( GLenum, GLint ) = extension_funcs[EXT_glMultiTexCoord1iSGIS]; TRACE("(%d, %d)\n", target, s ); ENTER_GL(); func_glMultiTexCoord1iSGIS( target, s ); @@ -5498,7 +6988,7 @@ static void WINAPI wine_glMultiTexCoord1iSGIS( GLenum target, GLint s ) { } static void WINAPI wine_glMultiTexCoord1iv( GLenum target, GLint* v ) { - void (*func_glMultiTexCoord1iv)( GLenum, GLint* ) = extension_funcs[671]; + void (*func_glMultiTexCoord1iv)( GLenum, GLint* ) = extension_funcs[EXT_glMultiTexCoord1iv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord1iv( target, v ); @@ -5506,7 +6996,7 @@ static void WINAPI wine_glMultiTexCoord1iv( GLenum target, GLint* v ) { } static void WINAPI wine_glMultiTexCoord1ivARB( GLenum target, GLint* v ) { - void (*func_glMultiTexCoord1ivARB)( GLenum, GLint* ) = extension_funcs[672]; + void (*func_glMultiTexCoord1ivARB)( GLenum, GLint* ) = extension_funcs[EXT_glMultiTexCoord1ivARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord1ivARB( target, v ); @@ -5514,7 +7004,7 @@ static void WINAPI wine_glMultiTexCoord1ivARB( GLenum target, GLint* v ) { } static void WINAPI wine_glMultiTexCoord1ivSGIS( GLenum target, GLint * v ) { - void (*func_glMultiTexCoord1ivSGIS)( GLenum, GLint * ) = extension_funcs[673]; + void (*func_glMultiTexCoord1ivSGIS)( GLenum, GLint * ) = extension_funcs[EXT_glMultiTexCoord1ivSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord1ivSGIS( target, v ); @@ -5522,7 +7012,7 @@ static void WINAPI wine_glMultiTexCoord1ivSGIS( GLenum target, GLint * v ) { } static void WINAPI wine_glMultiTexCoord1s( GLenum target, GLshort s ) { - void (*func_glMultiTexCoord1s)( GLenum, GLshort ) = extension_funcs[674]; + void (*func_glMultiTexCoord1s)( GLenum, GLshort ) = extension_funcs[EXT_glMultiTexCoord1s]; TRACE("(%d, %d)\n", target, s ); ENTER_GL(); func_glMultiTexCoord1s( target, s ); @@ -5530,7 +7020,7 @@ static void WINAPI wine_glMultiTexCoord1s( GLenum target, GLshort s ) { } static void WINAPI wine_glMultiTexCoord1sARB( GLenum target, GLshort s ) { - void (*func_glMultiTexCoord1sARB)( GLenum, GLshort ) = extension_funcs[675]; + void (*func_glMultiTexCoord1sARB)( GLenum, GLshort ) = extension_funcs[EXT_glMultiTexCoord1sARB]; TRACE("(%d, %d)\n", target, s ); ENTER_GL(); func_glMultiTexCoord1sARB( target, s ); @@ -5538,7 +7028,7 @@ static void WINAPI wine_glMultiTexCoord1sARB( GLenum target, GLshort s ) { } static void WINAPI wine_glMultiTexCoord1sSGIS( GLenum target, GLshort s ) { - void (*func_glMultiTexCoord1sSGIS)( GLenum, GLshort ) = extension_funcs[676]; + void (*func_glMultiTexCoord1sSGIS)( GLenum, GLshort ) = extension_funcs[EXT_glMultiTexCoord1sSGIS]; TRACE("(%d, %d)\n", target, s ); ENTER_GL(); func_glMultiTexCoord1sSGIS( target, s ); @@ -5546,7 +7036,7 @@ static void WINAPI wine_glMultiTexCoord1sSGIS( GLenum target, GLshort s ) { } static void WINAPI wine_glMultiTexCoord1sv( GLenum target, GLshort* v ) { - void (*func_glMultiTexCoord1sv)( GLenum, GLshort* ) = extension_funcs[677]; + void (*func_glMultiTexCoord1sv)( GLenum, GLshort* ) = extension_funcs[EXT_glMultiTexCoord1sv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord1sv( target, v ); @@ -5554,7 +7044,7 @@ static void WINAPI wine_glMultiTexCoord1sv( GLenum target, GLshort* v ) { } static void WINAPI wine_glMultiTexCoord1svARB( GLenum target, GLshort* v ) { - void (*func_glMultiTexCoord1svARB)( GLenum, GLshort* ) = extension_funcs[678]; + void (*func_glMultiTexCoord1svARB)( GLenum, GLshort* ) = extension_funcs[EXT_glMultiTexCoord1svARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord1svARB( target, v ); @@ -5562,7 +7052,7 @@ static void WINAPI wine_glMultiTexCoord1svARB( GLenum target, GLshort* v ) { } static void WINAPI wine_glMultiTexCoord1svSGIS( GLenum target, GLshort * v ) { - void (*func_glMultiTexCoord1svSGIS)( GLenum, GLshort * ) = extension_funcs[679]; + void (*func_glMultiTexCoord1svSGIS)( GLenum, GLshort * ) = extension_funcs[EXT_glMultiTexCoord1svSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord1svSGIS( target, v ); @@ -5570,7 +7060,7 @@ static void WINAPI wine_glMultiTexCoord1svSGIS( GLenum target, GLshort * v ) { } static void WINAPI wine_glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t ) { - void (*func_glMultiTexCoord2d)( GLenum, GLdouble, GLdouble ) = extension_funcs[680]; + void (*func_glMultiTexCoord2d)( GLenum, GLdouble, GLdouble ) = extension_funcs[EXT_glMultiTexCoord2d]; TRACE("(%d, %f, %f)\n", target, s, t ); ENTER_GL(); func_glMultiTexCoord2d( target, s, t ); @@ -5578,7 +7068,7 @@ static void WINAPI wine_glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t } static void WINAPI wine_glMultiTexCoord2dARB( GLenum target, GLdouble s, GLdouble t ) { - void (*func_glMultiTexCoord2dARB)( GLenum, GLdouble, GLdouble ) = extension_funcs[681]; + void (*func_glMultiTexCoord2dARB)( GLenum, GLdouble, GLdouble ) = extension_funcs[EXT_glMultiTexCoord2dARB]; TRACE("(%d, %f, %f)\n", target, s, t ); ENTER_GL(); func_glMultiTexCoord2dARB( target, s, t ); @@ -5586,7 +7076,7 @@ static void WINAPI wine_glMultiTexCoord2dARB( GLenum target, GLdouble s, GLdoubl } static void WINAPI wine_glMultiTexCoord2dSGIS( GLenum target, GLdouble s, GLdouble t ) { - void (*func_glMultiTexCoord2dSGIS)( GLenum, GLdouble, GLdouble ) = extension_funcs[682]; + void (*func_glMultiTexCoord2dSGIS)( GLenum, GLdouble, GLdouble ) = extension_funcs[EXT_glMultiTexCoord2dSGIS]; TRACE("(%d, %f, %f)\n", target, s, t ); ENTER_GL(); func_glMultiTexCoord2dSGIS( target, s, t ); @@ -5594,7 +7084,7 @@ static void WINAPI wine_glMultiTexCoord2dSGIS( GLenum target, GLdouble s, GLdoub } static void WINAPI wine_glMultiTexCoord2dv( GLenum target, GLdouble* v ) { - void (*func_glMultiTexCoord2dv)( GLenum, GLdouble* ) = extension_funcs[683]; + void (*func_glMultiTexCoord2dv)( GLenum, GLdouble* ) = extension_funcs[EXT_glMultiTexCoord2dv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord2dv( target, v ); @@ -5602,7 +7092,7 @@ static void WINAPI wine_glMultiTexCoord2dv( GLenum target, GLdouble* v ) { } static void WINAPI wine_glMultiTexCoord2dvARB( GLenum target, GLdouble* v ) { - void (*func_glMultiTexCoord2dvARB)( GLenum, GLdouble* ) = extension_funcs[684]; + void (*func_glMultiTexCoord2dvARB)( GLenum, GLdouble* ) = extension_funcs[EXT_glMultiTexCoord2dvARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord2dvARB( target, v ); @@ -5610,7 +7100,7 @@ static void WINAPI wine_glMultiTexCoord2dvARB( GLenum target, GLdouble* v ) { } static void WINAPI wine_glMultiTexCoord2dvSGIS( GLenum target, GLdouble * v ) { - void (*func_glMultiTexCoord2dvSGIS)( GLenum, GLdouble * ) = extension_funcs[685]; + void (*func_glMultiTexCoord2dvSGIS)( GLenum, GLdouble * ) = extension_funcs[EXT_glMultiTexCoord2dvSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord2dvSGIS( target, v ); @@ -5618,7 +7108,7 @@ static void WINAPI wine_glMultiTexCoord2dvSGIS( GLenum target, GLdouble * v ) { } static void WINAPI wine_glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t ) { - void (*func_glMultiTexCoord2f)( GLenum, GLfloat, GLfloat ) = extension_funcs[686]; + void (*func_glMultiTexCoord2f)( GLenum, GLfloat, GLfloat ) = extension_funcs[EXT_glMultiTexCoord2f]; TRACE("(%d, %f, %f)\n", target, s, t ); ENTER_GL(); func_glMultiTexCoord2f( target, s, t ); @@ -5626,7 +7116,7 @@ static void WINAPI wine_glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t ) } static void WINAPI wine_glMultiTexCoord2fARB( GLenum target, GLfloat s, GLfloat t ) { - void (*func_glMultiTexCoord2fARB)( GLenum, GLfloat, GLfloat ) = extension_funcs[687]; + void (*func_glMultiTexCoord2fARB)( GLenum, GLfloat, GLfloat ) = extension_funcs[EXT_glMultiTexCoord2fARB]; TRACE("(%d, %f, %f)\n", target, s, t ); ENTER_GL(); func_glMultiTexCoord2fARB( target, s, t ); @@ -5634,7 +7124,7 @@ static void WINAPI wine_glMultiTexCoord2fARB( GLenum target, GLfloat s, GLfloat } static void WINAPI wine_glMultiTexCoord2fSGIS( GLenum target, GLfloat s, GLfloat t ) { - void (*func_glMultiTexCoord2fSGIS)( GLenum, GLfloat, GLfloat ) = extension_funcs[688]; + void (*func_glMultiTexCoord2fSGIS)( GLenum, GLfloat, GLfloat ) = extension_funcs[EXT_glMultiTexCoord2fSGIS]; TRACE("(%d, %f, %f)\n", target, s, t ); ENTER_GL(); func_glMultiTexCoord2fSGIS( target, s, t ); @@ -5642,7 +7132,7 @@ static void WINAPI wine_glMultiTexCoord2fSGIS( GLenum target, GLfloat s, GLfloat } static void WINAPI wine_glMultiTexCoord2fv( GLenum target, GLfloat* v ) { - void (*func_glMultiTexCoord2fv)( GLenum, GLfloat* ) = extension_funcs[689]; + void (*func_glMultiTexCoord2fv)( GLenum, GLfloat* ) = extension_funcs[EXT_glMultiTexCoord2fv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord2fv( target, v ); @@ -5650,7 +7140,7 @@ static void WINAPI wine_glMultiTexCoord2fv( GLenum target, GLfloat* v ) { } static void WINAPI wine_glMultiTexCoord2fvARB( GLenum target, GLfloat* v ) { - void (*func_glMultiTexCoord2fvARB)( GLenum, GLfloat* ) = extension_funcs[690]; + void (*func_glMultiTexCoord2fvARB)( GLenum, GLfloat* ) = extension_funcs[EXT_glMultiTexCoord2fvARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord2fvARB( target, v ); @@ -5658,7 +7148,7 @@ static void WINAPI wine_glMultiTexCoord2fvARB( GLenum target, GLfloat* v ) { } static void WINAPI wine_glMultiTexCoord2fvSGIS( GLenum target, GLfloat * v ) { - void (*func_glMultiTexCoord2fvSGIS)( GLenum, GLfloat * ) = extension_funcs[691]; + void (*func_glMultiTexCoord2fvSGIS)( GLenum, GLfloat * ) = extension_funcs[EXT_glMultiTexCoord2fvSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord2fvSGIS( target, v ); @@ -5666,7 +7156,7 @@ static void WINAPI wine_glMultiTexCoord2fvSGIS( GLenum target, GLfloat * v ) { } static void WINAPI wine_glMultiTexCoord2hNV( GLenum target, unsigned short s, unsigned short t ) { - void (*func_glMultiTexCoord2hNV)( GLenum, unsigned short, unsigned short ) = extension_funcs[692]; + void (*func_glMultiTexCoord2hNV)( GLenum, unsigned short, unsigned short ) = extension_funcs[EXT_glMultiTexCoord2hNV]; TRACE("(%d, %d, %d)\n", target, s, t ); ENTER_GL(); func_glMultiTexCoord2hNV( target, s, t ); @@ -5674,7 +7164,7 @@ static void WINAPI wine_glMultiTexCoord2hNV( GLenum target, unsigned short s, un } static void WINAPI wine_glMultiTexCoord2hvNV( GLenum target, unsigned short* v ) { - void (*func_glMultiTexCoord2hvNV)( GLenum, unsigned short* ) = extension_funcs[693]; + void (*func_glMultiTexCoord2hvNV)( GLenum, unsigned short* ) = extension_funcs[EXT_glMultiTexCoord2hvNV]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord2hvNV( target, v ); @@ -5682,7 +7172,7 @@ static void WINAPI wine_glMultiTexCoord2hvNV( GLenum target, unsigned short* v ) } static void WINAPI wine_glMultiTexCoord2i( GLenum target, GLint s, GLint t ) { - void (*func_glMultiTexCoord2i)( GLenum, GLint, GLint ) = extension_funcs[694]; + void (*func_glMultiTexCoord2i)( GLenum, GLint, GLint ) = extension_funcs[EXT_glMultiTexCoord2i]; TRACE("(%d, %d, %d)\n", target, s, t ); ENTER_GL(); func_glMultiTexCoord2i( target, s, t ); @@ -5690,7 +7180,7 @@ static void WINAPI wine_glMultiTexCoord2i( GLenum target, GLint s, GLint t ) { } static void WINAPI wine_glMultiTexCoord2iARB( GLenum target, GLint s, GLint t ) { - void (*func_glMultiTexCoord2iARB)( GLenum, GLint, GLint ) = extension_funcs[695]; + void (*func_glMultiTexCoord2iARB)( GLenum, GLint, GLint ) = extension_funcs[EXT_glMultiTexCoord2iARB]; TRACE("(%d, %d, %d)\n", target, s, t ); ENTER_GL(); func_glMultiTexCoord2iARB( target, s, t ); @@ -5698,7 +7188,7 @@ static void WINAPI wine_glMultiTexCoord2iARB( GLenum target, GLint s, GLint t ) } static void WINAPI wine_glMultiTexCoord2iSGIS( GLenum target, GLint s, GLint t ) { - void (*func_glMultiTexCoord2iSGIS)( GLenum, GLint, GLint ) = extension_funcs[696]; + void (*func_glMultiTexCoord2iSGIS)( GLenum, GLint, GLint ) = extension_funcs[EXT_glMultiTexCoord2iSGIS]; TRACE("(%d, %d, %d)\n", target, s, t ); ENTER_GL(); func_glMultiTexCoord2iSGIS( target, s, t ); @@ -5706,7 +7196,7 @@ static void WINAPI wine_glMultiTexCoord2iSGIS( GLenum target, GLint s, GLint t ) } static void WINAPI wine_glMultiTexCoord2iv( GLenum target, GLint* v ) { - void (*func_glMultiTexCoord2iv)( GLenum, GLint* ) = extension_funcs[697]; + void (*func_glMultiTexCoord2iv)( GLenum, GLint* ) = extension_funcs[EXT_glMultiTexCoord2iv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord2iv( target, v ); @@ -5714,7 +7204,7 @@ static void WINAPI wine_glMultiTexCoord2iv( GLenum target, GLint* v ) { } static void WINAPI wine_glMultiTexCoord2ivARB( GLenum target, GLint* v ) { - void (*func_glMultiTexCoord2ivARB)( GLenum, GLint* ) = extension_funcs[698]; + void (*func_glMultiTexCoord2ivARB)( GLenum, GLint* ) = extension_funcs[EXT_glMultiTexCoord2ivARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord2ivARB( target, v ); @@ -5722,7 +7212,7 @@ static void WINAPI wine_glMultiTexCoord2ivARB( GLenum target, GLint* v ) { } static void WINAPI wine_glMultiTexCoord2ivSGIS( GLenum target, GLint * v ) { - void (*func_glMultiTexCoord2ivSGIS)( GLenum, GLint * ) = extension_funcs[699]; + void (*func_glMultiTexCoord2ivSGIS)( GLenum, GLint * ) = extension_funcs[EXT_glMultiTexCoord2ivSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord2ivSGIS( target, v ); @@ -5730,7 +7220,7 @@ static void WINAPI wine_glMultiTexCoord2ivSGIS( GLenum target, GLint * v ) { } static void WINAPI wine_glMultiTexCoord2s( GLenum target, GLshort s, GLshort t ) { - void (*func_glMultiTexCoord2s)( GLenum, GLshort, GLshort ) = extension_funcs[700]; + void (*func_glMultiTexCoord2s)( GLenum, GLshort, GLshort ) = extension_funcs[EXT_glMultiTexCoord2s]; TRACE("(%d, %d, %d)\n", target, s, t ); ENTER_GL(); func_glMultiTexCoord2s( target, s, t ); @@ -5738,7 +7228,7 @@ static void WINAPI wine_glMultiTexCoord2s( GLenum target, GLshort s, GLshort t ) } static void WINAPI wine_glMultiTexCoord2sARB( GLenum target, GLshort s, GLshort t ) { - void (*func_glMultiTexCoord2sARB)( GLenum, GLshort, GLshort ) = extension_funcs[701]; + void (*func_glMultiTexCoord2sARB)( GLenum, GLshort, GLshort ) = extension_funcs[EXT_glMultiTexCoord2sARB]; TRACE("(%d, %d, %d)\n", target, s, t ); ENTER_GL(); func_glMultiTexCoord2sARB( target, s, t ); @@ -5746,7 +7236,7 @@ static void WINAPI wine_glMultiTexCoord2sARB( GLenum target, GLshort s, GLshort } static void WINAPI wine_glMultiTexCoord2sSGIS( GLenum target, GLshort s, GLshort t ) { - void (*func_glMultiTexCoord2sSGIS)( GLenum, GLshort, GLshort ) = extension_funcs[702]; + void (*func_glMultiTexCoord2sSGIS)( GLenum, GLshort, GLshort ) = extension_funcs[EXT_glMultiTexCoord2sSGIS]; TRACE("(%d, %d, %d)\n", target, s, t ); ENTER_GL(); func_glMultiTexCoord2sSGIS( target, s, t ); @@ -5754,7 +7244,7 @@ static void WINAPI wine_glMultiTexCoord2sSGIS( GLenum target, GLshort s, GLshort } static void WINAPI wine_glMultiTexCoord2sv( GLenum target, GLshort* v ) { - void (*func_glMultiTexCoord2sv)( GLenum, GLshort* ) = extension_funcs[703]; + void (*func_glMultiTexCoord2sv)( GLenum, GLshort* ) = extension_funcs[EXT_glMultiTexCoord2sv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord2sv( target, v ); @@ -5762,7 +7252,7 @@ static void WINAPI wine_glMultiTexCoord2sv( GLenum target, GLshort* v ) { } static void WINAPI wine_glMultiTexCoord2svARB( GLenum target, GLshort* v ) { - void (*func_glMultiTexCoord2svARB)( GLenum, GLshort* ) = extension_funcs[704]; + void (*func_glMultiTexCoord2svARB)( GLenum, GLshort* ) = extension_funcs[EXT_glMultiTexCoord2svARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord2svARB( target, v ); @@ -5770,7 +7260,7 @@ static void WINAPI wine_glMultiTexCoord2svARB( GLenum target, GLshort* v ) { } static void WINAPI wine_glMultiTexCoord2svSGIS( GLenum target, GLshort * v ) { - void (*func_glMultiTexCoord2svSGIS)( GLenum, GLshort * ) = extension_funcs[705]; + void (*func_glMultiTexCoord2svSGIS)( GLenum, GLshort * ) = extension_funcs[EXT_glMultiTexCoord2svSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord2svSGIS( target, v ); @@ -5778,7 +7268,7 @@ static void WINAPI wine_glMultiTexCoord2svSGIS( GLenum target, GLshort * v ) { } static void WINAPI wine_glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r ) { - void (*func_glMultiTexCoord3d)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[706]; + void (*func_glMultiTexCoord3d)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glMultiTexCoord3d]; TRACE("(%d, %f, %f, %f)\n", target, s, t, r ); ENTER_GL(); func_glMultiTexCoord3d( target, s, t, r ); @@ -5786,7 +7276,7 @@ static void WINAPI wine_glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t } static void WINAPI wine_glMultiTexCoord3dARB( GLenum target, GLdouble s, GLdouble t, GLdouble r ) { - void (*func_glMultiTexCoord3dARB)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[707]; + void (*func_glMultiTexCoord3dARB)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glMultiTexCoord3dARB]; TRACE("(%d, %f, %f, %f)\n", target, s, t, r ); ENTER_GL(); func_glMultiTexCoord3dARB( target, s, t, r ); @@ -5794,7 +7284,7 @@ static void WINAPI wine_glMultiTexCoord3dARB( GLenum target, GLdouble s, GLdoubl } static void WINAPI wine_glMultiTexCoord3dSGIS( GLenum target, GLdouble s, GLdouble t, GLdouble r ) { - void (*func_glMultiTexCoord3dSGIS)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[708]; + void (*func_glMultiTexCoord3dSGIS)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glMultiTexCoord3dSGIS]; TRACE("(%d, %f, %f, %f)\n", target, s, t, r ); ENTER_GL(); func_glMultiTexCoord3dSGIS( target, s, t, r ); @@ -5802,7 +7292,7 @@ static void WINAPI wine_glMultiTexCoord3dSGIS( GLenum target, GLdouble s, GLdoub } static void WINAPI wine_glMultiTexCoord3dv( GLenum target, GLdouble* v ) { - void (*func_glMultiTexCoord3dv)( GLenum, GLdouble* ) = extension_funcs[709]; + void (*func_glMultiTexCoord3dv)( GLenum, GLdouble* ) = extension_funcs[EXT_glMultiTexCoord3dv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord3dv( target, v ); @@ -5810,7 +7300,7 @@ static void WINAPI wine_glMultiTexCoord3dv( GLenum target, GLdouble* v ) { } static void WINAPI wine_glMultiTexCoord3dvARB( GLenum target, GLdouble* v ) { - void (*func_glMultiTexCoord3dvARB)( GLenum, GLdouble* ) = extension_funcs[710]; + void (*func_glMultiTexCoord3dvARB)( GLenum, GLdouble* ) = extension_funcs[EXT_glMultiTexCoord3dvARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord3dvARB( target, v ); @@ -5818,7 +7308,7 @@ static void WINAPI wine_glMultiTexCoord3dvARB( GLenum target, GLdouble* v ) { } static void WINAPI wine_glMultiTexCoord3dvSGIS( GLenum target, GLdouble * v ) { - void (*func_glMultiTexCoord3dvSGIS)( GLenum, GLdouble * ) = extension_funcs[711]; + void (*func_glMultiTexCoord3dvSGIS)( GLenum, GLdouble * ) = extension_funcs[EXT_glMultiTexCoord3dvSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord3dvSGIS( target, v ); @@ -5826,7 +7316,7 @@ static void WINAPI wine_glMultiTexCoord3dvSGIS( GLenum target, GLdouble * v ) { } static void WINAPI wine_glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r ) { - void (*func_glMultiTexCoord3f)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[712]; + void (*func_glMultiTexCoord3f)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glMultiTexCoord3f]; TRACE("(%d, %f, %f, %f)\n", target, s, t, r ); ENTER_GL(); func_glMultiTexCoord3f( target, s, t, r ); @@ -5834,7 +7324,7 @@ static void WINAPI wine_glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, } static void WINAPI wine_glMultiTexCoord3fARB( GLenum target, GLfloat s, GLfloat t, GLfloat r ) { - void (*func_glMultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[713]; + void (*func_glMultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glMultiTexCoord3fARB]; TRACE("(%d, %f, %f, %f)\n", target, s, t, r ); ENTER_GL(); func_glMultiTexCoord3fARB( target, s, t, r ); @@ -5842,7 +7332,7 @@ static void WINAPI wine_glMultiTexCoord3fARB( GLenum target, GLfloat s, GLfloat } static void WINAPI wine_glMultiTexCoord3fSGIS( GLenum target, GLfloat s, GLfloat t, GLfloat r ) { - void (*func_glMultiTexCoord3fSGIS)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[714]; + void (*func_glMultiTexCoord3fSGIS)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glMultiTexCoord3fSGIS]; TRACE("(%d, %f, %f, %f)\n", target, s, t, r ); ENTER_GL(); func_glMultiTexCoord3fSGIS( target, s, t, r ); @@ -5850,7 +7340,7 @@ static void WINAPI wine_glMultiTexCoord3fSGIS( GLenum target, GLfloat s, GLfloat } static void WINAPI wine_glMultiTexCoord3fv( GLenum target, GLfloat* v ) { - void (*func_glMultiTexCoord3fv)( GLenum, GLfloat* ) = extension_funcs[715]; + void (*func_glMultiTexCoord3fv)( GLenum, GLfloat* ) = extension_funcs[EXT_glMultiTexCoord3fv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord3fv( target, v ); @@ -5858,7 +7348,7 @@ static void WINAPI wine_glMultiTexCoord3fv( GLenum target, GLfloat* v ) { } static void WINAPI wine_glMultiTexCoord3fvARB( GLenum target, GLfloat* v ) { - void (*func_glMultiTexCoord3fvARB)( GLenum, GLfloat* ) = extension_funcs[716]; + void (*func_glMultiTexCoord3fvARB)( GLenum, GLfloat* ) = extension_funcs[EXT_glMultiTexCoord3fvARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord3fvARB( target, v ); @@ -5866,7 +7356,7 @@ static void WINAPI wine_glMultiTexCoord3fvARB( GLenum target, GLfloat* v ) { } static void WINAPI wine_glMultiTexCoord3fvSGIS( GLenum target, GLfloat * v ) { - void (*func_glMultiTexCoord3fvSGIS)( GLenum, GLfloat * ) = extension_funcs[717]; + void (*func_glMultiTexCoord3fvSGIS)( GLenum, GLfloat * ) = extension_funcs[EXT_glMultiTexCoord3fvSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord3fvSGIS( target, v ); @@ -5874,7 +7364,7 @@ static void WINAPI wine_glMultiTexCoord3fvSGIS( GLenum target, GLfloat * v ) { } static void WINAPI wine_glMultiTexCoord3hNV( GLenum target, unsigned short s, unsigned short t, unsigned short r ) { - void (*func_glMultiTexCoord3hNV)( GLenum, unsigned short, unsigned short, unsigned short ) = extension_funcs[718]; + void (*func_glMultiTexCoord3hNV)( GLenum, unsigned short, unsigned short, unsigned short ) = extension_funcs[EXT_glMultiTexCoord3hNV]; TRACE("(%d, %d, %d, %d)\n", target, s, t, r ); ENTER_GL(); func_glMultiTexCoord3hNV( target, s, t, r ); @@ -5882,7 +7372,7 @@ static void WINAPI wine_glMultiTexCoord3hNV( GLenum target, unsigned short s, un } static void WINAPI wine_glMultiTexCoord3hvNV( GLenum target, unsigned short* v ) { - void (*func_glMultiTexCoord3hvNV)( GLenum, unsigned short* ) = extension_funcs[719]; + void (*func_glMultiTexCoord3hvNV)( GLenum, unsigned short* ) = extension_funcs[EXT_glMultiTexCoord3hvNV]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord3hvNV( target, v ); @@ -5890,7 +7380,7 @@ static void WINAPI wine_glMultiTexCoord3hvNV( GLenum target, unsigned short* v ) } static void WINAPI wine_glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r ) { - void (*func_glMultiTexCoord3i)( GLenum, GLint, GLint, GLint ) = extension_funcs[720]; + void (*func_glMultiTexCoord3i)( GLenum, GLint, GLint, GLint ) = extension_funcs[EXT_glMultiTexCoord3i]; TRACE("(%d, %d, %d, %d)\n", target, s, t, r ); ENTER_GL(); func_glMultiTexCoord3i( target, s, t, r ); @@ -5898,7 +7388,7 @@ static void WINAPI wine_glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLin } static void WINAPI wine_glMultiTexCoord3iARB( GLenum target, GLint s, GLint t, GLint r ) { - void (*func_glMultiTexCoord3iARB)( GLenum, GLint, GLint, GLint ) = extension_funcs[721]; + void (*func_glMultiTexCoord3iARB)( GLenum, GLint, GLint, GLint ) = extension_funcs[EXT_glMultiTexCoord3iARB]; TRACE("(%d, %d, %d, %d)\n", target, s, t, r ); ENTER_GL(); func_glMultiTexCoord3iARB( target, s, t, r ); @@ -5906,7 +7396,7 @@ static void WINAPI wine_glMultiTexCoord3iARB( GLenum target, GLint s, GLint t, G } static void WINAPI wine_glMultiTexCoord3iSGIS( GLenum target, GLint s, GLint t, GLint r ) { - void (*func_glMultiTexCoord3iSGIS)( GLenum, GLint, GLint, GLint ) = extension_funcs[722]; + void (*func_glMultiTexCoord3iSGIS)( GLenum, GLint, GLint, GLint ) = extension_funcs[EXT_glMultiTexCoord3iSGIS]; TRACE("(%d, %d, %d, %d)\n", target, s, t, r ); ENTER_GL(); func_glMultiTexCoord3iSGIS( target, s, t, r ); @@ -5914,7 +7404,7 @@ static void WINAPI wine_glMultiTexCoord3iSGIS( GLenum target, GLint s, GLint t, } static void WINAPI wine_glMultiTexCoord3iv( GLenum target, GLint* v ) { - void (*func_glMultiTexCoord3iv)( GLenum, GLint* ) = extension_funcs[723]; + void (*func_glMultiTexCoord3iv)( GLenum, GLint* ) = extension_funcs[EXT_glMultiTexCoord3iv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord3iv( target, v ); @@ -5922,7 +7412,7 @@ static void WINAPI wine_glMultiTexCoord3iv( GLenum target, GLint* v ) { } static void WINAPI wine_glMultiTexCoord3ivARB( GLenum target, GLint* v ) { - void (*func_glMultiTexCoord3ivARB)( GLenum, GLint* ) = extension_funcs[724]; + void (*func_glMultiTexCoord3ivARB)( GLenum, GLint* ) = extension_funcs[EXT_glMultiTexCoord3ivARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord3ivARB( target, v ); @@ -5930,7 +7420,7 @@ static void WINAPI wine_glMultiTexCoord3ivARB( GLenum target, GLint* v ) { } static void WINAPI wine_glMultiTexCoord3ivSGIS( GLenum target, GLint * v ) { - void (*func_glMultiTexCoord3ivSGIS)( GLenum, GLint * ) = extension_funcs[725]; + void (*func_glMultiTexCoord3ivSGIS)( GLenum, GLint * ) = extension_funcs[EXT_glMultiTexCoord3ivSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord3ivSGIS( target, v ); @@ -5938,7 +7428,7 @@ static void WINAPI wine_glMultiTexCoord3ivSGIS( GLenum target, GLint * v ) { } static void WINAPI wine_glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r ) { - void (*func_glMultiTexCoord3s)( GLenum, GLshort, GLshort, GLshort ) = extension_funcs[726]; + void (*func_glMultiTexCoord3s)( GLenum, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glMultiTexCoord3s]; TRACE("(%d, %d, %d, %d)\n", target, s, t, r ); ENTER_GL(); func_glMultiTexCoord3s( target, s, t, r ); @@ -5946,7 +7436,7 @@ static void WINAPI wine_glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, } static void WINAPI wine_glMultiTexCoord3sARB( GLenum target, GLshort s, GLshort t, GLshort r ) { - void (*func_glMultiTexCoord3sARB)( GLenum, GLshort, GLshort, GLshort ) = extension_funcs[727]; + void (*func_glMultiTexCoord3sARB)( GLenum, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glMultiTexCoord3sARB]; TRACE("(%d, %d, %d, %d)\n", target, s, t, r ); ENTER_GL(); func_glMultiTexCoord3sARB( target, s, t, r ); @@ -5954,7 +7444,7 @@ static void WINAPI wine_glMultiTexCoord3sARB( GLenum target, GLshort s, GLshort } static void WINAPI wine_glMultiTexCoord3sSGIS( GLenum target, GLshort s, GLshort t, GLshort r ) { - void (*func_glMultiTexCoord3sSGIS)( GLenum, GLshort, GLshort, GLshort ) = extension_funcs[728]; + void (*func_glMultiTexCoord3sSGIS)( GLenum, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glMultiTexCoord3sSGIS]; TRACE("(%d, %d, %d, %d)\n", target, s, t, r ); ENTER_GL(); func_glMultiTexCoord3sSGIS( target, s, t, r ); @@ -5962,7 +7452,7 @@ static void WINAPI wine_glMultiTexCoord3sSGIS( GLenum target, GLshort s, GLshort } static void WINAPI wine_glMultiTexCoord3sv( GLenum target, GLshort* v ) { - void (*func_glMultiTexCoord3sv)( GLenum, GLshort* ) = extension_funcs[729]; + void (*func_glMultiTexCoord3sv)( GLenum, GLshort* ) = extension_funcs[EXT_glMultiTexCoord3sv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord3sv( target, v ); @@ -5970,7 +7460,7 @@ static void WINAPI wine_glMultiTexCoord3sv( GLenum target, GLshort* v ) { } static void WINAPI wine_glMultiTexCoord3svARB( GLenum target, GLshort* v ) { - void (*func_glMultiTexCoord3svARB)( GLenum, GLshort* ) = extension_funcs[730]; + void (*func_glMultiTexCoord3svARB)( GLenum, GLshort* ) = extension_funcs[EXT_glMultiTexCoord3svARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord3svARB( target, v ); @@ -5978,7 +7468,7 @@ static void WINAPI wine_glMultiTexCoord3svARB( GLenum target, GLshort* v ) { } static void WINAPI wine_glMultiTexCoord3svSGIS( GLenum target, GLshort * v ) { - void (*func_glMultiTexCoord3svSGIS)( GLenum, GLshort * ) = extension_funcs[731]; + void (*func_glMultiTexCoord3svSGIS)( GLenum, GLshort * ) = extension_funcs[EXT_glMultiTexCoord3svSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord3svSGIS( target, v ); @@ -5986,7 +7476,7 @@ static void WINAPI wine_glMultiTexCoord3svSGIS( GLenum target, GLshort * v ) { } static void WINAPI wine_glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ) { - void (*func_glMultiTexCoord4d)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[732]; + void (*func_glMultiTexCoord4d)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glMultiTexCoord4d]; TRACE("(%d, %f, %f, %f, %f)\n", target, s, t, r, q ); ENTER_GL(); func_glMultiTexCoord4d( target, s, t, r, q ); @@ -5994,7 +7484,7 @@ static void WINAPI wine_glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t } static void WINAPI wine_glMultiTexCoord4dARB( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ) { - void (*func_glMultiTexCoord4dARB)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[733]; + void (*func_glMultiTexCoord4dARB)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glMultiTexCoord4dARB]; TRACE("(%d, %f, %f, %f, %f)\n", target, s, t, r, q ); ENTER_GL(); func_glMultiTexCoord4dARB( target, s, t, r, q ); @@ -6002,7 +7492,7 @@ static void WINAPI wine_glMultiTexCoord4dARB( GLenum target, GLdouble s, GLdoubl } static void WINAPI wine_glMultiTexCoord4dSGIS( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ) { - void (*func_glMultiTexCoord4dSGIS)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[734]; + void (*func_glMultiTexCoord4dSGIS)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glMultiTexCoord4dSGIS]; TRACE("(%d, %f, %f, %f, %f)\n", target, s, t, r, q ); ENTER_GL(); func_glMultiTexCoord4dSGIS( target, s, t, r, q ); @@ -6010,7 +7500,7 @@ static void WINAPI wine_glMultiTexCoord4dSGIS( GLenum target, GLdouble s, GLdoub } static void WINAPI wine_glMultiTexCoord4dv( GLenum target, GLdouble* v ) { - void (*func_glMultiTexCoord4dv)( GLenum, GLdouble* ) = extension_funcs[735]; + void (*func_glMultiTexCoord4dv)( GLenum, GLdouble* ) = extension_funcs[EXT_glMultiTexCoord4dv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord4dv( target, v ); @@ -6018,7 +7508,7 @@ static void WINAPI wine_glMultiTexCoord4dv( GLenum target, GLdouble* v ) { } static void WINAPI wine_glMultiTexCoord4dvARB( GLenum target, GLdouble* v ) { - void (*func_glMultiTexCoord4dvARB)( GLenum, GLdouble* ) = extension_funcs[736]; + void (*func_glMultiTexCoord4dvARB)( GLenum, GLdouble* ) = extension_funcs[EXT_glMultiTexCoord4dvARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord4dvARB( target, v ); @@ -6026,7 +7516,7 @@ static void WINAPI wine_glMultiTexCoord4dvARB( GLenum target, GLdouble* v ) { } static void WINAPI wine_glMultiTexCoord4dvSGIS( GLenum target, GLdouble * v ) { - void (*func_glMultiTexCoord4dvSGIS)( GLenum, GLdouble * ) = extension_funcs[737]; + void (*func_glMultiTexCoord4dvSGIS)( GLenum, GLdouble * ) = extension_funcs[EXT_glMultiTexCoord4dvSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord4dvSGIS( target, v ); @@ -6034,7 +7524,7 @@ static void WINAPI wine_glMultiTexCoord4dvSGIS( GLenum target, GLdouble * v ) { } static void WINAPI wine_glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ) { - void (*func_glMultiTexCoord4f)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[738]; + void (*func_glMultiTexCoord4f)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glMultiTexCoord4f]; TRACE("(%d, %f, %f, %f, %f)\n", target, s, t, r, q ); ENTER_GL(); func_glMultiTexCoord4f( target, s, t, r, q ); @@ -6042,7 +7532,7 @@ static void WINAPI wine_glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, } static void WINAPI wine_glMultiTexCoord4fARB( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ) { - void (*func_glMultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[739]; + void (*func_glMultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glMultiTexCoord4fARB]; TRACE("(%d, %f, %f, %f, %f)\n", target, s, t, r, q ); ENTER_GL(); func_glMultiTexCoord4fARB( target, s, t, r, q ); @@ -6050,7 +7540,7 @@ static void WINAPI wine_glMultiTexCoord4fARB( GLenum target, GLfloat s, GLfloat } static void WINAPI wine_glMultiTexCoord4fSGIS( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ) { - void (*func_glMultiTexCoord4fSGIS)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[740]; + void (*func_glMultiTexCoord4fSGIS)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glMultiTexCoord4fSGIS]; TRACE("(%d, %f, %f, %f, %f)\n", target, s, t, r, q ); ENTER_GL(); func_glMultiTexCoord4fSGIS( target, s, t, r, q ); @@ -6058,7 +7548,7 @@ static void WINAPI wine_glMultiTexCoord4fSGIS( GLenum target, GLfloat s, GLfloat } static void WINAPI wine_glMultiTexCoord4fv( GLenum target, GLfloat* v ) { - void (*func_glMultiTexCoord4fv)( GLenum, GLfloat* ) = extension_funcs[741]; + void (*func_glMultiTexCoord4fv)( GLenum, GLfloat* ) = extension_funcs[EXT_glMultiTexCoord4fv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord4fv( target, v ); @@ -6066,7 +7556,7 @@ static void WINAPI wine_glMultiTexCoord4fv( GLenum target, GLfloat* v ) { } static void WINAPI wine_glMultiTexCoord4fvARB( GLenum target, GLfloat* v ) { - void (*func_glMultiTexCoord4fvARB)( GLenum, GLfloat* ) = extension_funcs[742]; + void (*func_glMultiTexCoord4fvARB)( GLenum, GLfloat* ) = extension_funcs[EXT_glMultiTexCoord4fvARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord4fvARB( target, v ); @@ -6074,7 +7564,7 @@ static void WINAPI wine_glMultiTexCoord4fvARB( GLenum target, GLfloat* v ) { } static void WINAPI wine_glMultiTexCoord4fvSGIS( GLenum target, GLfloat * v ) { - void (*func_glMultiTexCoord4fvSGIS)( GLenum, GLfloat * ) = extension_funcs[743]; + void (*func_glMultiTexCoord4fvSGIS)( GLenum, GLfloat * ) = extension_funcs[EXT_glMultiTexCoord4fvSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord4fvSGIS( target, v ); @@ -6082,7 +7572,7 @@ static void WINAPI wine_glMultiTexCoord4fvSGIS( GLenum target, GLfloat * v ) { } static void WINAPI wine_glMultiTexCoord4hNV( GLenum target, unsigned short s, unsigned short t, unsigned short r, unsigned short q ) { - void (*func_glMultiTexCoord4hNV)( GLenum, unsigned short, unsigned short, unsigned short, unsigned short ) = extension_funcs[744]; + void (*func_glMultiTexCoord4hNV)( GLenum, unsigned short, unsigned short, unsigned short, unsigned short ) = extension_funcs[EXT_glMultiTexCoord4hNV]; TRACE("(%d, %d, %d, %d, %d)\n", target, s, t, r, q ); ENTER_GL(); func_glMultiTexCoord4hNV( target, s, t, r, q ); @@ -6090,7 +7580,7 @@ static void WINAPI wine_glMultiTexCoord4hNV( GLenum target, unsigned short s, un } static void WINAPI wine_glMultiTexCoord4hvNV( GLenum target, unsigned short* v ) { - void (*func_glMultiTexCoord4hvNV)( GLenum, unsigned short* ) = extension_funcs[745]; + void (*func_glMultiTexCoord4hvNV)( GLenum, unsigned short* ) = extension_funcs[EXT_glMultiTexCoord4hvNV]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord4hvNV( target, v ); @@ -6098,7 +7588,7 @@ static void WINAPI wine_glMultiTexCoord4hvNV( GLenum target, unsigned short* v ) } static void WINAPI wine_glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q ) { - void (*func_glMultiTexCoord4i)( GLenum, GLint, GLint, GLint, GLint ) = extension_funcs[746]; + void (*func_glMultiTexCoord4i)( GLenum, GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glMultiTexCoord4i]; TRACE("(%d, %d, %d, %d, %d)\n", target, s, t, r, q ); ENTER_GL(); func_glMultiTexCoord4i( target, s, t, r, q ); @@ -6106,7 +7596,7 @@ static void WINAPI wine_glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLin } static void WINAPI wine_glMultiTexCoord4iARB( GLenum target, GLint s, GLint t, GLint r, GLint q ) { - void (*func_glMultiTexCoord4iARB)( GLenum, GLint, GLint, GLint, GLint ) = extension_funcs[747]; + void (*func_glMultiTexCoord4iARB)( GLenum, GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glMultiTexCoord4iARB]; TRACE("(%d, %d, %d, %d, %d)\n", target, s, t, r, q ); ENTER_GL(); func_glMultiTexCoord4iARB( target, s, t, r, q ); @@ -6114,7 +7604,7 @@ static void WINAPI wine_glMultiTexCoord4iARB( GLenum target, GLint s, GLint t, G } static void WINAPI wine_glMultiTexCoord4iSGIS( GLenum target, GLint s, GLint t, GLint r, GLint q ) { - void (*func_glMultiTexCoord4iSGIS)( GLenum, GLint, GLint, GLint, GLint ) = extension_funcs[748]; + void (*func_glMultiTexCoord4iSGIS)( GLenum, GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glMultiTexCoord4iSGIS]; TRACE("(%d, %d, %d, %d, %d)\n", target, s, t, r, q ); ENTER_GL(); func_glMultiTexCoord4iSGIS( target, s, t, r, q ); @@ -6122,7 +7612,7 @@ static void WINAPI wine_glMultiTexCoord4iSGIS( GLenum target, GLint s, GLint t, } static void WINAPI wine_glMultiTexCoord4iv( GLenum target, GLint* v ) { - void (*func_glMultiTexCoord4iv)( GLenum, GLint* ) = extension_funcs[749]; + void (*func_glMultiTexCoord4iv)( GLenum, GLint* ) = extension_funcs[EXT_glMultiTexCoord4iv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord4iv( target, v ); @@ -6130,7 +7620,7 @@ static void WINAPI wine_glMultiTexCoord4iv( GLenum target, GLint* v ) { } static void WINAPI wine_glMultiTexCoord4ivARB( GLenum target, GLint* v ) { - void (*func_glMultiTexCoord4ivARB)( GLenum, GLint* ) = extension_funcs[750]; + void (*func_glMultiTexCoord4ivARB)( GLenum, GLint* ) = extension_funcs[EXT_glMultiTexCoord4ivARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord4ivARB( target, v ); @@ -6138,7 +7628,7 @@ static void WINAPI wine_glMultiTexCoord4ivARB( GLenum target, GLint* v ) { } static void WINAPI wine_glMultiTexCoord4ivSGIS( GLenum target, GLint * v ) { - void (*func_glMultiTexCoord4ivSGIS)( GLenum, GLint * ) = extension_funcs[751]; + void (*func_glMultiTexCoord4ivSGIS)( GLenum, GLint * ) = extension_funcs[EXT_glMultiTexCoord4ivSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord4ivSGIS( target, v ); @@ -6146,7 +7636,7 @@ static void WINAPI wine_glMultiTexCoord4ivSGIS( GLenum target, GLint * v ) { } static void WINAPI wine_glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ) { - void (*func_glMultiTexCoord4s)( GLenum, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[752]; + void (*func_glMultiTexCoord4s)( GLenum, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glMultiTexCoord4s]; TRACE("(%d, %d, %d, %d, %d)\n", target, s, t, r, q ); ENTER_GL(); func_glMultiTexCoord4s( target, s, t, r, q ); @@ -6154,7 +7644,7 @@ static void WINAPI wine_glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, } static void WINAPI wine_glMultiTexCoord4sARB( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ) { - void (*func_glMultiTexCoord4sARB)( GLenum, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[753]; + void (*func_glMultiTexCoord4sARB)( GLenum, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glMultiTexCoord4sARB]; TRACE("(%d, %d, %d, %d, %d)\n", target, s, t, r, q ); ENTER_GL(); func_glMultiTexCoord4sARB( target, s, t, r, q ); @@ -6162,7 +7652,7 @@ static void WINAPI wine_glMultiTexCoord4sARB( GLenum target, GLshort s, GLshort } static void WINAPI wine_glMultiTexCoord4sSGIS( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ) { - void (*func_glMultiTexCoord4sSGIS)( GLenum, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[754]; + void (*func_glMultiTexCoord4sSGIS)( GLenum, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glMultiTexCoord4sSGIS]; TRACE("(%d, %d, %d, %d, %d)\n", target, s, t, r, q ); ENTER_GL(); func_glMultiTexCoord4sSGIS( target, s, t, r, q ); @@ -6170,7 +7660,7 @@ static void WINAPI wine_glMultiTexCoord4sSGIS( GLenum target, GLshort s, GLshort } static void WINAPI wine_glMultiTexCoord4sv( GLenum target, GLshort* v ) { - void (*func_glMultiTexCoord4sv)( GLenum, GLshort* ) = extension_funcs[755]; + void (*func_glMultiTexCoord4sv)( GLenum, GLshort* ) = extension_funcs[EXT_glMultiTexCoord4sv]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord4sv( target, v ); @@ -6178,7 +7668,7 @@ static void WINAPI wine_glMultiTexCoord4sv( GLenum target, GLshort* v ) { } static void WINAPI wine_glMultiTexCoord4svARB( GLenum target, GLshort* v ) { - void (*func_glMultiTexCoord4svARB)( GLenum, GLshort* ) = extension_funcs[756]; + void (*func_glMultiTexCoord4svARB)( GLenum, GLshort* ) = extension_funcs[EXT_glMultiTexCoord4svARB]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord4svARB( target, v ); @@ -6186,7 +7676,7 @@ static void WINAPI wine_glMultiTexCoord4svARB( GLenum target, GLshort* v ) { } static void WINAPI wine_glMultiTexCoord4svSGIS( GLenum target, GLshort * v ) { - void (*func_glMultiTexCoord4svSGIS)( GLenum, GLshort * ) = extension_funcs[757]; + void (*func_glMultiTexCoord4svSGIS)( GLenum, GLshort * ) = extension_funcs[EXT_glMultiTexCoord4svSGIS]; TRACE("(%d, %p)\n", target, v ); ENTER_GL(); func_glMultiTexCoord4svSGIS( target, v ); @@ -6194,7 +7684,7 @@ static void WINAPI wine_glMultiTexCoord4svSGIS( GLenum target, GLshort * v ) { } static void WINAPI wine_glMultiTexCoordPointerEXT( GLenum texunit, GLint size, GLenum type, GLsizei stride, GLvoid* pointer ) { - void (*func_glMultiTexCoordPointerEXT)( GLenum, GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[758]; + void (*func_glMultiTexCoordPointerEXT)( GLenum, GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glMultiTexCoordPointerEXT]; TRACE("(%d, %d, %d, %d, %p)\n", texunit, size, type, stride, pointer ); ENTER_GL(); func_glMultiTexCoordPointerEXT( texunit, size, type, stride, pointer ); @@ -6202,7 +7692,7 @@ static void WINAPI wine_glMultiTexCoordPointerEXT( GLenum texunit, GLint size, G } static void WINAPI wine_glMultiTexCoordPointerSGIS( GLenum target, GLint size, GLenum type, GLsizei stride, GLvoid * pointer ) { - void (*func_glMultiTexCoordPointerSGIS)( GLenum, GLint, GLenum, GLsizei, GLvoid * ) = extension_funcs[759]; + void (*func_glMultiTexCoordPointerSGIS)( GLenum, GLint, GLenum, GLsizei, GLvoid * ) = extension_funcs[EXT_glMultiTexCoordPointerSGIS]; TRACE("(%d, %d, %d, %d, %p)\n", target, size, type, stride, pointer ); ENTER_GL(); func_glMultiTexCoordPointerSGIS( target, size, type, stride, pointer ); @@ -6210,7 +7700,7 @@ static void WINAPI wine_glMultiTexCoordPointerSGIS( GLenum target, GLint size, G } static void WINAPI wine_glMultiTexEnvfEXT( GLenum texunit, GLenum target, GLenum pname, GLfloat param ) { - void (*func_glMultiTexEnvfEXT)( GLenum, GLenum, GLenum, GLfloat ) = extension_funcs[760]; + void (*func_glMultiTexEnvfEXT)( GLenum, GLenum, GLenum, GLfloat ) = extension_funcs[EXT_glMultiTexEnvfEXT]; TRACE("(%d, %d, %d, %f)\n", texunit, target, pname, param ); ENTER_GL(); func_glMultiTexEnvfEXT( texunit, target, pname, param ); @@ -6218,7 +7708,7 @@ static void WINAPI wine_glMultiTexEnvfEXT( GLenum texunit, GLenum target, GLenum } static void WINAPI wine_glMultiTexEnvfvEXT( GLenum texunit, GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glMultiTexEnvfvEXT)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[761]; + void (*func_glMultiTexEnvfvEXT)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glMultiTexEnvfvEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, target, pname, params ); ENTER_GL(); func_glMultiTexEnvfvEXT( texunit, target, pname, params ); @@ -6226,7 +7716,7 @@ static void WINAPI wine_glMultiTexEnvfvEXT( GLenum texunit, GLenum target, GLenu } static void WINAPI wine_glMultiTexEnviEXT( GLenum texunit, GLenum target, GLenum pname, GLint param ) { - void (*func_glMultiTexEnviEXT)( GLenum, GLenum, GLenum, GLint ) = extension_funcs[762]; + void (*func_glMultiTexEnviEXT)( GLenum, GLenum, GLenum, GLint ) = extension_funcs[EXT_glMultiTexEnviEXT]; TRACE("(%d, %d, %d, %d)\n", texunit, target, pname, param ); ENTER_GL(); func_glMultiTexEnviEXT( texunit, target, pname, param ); @@ -6234,7 +7724,7 @@ static void WINAPI wine_glMultiTexEnviEXT( GLenum texunit, GLenum target, GLenum } static void WINAPI wine_glMultiTexEnvivEXT( GLenum texunit, GLenum target, GLenum pname, GLint* params ) { - void (*func_glMultiTexEnvivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[763]; + void (*func_glMultiTexEnvivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glMultiTexEnvivEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, target, pname, params ); ENTER_GL(); func_glMultiTexEnvivEXT( texunit, target, pname, params ); @@ -6242,7 +7732,7 @@ static void WINAPI wine_glMultiTexEnvivEXT( GLenum texunit, GLenum target, GLenu } static void WINAPI wine_glMultiTexGendEXT( GLenum texunit, GLenum coord, GLenum pname, GLdouble param ) { - void (*func_glMultiTexGendEXT)( GLenum, GLenum, GLenum, GLdouble ) = extension_funcs[764]; + void (*func_glMultiTexGendEXT)( GLenum, GLenum, GLenum, GLdouble ) = extension_funcs[EXT_glMultiTexGendEXT]; TRACE("(%d, %d, %d, %f)\n", texunit, coord, pname, param ); ENTER_GL(); func_glMultiTexGendEXT( texunit, coord, pname, param ); @@ -6250,7 +7740,7 @@ static void WINAPI wine_glMultiTexGendEXT( GLenum texunit, GLenum coord, GLenum } static void WINAPI wine_glMultiTexGendvEXT( GLenum texunit, GLenum coord, GLenum pname, GLdouble* params ) { - void (*func_glMultiTexGendvEXT)( GLenum, GLenum, GLenum, GLdouble* ) = extension_funcs[765]; + void (*func_glMultiTexGendvEXT)( GLenum, GLenum, GLenum, GLdouble* ) = extension_funcs[EXT_glMultiTexGendvEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, coord, pname, params ); ENTER_GL(); func_glMultiTexGendvEXT( texunit, coord, pname, params ); @@ -6258,7 +7748,7 @@ static void WINAPI wine_glMultiTexGendvEXT( GLenum texunit, GLenum coord, GLenum } static void WINAPI wine_glMultiTexGenfEXT( GLenum texunit, GLenum coord, GLenum pname, GLfloat param ) { - void (*func_glMultiTexGenfEXT)( GLenum, GLenum, GLenum, GLfloat ) = extension_funcs[766]; + void (*func_glMultiTexGenfEXT)( GLenum, GLenum, GLenum, GLfloat ) = extension_funcs[EXT_glMultiTexGenfEXT]; TRACE("(%d, %d, %d, %f)\n", texunit, coord, pname, param ); ENTER_GL(); func_glMultiTexGenfEXT( texunit, coord, pname, param ); @@ -6266,7 +7756,7 @@ static void WINAPI wine_glMultiTexGenfEXT( GLenum texunit, GLenum coord, GLenum } static void WINAPI wine_glMultiTexGenfvEXT( GLenum texunit, GLenum coord, GLenum pname, GLfloat* params ) { - void (*func_glMultiTexGenfvEXT)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[767]; + void (*func_glMultiTexGenfvEXT)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glMultiTexGenfvEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, coord, pname, params ); ENTER_GL(); func_glMultiTexGenfvEXT( texunit, coord, pname, params ); @@ -6274,7 +7764,7 @@ static void WINAPI wine_glMultiTexGenfvEXT( GLenum texunit, GLenum coord, GLenum } static void WINAPI wine_glMultiTexGeniEXT( GLenum texunit, GLenum coord, GLenum pname, GLint param ) { - void (*func_glMultiTexGeniEXT)( GLenum, GLenum, GLenum, GLint ) = extension_funcs[768]; + void (*func_glMultiTexGeniEXT)( GLenum, GLenum, GLenum, GLint ) = extension_funcs[EXT_glMultiTexGeniEXT]; TRACE("(%d, %d, %d, %d)\n", texunit, coord, pname, param ); ENTER_GL(); func_glMultiTexGeniEXT( texunit, coord, pname, param ); @@ -6282,7 +7772,7 @@ static void WINAPI wine_glMultiTexGeniEXT( GLenum texunit, GLenum coord, GLenum } static void WINAPI wine_glMultiTexGenivEXT( GLenum texunit, GLenum coord, GLenum pname, GLint* params ) { - void (*func_glMultiTexGenivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[769]; + void (*func_glMultiTexGenivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glMultiTexGenivEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, coord, pname, params ); ENTER_GL(); func_glMultiTexGenivEXT( texunit, coord, pname, params ); @@ -6290,7 +7780,7 @@ static void WINAPI wine_glMultiTexGenivEXT( GLenum texunit, GLenum coord, GLenum } static void WINAPI wine_glMultiTexImage1DEXT( GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glMultiTexImage1DEXT)( GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[770]; + void (*func_glMultiTexImage1DEXT)( GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glMultiTexImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texunit, target, level, internalformat, width, border, format, type, pixels ); ENTER_GL(); func_glMultiTexImage1DEXT( texunit, target, level, internalformat, width, border, format, type, pixels ); @@ -6298,7 +7788,7 @@ static void WINAPI wine_glMultiTexImage1DEXT( GLenum texunit, GLenum target, GLi } static void WINAPI wine_glMultiTexImage2DEXT( GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glMultiTexImage2DEXT)( GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[771]; + void (*func_glMultiTexImage2DEXT)( GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glMultiTexImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texunit, target, level, internalformat, width, height, border, format, type, pixels ); ENTER_GL(); func_glMultiTexImage2DEXT( texunit, target, level, internalformat, width, height, border, format, type, pixels ); @@ -6306,7 +7796,7 @@ static void WINAPI wine_glMultiTexImage2DEXT( GLenum texunit, GLenum target, GLi } static void WINAPI wine_glMultiTexImage3DEXT( GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glMultiTexImage3DEXT)( GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[772]; + void (*func_glMultiTexImage3DEXT)( GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glMultiTexImage3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texunit, target, level, internalformat, width, height, depth, border, format, type, pixels ); ENTER_GL(); func_glMultiTexImage3DEXT( texunit, target, level, internalformat, width, height, depth, border, format, type, pixels ); @@ -6314,7 +7804,7 @@ static void WINAPI wine_glMultiTexImage3DEXT( GLenum texunit, GLenum target, GLi } static void WINAPI wine_glMultiTexParameterIivEXT( GLenum texunit, GLenum target, GLenum pname, GLint* params ) { - void (*func_glMultiTexParameterIivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[773]; + void (*func_glMultiTexParameterIivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glMultiTexParameterIivEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, target, pname, params ); ENTER_GL(); func_glMultiTexParameterIivEXT( texunit, target, pname, params ); @@ -6322,7 +7812,7 @@ static void WINAPI wine_glMultiTexParameterIivEXT( GLenum texunit, GLenum target } static void WINAPI wine_glMultiTexParameterIuivEXT( GLenum texunit, GLenum target, GLenum pname, GLuint* params ) { - void (*func_glMultiTexParameterIuivEXT)( GLenum, GLenum, GLenum, GLuint* ) = extension_funcs[774]; + void (*func_glMultiTexParameterIuivEXT)( GLenum, GLenum, GLenum, GLuint* ) = extension_funcs[EXT_glMultiTexParameterIuivEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, target, pname, params ); ENTER_GL(); func_glMultiTexParameterIuivEXT( texunit, target, pname, params ); @@ -6330,7 +7820,7 @@ static void WINAPI wine_glMultiTexParameterIuivEXT( GLenum texunit, GLenum targe } static void WINAPI wine_glMultiTexParameterfEXT( GLenum texunit, GLenum target, GLenum pname, GLfloat param ) { - void (*func_glMultiTexParameterfEXT)( GLenum, GLenum, GLenum, GLfloat ) = extension_funcs[775]; + void (*func_glMultiTexParameterfEXT)( GLenum, GLenum, GLenum, GLfloat ) = extension_funcs[EXT_glMultiTexParameterfEXT]; TRACE("(%d, %d, %d, %f)\n", texunit, target, pname, param ); ENTER_GL(); func_glMultiTexParameterfEXT( texunit, target, pname, param ); @@ -6338,7 +7828,7 @@ static void WINAPI wine_glMultiTexParameterfEXT( GLenum texunit, GLenum target, } static void WINAPI wine_glMultiTexParameterfvEXT( GLenum texunit, GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glMultiTexParameterfvEXT)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[776]; + void (*func_glMultiTexParameterfvEXT)( GLenum, GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glMultiTexParameterfvEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, target, pname, params ); ENTER_GL(); func_glMultiTexParameterfvEXT( texunit, target, pname, params ); @@ -6346,7 +7836,7 @@ static void WINAPI wine_glMultiTexParameterfvEXT( GLenum texunit, GLenum target, } static void WINAPI wine_glMultiTexParameteriEXT( GLenum texunit, GLenum target, GLenum pname, GLint param ) { - void (*func_glMultiTexParameteriEXT)( GLenum, GLenum, GLenum, GLint ) = extension_funcs[777]; + void (*func_glMultiTexParameteriEXT)( GLenum, GLenum, GLenum, GLint ) = extension_funcs[EXT_glMultiTexParameteriEXT]; TRACE("(%d, %d, %d, %d)\n", texunit, target, pname, param ); ENTER_GL(); func_glMultiTexParameteriEXT( texunit, target, pname, param ); @@ -6354,7 +7844,7 @@ static void WINAPI wine_glMultiTexParameteriEXT( GLenum texunit, GLenum target, } static void WINAPI wine_glMultiTexParameterivEXT( GLenum texunit, GLenum target, GLenum pname, GLint* params ) { - void (*func_glMultiTexParameterivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[778]; + void (*func_glMultiTexParameterivEXT)( GLenum, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glMultiTexParameterivEXT]; TRACE("(%d, %d, %d, %p)\n", texunit, target, pname, params ); ENTER_GL(); func_glMultiTexParameterivEXT( texunit, target, pname, params ); @@ -6362,7 +7852,7 @@ static void WINAPI wine_glMultiTexParameterivEXT( GLenum texunit, GLenum target, } static void WINAPI wine_glMultiTexRenderbufferEXT( GLenum texunit, GLenum target, GLuint renderbuffer ) { - void (*func_glMultiTexRenderbufferEXT)( GLenum, GLenum, GLuint ) = extension_funcs[779]; + void (*func_glMultiTexRenderbufferEXT)( GLenum, GLenum, GLuint ) = extension_funcs[EXT_glMultiTexRenderbufferEXT]; TRACE("(%d, %d, %d)\n", texunit, target, renderbuffer ); ENTER_GL(); func_glMultiTexRenderbufferEXT( texunit, target, renderbuffer ); @@ -6370,7 +7860,7 @@ static void WINAPI wine_glMultiTexRenderbufferEXT( GLenum texunit, GLenum target } static void WINAPI wine_glMultiTexSubImage1DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glMultiTexSubImage1DEXT)( GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[780]; + void (*func_glMultiTexSubImage1DEXT)( GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glMultiTexSubImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %p)\n", texunit, target, level, xoffset, width, format, type, pixels ); ENTER_GL(); func_glMultiTexSubImage1DEXT( texunit, target, level, xoffset, width, format, type, pixels ); @@ -6378,7 +7868,7 @@ static void WINAPI wine_glMultiTexSubImage1DEXT( GLenum texunit, GLenum target, } static void WINAPI wine_glMultiTexSubImage2DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glMultiTexSubImage2DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[781]; + void (*func_glMultiTexSubImage2DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glMultiTexSubImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texunit, target, level, xoffset, yoffset, width, height, format, type, pixels ); ENTER_GL(); func_glMultiTexSubImage2DEXT( texunit, target, level, xoffset, yoffset, width, height, format, type, pixels ); @@ -6386,7 +7876,7 @@ static void WINAPI wine_glMultiTexSubImage2DEXT( GLenum texunit, GLenum target, } static void WINAPI wine_glMultiTexSubImage3DEXT( GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glMultiTexSubImage3DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[782]; + void (*func_glMultiTexSubImage3DEXT)( GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glMultiTexSubImage3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels ); ENTER_GL(); func_glMultiTexSubImage3DEXT( texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels ); @@ -6394,7 +7884,7 @@ static void WINAPI wine_glMultiTexSubImage3DEXT( GLenum texunit, GLenum target, } static void WINAPI wine_glNamedBufferDataEXT( GLuint buffer, ptrdiff_t size, GLvoid* data, GLenum usage ) { - void (*func_glNamedBufferDataEXT)( GLuint, ptrdiff_t, GLvoid*, GLenum ) = extension_funcs[783]; + void (*func_glNamedBufferDataEXT)( GLuint, ptrdiff_t, GLvoid*, GLenum ) = extension_funcs[EXT_glNamedBufferDataEXT]; TRACE("(%d, %d, %p, %d)\n", buffer, size, data, usage ); ENTER_GL(); func_glNamedBufferDataEXT( buffer, size, data, usage ); @@ -6402,7 +7892,7 @@ static void WINAPI wine_glNamedBufferDataEXT( GLuint buffer, ptrdiff_t size, GLv } static void WINAPI wine_glNamedBufferSubDataEXT( GLuint buffer, ptrdiff_t offset, ptrdiff_t size, GLvoid* data ) { - void (*func_glNamedBufferSubDataEXT)( GLuint, ptrdiff_t, ptrdiff_t, GLvoid* ) = extension_funcs[784]; + void (*func_glNamedBufferSubDataEXT)( GLuint, ptrdiff_t, ptrdiff_t, GLvoid* ) = extension_funcs[EXT_glNamedBufferSubDataEXT]; TRACE("(%d, %d, %d, %p)\n", buffer, offset, size, data ); ENTER_GL(); func_glNamedBufferSubDataEXT( buffer, offset, size, data ); @@ -6410,7 +7900,7 @@ static void WINAPI wine_glNamedBufferSubDataEXT( GLuint buffer, ptrdiff_t offset } static void WINAPI wine_glNamedFramebufferRenderbufferEXT( GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) { - void (*func_glNamedFramebufferRenderbufferEXT)( GLuint, GLenum, GLenum, GLuint ) = extension_funcs[785]; + void (*func_glNamedFramebufferRenderbufferEXT)( GLuint, GLenum, GLenum, GLuint ) = extension_funcs[EXT_glNamedFramebufferRenderbufferEXT]; TRACE("(%d, %d, %d, %d)\n", framebuffer, attachment, renderbuffertarget, renderbuffer ); ENTER_GL(); func_glNamedFramebufferRenderbufferEXT( framebuffer, attachment, renderbuffertarget, renderbuffer ); @@ -6418,7 +7908,7 @@ static void WINAPI wine_glNamedFramebufferRenderbufferEXT( GLuint framebuffer, G } static void WINAPI wine_glNamedFramebufferTexture1DEXT( GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) { - void (*func_glNamedFramebufferTexture1DEXT)( GLuint, GLenum, GLenum, GLuint, GLint ) = extension_funcs[786]; + void (*func_glNamedFramebufferTexture1DEXT)( GLuint, GLenum, GLenum, GLuint, GLint ) = extension_funcs[EXT_glNamedFramebufferTexture1DEXT]; TRACE("(%d, %d, %d, %d, %d)\n", framebuffer, attachment, textarget, texture, level ); ENTER_GL(); func_glNamedFramebufferTexture1DEXT( framebuffer, attachment, textarget, texture, level ); @@ -6426,7 +7916,7 @@ static void WINAPI wine_glNamedFramebufferTexture1DEXT( GLuint framebuffer, GLen } static void WINAPI wine_glNamedFramebufferTexture2DEXT( GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) { - void (*func_glNamedFramebufferTexture2DEXT)( GLuint, GLenum, GLenum, GLuint, GLint ) = extension_funcs[787]; + void (*func_glNamedFramebufferTexture2DEXT)( GLuint, GLenum, GLenum, GLuint, GLint ) = extension_funcs[EXT_glNamedFramebufferTexture2DEXT]; TRACE("(%d, %d, %d, %d, %d)\n", framebuffer, attachment, textarget, texture, level ); ENTER_GL(); func_glNamedFramebufferTexture2DEXT( framebuffer, attachment, textarget, texture, level ); @@ -6434,7 +7924,7 @@ static void WINAPI wine_glNamedFramebufferTexture2DEXT( GLuint framebuffer, GLen } static void WINAPI wine_glNamedFramebufferTexture3DEXT( GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset ) { - void (*func_glNamedFramebufferTexture3DEXT)( GLuint, GLenum, GLenum, GLuint, GLint, GLint ) = extension_funcs[788]; + void (*func_glNamedFramebufferTexture3DEXT)( GLuint, GLenum, GLenum, GLuint, GLint, GLint ) = extension_funcs[EXT_glNamedFramebufferTexture3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d)\n", framebuffer, attachment, textarget, texture, level, zoffset ); ENTER_GL(); func_glNamedFramebufferTexture3DEXT( framebuffer, attachment, textarget, texture, level, zoffset ); @@ -6442,7 +7932,7 @@ static void WINAPI wine_glNamedFramebufferTexture3DEXT( GLuint framebuffer, GLen } static void WINAPI wine_glNamedFramebufferTextureEXT( GLuint framebuffer, GLenum attachment, GLuint texture, GLint level ) { - void (*func_glNamedFramebufferTextureEXT)( GLuint, GLenum, GLuint, GLint ) = extension_funcs[789]; + void (*func_glNamedFramebufferTextureEXT)( GLuint, GLenum, GLuint, GLint ) = extension_funcs[EXT_glNamedFramebufferTextureEXT]; TRACE("(%d, %d, %d, %d)\n", framebuffer, attachment, texture, level ); ENTER_GL(); func_glNamedFramebufferTextureEXT( framebuffer, attachment, texture, level ); @@ -6450,7 +7940,7 @@ static void WINAPI wine_glNamedFramebufferTextureEXT( GLuint framebuffer, GLenum } static void WINAPI wine_glNamedFramebufferTextureFaceEXT( GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face ) { - void (*func_glNamedFramebufferTextureFaceEXT)( GLuint, GLenum, GLuint, GLint, GLenum ) = extension_funcs[790]; + void (*func_glNamedFramebufferTextureFaceEXT)( GLuint, GLenum, GLuint, GLint, GLenum ) = extension_funcs[EXT_glNamedFramebufferTextureFaceEXT]; TRACE("(%d, %d, %d, %d, %d)\n", framebuffer, attachment, texture, level, face ); ENTER_GL(); func_glNamedFramebufferTextureFaceEXT( framebuffer, attachment, texture, level, face ); @@ -6458,7 +7948,7 @@ static void WINAPI wine_glNamedFramebufferTextureFaceEXT( GLuint framebuffer, GL } static void WINAPI wine_glNamedFramebufferTextureLayerEXT( GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer ) { - void (*func_glNamedFramebufferTextureLayerEXT)( GLuint, GLenum, GLuint, GLint, GLint ) = extension_funcs[791]; + void (*func_glNamedFramebufferTextureLayerEXT)( GLuint, GLenum, GLuint, GLint, GLint ) = extension_funcs[EXT_glNamedFramebufferTextureLayerEXT]; TRACE("(%d, %d, %d, %d, %d)\n", framebuffer, attachment, texture, level, layer ); ENTER_GL(); func_glNamedFramebufferTextureLayerEXT( framebuffer, attachment, texture, level, layer ); @@ -6466,7 +7956,7 @@ static void WINAPI wine_glNamedFramebufferTextureLayerEXT( GLuint framebuffer, G } static void WINAPI wine_glNamedProgramLocalParameter4dEXT( GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { - void (*func_glNamedProgramLocalParameter4dEXT)( GLuint, GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[792]; + void (*func_glNamedProgramLocalParameter4dEXT)( GLuint, GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glNamedProgramLocalParameter4dEXT]; TRACE("(%d, %d, %d, %f, %f, %f, %f)\n", program, target, index, x, y, z, w ); ENTER_GL(); func_glNamedProgramLocalParameter4dEXT( program, target, index, x, y, z, w ); @@ -6474,7 +7964,7 @@ static void WINAPI wine_glNamedProgramLocalParameter4dEXT( GLuint program, GLenu } static void WINAPI wine_glNamedProgramLocalParameter4dvEXT( GLuint program, GLenum target, GLuint index, GLdouble* params ) { - void (*func_glNamedProgramLocalParameter4dvEXT)( GLuint, GLenum, GLuint, GLdouble* ) = extension_funcs[793]; + void (*func_glNamedProgramLocalParameter4dvEXT)( GLuint, GLenum, GLuint, GLdouble* ) = extension_funcs[EXT_glNamedProgramLocalParameter4dvEXT]; TRACE("(%d, %d, %d, %p)\n", program, target, index, params ); ENTER_GL(); func_glNamedProgramLocalParameter4dvEXT( program, target, index, params ); @@ -6482,7 +7972,7 @@ static void WINAPI wine_glNamedProgramLocalParameter4dvEXT( GLuint program, GLen } static void WINAPI wine_glNamedProgramLocalParameter4fEXT( GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - void (*func_glNamedProgramLocalParameter4fEXT)( GLuint, GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[794]; + void (*func_glNamedProgramLocalParameter4fEXT)( GLuint, GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glNamedProgramLocalParameter4fEXT]; TRACE("(%d, %d, %d, %f, %f, %f, %f)\n", program, target, index, x, y, z, w ); ENTER_GL(); func_glNamedProgramLocalParameter4fEXT( program, target, index, x, y, z, w ); @@ -6490,7 +7980,7 @@ static void WINAPI wine_glNamedProgramLocalParameter4fEXT( GLuint program, GLenu } static void WINAPI wine_glNamedProgramLocalParameter4fvEXT( GLuint program, GLenum target, GLuint index, GLfloat* params ) { - void (*func_glNamedProgramLocalParameter4fvEXT)( GLuint, GLenum, GLuint, GLfloat* ) = extension_funcs[795]; + void (*func_glNamedProgramLocalParameter4fvEXT)( GLuint, GLenum, GLuint, GLfloat* ) = extension_funcs[EXT_glNamedProgramLocalParameter4fvEXT]; TRACE("(%d, %d, %d, %p)\n", program, target, index, params ); ENTER_GL(); func_glNamedProgramLocalParameter4fvEXT( program, target, index, params ); @@ -6498,7 +7988,7 @@ static void WINAPI wine_glNamedProgramLocalParameter4fvEXT( GLuint program, GLen } static void WINAPI wine_glNamedProgramLocalParameterI4iEXT( GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w ) { - void (*func_glNamedProgramLocalParameterI4iEXT)( GLuint, GLenum, GLuint, GLint, GLint, GLint, GLint ) = extension_funcs[796]; + void (*func_glNamedProgramLocalParameterI4iEXT)( GLuint, GLenum, GLuint, GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glNamedProgramLocalParameterI4iEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d)\n", program, target, index, x, y, z, w ); ENTER_GL(); func_glNamedProgramLocalParameterI4iEXT( program, target, index, x, y, z, w ); @@ -6506,7 +7996,7 @@ static void WINAPI wine_glNamedProgramLocalParameterI4iEXT( GLuint program, GLen } static void WINAPI wine_glNamedProgramLocalParameterI4ivEXT( GLuint program, GLenum target, GLuint index, GLint* params ) { - void (*func_glNamedProgramLocalParameterI4ivEXT)( GLuint, GLenum, GLuint, GLint* ) = extension_funcs[797]; + void (*func_glNamedProgramLocalParameterI4ivEXT)( GLuint, GLenum, GLuint, GLint* ) = extension_funcs[EXT_glNamedProgramLocalParameterI4ivEXT]; TRACE("(%d, %d, %d, %p)\n", program, target, index, params ); ENTER_GL(); func_glNamedProgramLocalParameterI4ivEXT( program, target, index, params ); @@ -6514,7 +8004,7 @@ static void WINAPI wine_glNamedProgramLocalParameterI4ivEXT( GLuint program, GLe } static void WINAPI wine_glNamedProgramLocalParameterI4uiEXT( GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) { - void (*func_glNamedProgramLocalParameterI4uiEXT)( GLuint, GLenum, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[798]; + void (*func_glNamedProgramLocalParameterI4uiEXT)( GLuint, GLenum, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glNamedProgramLocalParameterI4uiEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d)\n", program, target, index, x, y, z, w ); ENTER_GL(); func_glNamedProgramLocalParameterI4uiEXT( program, target, index, x, y, z, w ); @@ -6522,7 +8012,7 @@ static void WINAPI wine_glNamedProgramLocalParameterI4uiEXT( GLuint program, GLe } static void WINAPI wine_glNamedProgramLocalParameterI4uivEXT( GLuint program, GLenum target, GLuint index, GLuint* params ) { - void (*func_glNamedProgramLocalParameterI4uivEXT)( GLuint, GLenum, GLuint, GLuint* ) = extension_funcs[799]; + void (*func_glNamedProgramLocalParameterI4uivEXT)( GLuint, GLenum, GLuint, GLuint* ) = extension_funcs[EXT_glNamedProgramLocalParameterI4uivEXT]; TRACE("(%d, %d, %d, %p)\n", program, target, index, params ); ENTER_GL(); func_glNamedProgramLocalParameterI4uivEXT( program, target, index, params ); @@ -6530,7 +8020,7 @@ static void WINAPI wine_glNamedProgramLocalParameterI4uivEXT( GLuint program, GL } static void WINAPI wine_glNamedProgramLocalParameters4fvEXT( GLuint program, GLenum target, GLuint index, GLsizei count, GLfloat* params ) { - void (*func_glNamedProgramLocalParameters4fvEXT)( GLuint, GLenum, GLuint, GLsizei, GLfloat* ) = extension_funcs[800]; + void (*func_glNamedProgramLocalParameters4fvEXT)( GLuint, GLenum, GLuint, GLsizei, GLfloat* ) = extension_funcs[EXT_glNamedProgramLocalParameters4fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, target, index, count, params ); ENTER_GL(); func_glNamedProgramLocalParameters4fvEXT( program, target, index, count, params ); @@ -6538,7 +8028,7 @@ static void WINAPI wine_glNamedProgramLocalParameters4fvEXT( GLuint program, GLe } static void WINAPI wine_glNamedProgramLocalParametersI4ivEXT( GLuint program, GLenum target, GLuint index, GLsizei count, GLint* params ) { - void (*func_glNamedProgramLocalParametersI4ivEXT)( GLuint, GLenum, GLuint, GLsizei, GLint* ) = extension_funcs[801]; + void (*func_glNamedProgramLocalParametersI4ivEXT)( GLuint, GLenum, GLuint, GLsizei, GLint* ) = extension_funcs[EXT_glNamedProgramLocalParametersI4ivEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, target, index, count, params ); ENTER_GL(); func_glNamedProgramLocalParametersI4ivEXT( program, target, index, count, params ); @@ -6546,7 +8036,7 @@ static void WINAPI wine_glNamedProgramLocalParametersI4ivEXT( GLuint program, GL } static void WINAPI wine_glNamedProgramLocalParametersI4uivEXT( GLuint program, GLenum target, GLuint index, GLsizei count, GLuint* params ) { - void (*func_glNamedProgramLocalParametersI4uivEXT)( GLuint, GLenum, GLuint, GLsizei, GLuint* ) = extension_funcs[802]; + void (*func_glNamedProgramLocalParametersI4uivEXT)( GLuint, GLenum, GLuint, GLsizei, GLuint* ) = extension_funcs[EXT_glNamedProgramLocalParametersI4uivEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, target, index, count, params ); ENTER_GL(); func_glNamedProgramLocalParametersI4uivEXT( program, target, index, count, params ); @@ -6554,7 +8044,7 @@ static void WINAPI wine_glNamedProgramLocalParametersI4uivEXT( GLuint program, G } static void WINAPI wine_glNamedProgramStringEXT( GLuint program, GLenum target, GLenum format, GLsizei len, GLvoid* string ) { - void (*func_glNamedProgramStringEXT)( GLuint, GLenum, GLenum, GLsizei, GLvoid* ) = extension_funcs[803]; + void (*func_glNamedProgramStringEXT)( GLuint, GLenum, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glNamedProgramStringEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, target, format, len, string ); ENTER_GL(); func_glNamedProgramStringEXT( program, target, format, len, string ); @@ -6562,7 +8052,7 @@ static void WINAPI wine_glNamedProgramStringEXT( GLuint program, GLenum target, } static void WINAPI wine_glNamedRenderbufferStorageEXT( GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height ) { - void (*func_glNamedRenderbufferStorageEXT)( GLuint, GLenum, GLsizei, GLsizei ) = extension_funcs[804]; + void (*func_glNamedRenderbufferStorageEXT)( GLuint, GLenum, GLsizei, GLsizei ) = extension_funcs[EXT_glNamedRenderbufferStorageEXT]; TRACE("(%d, %d, %d, %d)\n", renderbuffer, internalformat, width, height ); ENTER_GL(); func_glNamedRenderbufferStorageEXT( renderbuffer, internalformat, width, height ); @@ -6570,7 +8060,7 @@ static void WINAPI wine_glNamedRenderbufferStorageEXT( GLuint renderbuffer, GLen } static void WINAPI wine_glNamedRenderbufferStorageMultisampleCoverageEXT( GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height ) { - void (*func_glNamedRenderbufferStorageMultisampleCoverageEXT)( GLuint, GLsizei, GLsizei, GLenum, GLsizei, GLsizei ) = extension_funcs[805]; + void (*func_glNamedRenderbufferStorageMultisampleCoverageEXT)( GLuint, GLsizei, GLsizei, GLenum, GLsizei, GLsizei ) = extension_funcs[EXT_glNamedRenderbufferStorageMultisampleCoverageEXT]; TRACE("(%d, %d, %d, %d, %d, %d)\n", renderbuffer, coverageSamples, colorSamples, internalformat, width, height ); ENTER_GL(); func_glNamedRenderbufferStorageMultisampleCoverageEXT( renderbuffer, coverageSamples, colorSamples, internalformat, width, height ); @@ -6578,7 +8068,7 @@ static void WINAPI wine_glNamedRenderbufferStorageMultisampleCoverageEXT( GLuint } static void WINAPI wine_glNamedRenderbufferStorageMultisampleEXT( GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ) { - void (*func_glNamedRenderbufferStorageMultisampleEXT)( GLuint, GLsizei, GLenum, GLsizei, GLsizei ) = extension_funcs[806]; + void (*func_glNamedRenderbufferStorageMultisampleEXT)( GLuint, GLsizei, GLenum, GLsizei, GLsizei ) = extension_funcs[EXT_glNamedRenderbufferStorageMultisampleEXT]; TRACE("(%d, %d, %d, %d, %d)\n", renderbuffer, samples, internalformat, width, height ); ENTER_GL(); func_glNamedRenderbufferStorageMultisampleEXT( renderbuffer, samples, internalformat, width, height ); @@ -6587,7 +8077,7 @@ static void WINAPI wine_glNamedRenderbufferStorageMultisampleEXT( GLuint renderb static GLuint WINAPI wine_glNewBufferRegion( GLenum type ) { GLuint ret_value; - GLuint (*func_glNewBufferRegion)( GLenum ) = extension_funcs[807]; + GLuint (*func_glNewBufferRegion)( GLenum ) = extension_funcs[EXT_glNewBufferRegion]; TRACE("(%d)\n", type ); ENTER_GL(); ret_value = func_glNewBufferRegion( type ); @@ -6597,7 +8087,7 @@ static GLuint WINAPI wine_glNewBufferRegion( GLenum type ) { static GLuint WINAPI wine_glNewObjectBufferATI( GLsizei size, GLvoid* pointer, GLenum usage ) { GLuint ret_value; - GLuint (*func_glNewObjectBufferATI)( GLsizei, GLvoid*, GLenum ) = extension_funcs[808]; + GLuint (*func_glNewObjectBufferATI)( GLsizei, GLvoid*, GLenum ) = extension_funcs[EXT_glNewObjectBufferATI]; TRACE("(%d, %p, %d)\n", size, pointer, usage ); ENTER_GL(); ret_value = func_glNewObjectBufferATI( size, pointer, usage ); @@ -6606,7 +8096,7 @@ static GLuint WINAPI wine_glNewObjectBufferATI( GLsizei size, GLvoid* pointer, G } static void WINAPI wine_glNormal3fVertex3fSUN( GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glNormal3fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[809]; + void (*func_glNormal3fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glNormal3fVertex3fSUN]; TRACE("(%f, %f, %f, %f, %f, %f)\n", nx, ny, nz, x, y, z ); ENTER_GL(); func_glNormal3fVertex3fSUN( nx, ny, nz, x, y, z ); @@ -6614,7 +8104,7 @@ static void WINAPI wine_glNormal3fVertex3fSUN( GLfloat nx, GLfloat ny, GLfloat n } static void WINAPI wine_glNormal3fVertex3fvSUN( GLfloat* n, GLfloat* v ) { - void (*func_glNormal3fVertex3fvSUN)( GLfloat*, GLfloat* ) = extension_funcs[810]; + void (*func_glNormal3fVertex3fvSUN)( GLfloat*, GLfloat* ) = extension_funcs[EXT_glNormal3fVertex3fvSUN]; TRACE("(%p, %p)\n", n, v ); ENTER_GL(); func_glNormal3fVertex3fvSUN( n, v ); @@ -6622,7 +8112,7 @@ static void WINAPI wine_glNormal3fVertex3fvSUN( GLfloat* n, GLfloat* v ) { } static void WINAPI wine_glNormal3hNV( unsigned short nx, unsigned short ny, unsigned short nz ) { - void (*func_glNormal3hNV)( unsigned short, unsigned short, unsigned short ) = extension_funcs[811]; + void (*func_glNormal3hNV)( unsigned short, unsigned short, unsigned short ) = extension_funcs[EXT_glNormal3hNV]; TRACE("(%d, %d, %d)\n", nx, ny, nz ); ENTER_GL(); func_glNormal3hNV( nx, ny, nz ); @@ -6630,7 +8120,7 @@ static void WINAPI wine_glNormal3hNV( unsigned short nx, unsigned short ny, unsi } static void WINAPI wine_glNormal3hvNV( unsigned short* v ) { - void (*func_glNormal3hvNV)( unsigned short* ) = extension_funcs[812]; + void (*func_glNormal3hvNV)( unsigned short* ) = extension_funcs[EXT_glNormal3hvNV]; TRACE("(%p)\n", v ); ENTER_GL(); func_glNormal3hvNV( v ); @@ -6638,7 +8128,7 @@ static void WINAPI wine_glNormal3hvNV( unsigned short* v ) { } static void WINAPI wine_glNormalPointerEXT( GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer ) { - void (*func_glNormalPointerEXT)( GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[813]; + void (*func_glNormalPointerEXT)( GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[EXT_glNormalPointerEXT]; TRACE("(%d, %d, %d, %p)\n", type, stride, count, pointer ); ENTER_GL(); func_glNormalPointerEXT( type, stride, count, pointer ); @@ -6646,7 +8136,7 @@ static void WINAPI wine_glNormalPointerEXT( GLenum type, GLsizei stride, GLsizei } static void WINAPI wine_glNormalPointerListIBM( GLenum type, GLint stride, GLvoid** pointer, GLint ptrstride ) { - void (*func_glNormalPointerListIBM)( GLenum, GLint, GLvoid**, GLint ) = extension_funcs[814]; + void (*func_glNormalPointerListIBM)( GLenum, GLint, GLvoid**, GLint ) = extension_funcs[EXT_glNormalPointerListIBM]; TRACE("(%d, %d, %p, %d)\n", type, stride, pointer, ptrstride ); ENTER_GL(); func_glNormalPointerListIBM( type, stride, pointer, ptrstride ); @@ -6654,7 +8144,7 @@ static void WINAPI wine_glNormalPointerListIBM( GLenum type, GLint stride, GLvoi } static void WINAPI wine_glNormalPointervINTEL( GLenum type, GLvoid** pointer ) { - void (*func_glNormalPointervINTEL)( GLenum, GLvoid** ) = extension_funcs[815]; + void (*func_glNormalPointervINTEL)( GLenum, GLvoid** ) = extension_funcs[EXT_glNormalPointervINTEL]; TRACE("(%d, %p)\n", type, pointer ); ENTER_GL(); func_glNormalPointervINTEL( type, pointer ); @@ -6662,7 +8152,7 @@ static void WINAPI wine_glNormalPointervINTEL( GLenum type, GLvoid** pointer ) { } static void WINAPI wine_glNormalStream3bATI( GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz ) { - void (*func_glNormalStream3bATI)( GLenum, GLbyte, GLbyte, GLbyte ) = extension_funcs[816]; + void (*func_glNormalStream3bATI)( GLenum, GLbyte, GLbyte, GLbyte ) = extension_funcs[EXT_glNormalStream3bATI]; TRACE("(%d, %d, %d, %d)\n", stream, nx, ny, nz ); ENTER_GL(); func_glNormalStream3bATI( stream, nx, ny, nz ); @@ -6670,7 +8160,7 @@ static void WINAPI wine_glNormalStream3bATI( GLenum stream, GLbyte nx, GLbyte ny } static void WINAPI wine_glNormalStream3bvATI( GLenum stream, GLbyte* coords ) { - void (*func_glNormalStream3bvATI)( GLenum, GLbyte* ) = extension_funcs[817]; + void (*func_glNormalStream3bvATI)( GLenum, GLbyte* ) = extension_funcs[EXT_glNormalStream3bvATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glNormalStream3bvATI( stream, coords ); @@ -6678,7 +8168,7 @@ static void WINAPI wine_glNormalStream3bvATI( GLenum stream, GLbyte* coords ) { } static void WINAPI wine_glNormalStream3dATI( GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz ) { - void (*func_glNormalStream3dATI)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[818]; + void (*func_glNormalStream3dATI)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glNormalStream3dATI]; TRACE("(%d, %f, %f, %f)\n", stream, nx, ny, nz ); ENTER_GL(); func_glNormalStream3dATI( stream, nx, ny, nz ); @@ -6686,7 +8176,7 @@ static void WINAPI wine_glNormalStream3dATI( GLenum stream, GLdouble nx, GLdoubl } static void WINAPI wine_glNormalStream3dvATI( GLenum stream, GLdouble* coords ) { - void (*func_glNormalStream3dvATI)( GLenum, GLdouble* ) = extension_funcs[819]; + void (*func_glNormalStream3dvATI)( GLenum, GLdouble* ) = extension_funcs[EXT_glNormalStream3dvATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glNormalStream3dvATI( stream, coords ); @@ -6694,7 +8184,7 @@ static void WINAPI wine_glNormalStream3dvATI( GLenum stream, GLdouble* coords ) } static void WINAPI wine_glNormalStream3fATI( GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz ) { - void (*func_glNormalStream3fATI)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[820]; + void (*func_glNormalStream3fATI)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glNormalStream3fATI]; TRACE("(%d, %f, %f, %f)\n", stream, nx, ny, nz ); ENTER_GL(); func_glNormalStream3fATI( stream, nx, ny, nz ); @@ -6702,7 +8192,7 @@ static void WINAPI wine_glNormalStream3fATI( GLenum stream, GLfloat nx, GLfloat } static void WINAPI wine_glNormalStream3fvATI( GLenum stream, GLfloat* coords ) { - void (*func_glNormalStream3fvATI)( GLenum, GLfloat* ) = extension_funcs[821]; + void (*func_glNormalStream3fvATI)( GLenum, GLfloat* ) = extension_funcs[EXT_glNormalStream3fvATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glNormalStream3fvATI( stream, coords ); @@ -6710,7 +8200,7 @@ static void WINAPI wine_glNormalStream3fvATI( GLenum stream, GLfloat* coords ) { } static void WINAPI wine_glNormalStream3iATI( GLenum stream, GLint nx, GLint ny, GLint nz ) { - void (*func_glNormalStream3iATI)( GLenum, GLint, GLint, GLint ) = extension_funcs[822]; + void (*func_glNormalStream3iATI)( GLenum, GLint, GLint, GLint ) = extension_funcs[EXT_glNormalStream3iATI]; TRACE("(%d, %d, %d, %d)\n", stream, nx, ny, nz ); ENTER_GL(); func_glNormalStream3iATI( stream, nx, ny, nz ); @@ -6718,7 +8208,7 @@ static void WINAPI wine_glNormalStream3iATI( GLenum stream, GLint nx, GLint ny, } static void WINAPI wine_glNormalStream3ivATI( GLenum stream, GLint* coords ) { - void (*func_glNormalStream3ivATI)( GLenum, GLint* ) = extension_funcs[823]; + void (*func_glNormalStream3ivATI)( GLenum, GLint* ) = extension_funcs[EXT_glNormalStream3ivATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glNormalStream3ivATI( stream, coords ); @@ -6726,7 +8216,7 @@ static void WINAPI wine_glNormalStream3ivATI( GLenum stream, GLint* coords ) { } static void WINAPI wine_glNormalStream3sATI( GLenum stream, GLshort nx, GLshort ny, GLshort nz ) { - void (*func_glNormalStream3sATI)( GLenum, GLshort, GLshort, GLshort ) = extension_funcs[824]; + void (*func_glNormalStream3sATI)( GLenum, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glNormalStream3sATI]; TRACE("(%d, %d, %d, %d)\n", stream, nx, ny, nz ); ENTER_GL(); func_glNormalStream3sATI( stream, nx, ny, nz ); @@ -6734,7 +8224,7 @@ static void WINAPI wine_glNormalStream3sATI( GLenum stream, GLshort nx, GLshort } static void WINAPI wine_glNormalStream3svATI( GLenum stream, GLshort* coords ) { - void (*func_glNormalStream3svATI)( GLenum, GLshort* ) = extension_funcs[825]; + void (*func_glNormalStream3svATI)( GLenum, GLshort* ) = extension_funcs[EXT_glNormalStream3svATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glNormalStream3svATI( stream, coords ); @@ -6742,7 +8232,7 @@ static void WINAPI wine_glNormalStream3svATI( GLenum stream, GLshort* coords ) { } static void WINAPI wine_glPNTrianglesfATI( GLenum pname, GLfloat param ) { - void (*func_glPNTrianglesfATI)( GLenum, GLfloat ) = extension_funcs[826]; + void (*func_glPNTrianglesfATI)( GLenum, GLfloat ) = extension_funcs[EXT_glPNTrianglesfATI]; TRACE("(%d, %f)\n", pname, param ); ENTER_GL(); func_glPNTrianglesfATI( pname, param ); @@ -6750,7 +8240,7 @@ static void WINAPI wine_glPNTrianglesfATI( GLenum pname, GLfloat param ) { } static void WINAPI wine_glPNTrianglesiATI( GLenum pname, GLint param ) { - void (*func_glPNTrianglesiATI)( GLenum, GLint ) = extension_funcs[827]; + void (*func_glPNTrianglesiATI)( GLenum, GLint ) = extension_funcs[EXT_glPNTrianglesiATI]; TRACE("(%d, %d)\n", pname, param ); ENTER_GL(); func_glPNTrianglesiATI( pname, param ); @@ -6758,7 +8248,7 @@ static void WINAPI wine_glPNTrianglesiATI( GLenum pname, GLint param ) { } static void WINAPI wine_glPassTexCoordATI( GLuint dst, GLuint coord, GLenum swizzle ) { - void (*func_glPassTexCoordATI)( GLuint, GLuint, GLenum ) = extension_funcs[828]; + void (*func_glPassTexCoordATI)( GLuint, GLuint, GLenum ) = extension_funcs[EXT_glPassTexCoordATI]; TRACE("(%d, %d, %d)\n", dst, coord, swizzle ); ENTER_GL(); func_glPassTexCoordATI( dst, coord, swizzle ); @@ -6766,7 +8256,7 @@ static void WINAPI wine_glPassTexCoordATI( GLuint dst, GLuint coord, GLenum swiz } static void WINAPI wine_glPixelDataRangeNV( GLenum target, GLsizei length, GLvoid* pointer ) { - void (*func_glPixelDataRangeNV)( GLenum, GLsizei, GLvoid* ) = extension_funcs[829]; + void (*func_glPixelDataRangeNV)( GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glPixelDataRangeNV]; TRACE("(%d, %d, %p)\n", target, length, pointer ); ENTER_GL(); func_glPixelDataRangeNV( target, length, pointer ); @@ -6774,7 +8264,7 @@ static void WINAPI wine_glPixelDataRangeNV( GLenum target, GLsizei length, GLvoi } static void WINAPI wine_glPixelTexGenParameterfSGIS( GLenum pname, GLfloat param ) { - void (*func_glPixelTexGenParameterfSGIS)( GLenum, GLfloat ) = extension_funcs[830]; + void (*func_glPixelTexGenParameterfSGIS)( GLenum, GLfloat ) = extension_funcs[EXT_glPixelTexGenParameterfSGIS]; TRACE("(%d, %f)\n", pname, param ); ENTER_GL(); func_glPixelTexGenParameterfSGIS( pname, param ); @@ -6782,7 +8272,7 @@ static void WINAPI wine_glPixelTexGenParameterfSGIS( GLenum pname, GLfloat param } static void WINAPI wine_glPixelTexGenParameterfvSGIS( GLenum pname, GLfloat* params ) { - void (*func_glPixelTexGenParameterfvSGIS)( GLenum, GLfloat* ) = extension_funcs[831]; + void (*func_glPixelTexGenParameterfvSGIS)( GLenum, GLfloat* ) = extension_funcs[EXT_glPixelTexGenParameterfvSGIS]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glPixelTexGenParameterfvSGIS( pname, params ); @@ -6790,7 +8280,7 @@ static void WINAPI wine_glPixelTexGenParameterfvSGIS( GLenum pname, GLfloat* par } static void WINAPI wine_glPixelTexGenParameteriSGIS( GLenum pname, GLint param ) { - void (*func_glPixelTexGenParameteriSGIS)( GLenum, GLint ) = extension_funcs[832]; + void (*func_glPixelTexGenParameteriSGIS)( GLenum, GLint ) = extension_funcs[EXT_glPixelTexGenParameteriSGIS]; TRACE("(%d, %d)\n", pname, param ); ENTER_GL(); func_glPixelTexGenParameteriSGIS( pname, param ); @@ -6798,7 +8288,7 @@ static void WINAPI wine_glPixelTexGenParameteriSGIS( GLenum pname, GLint param ) } static void WINAPI wine_glPixelTexGenParameterivSGIS( GLenum pname, GLint* params ) { - void (*func_glPixelTexGenParameterivSGIS)( GLenum, GLint* ) = extension_funcs[833]; + void (*func_glPixelTexGenParameterivSGIS)( GLenum, GLint* ) = extension_funcs[EXT_glPixelTexGenParameterivSGIS]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glPixelTexGenParameterivSGIS( pname, params ); @@ -6806,7 +8296,7 @@ static void WINAPI wine_glPixelTexGenParameterivSGIS( GLenum pname, GLint* param } static void WINAPI wine_glPixelTexGenSGIX( GLenum mode ) { - void (*func_glPixelTexGenSGIX)( GLenum ) = extension_funcs[834]; + void (*func_glPixelTexGenSGIX)( GLenum ) = extension_funcs[EXT_glPixelTexGenSGIX]; TRACE("(%d)\n", mode ); ENTER_GL(); func_glPixelTexGenSGIX( mode ); @@ -6814,7 +8304,7 @@ static void WINAPI wine_glPixelTexGenSGIX( GLenum mode ) { } static void WINAPI wine_glPixelTransformParameterfEXT( GLenum target, GLenum pname, GLfloat param ) { - void (*func_glPixelTransformParameterfEXT)( GLenum, GLenum, GLfloat ) = extension_funcs[835]; + void (*func_glPixelTransformParameterfEXT)( GLenum, GLenum, GLfloat ) = extension_funcs[EXT_glPixelTransformParameterfEXT]; TRACE("(%d, %d, %f)\n", target, pname, param ); ENTER_GL(); func_glPixelTransformParameterfEXT( target, pname, param ); @@ -6822,7 +8312,7 @@ static void WINAPI wine_glPixelTransformParameterfEXT( GLenum target, GLenum pna } static void WINAPI wine_glPixelTransformParameterfvEXT( GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glPixelTransformParameterfvEXT)( GLenum, GLenum, GLfloat* ) = extension_funcs[836]; + void (*func_glPixelTransformParameterfvEXT)( GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glPixelTransformParameterfvEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glPixelTransformParameterfvEXT( target, pname, params ); @@ -6830,7 +8320,7 @@ static void WINAPI wine_glPixelTransformParameterfvEXT( GLenum target, GLenum pn } static void WINAPI wine_glPixelTransformParameteriEXT( GLenum target, GLenum pname, GLint param ) { - void (*func_glPixelTransformParameteriEXT)( GLenum, GLenum, GLint ) = extension_funcs[837]; + void (*func_glPixelTransformParameteriEXT)( GLenum, GLenum, GLint ) = extension_funcs[EXT_glPixelTransformParameteriEXT]; TRACE("(%d, %d, %d)\n", target, pname, param ); ENTER_GL(); func_glPixelTransformParameteriEXT( target, pname, param ); @@ -6838,7 +8328,7 @@ static void WINAPI wine_glPixelTransformParameteriEXT( GLenum target, GLenum pna } static void WINAPI wine_glPixelTransformParameterivEXT( GLenum target, GLenum pname, GLint* params ) { - void (*func_glPixelTransformParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[838]; + void (*func_glPixelTransformParameterivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glPixelTransformParameterivEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glPixelTransformParameterivEXT( target, pname, params ); @@ -6846,7 +8336,7 @@ static void WINAPI wine_glPixelTransformParameterivEXT( GLenum target, GLenum pn } static void WINAPI wine_glPointParameterf( GLenum pname, GLfloat param ) { - void (*func_glPointParameterf)( GLenum, GLfloat ) = extension_funcs[839]; + void (*func_glPointParameterf)( GLenum, GLfloat ) = extension_funcs[EXT_glPointParameterf]; TRACE("(%d, %f)\n", pname, param ); ENTER_GL(); func_glPointParameterf( pname, param ); @@ -6854,7 +8344,7 @@ static void WINAPI wine_glPointParameterf( GLenum pname, GLfloat param ) { } static void WINAPI wine_glPointParameterfARB( GLenum pname, GLfloat param ) { - void (*func_glPointParameterfARB)( GLenum, GLfloat ) = extension_funcs[840]; + void (*func_glPointParameterfARB)( GLenum, GLfloat ) = extension_funcs[EXT_glPointParameterfARB]; TRACE("(%d, %f)\n", pname, param ); ENTER_GL(); func_glPointParameterfARB( pname, param ); @@ -6862,7 +8352,7 @@ static void WINAPI wine_glPointParameterfARB( GLenum pname, GLfloat param ) { } static void WINAPI wine_glPointParameterfEXT( GLenum pname, GLfloat param ) { - void (*func_glPointParameterfEXT)( GLenum, GLfloat ) = extension_funcs[841]; + void (*func_glPointParameterfEXT)( GLenum, GLfloat ) = extension_funcs[EXT_glPointParameterfEXT]; TRACE("(%d, %f)\n", pname, param ); ENTER_GL(); func_glPointParameterfEXT( pname, param ); @@ -6870,7 +8360,7 @@ static void WINAPI wine_glPointParameterfEXT( GLenum pname, GLfloat param ) { } static void WINAPI wine_glPointParameterfSGIS( GLenum pname, GLfloat param ) { - void (*func_glPointParameterfSGIS)( GLenum, GLfloat ) = extension_funcs[842]; + void (*func_glPointParameterfSGIS)( GLenum, GLfloat ) = extension_funcs[EXT_glPointParameterfSGIS]; TRACE("(%d, %f)\n", pname, param ); ENTER_GL(); func_glPointParameterfSGIS( pname, param ); @@ -6878,7 +8368,7 @@ static void WINAPI wine_glPointParameterfSGIS( GLenum pname, GLfloat param ) { } static void WINAPI wine_glPointParameterfv( GLenum pname, GLfloat* params ) { - void (*func_glPointParameterfv)( GLenum, GLfloat* ) = extension_funcs[843]; + void (*func_glPointParameterfv)( GLenum, GLfloat* ) = extension_funcs[EXT_glPointParameterfv]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glPointParameterfv( pname, params ); @@ -6886,7 +8376,7 @@ static void WINAPI wine_glPointParameterfv( GLenum pname, GLfloat* params ) { } static void WINAPI wine_glPointParameterfvARB( GLenum pname, GLfloat* params ) { - void (*func_glPointParameterfvARB)( GLenum, GLfloat* ) = extension_funcs[844]; + void (*func_glPointParameterfvARB)( GLenum, GLfloat* ) = extension_funcs[EXT_glPointParameterfvARB]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glPointParameterfvARB( pname, params ); @@ -6894,7 +8384,7 @@ static void WINAPI wine_glPointParameterfvARB( GLenum pname, GLfloat* params ) { } static void WINAPI wine_glPointParameterfvEXT( GLenum pname, GLfloat* params ) { - void (*func_glPointParameterfvEXT)( GLenum, GLfloat* ) = extension_funcs[845]; + void (*func_glPointParameterfvEXT)( GLenum, GLfloat* ) = extension_funcs[EXT_glPointParameterfvEXT]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glPointParameterfvEXT( pname, params ); @@ -6902,7 +8392,7 @@ static void WINAPI wine_glPointParameterfvEXT( GLenum pname, GLfloat* params ) { } static void WINAPI wine_glPointParameterfvSGIS( GLenum pname, GLfloat* params ) { - void (*func_glPointParameterfvSGIS)( GLenum, GLfloat* ) = extension_funcs[846]; + void (*func_glPointParameterfvSGIS)( GLenum, GLfloat* ) = extension_funcs[EXT_glPointParameterfvSGIS]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glPointParameterfvSGIS( pname, params ); @@ -6910,7 +8400,7 @@ static void WINAPI wine_glPointParameterfvSGIS( GLenum pname, GLfloat* params ) } static void WINAPI wine_glPointParameteri( GLenum pname, GLint param ) { - void (*func_glPointParameteri)( GLenum, GLint ) = extension_funcs[847]; + void (*func_glPointParameteri)( GLenum, GLint ) = extension_funcs[EXT_glPointParameteri]; TRACE("(%d, %d)\n", pname, param ); ENTER_GL(); func_glPointParameteri( pname, param ); @@ -6918,7 +8408,7 @@ static void WINAPI wine_glPointParameteri( GLenum pname, GLint param ) { } static void WINAPI wine_glPointParameteriNV( GLenum pname, GLint param ) { - void (*func_glPointParameteriNV)( GLenum, GLint ) = extension_funcs[848]; + void (*func_glPointParameteriNV)( GLenum, GLint ) = extension_funcs[EXT_glPointParameteriNV]; TRACE("(%d, %d)\n", pname, param ); ENTER_GL(); func_glPointParameteriNV( pname, param ); @@ -6926,7 +8416,7 @@ static void WINAPI wine_glPointParameteriNV( GLenum pname, GLint param ) { } static void WINAPI wine_glPointParameteriv( GLenum pname, GLint* params ) { - void (*func_glPointParameteriv)( GLenum, GLint* ) = extension_funcs[849]; + void (*func_glPointParameteriv)( GLenum, GLint* ) = extension_funcs[EXT_glPointParameteriv]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glPointParameteriv( pname, params ); @@ -6934,7 +8424,7 @@ static void WINAPI wine_glPointParameteriv( GLenum pname, GLint* params ) { } static void WINAPI wine_glPointParameterivNV( GLenum pname, GLint* params ) { - void (*func_glPointParameterivNV)( GLenum, GLint* ) = extension_funcs[850]; + void (*func_glPointParameterivNV)( GLenum, GLint* ) = extension_funcs[EXT_glPointParameterivNV]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glPointParameterivNV( pname, params ); @@ -6943,7 +8433,7 @@ static void WINAPI wine_glPointParameterivNV( GLenum pname, GLint* params ) { static GLint WINAPI wine_glPollAsyncSGIX( GLuint* markerp ) { GLint ret_value; - GLint (*func_glPollAsyncSGIX)( GLuint* ) = extension_funcs[851]; + GLint (*func_glPollAsyncSGIX)( GLuint* ) = extension_funcs[EXT_glPollAsyncSGIX]; TRACE("(%p)\n", markerp ); ENTER_GL(); ret_value = func_glPollAsyncSGIX( markerp ); @@ -6953,7 +8443,7 @@ static GLint WINAPI wine_glPollAsyncSGIX( GLuint* markerp ) { static GLint WINAPI wine_glPollInstrumentsSGIX( GLint* marker_p ) { GLint ret_value; - GLint (*func_glPollInstrumentsSGIX)( GLint* ) = extension_funcs[852]; + GLint (*func_glPollInstrumentsSGIX)( GLint* ) = extension_funcs[EXT_glPollInstrumentsSGIX]; TRACE("(%p)\n", marker_p ); ENTER_GL(); ret_value = func_glPollInstrumentsSGIX( marker_p ); @@ -6962,7 +8452,7 @@ static GLint WINAPI wine_glPollInstrumentsSGIX( GLint* marker_p ) { } static void WINAPI wine_glPolygonOffsetEXT( GLfloat factor, GLfloat bias ) { - void (*func_glPolygonOffsetEXT)( GLfloat, GLfloat ) = extension_funcs[853]; + void (*func_glPolygonOffsetEXT)( GLfloat, GLfloat ) = extension_funcs[EXT_glPolygonOffsetEXT]; TRACE("(%f, %f)\n", factor, bias ); ENTER_GL(); func_glPolygonOffsetEXT( factor, bias ); @@ -6970,7 +8460,7 @@ static void WINAPI wine_glPolygonOffsetEXT( GLfloat factor, GLfloat bias ) { } static void WINAPI wine_glPrimitiveRestartIndexNV( GLuint index ) { - void (*func_glPrimitiveRestartIndexNV)( GLuint ) = extension_funcs[854]; + void (*func_glPrimitiveRestartIndexNV)( GLuint ) = extension_funcs[EXT_glPrimitiveRestartIndexNV]; TRACE("(%d)\n", index ); ENTER_GL(); func_glPrimitiveRestartIndexNV( index ); @@ -6978,7 +8468,7 @@ static void WINAPI wine_glPrimitiveRestartIndexNV( GLuint index ) { } static void WINAPI wine_glPrimitiveRestartNV( void ) { - void (*func_glPrimitiveRestartNV)( void ) = extension_funcs[855]; + void (*func_glPrimitiveRestartNV)( void ) = extension_funcs[EXT_glPrimitiveRestartNV]; TRACE("()\n"); ENTER_GL(); func_glPrimitiveRestartNV( ); @@ -6986,7 +8476,7 @@ static void WINAPI wine_glPrimitiveRestartNV( void ) { } static void WINAPI wine_glPrioritizeTexturesEXT( GLsizei n, GLuint* textures, GLclampf* priorities ) { - void (*func_glPrioritizeTexturesEXT)( GLsizei, GLuint*, GLclampf* ) = extension_funcs[856]; + void (*func_glPrioritizeTexturesEXT)( GLsizei, GLuint*, GLclampf* ) = extension_funcs[EXT_glPrioritizeTexturesEXT]; TRACE("(%d, %p, %p)\n", n, textures, priorities ); ENTER_GL(); func_glPrioritizeTexturesEXT( n, textures, priorities ); @@ -6994,7 +8484,7 @@ static void WINAPI wine_glPrioritizeTexturesEXT( GLsizei n, GLuint* textures, GL } static void WINAPI wine_glProgramBufferParametersIivNV( GLenum target, GLuint buffer, GLuint index, GLsizei count, GLint* params ) { - void (*func_glProgramBufferParametersIivNV)( GLenum, GLuint, GLuint, GLsizei, GLint* ) = extension_funcs[857]; + void (*func_glProgramBufferParametersIivNV)( GLenum, GLuint, GLuint, GLsizei, GLint* ) = extension_funcs[EXT_glProgramBufferParametersIivNV]; TRACE("(%d, %d, %d, %d, %p)\n", target, buffer, index, count, params ); ENTER_GL(); func_glProgramBufferParametersIivNV( target, buffer, index, count, params ); @@ -7002,7 +8492,7 @@ static void WINAPI wine_glProgramBufferParametersIivNV( GLenum target, GLuint bu } static void WINAPI wine_glProgramBufferParametersIuivNV( GLenum target, GLuint buffer, GLuint index, GLsizei count, GLuint* params ) { - void (*func_glProgramBufferParametersIuivNV)( GLenum, GLuint, GLuint, GLsizei, GLuint* ) = extension_funcs[858]; + void (*func_glProgramBufferParametersIuivNV)( GLenum, GLuint, GLuint, GLsizei, GLuint* ) = extension_funcs[EXT_glProgramBufferParametersIuivNV]; TRACE("(%d, %d, %d, %d, %p)\n", target, buffer, index, count, params ); ENTER_GL(); func_glProgramBufferParametersIuivNV( target, buffer, index, count, params ); @@ -7010,7 +8500,7 @@ static void WINAPI wine_glProgramBufferParametersIuivNV( GLenum target, GLuint b } static void WINAPI wine_glProgramBufferParametersfvNV( GLenum target, GLuint buffer, GLuint index, GLsizei count, GLfloat* params ) { - void (*func_glProgramBufferParametersfvNV)( GLenum, GLuint, GLuint, GLsizei, GLfloat* ) = extension_funcs[859]; + void (*func_glProgramBufferParametersfvNV)( GLenum, GLuint, GLuint, GLsizei, GLfloat* ) = extension_funcs[EXT_glProgramBufferParametersfvNV]; TRACE("(%d, %d, %d, %d, %p)\n", target, buffer, index, count, params ); ENTER_GL(); func_glProgramBufferParametersfvNV( target, buffer, index, count, params ); @@ -7018,7 +8508,7 @@ static void WINAPI wine_glProgramBufferParametersfvNV( GLenum target, GLuint buf } static void WINAPI wine_glProgramEnvParameter4dARB( GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { - void (*func_glProgramEnvParameter4dARB)( GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[860]; + void (*func_glProgramEnvParameter4dARB)( GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glProgramEnvParameter4dARB]; TRACE("(%d, %d, %f, %f, %f, %f)\n", target, index, x, y, z, w ); ENTER_GL(); func_glProgramEnvParameter4dARB( target, index, x, y, z, w ); @@ -7026,7 +8516,7 @@ static void WINAPI wine_glProgramEnvParameter4dARB( GLenum target, GLuint index, } static void WINAPI wine_glProgramEnvParameter4dvARB( GLenum target, GLuint index, GLdouble* params ) { - void (*func_glProgramEnvParameter4dvARB)( GLenum, GLuint, GLdouble* ) = extension_funcs[861]; + void (*func_glProgramEnvParameter4dvARB)( GLenum, GLuint, GLdouble* ) = extension_funcs[EXT_glProgramEnvParameter4dvARB]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glProgramEnvParameter4dvARB( target, index, params ); @@ -7034,7 +8524,7 @@ static void WINAPI wine_glProgramEnvParameter4dvARB( GLenum target, GLuint index } static void WINAPI wine_glProgramEnvParameter4fARB( GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - void (*func_glProgramEnvParameter4fARB)( GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[862]; + void (*func_glProgramEnvParameter4fARB)( GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glProgramEnvParameter4fARB]; TRACE("(%d, %d, %f, %f, %f, %f)\n", target, index, x, y, z, w ); ENTER_GL(); func_glProgramEnvParameter4fARB( target, index, x, y, z, w ); @@ -7042,7 +8532,7 @@ static void WINAPI wine_glProgramEnvParameter4fARB( GLenum target, GLuint index, } static void WINAPI wine_glProgramEnvParameter4fvARB( GLenum target, GLuint index, GLfloat* params ) { - void (*func_glProgramEnvParameter4fvARB)( GLenum, GLuint, GLfloat* ) = extension_funcs[863]; + void (*func_glProgramEnvParameter4fvARB)( GLenum, GLuint, GLfloat* ) = extension_funcs[EXT_glProgramEnvParameter4fvARB]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glProgramEnvParameter4fvARB( target, index, params ); @@ -7050,7 +8540,7 @@ static void WINAPI wine_glProgramEnvParameter4fvARB( GLenum target, GLuint index } static void WINAPI wine_glProgramEnvParameterI4iNV( GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w ) { - void (*func_glProgramEnvParameterI4iNV)( GLenum, GLuint, GLint, GLint, GLint, GLint ) = extension_funcs[864]; + void (*func_glProgramEnvParameterI4iNV)( GLenum, GLuint, GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glProgramEnvParameterI4iNV]; TRACE("(%d, %d, %d, %d, %d, %d)\n", target, index, x, y, z, w ); ENTER_GL(); func_glProgramEnvParameterI4iNV( target, index, x, y, z, w ); @@ -7058,7 +8548,7 @@ static void WINAPI wine_glProgramEnvParameterI4iNV( GLenum target, GLuint index, } static void WINAPI wine_glProgramEnvParameterI4ivNV( GLenum target, GLuint index, GLint* params ) { - void (*func_glProgramEnvParameterI4ivNV)( GLenum, GLuint, GLint* ) = extension_funcs[865]; + void (*func_glProgramEnvParameterI4ivNV)( GLenum, GLuint, GLint* ) = extension_funcs[EXT_glProgramEnvParameterI4ivNV]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glProgramEnvParameterI4ivNV( target, index, params ); @@ -7066,7 +8556,7 @@ static void WINAPI wine_glProgramEnvParameterI4ivNV( GLenum target, GLuint index } static void WINAPI wine_glProgramEnvParameterI4uiNV( GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) { - void (*func_glProgramEnvParameterI4uiNV)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[866]; + void (*func_glProgramEnvParameterI4uiNV)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glProgramEnvParameterI4uiNV]; TRACE("(%d, %d, %d, %d, %d, %d)\n", target, index, x, y, z, w ); ENTER_GL(); func_glProgramEnvParameterI4uiNV( target, index, x, y, z, w ); @@ -7074,7 +8564,7 @@ static void WINAPI wine_glProgramEnvParameterI4uiNV( GLenum target, GLuint index } static void WINAPI wine_glProgramEnvParameterI4uivNV( GLenum target, GLuint index, GLuint* params ) { - void (*func_glProgramEnvParameterI4uivNV)( GLenum, GLuint, GLuint* ) = extension_funcs[867]; + void (*func_glProgramEnvParameterI4uivNV)( GLenum, GLuint, GLuint* ) = extension_funcs[EXT_glProgramEnvParameterI4uivNV]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glProgramEnvParameterI4uivNV( target, index, params ); @@ -7082,7 +8572,7 @@ static void WINAPI wine_glProgramEnvParameterI4uivNV( GLenum target, GLuint inde } static void WINAPI wine_glProgramEnvParameters4fvEXT( GLenum target, GLuint index, GLsizei count, GLfloat* params ) { - void (*func_glProgramEnvParameters4fvEXT)( GLenum, GLuint, GLsizei, GLfloat* ) = extension_funcs[868]; + void (*func_glProgramEnvParameters4fvEXT)( GLenum, GLuint, GLsizei, GLfloat* ) = extension_funcs[EXT_glProgramEnvParameters4fvEXT]; TRACE("(%d, %d, %d, %p)\n", target, index, count, params ); ENTER_GL(); func_glProgramEnvParameters4fvEXT( target, index, count, params ); @@ -7090,7 +8580,7 @@ static void WINAPI wine_glProgramEnvParameters4fvEXT( GLenum target, GLuint inde } static void WINAPI wine_glProgramEnvParametersI4ivNV( GLenum target, GLuint index, GLsizei count, GLint* params ) { - void (*func_glProgramEnvParametersI4ivNV)( GLenum, GLuint, GLsizei, GLint* ) = extension_funcs[869]; + void (*func_glProgramEnvParametersI4ivNV)( GLenum, GLuint, GLsizei, GLint* ) = extension_funcs[EXT_glProgramEnvParametersI4ivNV]; TRACE("(%d, %d, %d, %p)\n", target, index, count, params ); ENTER_GL(); func_glProgramEnvParametersI4ivNV( target, index, count, params ); @@ -7098,7 +8588,7 @@ static void WINAPI wine_glProgramEnvParametersI4ivNV( GLenum target, GLuint inde } static void WINAPI wine_glProgramEnvParametersI4uivNV( GLenum target, GLuint index, GLsizei count, GLuint* params ) { - void (*func_glProgramEnvParametersI4uivNV)( GLenum, GLuint, GLsizei, GLuint* ) = extension_funcs[870]; + void (*func_glProgramEnvParametersI4uivNV)( GLenum, GLuint, GLsizei, GLuint* ) = extension_funcs[EXT_glProgramEnvParametersI4uivNV]; TRACE("(%d, %d, %d, %p)\n", target, index, count, params ); ENTER_GL(); func_glProgramEnvParametersI4uivNV( target, index, count, params ); @@ -7106,7 +8596,7 @@ static void WINAPI wine_glProgramEnvParametersI4uivNV( GLenum target, GLuint ind } static void WINAPI wine_glProgramLocalParameter4dARB( GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { - void (*func_glProgramLocalParameter4dARB)( GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[871]; + void (*func_glProgramLocalParameter4dARB)( GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glProgramLocalParameter4dARB]; TRACE("(%d, %d, %f, %f, %f, %f)\n", target, index, x, y, z, w ); ENTER_GL(); func_glProgramLocalParameter4dARB( target, index, x, y, z, w ); @@ -7114,7 +8604,7 @@ static void WINAPI wine_glProgramLocalParameter4dARB( GLenum target, GLuint inde } static void WINAPI wine_glProgramLocalParameter4dvARB( GLenum target, GLuint index, GLdouble* params ) { - void (*func_glProgramLocalParameter4dvARB)( GLenum, GLuint, GLdouble* ) = extension_funcs[872]; + void (*func_glProgramLocalParameter4dvARB)( GLenum, GLuint, GLdouble* ) = extension_funcs[EXT_glProgramLocalParameter4dvARB]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glProgramLocalParameter4dvARB( target, index, params ); @@ -7122,7 +8612,7 @@ static void WINAPI wine_glProgramLocalParameter4dvARB( GLenum target, GLuint ind } static void WINAPI wine_glProgramLocalParameter4fARB( GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - void (*func_glProgramLocalParameter4fARB)( GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[873]; + void (*func_glProgramLocalParameter4fARB)( GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glProgramLocalParameter4fARB]; TRACE("(%d, %d, %f, %f, %f, %f)\n", target, index, x, y, z, w ); ENTER_GL(); func_glProgramLocalParameter4fARB( target, index, x, y, z, w ); @@ -7130,7 +8620,7 @@ static void WINAPI wine_glProgramLocalParameter4fARB( GLenum target, GLuint inde } static void WINAPI wine_glProgramLocalParameter4fvARB( GLenum target, GLuint index, GLfloat* params ) { - void (*func_glProgramLocalParameter4fvARB)( GLenum, GLuint, GLfloat* ) = extension_funcs[874]; + void (*func_glProgramLocalParameter4fvARB)( GLenum, GLuint, GLfloat* ) = extension_funcs[EXT_glProgramLocalParameter4fvARB]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glProgramLocalParameter4fvARB( target, index, params ); @@ -7138,7 +8628,7 @@ static void WINAPI wine_glProgramLocalParameter4fvARB( GLenum target, GLuint ind } static void WINAPI wine_glProgramLocalParameterI4iNV( GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w ) { - void (*func_glProgramLocalParameterI4iNV)( GLenum, GLuint, GLint, GLint, GLint, GLint ) = extension_funcs[875]; + void (*func_glProgramLocalParameterI4iNV)( GLenum, GLuint, GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glProgramLocalParameterI4iNV]; TRACE("(%d, %d, %d, %d, %d, %d)\n", target, index, x, y, z, w ); ENTER_GL(); func_glProgramLocalParameterI4iNV( target, index, x, y, z, w ); @@ -7146,7 +8636,7 @@ static void WINAPI wine_glProgramLocalParameterI4iNV( GLenum target, GLuint inde } static void WINAPI wine_glProgramLocalParameterI4ivNV( GLenum target, GLuint index, GLint* params ) { - void (*func_glProgramLocalParameterI4ivNV)( GLenum, GLuint, GLint* ) = extension_funcs[876]; + void (*func_glProgramLocalParameterI4ivNV)( GLenum, GLuint, GLint* ) = extension_funcs[EXT_glProgramLocalParameterI4ivNV]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glProgramLocalParameterI4ivNV( target, index, params ); @@ -7154,7 +8644,7 @@ static void WINAPI wine_glProgramLocalParameterI4ivNV( GLenum target, GLuint ind } static void WINAPI wine_glProgramLocalParameterI4uiNV( GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) { - void (*func_glProgramLocalParameterI4uiNV)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[877]; + void (*func_glProgramLocalParameterI4uiNV)( GLenum, GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glProgramLocalParameterI4uiNV]; TRACE("(%d, %d, %d, %d, %d, %d)\n", target, index, x, y, z, w ); ENTER_GL(); func_glProgramLocalParameterI4uiNV( target, index, x, y, z, w ); @@ -7162,7 +8652,7 @@ static void WINAPI wine_glProgramLocalParameterI4uiNV( GLenum target, GLuint ind } static void WINAPI wine_glProgramLocalParameterI4uivNV( GLenum target, GLuint index, GLuint* params ) { - void (*func_glProgramLocalParameterI4uivNV)( GLenum, GLuint, GLuint* ) = extension_funcs[878]; + void (*func_glProgramLocalParameterI4uivNV)( GLenum, GLuint, GLuint* ) = extension_funcs[EXT_glProgramLocalParameterI4uivNV]; TRACE("(%d, %d, %p)\n", target, index, params ); ENTER_GL(); func_glProgramLocalParameterI4uivNV( target, index, params ); @@ -7170,7 +8660,7 @@ static void WINAPI wine_glProgramLocalParameterI4uivNV( GLenum target, GLuint in } static void WINAPI wine_glProgramLocalParameters4fvEXT( GLenum target, GLuint index, GLsizei count, GLfloat* params ) { - void (*func_glProgramLocalParameters4fvEXT)( GLenum, GLuint, GLsizei, GLfloat* ) = extension_funcs[879]; + void (*func_glProgramLocalParameters4fvEXT)( GLenum, GLuint, GLsizei, GLfloat* ) = extension_funcs[EXT_glProgramLocalParameters4fvEXT]; TRACE("(%d, %d, %d, %p)\n", target, index, count, params ); ENTER_GL(); func_glProgramLocalParameters4fvEXT( target, index, count, params ); @@ -7178,7 +8668,7 @@ static void WINAPI wine_glProgramLocalParameters4fvEXT( GLenum target, GLuint in } static void WINAPI wine_glProgramLocalParametersI4ivNV( GLenum target, GLuint index, GLsizei count, GLint* params ) { - void (*func_glProgramLocalParametersI4ivNV)( GLenum, GLuint, GLsizei, GLint* ) = extension_funcs[880]; + void (*func_glProgramLocalParametersI4ivNV)( GLenum, GLuint, GLsizei, GLint* ) = extension_funcs[EXT_glProgramLocalParametersI4ivNV]; TRACE("(%d, %d, %d, %p)\n", target, index, count, params ); ENTER_GL(); func_glProgramLocalParametersI4ivNV( target, index, count, params ); @@ -7186,7 +8676,7 @@ static void WINAPI wine_glProgramLocalParametersI4ivNV( GLenum target, GLuint in } static void WINAPI wine_glProgramLocalParametersI4uivNV( GLenum target, GLuint index, GLsizei count, GLuint* params ) { - void (*func_glProgramLocalParametersI4uivNV)( GLenum, GLuint, GLsizei, GLuint* ) = extension_funcs[881]; + void (*func_glProgramLocalParametersI4uivNV)( GLenum, GLuint, GLsizei, GLuint* ) = extension_funcs[EXT_glProgramLocalParametersI4uivNV]; TRACE("(%d, %d, %d, %p)\n", target, index, count, params ); ENTER_GL(); func_glProgramLocalParametersI4uivNV( target, index, count, params ); @@ -7194,7 +8684,7 @@ static void WINAPI wine_glProgramLocalParametersI4uivNV( GLenum target, GLuint i } static void WINAPI wine_glProgramNamedParameter4dNV( GLuint id, GLsizei len, GLubyte* name, GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { - void (*func_glProgramNamedParameter4dNV)( GLuint, GLsizei, GLubyte*, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[882]; + void (*func_glProgramNamedParameter4dNV)( GLuint, GLsizei, GLubyte*, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glProgramNamedParameter4dNV]; TRACE("(%d, %d, %p, %f, %f, %f, %f)\n", id, len, name, x, y, z, w ); ENTER_GL(); func_glProgramNamedParameter4dNV( id, len, name, x, y, z, w ); @@ -7202,7 +8692,7 @@ static void WINAPI wine_glProgramNamedParameter4dNV( GLuint id, GLsizei len, GLu } static void WINAPI wine_glProgramNamedParameter4dvNV( GLuint id, GLsizei len, GLubyte* name, GLdouble* v ) { - void (*func_glProgramNamedParameter4dvNV)( GLuint, GLsizei, GLubyte*, GLdouble* ) = extension_funcs[883]; + void (*func_glProgramNamedParameter4dvNV)( GLuint, GLsizei, GLubyte*, GLdouble* ) = extension_funcs[EXT_glProgramNamedParameter4dvNV]; TRACE("(%d, %d, %p, %p)\n", id, len, name, v ); ENTER_GL(); func_glProgramNamedParameter4dvNV( id, len, name, v ); @@ -7210,7 +8700,7 @@ static void WINAPI wine_glProgramNamedParameter4dvNV( GLuint id, GLsizei len, GL } static void WINAPI wine_glProgramNamedParameter4fNV( GLuint id, GLsizei len, GLubyte* name, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - void (*func_glProgramNamedParameter4fNV)( GLuint, GLsizei, GLubyte*, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[884]; + void (*func_glProgramNamedParameter4fNV)( GLuint, GLsizei, GLubyte*, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glProgramNamedParameter4fNV]; TRACE("(%d, %d, %p, %f, %f, %f, %f)\n", id, len, name, x, y, z, w ); ENTER_GL(); func_glProgramNamedParameter4fNV( id, len, name, x, y, z, w ); @@ -7218,7 +8708,7 @@ static void WINAPI wine_glProgramNamedParameter4fNV( GLuint id, GLsizei len, GLu } static void WINAPI wine_glProgramNamedParameter4fvNV( GLuint id, GLsizei len, GLubyte* name, GLfloat* v ) { - void (*func_glProgramNamedParameter4fvNV)( GLuint, GLsizei, GLubyte*, GLfloat* ) = extension_funcs[885]; + void (*func_glProgramNamedParameter4fvNV)( GLuint, GLsizei, GLubyte*, GLfloat* ) = extension_funcs[EXT_glProgramNamedParameter4fvNV]; TRACE("(%d, %d, %p, %p)\n", id, len, name, v ); ENTER_GL(); func_glProgramNamedParameter4fvNV( id, len, name, v ); @@ -7226,7 +8716,7 @@ static void WINAPI wine_glProgramNamedParameter4fvNV( GLuint id, GLsizei len, GL } static void WINAPI wine_glProgramParameter4dNV( GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { - void (*func_glProgramParameter4dNV)( GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[886]; + void (*func_glProgramParameter4dNV)( GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glProgramParameter4dNV]; TRACE("(%d, %d, %f, %f, %f, %f)\n", target, index, x, y, z, w ); ENTER_GL(); func_glProgramParameter4dNV( target, index, x, y, z, w ); @@ -7234,7 +8724,7 @@ static void WINAPI wine_glProgramParameter4dNV( GLenum target, GLuint index, GLd } static void WINAPI wine_glProgramParameter4dvNV( GLenum target, GLuint index, GLdouble* v ) { - void (*func_glProgramParameter4dvNV)( GLenum, GLuint, GLdouble* ) = extension_funcs[887]; + void (*func_glProgramParameter4dvNV)( GLenum, GLuint, GLdouble* ) = extension_funcs[EXT_glProgramParameter4dvNV]; TRACE("(%d, %d, %p)\n", target, index, v ); ENTER_GL(); func_glProgramParameter4dvNV( target, index, v ); @@ -7242,7 +8732,7 @@ static void WINAPI wine_glProgramParameter4dvNV( GLenum target, GLuint index, GL } static void WINAPI wine_glProgramParameter4fNV( GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - void (*func_glProgramParameter4fNV)( GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[888]; + void (*func_glProgramParameter4fNV)( GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glProgramParameter4fNV]; TRACE("(%d, %d, %f, %f, %f, %f)\n", target, index, x, y, z, w ); ENTER_GL(); func_glProgramParameter4fNV( target, index, x, y, z, w ); @@ -7250,7 +8740,7 @@ static void WINAPI wine_glProgramParameter4fNV( GLenum target, GLuint index, GLf } static void WINAPI wine_glProgramParameter4fvNV( GLenum target, GLuint index, GLfloat* v ) { - void (*func_glProgramParameter4fvNV)( GLenum, GLuint, GLfloat* ) = extension_funcs[889]; + void (*func_glProgramParameter4fvNV)( GLenum, GLuint, GLfloat* ) = extension_funcs[EXT_glProgramParameter4fvNV]; TRACE("(%d, %d, %p)\n", target, index, v ); ENTER_GL(); func_glProgramParameter4fvNV( target, index, v ); @@ -7258,7 +8748,7 @@ static void WINAPI wine_glProgramParameter4fvNV( GLenum target, GLuint index, GL } static void WINAPI wine_glProgramParameteriARB( GLuint program, GLenum pname, GLint value ) { - void (*func_glProgramParameteriARB)( GLuint, GLenum, GLint ) = extension_funcs[890]; + void (*func_glProgramParameteriARB)( GLuint, GLenum, GLint ) = extension_funcs[EXT_glProgramParameteriARB]; TRACE("(%d, %d, %d)\n", program, pname, value ); ENTER_GL(); func_glProgramParameteriARB( program, pname, value ); @@ -7266,7 +8756,7 @@ static void WINAPI wine_glProgramParameteriARB( GLuint program, GLenum pname, GL } static void WINAPI wine_glProgramParameteriEXT( GLuint program, GLenum pname, GLint value ) { - void (*func_glProgramParameteriEXT)( GLuint, GLenum, GLint ) = extension_funcs[891]; + void (*func_glProgramParameteriEXT)( GLuint, GLenum, GLint ) = extension_funcs[EXT_glProgramParameteriEXT]; TRACE("(%d, %d, %d)\n", program, pname, value ); ENTER_GL(); func_glProgramParameteriEXT( program, pname, value ); @@ -7274,7 +8764,7 @@ static void WINAPI wine_glProgramParameteriEXT( GLuint program, GLenum pname, GL } static void WINAPI wine_glProgramParameters4dvNV( GLenum target, GLuint index, GLuint count, GLdouble* v ) { - void (*func_glProgramParameters4dvNV)( GLenum, GLuint, GLuint, GLdouble* ) = extension_funcs[892]; + void (*func_glProgramParameters4dvNV)( GLenum, GLuint, GLuint, GLdouble* ) = extension_funcs[EXT_glProgramParameters4dvNV]; TRACE("(%d, %d, %d, %p)\n", target, index, count, v ); ENTER_GL(); func_glProgramParameters4dvNV( target, index, count, v ); @@ -7282,7 +8772,7 @@ static void WINAPI wine_glProgramParameters4dvNV( GLenum target, GLuint index, G } static void WINAPI wine_glProgramParameters4fvNV( GLenum target, GLuint index, GLuint count, GLfloat* v ) { - void (*func_glProgramParameters4fvNV)( GLenum, GLuint, GLuint, GLfloat* ) = extension_funcs[893]; + void (*func_glProgramParameters4fvNV)( GLenum, GLuint, GLuint, GLfloat* ) = extension_funcs[EXT_glProgramParameters4fvNV]; TRACE("(%d, %d, %d, %p)\n", target, index, count, v ); ENTER_GL(); func_glProgramParameters4fvNV( target, index, count, v ); @@ -7290,7 +8780,7 @@ static void WINAPI wine_glProgramParameters4fvNV( GLenum target, GLuint index, G } static void WINAPI wine_glProgramStringARB( GLenum target, GLenum format, GLsizei len, GLvoid* string ) { - void (*func_glProgramStringARB)( GLenum, GLenum, GLsizei, GLvoid* ) = extension_funcs[894]; + void (*func_glProgramStringARB)( GLenum, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glProgramStringARB]; TRACE("(%d, %d, %d, %p)\n", target, format, len, string ); ENTER_GL(); func_glProgramStringARB( target, format, len, string ); @@ -7298,7 +8788,7 @@ static void WINAPI wine_glProgramStringARB( GLenum target, GLenum format, GLsize } static void WINAPI wine_glProgramUniform1fEXT( GLuint program, GLint location, GLfloat v0 ) { - void (*func_glProgramUniform1fEXT)( GLuint, GLint, GLfloat ) = extension_funcs[895]; + void (*func_glProgramUniform1fEXT)( GLuint, GLint, GLfloat ) = extension_funcs[EXT_glProgramUniform1fEXT]; TRACE("(%d, %d, %f)\n", program, location, v0 ); ENTER_GL(); func_glProgramUniform1fEXT( program, location, v0 ); @@ -7306,7 +8796,7 @@ static void WINAPI wine_glProgramUniform1fEXT( GLuint program, GLint location, G } static void WINAPI wine_glProgramUniform1fvEXT( GLuint program, GLint location, GLsizei count, GLfloat* value ) { - void (*func_glProgramUniform1fvEXT)( GLuint, GLint, GLsizei, GLfloat* ) = extension_funcs[896]; + void (*func_glProgramUniform1fvEXT)( GLuint, GLint, GLsizei, GLfloat* ) = extension_funcs[EXT_glProgramUniform1fvEXT]; TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); ENTER_GL(); func_glProgramUniform1fvEXT( program, location, count, value ); @@ -7314,7 +8804,7 @@ static void WINAPI wine_glProgramUniform1fvEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform1iEXT( GLuint program, GLint location, GLint v0 ) { - void (*func_glProgramUniform1iEXT)( GLuint, GLint, GLint ) = extension_funcs[897]; + void (*func_glProgramUniform1iEXT)( GLuint, GLint, GLint ) = extension_funcs[EXT_glProgramUniform1iEXT]; TRACE("(%d, %d, %d)\n", program, location, v0 ); ENTER_GL(); func_glProgramUniform1iEXT( program, location, v0 ); @@ -7322,7 +8812,7 @@ static void WINAPI wine_glProgramUniform1iEXT( GLuint program, GLint location, G } static void WINAPI wine_glProgramUniform1ivEXT( GLuint program, GLint location, GLsizei count, GLint* value ) { - void (*func_glProgramUniform1ivEXT)( GLuint, GLint, GLsizei, GLint* ) = extension_funcs[898]; + void (*func_glProgramUniform1ivEXT)( GLuint, GLint, GLsizei, GLint* ) = extension_funcs[EXT_glProgramUniform1ivEXT]; TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); ENTER_GL(); func_glProgramUniform1ivEXT( program, location, count, value ); @@ -7330,7 +8820,7 @@ static void WINAPI wine_glProgramUniform1ivEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform1uiEXT( GLuint program, GLint location, GLuint v0 ) { - void (*func_glProgramUniform1uiEXT)( GLuint, GLint, GLuint ) = extension_funcs[899]; + void (*func_glProgramUniform1uiEXT)( GLuint, GLint, GLuint ) = extension_funcs[EXT_glProgramUniform1uiEXT]; TRACE("(%d, %d, %d)\n", program, location, v0 ); ENTER_GL(); func_glProgramUniform1uiEXT( program, location, v0 ); @@ -7338,7 +8828,7 @@ static void WINAPI wine_glProgramUniform1uiEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform1uivEXT( GLuint program, GLint location, GLsizei count, GLuint* value ) { - void (*func_glProgramUniform1uivEXT)( GLuint, GLint, GLsizei, GLuint* ) = extension_funcs[900]; + void (*func_glProgramUniform1uivEXT)( GLuint, GLint, GLsizei, GLuint* ) = extension_funcs[EXT_glProgramUniform1uivEXT]; TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); ENTER_GL(); func_glProgramUniform1uivEXT( program, location, count, value ); @@ -7346,7 +8836,7 @@ static void WINAPI wine_glProgramUniform1uivEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform2fEXT( GLuint program, GLint location, GLfloat v0, GLfloat v1 ) { - void (*func_glProgramUniform2fEXT)( GLuint, GLint, GLfloat, GLfloat ) = extension_funcs[901]; + void (*func_glProgramUniform2fEXT)( GLuint, GLint, GLfloat, GLfloat ) = extension_funcs[EXT_glProgramUniform2fEXT]; TRACE("(%d, %d, %f, %f)\n", program, location, v0, v1 ); ENTER_GL(); func_glProgramUniform2fEXT( program, location, v0, v1 ); @@ -7354,7 +8844,7 @@ static void WINAPI wine_glProgramUniform2fEXT( GLuint program, GLint location, G } static void WINAPI wine_glProgramUniform2fvEXT( GLuint program, GLint location, GLsizei count, GLfloat* value ) { - void (*func_glProgramUniform2fvEXT)( GLuint, GLint, GLsizei, GLfloat* ) = extension_funcs[902]; + void (*func_glProgramUniform2fvEXT)( GLuint, GLint, GLsizei, GLfloat* ) = extension_funcs[EXT_glProgramUniform2fvEXT]; TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); ENTER_GL(); func_glProgramUniform2fvEXT( program, location, count, value ); @@ -7362,7 +8852,7 @@ static void WINAPI wine_glProgramUniform2fvEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform2iEXT( GLuint program, GLint location, GLint v0, GLint v1 ) { - void (*func_glProgramUniform2iEXT)( GLuint, GLint, GLint, GLint ) = extension_funcs[903]; + void (*func_glProgramUniform2iEXT)( GLuint, GLint, GLint, GLint ) = extension_funcs[EXT_glProgramUniform2iEXT]; TRACE("(%d, %d, %d, %d)\n", program, location, v0, v1 ); ENTER_GL(); func_glProgramUniform2iEXT( program, location, v0, v1 ); @@ -7370,7 +8860,7 @@ static void WINAPI wine_glProgramUniform2iEXT( GLuint program, GLint location, G } static void WINAPI wine_glProgramUniform2ivEXT( GLuint program, GLint location, GLsizei count, GLint* value ) { - void (*func_glProgramUniform2ivEXT)( GLuint, GLint, GLsizei, GLint* ) = extension_funcs[904]; + void (*func_glProgramUniform2ivEXT)( GLuint, GLint, GLsizei, GLint* ) = extension_funcs[EXT_glProgramUniform2ivEXT]; TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); ENTER_GL(); func_glProgramUniform2ivEXT( program, location, count, value ); @@ -7378,7 +8868,7 @@ static void WINAPI wine_glProgramUniform2ivEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform2uiEXT( GLuint program, GLint location, GLuint v0, GLuint v1 ) { - void (*func_glProgramUniform2uiEXT)( GLuint, GLint, GLuint, GLuint ) = extension_funcs[905]; + void (*func_glProgramUniform2uiEXT)( GLuint, GLint, GLuint, GLuint ) = extension_funcs[EXT_glProgramUniform2uiEXT]; TRACE("(%d, %d, %d, %d)\n", program, location, v0, v1 ); ENTER_GL(); func_glProgramUniform2uiEXT( program, location, v0, v1 ); @@ -7386,7 +8876,7 @@ static void WINAPI wine_glProgramUniform2uiEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform2uivEXT( GLuint program, GLint location, GLsizei count, GLuint* value ) { - void (*func_glProgramUniform2uivEXT)( GLuint, GLint, GLsizei, GLuint* ) = extension_funcs[906]; + void (*func_glProgramUniform2uivEXT)( GLuint, GLint, GLsizei, GLuint* ) = extension_funcs[EXT_glProgramUniform2uivEXT]; TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); ENTER_GL(); func_glProgramUniform2uivEXT( program, location, count, value ); @@ -7394,7 +8884,7 @@ static void WINAPI wine_glProgramUniform2uivEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform3fEXT( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ) { - void (*func_glProgramUniform3fEXT)( GLuint, GLint, GLfloat, GLfloat, GLfloat ) = extension_funcs[907]; + void (*func_glProgramUniform3fEXT)( GLuint, GLint, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glProgramUniform3fEXT]; TRACE("(%d, %d, %f, %f, %f)\n", program, location, v0, v1, v2 ); ENTER_GL(); func_glProgramUniform3fEXT( program, location, v0, v1, v2 ); @@ -7402,7 +8892,7 @@ static void WINAPI wine_glProgramUniform3fEXT( GLuint program, GLint location, G } static void WINAPI wine_glProgramUniform3fvEXT( GLuint program, GLint location, GLsizei count, GLfloat* value ) { - void (*func_glProgramUniform3fvEXT)( GLuint, GLint, GLsizei, GLfloat* ) = extension_funcs[908]; + void (*func_glProgramUniform3fvEXT)( GLuint, GLint, GLsizei, GLfloat* ) = extension_funcs[EXT_glProgramUniform3fvEXT]; TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); ENTER_GL(); func_glProgramUniform3fvEXT( program, location, count, value ); @@ -7410,7 +8900,7 @@ static void WINAPI wine_glProgramUniform3fvEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform3iEXT( GLuint program, GLint location, GLint v0, GLint v1, GLint v2 ) { - void (*func_glProgramUniform3iEXT)( GLuint, GLint, GLint, GLint, GLint ) = extension_funcs[909]; + void (*func_glProgramUniform3iEXT)( GLuint, GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glProgramUniform3iEXT]; TRACE("(%d, %d, %d, %d, %d)\n", program, location, v0, v1, v2 ); ENTER_GL(); func_glProgramUniform3iEXT( program, location, v0, v1, v2 ); @@ -7418,7 +8908,7 @@ static void WINAPI wine_glProgramUniform3iEXT( GLuint program, GLint location, G } static void WINAPI wine_glProgramUniform3ivEXT( GLuint program, GLint location, GLsizei count, GLint* value ) { - void (*func_glProgramUniform3ivEXT)( GLuint, GLint, GLsizei, GLint* ) = extension_funcs[910]; + void (*func_glProgramUniform3ivEXT)( GLuint, GLint, GLsizei, GLint* ) = extension_funcs[EXT_glProgramUniform3ivEXT]; TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); ENTER_GL(); func_glProgramUniform3ivEXT( program, location, count, value ); @@ -7426,7 +8916,7 @@ static void WINAPI wine_glProgramUniform3ivEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform3uiEXT( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2 ) { - void (*func_glProgramUniform3uiEXT)( GLuint, GLint, GLuint, GLuint, GLuint ) = extension_funcs[911]; + void (*func_glProgramUniform3uiEXT)( GLuint, GLint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glProgramUniform3uiEXT]; TRACE("(%d, %d, %d, %d, %d)\n", program, location, v0, v1, v2 ); ENTER_GL(); func_glProgramUniform3uiEXT( program, location, v0, v1, v2 ); @@ -7434,7 +8924,7 @@ static void WINAPI wine_glProgramUniform3uiEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform3uivEXT( GLuint program, GLint location, GLsizei count, GLuint* value ) { - void (*func_glProgramUniform3uivEXT)( GLuint, GLint, GLsizei, GLuint* ) = extension_funcs[912]; + void (*func_glProgramUniform3uivEXT)( GLuint, GLint, GLsizei, GLuint* ) = extension_funcs[EXT_glProgramUniform3uivEXT]; TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); ENTER_GL(); func_glProgramUniform3uivEXT( program, location, count, value ); @@ -7442,7 +8932,7 @@ static void WINAPI wine_glProgramUniform3uivEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform4fEXT( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) { - void (*func_glProgramUniform4fEXT)( GLuint, GLint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[913]; + void (*func_glProgramUniform4fEXT)( GLuint, GLint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glProgramUniform4fEXT]; TRACE("(%d, %d, %f, %f, %f, %f)\n", program, location, v0, v1, v2, v3 ); ENTER_GL(); func_glProgramUniform4fEXT( program, location, v0, v1, v2, v3 ); @@ -7450,7 +8940,7 @@ static void WINAPI wine_glProgramUniform4fEXT( GLuint program, GLint location, G } static void WINAPI wine_glProgramUniform4fvEXT( GLuint program, GLint location, GLsizei count, GLfloat* value ) { - void (*func_glProgramUniform4fvEXT)( GLuint, GLint, GLsizei, GLfloat* ) = extension_funcs[914]; + void (*func_glProgramUniform4fvEXT)( GLuint, GLint, GLsizei, GLfloat* ) = extension_funcs[EXT_glProgramUniform4fvEXT]; TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); ENTER_GL(); func_glProgramUniform4fvEXT( program, location, count, value ); @@ -7458,7 +8948,7 @@ static void WINAPI wine_glProgramUniform4fvEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform4iEXT( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ) { - void (*func_glProgramUniform4iEXT)( GLuint, GLint, GLint, GLint, GLint, GLint ) = extension_funcs[915]; + void (*func_glProgramUniform4iEXT)( GLuint, GLint, GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glProgramUniform4iEXT]; TRACE("(%d, %d, %d, %d, %d, %d)\n", program, location, v0, v1, v2, v3 ); ENTER_GL(); func_glProgramUniform4iEXT( program, location, v0, v1, v2, v3 ); @@ -7466,7 +8956,7 @@ static void WINAPI wine_glProgramUniform4iEXT( GLuint program, GLint location, G } static void WINAPI wine_glProgramUniform4ivEXT( GLuint program, GLint location, GLsizei count, GLint* value ) { - void (*func_glProgramUniform4ivEXT)( GLuint, GLint, GLsizei, GLint* ) = extension_funcs[916]; + void (*func_glProgramUniform4ivEXT)( GLuint, GLint, GLsizei, GLint* ) = extension_funcs[EXT_glProgramUniform4ivEXT]; TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); ENTER_GL(); func_glProgramUniform4ivEXT( program, location, count, value ); @@ -7474,7 +8964,7 @@ static void WINAPI wine_glProgramUniform4ivEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform4uiEXT( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) { - void (*func_glProgramUniform4uiEXT)( GLuint, GLint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[917]; + void (*func_glProgramUniform4uiEXT)( GLuint, GLint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glProgramUniform4uiEXT]; TRACE("(%d, %d, %d, %d, %d, %d)\n", program, location, v0, v1, v2, v3 ); ENTER_GL(); func_glProgramUniform4uiEXT( program, location, v0, v1, v2, v3 ); @@ -7482,7 +8972,7 @@ static void WINAPI wine_glProgramUniform4uiEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniform4uivEXT( GLuint program, GLint location, GLsizei count, GLuint* value ) { - void (*func_glProgramUniform4uivEXT)( GLuint, GLint, GLsizei, GLuint* ) = extension_funcs[918]; + void (*func_glProgramUniform4uivEXT)( GLuint, GLint, GLsizei, GLuint* ) = extension_funcs[EXT_glProgramUniform4uivEXT]; TRACE("(%d, %d, %d, %p)\n", program, location, count, value ); ENTER_GL(); func_glProgramUniform4uivEXT( program, location, count, value ); @@ -7490,7 +8980,7 @@ static void WINAPI wine_glProgramUniform4uivEXT( GLuint program, GLint location, } static void WINAPI wine_glProgramUniformMatrix2fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glProgramUniformMatrix2fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[919]; + void (*func_glProgramUniformMatrix2fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix2fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); ENTER_GL(); func_glProgramUniformMatrix2fvEXT( program, location, count, transpose, value ); @@ -7498,7 +8988,7 @@ static void WINAPI wine_glProgramUniformMatrix2fvEXT( GLuint program, GLint loca } static void WINAPI wine_glProgramUniformMatrix2x3fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glProgramUniformMatrix2x3fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[920]; + void (*func_glProgramUniformMatrix2x3fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix2x3fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); ENTER_GL(); func_glProgramUniformMatrix2x3fvEXT( program, location, count, transpose, value ); @@ -7506,7 +8996,7 @@ static void WINAPI wine_glProgramUniformMatrix2x3fvEXT( GLuint program, GLint lo } static void WINAPI wine_glProgramUniformMatrix2x4fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glProgramUniformMatrix2x4fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[921]; + void (*func_glProgramUniformMatrix2x4fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix2x4fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); ENTER_GL(); func_glProgramUniformMatrix2x4fvEXT( program, location, count, transpose, value ); @@ -7514,7 +9004,7 @@ static void WINAPI wine_glProgramUniformMatrix2x4fvEXT( GLuint program, GLint lo } static void WINAPI wine_glProgramUniformMatrix3fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glProgramUniformMatrix3fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[922]; + void (*func_glProgramUniformMatrix3fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix3fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); ENTER_GL(); func_glProgramUniformMatrix3fvEXT( program, location, count, transpose, value ); @@ -7522,7 +9012,7 @@ static void WINAPI wine_glProgramUniformMatrix3fvEXT( GLuint program, GLint loca } static void WINAPI wine_glProgramUniformMatrix3x2fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glProgramUniformMatrix3x2fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[923]; + void (*func_glProgramUniformMatrix3x2fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix3x2fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); ENTER_GL(); func_glProgramUniformMatrix3x2fvEXT( program, location, count, transpose, value ); @@ -7530,7 +9020,7 @@ static void WINAPI wine_glProgramUniformMatrix3x2fvEXT( GLuint program, GLint lo } static void WINAPI wine_glProgramUniformMatrix3x4fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glProgramUniformMatrix3x4fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[924]; + void (*func_glProgramUniformMatrix3x4fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix3x4fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); ENTER_GL(); func_glProgramUniformMatrix3x4fvEXT( program, location, count, transpose, value ); @@ -7538,7 +9028,7 @@ static void WINAPI wine_glProgramUniformMatrix3x4fvEXT( GLuint program, GLint lo } static void WINAPI wine_glProgramUniformMatrix4fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glProgramUniformMatrix4fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[925]; + void (*func_glProgramUniformMatrix4fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix4fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); ENTER_GL(); func_glProgramUniformMatrix4fvEXT( program, location, count, transpose, value ); @@ -7546,7 +9036,7 @@ static void WINAPI wine_glProgramUniformMatrix4fvEXT( GLuint program, GLint loca } static void WINAPI wine_glProgramUniformMatrix4x2fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glProgramUniformMatrix4x2fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[926]; + void (*func_glProgramUniformMatrix4x2fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix4x2fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); ENTER_GL(); func_glProgramUniformMatrix4x2fvEXT( program, location, count, transpose, value ); @@ -7554,7 +9044,7 @@ static void WINAPI wine_glProgramUniformMatrix4x2fvEXT( GLuint program, GLint lo } static void WINAPI wine_glProgramUniformMatrix4x3fvEXT( GLuint program, GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glProgramUniformMatrix4x3fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[927]; + void (*func_glProgramUniformMatrix4x3fvEXT)( GLuint, GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glProgramUniformMatrix4x3fvEXT]; TRACE("(%d, %d, %d, %d, %p)\n", program, location, count, transpose, value ); ENTER_GL(); func_glProgramUniformMatrix4x3fvEXT( program, location, count, transpose, value ); @@ -7562,7 +9052,7 @@ static void WINAPI wine_glProgramUniformMatrix4x3fvEXT( GLuint program, GLint lo } static void WINAPI wine_glProgramVertexLimitNV( GLenum target, GLint limit ) { - void (*func_glProgramVertexLimitNV)( GLenum, GLint ) = extension_funcs[928]; + void (*func_glProgramVertexLimitNV)( GLenum, GLint ) = extension_funcs[EXT_glProgramVertexLimitNV]; TRACE("(%d, %d)\n", target, limit ); ENTER_GL(); func_glProgramVertexLimitNV( target, limit ); @@ -7570,7 +9060,7 @@ static void WINAPI wine_glProgramVertexLimitNV( GLenum target, GLint limit ) { } static void WINAPI wine_glPushClientAttribDefaultEXT( GLbitfield mask ) { - void (*func_glPushClientAttribDefaultEXT)( GLbitfield ) = extension_funcs[929]; + void (*func_glPushClientAttribDefaultEXT)( GLbitfield ) = extension_funcs[EXT_glPushClientAttribDefaultEXT]; TRACE("(%d)\n", mask ); ENTER_GL(); func_glPushClientAttribDefaultEXT( mask ); @@ -7578,7 +9068,7 @@ static void WINAPI wine_glPushClientAttribDefaultEXT( GLbitfield mask ) { } static void WINAPI wine_glReadBufferRegion( GLenum region, GLint x, GLint y, GLsizei width, GLsizei height ) { - void (*func_glReadBufferRegion)( GLenum, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[930]; + void (*func_glReadBufferRegion)( GLenum, GLint, GLint, GLsizei, GLsizei ) = extension_funcs[EXT_glReadBufferRegion]; TRACE("(%d, %d, %d, %d, %d)\n", region, x, y, width, height ); ENTER_GL(); func_glReadBufferRegion( region, x, y, width, height ); @@ -7586,7 +9076,7 @@ static void WINAPI wine_glReadBufferRegion( GLenum region, GLint x, GLint y, GLs } static void WINAPI wine_glReadInstrumentsSGIX( GLint marker ) { - void (*func_glReadInstrumentsSGIX)( GLint ) = extension_funcs[931]; + void (*func_glReadInstrumentsSGIX)( GLint ) = extension_funcs[EXT_glReadInstrumentsSGIX]; TRACE("(%d)\n", marker ); ENTER_GL(); func_glReadInstrumentsSGIX( marker ); @@ -7594,7 +9084,7 @@ static void WINAPI wine_glReadInstrumentsSGIX( GLint marker ) { } static void WINAPI wine_glReferencePlaneSGIX( GLdouble* equation ) { - void (*func_glReferencePlaneSGIX)( GLdouble* ) = extension_funcs[932]; + void (*func_glReferencePlaneSGIX)( GLdouble* ) = extension_funcs[EXT_glReferencePlaneSGIX]; TRACE("(%p)\n", equation ); ENTER_GL(); func_glReferencePlaneSGIX( equation ); @@ -7602,7 +9092,7 @@ static void WINAPI wine_glReferencePlaneSGIX( GLdouble* equation ) { } static void WINAPI wine_glRenderbufferStorage( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) { - void (*func_glRenderbufferStorage)( GLenum, GLenum, GLsizei, GLsizei ) = extension_funcs[933]; + void (*func_glRenderbufferStorage)( GLenum, GLenum, GLsizei, GLsizei ) = extension_funcs[EXT_glRenderbufferStorage]; TRACE("(%d, %d, %d, %d)\n", target, internalformat, width, height ); ENTER_GL(); func_glRenderbufferStorage( target, internalformat, width, height ); @@ -7610,7 +9100,7 @@ static void WINAPI wine_glRenderbufferStorage( GLenum target, GLenum internalfor } static void WINAPI wine_glRenderbufferStorageEXT( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) { - void (*func_glRenderbufferStorageEXT)( GLenum, GLenum, GLsizei, GLsizei ) = extension_funcs[934]; + void (*func_glRenderbufferStorageEXT)( GLenum, GLenum, GLsizei, GLsizei ) = extension_funcs[EXT_glRenderbufferStorageEXT]; TRACE("(%d, %d, %d, %d)\n", target, internalformat, width, height ); ENTER_GL(); func_glRenderbufferStorageEXT( target, internalformat, width, height ); @@ -7618,7 +9108,7 @@ static void WINAPI wine_glRenderbufferStorageEXT( GLenum target, GLenum internal } static void WINAPI wine_glRenderbufferStorageMultisample( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ) { - void (*func_glRenderbufferStorageMultisample)( GLenum, GLsizei, GLenum, GLsizei, GLsizei ) = extension_funcs[935]; + void (*func_glRenderbufferStorageMultisample)( GLenum, GLsizei, GLenum, GLsizei, GLsizei ) = extension_funcs[EXT_glRenderbufferStorageMultisample]; TRACE("(%d, %d, %d, %d, %d)\n", target, samples, internalformat, width, height ); ENTER_GL(); func_glRenderbufferStorageMultisample( target, samples, internalformat, width, height ); @@ -7626,7 +9116,7 @@ static void WINAPI wine_glRenderbufferStorageMultisample( GLenum target, GLsizei } static void WINAPI wine_glRenderbufferStorageMultisampleCoverageNV( GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height ) { - void (*func_glRenderbufferStorageMultisampleCoverageNV)( GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei ) = extension_funcs[936]; + void (*func_glRenderbufferStorageMultisampleCoverageNV)( GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei ) = extension_funcs[EXT_glRenderbufferStorageMultisampleCoverageNV]; TRACE("(%d, %d, %d, %d, %d, %d)\n", target, coverageSamples, colorSamples, internalformat, width, height ); ENTER_GL(); func_glRenderbufferStorageMultisampleCoverageNV( target, coverageSamples, colorSamples, internalformat, width, height ); @@ -7634,7 +9124,7 @@ static void WINAPI wine_glRenderbufferStorageMultisampleCoverageNV( GLenum targe } static void WINAPI wine_glRenderbufferStorageMultisampleEXT( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ) { - void (*func_glRenderbufferStorageMultisampleEXT)( GLenum, GLsizei, GLenum, GLsizei, GLsizei ) = extension_funcs[937]; + void (*func_glRenderbufferStorageMultisampleEXT)( GLenum, GLsizei, GLenum, GLsizei, GLsizei ) = extension_funcs[EXT_glRenderbufferStorageMultisampleEXT]; TRACE("(%d, %d, %d, %d, %d)\n", target, samples, internalformat, width, height ); ENTER_GL(); func_glRenderbufferStorageMultisampleEXT( target, samples, internalformat, width, height ); @@ -7642,7 +9132,7 @@ static void WINAPI wine_glRenderbufferStorageMultisampleEXT( GLenum target, GLsi } static void WINAPI wine_glReplacementCodePointerSUN( GLenum type, GLsizei stride, GLvoid** pointer ) { - void (*func_glReplacementCodePointerSUN)( GLenum, GLsizei, GLvoid** ) = extension_funcs[938]; + void (*func_glReplacementCodePointerSUN)( GLenum, GLsizei, GLvoid** ) = extension_funcs[EXT_glReplacementCodePointerSUN]; TRACE("(%d, %d, %p)\n", type, stride, pointer ); ENTER_GL(); func_glReplacementCodePointerSUN( type, stride, pointer ); @@ -7650,7 +9140,7 @@ static void WINAPI wine_glReplacementCodePointerSUN( GLenum type, GLsizei stride } static void WINAPI wine_glReplacementCodeubSUN( GLubyte code ) { - void (*func_glReplacementCodeubSUN)( GLubyte ) = extension_funcs[939]; + void (*func_glReplacementCodeubSUN)( GLubyte ) = extension_funcs[EXT_glReplacementCodeubSUN]; TRACE("(%d)\n", code ); ENTER_GL(); func_glReplacementCodeubSUN( code ); @@ -7658,7 +9148,7 @@ static void WINAPI wine_glReplacementCodeubSUN( GLubyte code ) { } static void WINAPI wine_glReplacementCodeubvSUN( GLubyte* code ) { - void (*func_glReplacementCodeubvSUN)( GLubyte* ) = extension_funcs[940]; + void (*func_glReplacementCodeubvSUN)( GLubyte* ) = extension_funcs[EXT_glReplacementCodeubvSUN]; TRACE("(%p)\n", code ); ENTER_GL(); func_glReplacementCodeubvSUN( code ); @@ -7666,7 +9156,7 @@ static void WINAPI wine_glReplacementCodeubvSUN( GLubyte* code ) { } static void WINAPI wine_glReplacementCodeuiColor3fVertex3fSUN( GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glReplacementCodeuiColor3fVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[941]; + void (*func_glReplacementCodeuiColor3fVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glReplacementCodeuiColor3fVertex3fSUN]; TRACE("(%d, %f, %f, %f, %f, %f, %f)\n", rc, r, g, b, x, y, z ); ENTER_GL(); func_glReplacementCodeuiColor3fVertex3fSUN( rc, r, g, b, x, y, z ); @@ -7674,7 +9164,7 @@ static void WINAPI wine_glReplacementCodeuiColor3fVertex3fSUN( GLuint rc, GLfloa } static void WINAPI wine_glReplacementCodeuiColor3fVertex3fvSUN( GLuint* rc, GLfloat* c, GLfloat* v ) { - void (*func_glReplacementCodeuiColor3fVertex3fvSUN)( GLuint*, GLfloat*, GLfloat* ) = extension_funcs[942]; + void (*func_glReplacementCodeuiColor3fVertex3fvSUN)( GLuint*, GLfloat*, GLfloat* ) = extension_funcs[EXT_glReplacementCodeuiColor3fVertex3fvSUN]; TRACE("(%p, %p, %p)\n", rc, c, v ); ENTER_GL(); func_glReplacementCodeuiColor3fVertex3fvSUN( rc, c, v ); @@ -7682,7 +9172,7 @@ static void WINAPI wine_glReplacementCodeuiColor3fVertex3fvSUN( GLuint* rc, GLfl } static void WINAPI wine_glReplacementCodeuiColor4fNormal3fVertex3fSUN( GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glReplacementCodeuiColor4fNormal3fVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[943]; + void (*func_glReplacementCodeuiColor4fNormal3fVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glReplacementCodeuiColor4fNormal3fVertex3fSUN]; TRACE("(%d, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f)\n", rc, r, g, b, a, nx, ny, nz, x, y, z ); ENTER_GL(); func_glReplacementCodeuiColor4fNormal3fVertex3fSUN( rc, r, g, b, a, nx, ny, nz, x, y, z ); @@ -7690,7 +9180,7 @@ static void WINAPI wine_glReplacementCodeuiColor4fNormal3fVertex3fSUN( GLuint rc } static void WINAPI wine_glReplacementCodeuiColor4fNormal3fVertex3fvSUN( GLuint* rc, GLfloat* c, GLfloat* n, GLfloat* v ) { - void (*func_glReplacementCodeuiColor4fNormal3fVertex3fvSUN)( GLuint*, GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[944]; + void (*func_glReplacementCodeuiColor4fNormal3fVertex3fvSUN)( GLuint*, GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[EXT_glReplacementCodeuiColor4fNormal3fVertex3fvSUN]; TRACE("(%p, %p, %p, %p)\n", rc, c, n, v ); ENTER_GL(); func_glReplacementCodeuiColor4fNormal3fVertex3fvSUN( rc, c, n, v ); @@ -7698,7 +9188,7 @@ static void WINAPI wine_glReplacementCodeuiColor4fNormal3fVertex3fvSUN( GLuint* } static void WINAPI wine_glReplacementCodeuiColor4ubVertex3fSUN( GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glReplacementCodeuiColor4ubVertex3fSUN)( GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat ) = extension_funcs[945]; + void (*func_glReplacementCodeuiColor4ubVertex3fSUN)( GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glReplacementCodeuiColor4ubVertex3fSUN]; TRACE("(%d, %d, %d, %d, %d, %f, %f, %f)\n", rc, r, g, b, a, x, y, z ); ENTER_GL(); func_glReplacementCodeuiColor4ubVertex3fSUN( rc, r, g, b, a, x, y, z ); @@ -7706,7 +9196,7 @@ static void WINAPI wine_glReplacementCodeuiColor4ubVertex3fSUN( GLuint rc, GLuby } static void WINAPI wine_glReplacementCodeuiColor4ubVertex3fvSUN( GLuint* rc, GLubyte* c, GLfloat* v ) { - void (*func_glReplacementCodeuiColor4ubVertex3fvSUN)( GLuint*, GLubyte*, GLfloat* ) = extension_funcs[946]; + void (*func_glReplacementCodeuiColor4ubVertex3fvSUN)( GLuint*, GLubyte*, GLfloat* ) = extension_funcs[EXT_glReplacementCodeuiColor4ubVertex3fvSUN]; TRACE("(%p, %p, %p)\n", rc, c, v ); ENTER_GL(); func_glReplacementCodeuiColor4ubVertex3fvSUN( rc, c, v ); @@ -7714,7 +9204,7 @@ static void WINAPI wine_glReplacementCodeuiColor4ubVertex3fvSUN( GLuint* rc, GLu } static void WINAPI wine_glReplacementCodeuiNormal3fVertex3fSUN( GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glReplacementCodeuiNormal3fVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[947]; + void (*func_glReplacementCodeuiNormal3fVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glReplacementCodeuiNormal3fVertex3fSUN]; TRACE("(%d, %f, %f, %f, %f, %f, %f)\n", rc, nx, ny, nz, x, y, z ); ENTER_GL(); func_glReplacementCodeuiNormal3fVertex3fSUN( rc, nx, ny, nz, x, y, z ); @@ -7722,7 +9212,7 @@ static void WINAPI wine_glReplacementCodeuiNormal3fVertex3fSUN( GLuint rc, GLflo } static void WINAPI wine_glReplacementCodeuiNormal3fVertex3fvSUN( GLuint* rc, GLfloat* n, GLfloat* v ) { - void (*func_glReplacementCodeuiNormal3fVertex3fvSUN)( GLuint*, GLfloat*, GLfloat* ) = extension_funcs[948]; + void (*func_glReplacementCodeuiNormal3fVertex3fvSUN)( GLuint*, GLfloat*, GLfloat* ) = extension_funcs[EXT_glReplacementCodeuiNormal3fVertex3fvSUN]; TRACE("(%p, %p, %p)\n", rc, n, v ); ENTER_GL(); func_glReplacementCodeuiNormal3fVertex3fvSUN( rc, n, v ); @@ -7730,7 +9220,7 @@ static void WINAPI wine_glReplacementCodeuiNormal3fVertex3fvSUN( GLuint* rc, GLf } static void WINAPI wine_glReplacementCodeuiSUN( GLuint code ) { - void (*func_glReplacementCodeuiSUN)( GLuint ) = extension_funcs[949]; + void (*func_glReplacementCodeuiSUN)( GLuint ) = extension_funcs[EXT_glReplacementCodeuiSUN]; TRACE("(%d)\n", code ); ENTER_GL(); func_glReplacementCodeuiSUN( code ); @@ -7738,7 +9228,7 @@ static void WINAPI wine_glReplacementCodeuiSUN( GLuint code ) { } static void WINAPI wine_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN( GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[950]; + void (*func_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN]; TRACE("(%d, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f)\n", rc, s, t, r, g, b, a, nx, ny, nz, x, y, z ); ENTER_GL(); func_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN( rc, s, t, r, g, b, a, nx, ny, nz, x, y, z ); @@ -7746,7 +9236,7 @@ static void WINAPI wine_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN( } static void WINAPI wine_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN( GLuint* rc, GLfloat* tc, GLfloat* c, GLfloat* n, GLfloat* v ) { - void (*func_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN)( GLuint*, GLfloat*, GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[951]; + void (*func_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN)( GLuint*, GLfloat*, GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[EXT_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN]; TRACE("(%p, %p, %p, %p, %p)\n", rc, tc, c, n, v ); ENTER_GL(); func_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN( rc, tc, c, n, v ); @@ -7754,7 +9244,7 @@ static void WINAPI wine_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN } static void WINAPI wine_glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN( GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[952]; + void (*func_glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN]; TRACE("(%d, %f, %f, %f, %f, %f, %f, %f, %f)\n", rc, s, t, nx, ny, nz, x, y, z ); ENTER_GL(); func_glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN( rc, s, t, nx, ny, nz, x, y, z ); @@ -7762,7 +9252,7 @@ static void WINAPI wine_glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN( GLuint } static void WINAPI wine_glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN( GLuint* rc, GLfloat* tc, GLfloat* n, GLfloat* v ) { - void (*func_glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN)( GLuint*, GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[953]; + void (*func_glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN)( GLuint*, GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[EXT_glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN]; TRACE("(%p, %p, %p, %p)\n", rc, tc, n, v ); ENTER_GL(); func_glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN( rc, tc, n, v ); @@ -7770,7 +9260,7 @@ static void WINAPI wine_glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN( GLuin } static void WINAPI wine_glReplacementCodeuiTexCoord2fVertex3fSUN( GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glReplacementCodeuiTexCoord2fVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[954]; + void (*func_glReplacementCodeuiTexCoord2fVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glReplacementCodeuiTexCoord2fVertex3fSUN]; TRACE("(%d, %f, %f, %f, %f, %f)\n", rc, s, t, x, y, z ); ENTER_GL(); func_glReplacementCodeuiTexCoord2fVertex3fSUN( rc, s, t, x, y, z ); @@ -7778,7 +9268,7 @@ static void WINAPI wine_glReplacementCodeuiTexCoord2fVertex3fSUN( GLuint rc, GLf } static void WINAPI wine_glReplacementCodeuiTexCoord2fVertex3fvSUN( GLuint* rc, GLfloat* tc, GLfloat* v ) { - void (*func_glReplacementCodeuiTexCoord2fVertex3fvSUN)( GLuint*, GLfloat*, GLfloat* ) = extension_funcs[955]; + void (*func_glReplacementCodeuiTexCoord2fVertex3fvSUN)( GLuint*, GLfloat*, GLfloat* ) = extension_funcs[EXT_glReplacementCodeuiTexCoord2fVertex3fvSUN]; TRACE("(%p, %p, %p)\n", rc, tc, v ); ENTER_GL(); func_glReplacementCodeuiTexCoord2fVertex3fvSUN( rc, tc, v ); @@ -7786,7 +9276,7 @@ static void WINAPI wine_glReplacementCodeuiTexCoord2fVertex3fvSUN( GLuint* rc, G } static void WINAPI wine_glReplacementCodeuiVertex3fSUN( GLuint rc, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glReplacementCodeuiVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat ) = extension_funcs[956]; + void (*func_glReplacementCodeuiVertex3fSUN)( GLuint, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glReplacementCodeuiVertex3fSUN]; TRACE("(%d, %f, %f, %f)\n", rc, x, y, z ); ENTER_GL(); func_glReplacementCodeuiVertex3fSUN( rc, x, y, z ); @@ -7794,7 +9284,7 @@ static void WINAPI wine_glReplacementCodeuiVertex3fSUN( GLuint rc, GLfloat x, GL } static void WINAPI wine_glReplacementCodeuiVertex3fvSUN( GLuint* rc, GLfloat* v ) { - void (*func_glReplacementCodeuiVertex3fvSUN)( GLuint*, GLfloat* ) = extension_funcs[957]; + void (*func_glReplacementCodeuiVertex3fvSUN)( GLuint*, GLfloat* ) = extension_funcs[EXT_glReplacementCodeuiVertex3fvSUN]; TRACE("(%p, %p)\n", rc, v ); ENTER_GL(); func_glReplacementCodeuiVertex3fvSUN( rc, v ); @@ -7802,7 +9292,7 @@ static void WINAPI wine_glReplacementCodeuiVertex3fvSUN( GLuint* rc, GLfloat* v } static void WINAPI wine_glReplacementCodeuivSUN( GLuint* code ) { - void (*func_glReplacementCodeuivSUN)( GLuint* ) = extension_funcs[958]; + void (*func_glReplacementCodeuivSUN)( GLuint* ) = extension_funcs[EXT_glReplacementCodeuivSUN]; TRACE("(%p)\n", code ); ENTER_GL(); func_glReplacementCodeuivSUN( code ); @@ -7810,7 +9300,7 @@ static void WINAPI wine_glReplacementCodeuivSUN( GLuint* code ) { } static void WINAPI wine_glReplacementCodeusSUN( GLushort code ) { - void (*func_glReplacementCodeusSUN)( GLushort ) = extension_funcs[959]; + void (*func_glReplacementCodeusSUN)( GLushort ) = extension_funcs[EXT_glReplacementCodeusSUN]; TRACE("(%d)\n", code ); ENTER_GL(); func_glReplacementCodeusSUN( code ); @@ -7818,7 +9308,7 @@ static void WINAPI wine_glReplacementCodeusSUN( GLushort code ) { } static void WINAPI wine_glReplacementCodeusvSUN( GLushort* code ) { - void (*func_glReplacementCodeusvSUN)( GLushort* ) = extension_funcs[960]; + void (*func_glReplacementCodeusvSUN)( GLushort* ) = extension_funcs[EXT_glReplacementCodeusvSUN]; TRACE("(%p)\n", code ); ENTER_GL(); func_glReplacementCodeusvSUN( code ); @@ -7826,7 +9316,7 @@ static void WINAPI wine_glReplacementCodeusvSUN( GLushort* code ) { } static void WINAPI wine_glRequestResidentProgramsNV( GLsizei n, GLuint* programs ) { - void (*func_glRequestResidentProgramsNV)( GLsizei, GLuint* ) = extension_funcs[961]; + void (*func_glRequestResidentProgramsNV)( GLsizei, GLuint* ) = extension_funcs[EXT_glRequestResidentProgramsNV]; TRACE("(%d, %p)\n", n, programs ); ENTER_GL(); func_glRequestResidentProgramsNV( n, programs ); @@ -7834,7 +9324,7 @@ static void WINAPI wine_glRequestResidentProgramsNV( GLsizei n, GLuint* programs } static void WINAPI wine_glResetHistogramEXT( GLenum target ) { - void (*func_glResetHistogramEXT)( GLenum ) = extension_funcs[962]; + void (*func_glResetHistogramEXT)( GLenum ) = extension_funcs[EXT_glResetHistogramEXT]; TRACE("(%d)\n", target ); ENTER_GL(); func_glResetHistogramEXT( target ); @@ -7842,7 +9332,7 @@ static void WINAPI wine_glResetHistogramEXT( GLenum target ) { } static void WINAPI wine_glResetMinmaxEXT( GLenum target ) { - void (*func_glResetMinmaxEXT)( GLenum ) = extension_funcs[963]; + void (*func_glResetMinmaxEXT)( GLenum ) = extension_funcs[EXT_glResetMinmaxEXT]; TRACE("(%d)\n", target ); ENTER_GL(); func_glResetMinmaxEXT( target ); @@ -7850,7 +9340,7 @@ static void WINAPI wine_glResetMinmaxEXT( GLenum target ) { } static void WINAPI wine_glResizeBuffersMESA( void ) { - void (*func_glResizeBuffersMESA)( void ) = extension_funcs[964]; + void (*func_glResizeBuffersMESA)( void ) = extension_funcs[EXT_glResizeBuffersMESA]; TRACE("()\n"); ENTER_GL(); func_glResizeBuffersMESA( ); @@ -7858,7 +9348,7 @@ static void WINAPI wine_glResizeBuffersMESA( void ) { } static void WINAPI wine_glSampleCoverage( GLclampf value, GLboolean invert ) { - void (*func_glSampleCoverage)( GLclampf, GLboolean ) = extension_funcs[965]; + void (*func_glSampleCoverage)( GLclampf, GLboolean ) = extension_funcs[EXT_glSampleCoverage]; TRACE("(%f, %d)\n", value, invert ); ENTER_GL(); func_glSampleCoverage( value, invert ); @@ -7866,7 +9356,7 @@ static void WINAPI wine_glSampleCoverage( GLclampf value, GLboolean invert ) { } static void WINAPI wine_glSampleCoverageARB( GLclampf value, GLboolean invert ) { - void (*func_glSampleCoverageARB)( GLclampf, GLboolean ) = extension_funcs[966]; + void (*func_glSampleCoverageARB)( GLclampf, GLboolean ) = extension_funcs[EXT_glSampleCoverageARB]; TRACE("(%f, %d)\n", value, invert ); ENTER_GL(); func_glSampleCoverageARB( value, invert ); @@ -7874,7 +9364,7 @@ static void WINAPI wine_glSampleCoverageARB( GLclampf value, GLboolean invert ) } static void WINAPI wine_glSampleMapATI( GLuint dst, GLuint interp, GLenum swizzle ) { - void (*func_glSampleMapATI)( GLuint, GLuint, GLenum ) = extension_funcs[967]; + void (*func_glSampleMapATI)( GLuint, GLuint, GLenum ) = extension_funcs[EXT_glSampleMapATI]; TRACE("(%d, %d, %d)\n", dst, interp, swizzle ); ENTER_GL(); func_glSampleMapATI( dst, interp, swizzle ); @@ -7882,7 +9372,7 @@ static void WINAPI wine_glSampleMapATI( GLuint dst, GLuint interp, GLenum swizzl } static void WINAPI wine_glSampleMaskEXT( GLclampf value, GLboolean invert ) { - void (*func_glSampleMaskEXT)( GLclampf, GLboolean ) = extension_funcs[968]; + void (*func_glSampleMaskEXT)( GLclampf, GLboolean ) = extension_funcs[EXT_glSampleMaskEXT]; TRACE("(%f, %d)\n", value, invert ); ENTER_GL(); func_glSampleMaskEXT( value, invert ); @@ -7890,7 +9380,7 @@ static void WINAPI wine_glSampleMaskEXT( GLclampf value, GLboolean invert ) { } static void WINAPI wine_glSampleMaskSGIS( GLclampf value, GLboolean invert ) { - void (*func_glSampleMaskSGIS)( GLclampf, GLboolean ) = extension_funcs[969]; + void (*func_glSampleMaskSGIS)( GLclampf, GLboolean ) = extension_funcs[EXT_glSampleMaskSGIS]; TRACE("(%f, %d)\n", value, invert ); ENTER_GL(); func_glSampleMaskSGIS( value, invert ); @@ -7898,7 +9388,7 @@ static void WINAPI wine_glSampleMaskSGIS( GLclampf value, GLboolean invert ) { } static void WINAPI wine_glSamplePatternEXT( GLenum pattern ) { - void (*func_glSamplePatternEXT)( GLenum ) = extension_funcs[970]; + void (*func_glSamplePatternEXT)( GLenum ) = extension_funcs[EXT_glSamplePatternEXT]; TRACE("(%d)\n", pattern ); ENTER_GL(); func_glSamplePatternEXT( pattern ); @@ -7906,7 +9396,7 @@ static void WINAPI wine_glSamplePatternEXT( GLenum pattern ) { } static void WINAPI wine_glSamplePatternSGIS( GLenum pattern ) { - void (*func_glSamplePatternSGIS)( GLenum ) = extension_funcs[971]; + void (*func_glSamplePatternSGIS)( GLenum ) = extension_funcs[EXT_glSamplePatternSGIS]; TRACE("(%d)\n", pattern ); ENTER_GL(); func_glSamplePatternSGIS( pattern ); @@ -7914,7 +9404,7 @@ static void WINAPI wine_glSamplePatternSGIS( GLenum pattern ) { } static void WINAPI wine_glSecondaryColor3b( GLbyte red, GLbyte green, GLbyte blue ) { - void (*func_glSecondaryColor3b)( GLbyte, GLbyte, GLbyte ) = extension_funcs[972]; + void (*func_glSecondaryColor3b)( GLbyte, GLbyte, GLbyte ) = extension_funcs[EXT_glSecondaryColor3b]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3b( red, green, blue ); @@ -7922,7 +9412,7 @@ static void WINAPI wine_glSecondaryColor3b( GLbyte red, GLbyte green, GLbyte blu } static void WINAPI wine_glSecondaryColor3bEXT( GLbyte red, GLbyte green, GLbyte blue ) { - void (*func_glSecondaryColor3bEXT)( GLbyte, GLbyte, GLbyte ) = extension_funcs[973]; + void (*func_glSecondaryColor3bEXT)( GLbyte, GLbyte, GLbyte ) = extension_funcs[EXT_glSecondaryColor3bEXT]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3bEXT( red, green, blue ); @@ -7930,7 +9420,7 @@ static void WINAPI wine_glSecondaryColor3bEXT( GLbyte red, GLbyte green, GLbyte } static void WINAPI wine_glSecondaryColor3bv( GLbyte* v ) { - void (*func_glSecondaryColor3bv)( GLbyte* ) = extension_funcs[974]; + void (*func_glSecondaryColor3bv)( GLbyte* ) = extension_funcs[EXT_glSecondaryColor3bv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3bv( v ); @@ -7938,7 +9428,7 @@ static void WINAPI wine_glSecondaryColor3bv( GLbyte* v ) { } static void WINAPI wine_glSecondaryColor3bvEXT( GLbyte* v ) { - void (*func_glSecondaryColor3bvEXT)( GLbyte* ) = extension_funcs[975]; + void (*func_glSecondaryColor3bvEXT)( GLbyte* ) = extension_funcs[EXT_glSecondaryColor3bvEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3bvEXT( v ); @@ -7946,7 +9436,7 @@ static void WINAPI wine_glSecondaryColor3bvEXT( GLbyte* v ) { } static void WINAPI wine_glSecondaryColor3d( GLdouble red, GLdouble green, GLdouble blue ) { - void (*func_glSecondaryColor3d)( GLdouble, GLdouble, GLdouble ) = extension_funcs[976]; + void (*func_glSecondaryColor3d)( GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glSecondaryColor3d]; TRACE("(%f, %f, %f)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3d( red, green, blue ); @@ -7954,7 +9444,7 @@ static void WINAPI wine_glSecondaryColor3d( GLdouble red, GLdouble green, GLdoub } static void WINAPI wine_glSecondaryColor3dEXT( GLdouble red, GLdouble green, GLdouble blue ) { - void (*func_glSecondaryColor3dEXT)( GLdouble, GLdouble, GLdouble ) = extension_funcs[977]; + void (*func_glSecondaryColor3dEXT)( GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glSecondaryColor3dEXT]; TRACE("(%f, %f, %f)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3dEXT( red, green, blue ); @@ -7962,7 +9452,7 @@ static void WINAPI wine_glSecondaryColor3dEXT( GLdouble red, GLdouble green, GLd } static void WINAPI wine_glSecondaryColor3dv( GLdouble* v ) { - void (*func_glSecondaryColor3dv)( GLdouble* ) = extension_funcs[978]; + void (*func_glSecondaryColor3dv)( GLdouble* ) = extension_funcs[EXT_glSecondaryColor3dv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3dv( v ); @@ -7970,7 +9460,7 @@ static void WINAPI wine_glSecondaryColor3dv( GLdouble* v ) { } static void WINAPI wine_glSecondaryColor3dvEXT( GLdouble* v ) { - void (*func_glSecondaryColor3dvEXT)( GLdouble* ) = extension_funcs[979]; + void (*func_glSecondaryColor3dvEXT)( GLdouble* ) = extension_funcs[EXT_glSecondaryColor3dvEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3dvEXT( v ); @@ -7978,7 +9468,7 @@ static void WINAPI wine_glSecondaryColor3dvEXT( GLdouble* v ) { } static void WINAPI wine_glSecondaryColor3f( GLfloat red, GLfloat green, GLfloat blue ) { - void (*func_glSecondaryColor3f)( GLfloat, GLfloat, GLfloat ) = extension_funcs[980]; + void (*func_glSecondaryColor3f)( GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glSecondaryColor3f]; TRACE("(%f, %f, %f)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3f( red, green, blue ); @@ -7986,7 +9476,7 @@ static void WINAPI wine_glSecondaryColor3f( GLfloat red, GLfloat green, GLfloat } static void WINAPI wine_glSecondaryColor3fEXT( GLfloat red, GLfloat green, GLfloat blue ) { - void (*func_glSecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat ) = extension_funcs[981]; + void (*func_glSecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glSecondaryColor3fEXT]; TRACE("(%f, %f, %f)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3fEXT( red, green, blue ); @@ -7994,7 +9484,7 @@ static void WINAPI wine_glSecondaryColor3fEXT( GLfloat red, GLfloat green, GLflo } static void WINAPI wine_glSecondaryColor3fv( GLfloat* v ) { - void (*func_glSecondaryColor3fv)( GLfloat* ) = extension_funcs[982]; + void (*func_glSecondaryColor3fv)( GLfloat* ) = extension_funcs[EXT_glSecondaryColor3fv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3fv( v ); @@ -8002,7 +9492,7 @@ static void WINAPI wine_glSecondaryColor3fv( GLfloat* v ) { } static void WINAPI wine_glSecondaryColor3fvEXT( GLfloat* v ) { - void (*func_glSecondaryColor3fvEXT)( GLfloat* ) = extension_funcs[983]; + void (*func_glSecondaryColor3fvEXT)( GLfloat* ) = extension_funcs[EXT_glSecondaryColor3fvEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3fvEXT( v ); @@ -8010,7 +9500,7 @@ static void WINAPI wine_glSecondaryColor3fvEXT( GLfloat* v ) { } static void WINAPI wine_glSecondaryColor3hNV( unsigned short red, unsigned short green, unsigned short blue ) { - void (*func_glSecondaryColor3hNV)( unsigned short, unsigned short, unsigned short ) = extension_funcs[984]; + void (*func_glSecondaryColor3hNV)( unsigned short, unsigned short, unsigned short ) = extension_funcs[EXT_glSecondaryColor3hNV]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3hNV( red, green, blue ); @@ -8018,7 +9508,7 @@ static void WINAPI wine_glSecondaryColor3hNV( unsigned short red, unsigned short } static void WINAPI wine_glSecondaryColor3hvNV( unsigned short* v ) { - void (*func_glSecondaryColor3hvNV)( unsigned short* ) = extension_funcs[985]; + void (*func_glSecondaryColor3hvNV)( unsigned short* ) = extension_funcs[EXT_glSecondaryColor3hvNV]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3hvNV( v ); @@ -8026,7 +9516,7 @@ static void WINAPI wine_glSecondaryColor3hvNV( unsigned short* v ) { } static void WINAPI wine_glSecondaryColor3i( GLint red, GLint green, GLint blue ) { - void (*func_glSecondaryColor3i)( GLint, GLint, GLint ) = extension_funcs[986]; + void (*func_glSecondaryColor3i)( GLint, GLint, GLint ) = extension_funcs[EXT_glSecondaryColor3i]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3i( red, green, blue ); @@ -8034,7 +9524,7 @@ static void WINAPI wine_glSecondaryColor3i( GLint red, GLint green, GLint blue ) } static void WINAPI wine_glSecondaryColor3iEXT( GLint red, GLint green, GLint blue ) { - void (*func_glSecondaryColor3iEXT)( GLint, GLint, GLint ) = extension_funcs[987]; + void (*func_glSecondaryColor3iEXT)( GLint, GLint, GLint ) = extension_funcs[EXT_glSecondaryColor3iEXT]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3iEXT( red, green, blue ); @@ -8042,7 +9532,7 @@ static void WINAPI wine_glSecondaryColor3iEXT( GLint red, GLint green, GLint blu } static void WINAPI wine_glSecondaryColor3iv( GLint* v ) { - void (*func_glSecondaryColor3iv)( GLint* ) = extension_funcs[988]; + void (*func_glSecondaryColor3iv)( GLint* ) = extension_funcs[EXT_glSecondaryColor3iv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3iv( v ); @@ -8050,7 +9540,7 @@ static void WINAPI wine_glSecondaryColor3iv( GLint* v ) { } static void WINAPI wine_glSecondaryColor3ivEXT( GLint* v ) { - void (*func_glSecondaryColor3ivEXT)( GLint* ) = extension_funcs[989]; + void (*func_glSecondaryColor3ivEXT)( GLint* ) = extension_funcs[EXT_glSecondaryColor3ivEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3ivEXT( v ); @@ -8058,7 +9548,7 @@ static void WINAPI wine_glSecondaryColor3ivEXT( GLint* v ) { } static void WINAPI wine_glSecondaryColor3s( GLshort red, GLshort green, GLshort blue ) { - void (*func_glSecondaryColor3s)( GLshort, GLshort, GLshort ) = extension_funcs[990]; + void (*func_glSecondaryColor3s)( GLshort, GLshort, GLshort ) = extension_funcs[EXT_glSecondaryColor3s]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3s( red, green, blue ); @@ -8066,7 +9556,7 @@ static void WINAPI wine_glSecondaryColor3s( GLshort red, GLshort green, GLshort } static void WINAPI wine_glSecondaryColor3sEXT( GLshort red, GLshort green, GLshort blue ) { - void (*func_glSecondaryColor3sEXT)( GLshort, GLshort, GLshort ) = extension_funcs[991]; + void (*func_glSecondaryColor3sEXT)( GLshort, GLshort, GLshort ) = extension_funcs[EXT_glSecondaryColor3sEXT]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3sEXT( red, green, blue ); @@ -8074,7 +9564,7 @@ static void WINAPI wine_glSecondaryColor3sEXT( GLshort red, GLshort green, GLsho } static void WINAPI wine_glSecondaryColor3sv( GLshort* v ) { - void (*func_glSecondaryColor3sv)( GLshort* ) = extension_funcs[992]; + void (*func_glSecondaryColor3sv)( GLshort* ) = extension_funcs[EXT_glSecondaryColor3sv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3sv( v ); @@ -8082,7 +9572,7 @@ static void WINAPI wine_glSecondaryColor3sv( GLshort* v ) { } static void WINAPI wine_glSecondaryColor3svEXT( GLshort* v ) { - void (*func_glSecondaryColor3svEXT)( GLshort* ) = extension_funcs[993]; + void (*func_glSecondaryColor3svEXT)( GLshort* ) = extension_funcs[EXT_glSecondaryColor3svEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3svEXT( v ); @@ -8090,7 +9580,7 @@ static void WINAPI wine_glSecondaryColor3svEXT( GLshort* v ) { } static void WINAPI wine_glSecondaryColor3ub( GLubyte red, GLubyte green, GLubyte blue ) { - void (*func_glSecondaryColor3ub)( GLubyte, GLubyte, GLubyte ) = extension_funcs[994]; + void (*func_glSecondaryColor3ub)( GLubyte, GLubyte, GLubyte ) = extension_funcs[EXT_glSecondaryColor3ub]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3ub( red, green, blue ); @@ -8098,7 +9588,7 @@ static void WINAPI wine_glSecondaryColor3ub( GLubyte red, GLubyte green, GLubyte } static void WINAPI wine_glSecondaryColor3ubEXT( GLubyte red, GLubyte green, GLubyte blue ) { - void (*func_glSecondaryColor3ubEXT)( GLubyte, GLubyte, GLubyte ) = extension_funcs[995]; + void (*func_glSecondaryColor3ubEXT)( GLubyte, GLubyte, GLubyte ) = extension_funcs[EXT_glSecondaryColor3ubEXT]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3ubEXT( red, green, blue ); @@ -8106,7 +9596,7 @@ static void WINAPI wine_glSecondaryColor3ubEXT( GLubyte red, GLubyte green, GLub } static void WINAPI wine_glSecondaryColor3ubv( GLubyte* v ) { - void (*func_glSecondaryColor3ubv)( GLubyte* ) = extension_funcs[996]; + void (*func_glSecondaryColor3ubv)( GLubyte* ) = extension_funcs[EXT_glSecondaryColor3ubv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3ubv( v ); @@ -8114,7 +9604,7 @@ static void WINAPI wine_glSecondaryColor3ubv( GLubyte* v ) { } static void WINAPI wine_glSecondaryColor3ubvEXT( GLubyte* v ) { - void (*func_glSecondaryColor3ubvEXT)( GLubyte* ) = extension_funcs[997]; + void (*func_glSecondaryColor3ubvEXT)( GLubyte* ) = extension_funcs[EXT_glSecondaryColor3ubvEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3ubvEXT( v ); @@ -8122,7 +9612,7 @@ static void WINAPI wine_glSecondaryColor3ubvEXT( GLubyte* v ) { } static void WINAPI wine_glSecondaryColor3ui( GLuint red, GLuint green, GLuint blue ) { - void (*func_glSecondaryColor3ui)( GLuint, GLuint, GLuint ) = extension_funcs[998]; + void (*func_glSecondaryColor3ui)( GLuint, GLuint, GLuint ) = extension_funcs[EXT_glSecondaryColor3ui]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3ui( red, green, blue ); @@ -8130,7 +9620,7 @@ static void WINAPI wine_glSecondaryColor3ui( GLuint red, GLuint green, GLuint bl } static void WINAPI wine_glSecondaryColor3uiEXT( GLuint red, GLuint green, GLuint blue ) { - void (*func_glSecondaryColor3uiEXT)( GLuint, GLuint, GLuint ) = extension_funcs[999]; + void (*func_glSecondaryColor3uiEXT)( GLuint, GLuint, GLuint ) = extension_funcs[EXT_glSecondaryColor3uiEXT]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3uiEXT( red, green, blue ); @@ -8138,7 +9628,7 @@ static void WINAPI wine_glSecondaryColor3uiEXT( GLuint red, GLuint green, GLuint } static void WINAPI wine_glSecondaryColor3uiv( GLuint* v ) { - void (*func_glSecondaryColor3uiv)( GLuint* ) = extension_funcs[1000]; + void (*func_glSecondaryColor3uiv)( GLuint* ) = extension_funcs[EXT_glSecondaryColor3uiv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3uiv( v ); @@ -8146,7 +9636,7 @@ static void WINAPI wine_glSecondaryColor3uiv( GLuint* v ) { } static void WINAPI wine_glSecondaryColor3uivEXT( GLuint* v ) { - void (*func_glSecondaryColor3uivEXT)( GLuint* ) = extension_funcs[1001]; + void (*func_glSecondaryColor3uivEXT)( GLuint* ) = extension_funcs[EXT_glSecondaryColor3uivEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3uivEXT( v ); @@ -8154,7 +9644,7 @@ static void WINAPI wine_glSecondaryColor3uivEXT( GLuint* v ) { } static void WINAPI wine_glSecondaryColor3us( GLushort red, GLushort green, GLushort blue ) { - void (*func_glSecondaryColor3us)( GLushort, GLushort, GLushort ) = extension_funcs[1002]; + void (*func_glSecondaryColor3us)( GLushort, GLushort, GLushort ) = extension_funcs[EXT_glSecondaryColor3us]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3us( red, green, blue ); @@ -8162,7 +9652,7 @@ static void WINAPI wine_glSecondaryColor3us( GLushort red, GLushort green, GLush } static void WINAPI wine_glSecondaryColor3usEXT( GLushort red, GLushort green, GLushort blue ) { - void (*func_glSecondaryColor3usEXT)( GLushort, GLushort, GLushort ) = extension_funcs[1003]; + void (*func_glSecondaryColor3usEXT)( GLushort, GLushort, GLushort ) = extension_funcs[EXT_glSecondaryColor3usEXT]; TRACE("(%d, %d, %d)\n", red, green, blue ); ENTER_GL(); func_glSecondaryColor3usEXT( red, green, blue ); @@ -8170,7 +9660,7 @@ static void WINAPI wine_glSecondaryColor3usEXT( GLushort red, GLushort green, GL } static void WINAPI wine_glSecondaryColor3usv( GLushort* v ) { - void (*func_glSecondaryColor3usv)( GLushort* ) = extension_funcs[1004]; + void (*func_glSecondaryColor3usv)( GLushort* ) = extension_funcs[EXT_glSecondaryColor3usv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3usv( v ); @@ -8178,7 +9668,7 @@ static void WINAPI wine_glSecondaryColor3usv( GLushort* v ) { } static void WINAPI wine_glSecondaryColor3usvEXT( GLushort* v ) { - void (*func_glSecondaryColor3usvEXT)( GLushort* ) = extension_funcs[1005]; + void (*func_glSecondaryColor3usvEXT)( GLushort* ) = extension_funcs[EXT_glSecondaryColor3usvEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glSecondaryColor3usvEXT( v ); @@ -8186,7 +9676,7 @@ static void WINAPI wine_glSecondaryColor3usvEXT( GLushort* v ) { } static void WINAPI wine_glSecondaryColorPointer( GLint size, GLenum type, GLsizei stride, GLvoid* pointer ) { - void (*func_glSecondaryColorPointer)( GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[1006]; + void (*func_glSecondaryColorPointer)( GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glSecondaryColorPointer]; TRACE("(%d, %d, %d, %p)\n", size, type, stride, pointer ); ENTER_GL(); func_glSecondaryColorPointer( size, type, stride, pointer ); @@ -8194,7 +9684,7 @@ static void WINAPI wine_glSecondaryColorPointer( GLint size, GLenum type, GLsize } static void WINAPI wine_glSecondaryColorPointerEXT( GLint size, GLenum type, GLsizei stride, GLvoid* pointer ) { - void (*func_glSecondaryColorPointerEXT)( GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[1007]; + void (*func_glSecondaryColorPointerEXT)( GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glSecondaryColorPointerEXT]; TRACE("(%d, %d, %d, %p)\n", size, type, stride, pointer ); ENTER_GL(); func_glSecondaryColorPointerEXT( size, type, stride, pointer ); @@ -8202,7 +9692,7 @@ static void WINAPI wine_glSecondaryColorPointerEXT( GLint size, GLenum type, GLs } static void WINAPI wine_glSecondaryColorPointerListIBM( GLint size, GLenum type, GLint stride, GLvoid** pointer, GLint ptrstride ) { - void (*func_glSecondaryColorPointerListIBM)( GLint, GLenum, GLint, GLvoid**, GLint ) = extension_funcs[1008]; + void (*func_glSecondaryColorPointerListIBM)( GLint, GLenum, GLint, GLvoid**, GLint ) = extension_funcs[EXT_glSecondaryColorPointerListIBM]; TRACE("(%d, %d, %d, %p, %d)\n", size, type, stride, pointer, ptrstride ); ENTER_GL(); func_glSecondaryColorPointerListIBM( size, type, stride, pointer, ptrstride ); @@ -8210,7 +9700,7 @@ static void WINAPI wine_glSecondaryColorPointerListIBM( GLint size, GLenum type, } static void WINAPI wine_glSelectTextureCoordSetSGIS( GLenum target ) { - void (*func_glSelectTextureCoordSetSGIS)( GLenum ) = extension_funcs[1009]; + void (*func_glSelectTextureCoordSetSGIS)( GLenum ) = extension_funcs[EXT_glSelectTextureCoordSetSGIS]; TRACE("(%d)\n", target ); ENTER_GL(); func_glSelectTextureCoordSetSGIS( target ); @@ -8218,7 +9708,7 @@ static void WINAPI wine_glSelectTextureCoordSetSGIS( GLenum target ) { } static void WINAPI wine_glSelectTextureSGIS( GLenum target ) { - void (*func_glSelectTextureSGIS)( GLenum ) = extension_funcs[1010]; + void (*func_glSelectTextureSGIS)( GLenum ) = extension_funcs[EXT_glSelectTextureSGIS]; TRACE("(%d)\n", target ); ENTER_GL(); func_glSelectTextureSGIS( target ); @@ -8226,7 +9716,7 @@ static void WINAPI wine_glSelectTextureSGIS( GLenum target ) { } static void WINAPI wine_glSeparableFilter2DEXT( GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* row, GLvoid* column ) { - void (*func_glSeparableFilter2DEXT)( GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, GLvoid*, GLvoid* ) = extension_funcs[1011]; + void (*func_glSeparableFilter2DEXT)( GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, GLvoid*, GLvoid* ) = extension_funcs[EXT_glSeparableFilter2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %p, %p)\n", target, internalformat, width, height, format, type, row, column ); ENTER_GL(); func_glSeparableFilter2DEXT( target, internalformat, width, height, format, type, row, column ); @@ -8234,7 +9724,7 @@ static void WINAPI wine_glSeparableFilter2DEXT( GLenum target, GLenum internalfo } static void WINAPI wine_glSetFenceAPPLE( GLuint fence ) { - void (*func_glSetFenceAPPLE)( GLuint ) = extension_funcs[1012]; + void (*func_glSetFenceAPPLE)( GLuint ) = extension_funcs[EXT_glSetFenceAPPLE]; TRACE("(%d)\n", fence ); ENTER_GL(); func_glSetFenceAPPLE( fence ); @@ -8242,7 +9732,7 @@ static void WINAPI wine_glSetFenceAPPLE( GLuint fence ) { } static void WINAPI wine_glSetFenceNV( GLuint fence, GLenum condition ) { - void (*func_glSetFenceNV)( GLuint, GLenum ) = extension_funcs[1013]; + void (*func_glSetFenceNV)( GLuint, GLenum ) = extension_funcs[EXT_glSetFenceNV]; TRACE("(%d, %d)\n", fence, condition ); ENTER_GL(); func_glSetFenceNV( fence, condition ); @@ -8250,7 +9740,7 @@ static void WINAPI wine_glSetFenceNV( GLuint fence, GLenum condition ) { } static void WINAPI wine_glSetFragmentShaderConstantATI( GLuint dst, GLfloat* value ) { - void (*func_glSetFragmentShaderConstantATI)( GLuint, GLfloat* ) = extension_funcs[1014]; + void (*func_glSetFragmentShaderConstantATI)( GLuint, GLfloat* ) = extension_funcs[EXT_glSetFragmentShaderConstantATI]; TRACE("(%d, %p)\n", dst, value ); ENTER_GL(); func_glSetFragmentShaderConstantATI( dst, value ); @@ -8258,7 +9748,7 @@ static void WINAPI wine_glSetFragmentShaderConstantATI( GLuint dst, GLfloat* val } static void WINAPI wine_glSetInvariantEXT( GLuint id, GLenum type, GLvoid* addr ) { - void (*func_glSetInvariantEXT)( GLuint, GLenum, GLvoid* ) = extension_funcs[1015]; + void (*func_glSetInvariantEXT)( GLuint, GLenum, GLvoid* ) = extension_funcs[EXT_glSetInvariantEXT]; TRACE("(%d, %d, %p)\n", id, type, addr ); ENTER_GL(); func_glSetInvariantEXT( id, type, addr ); @@ -8266,7 +9756,7 @@ static void WINAPI wine_glSetInvariantEXT( GLuint id, GLenum type, GLvoid* addr } static void WINAPI wine_glSetLocalConstantEXT( GLuint id, GLenum type, GLvoid* addr ) { - void (*func_glSetLocalConstantEXT)( GLuint, GLenum, GLvoid* ) = extension_funcs[1016]; + void (*func_glSetLocalConstantEXT)( GLuint, GLenum, GLvoid* ) = extension_funcs[EXT_glSetLocalConstantEXT]; TRACE("(%d, %d, %p)\n", id, type, addr ); ENTER_GL(); func_glSetLocalConstantEXT( id, type, addr ); @@ -8274,7 +9764,7 @@ static void WINAPI wine_glSetLocalConstantEXT( GLuint id, GLenum type, GLvoid* a } static void WINAPI wine_glShaderOp1EXT( GLenum op, GLuint res, GLuint arg1 ) { - void (*func_glShaderOp1EXT)( GLenum, GLuint, GLuint ) = extension_funcs[1017]; + void (*func_glShaderOp1EXT)( GLenum, GLuint, GLuint ) = extension_funcs[EXT_glShaderOp1EXT]; TRACE("(%d, %d, %d)\n", op, res, arg1 ); ENTER_GL(); func_glShaderOp1EXT( op, res, arg1 ); @@ -8282,7 +9772,7 @@ static void WINAPI wine_glShaderOp1EXT( GLenum op, GLuint res, GLuint arg1 ) { } static void WINAPI wine_glShaderOp2EXT( GLenum op, GLuint res, GLuint arg1, GLuint arg2 ) { - void (*func_glShaderOp2EXT)( GLenum, GLuint, GLuint, GLuint ) = extension_funcs[1018]; + void (*func_glShaderOp2EXT)( GLenum, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glShaderOp2EXT]; TRACE("(%d, %d, %d, %d)\n", op, res, arg1, arg2 ); ENTER_GL(); func_glShaderOp2EXT( op, res, arg1, arg2 ); @@ -8290,7 +9780,7 @@ static void WINAPI wine_glShaderOp2EXT( GLenum op, GLuint res, GLuint arg1, GLui } static void WINAPI wine_glShaderOp3EXT( GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3 ) { - void (*func_glShaderOp3EXT)( GLenum, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[1019]; + void (*func_glShaderOp3EXT)( GLenum, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glShaderOp3EXT]; TRACE("(%d, %d, %d, %d, %d)\n", op, res, arg1, arg2, arg3 ); ENTER_GL(); func_glShaderOp3EXT( op, res, arg1, arg2, arg3 ); @@ -8298,7 +9788,7 @@ static void WINAPI wine_glShaderOp3EXT( GLenum op, GLuint res, GLuint arg1, GLui } static void WINAPI wine_glShaderSource( GLuint shader, GLsizei count, char** string, GLint* length ) { - void (*func_glShaderSource)( GLuint, GLsizei, char**, GLint* ) = extension_funcs[1020]; + void (*func_glShaderSource)( GLuint, GLsizei, char**, GLint* ) = extension_funcs[EXT_glShaderSource]; TRACE("(%d, %d, %p, %p)\n", shader, count, string, length ); ENTER_GL(); func_glShaderSource( shader, count, string, length ); @@ -8306,7 +9796,7 @@ static void WINAPI wine_glShaderSource( GLuint shader, GLsizei count, char** str } static void WINAPI wine_glShaderSourceARB( unsigned int shaderObj, GLsizei count, char** string, GLint* length ) { - void (*func_glShaderSourceARB)( unsigned int, GLsizei, char**, GLint* ) = extension_funcs[1021]; + void (*func_glShaderSourceARB)( unsigned int, GLsizei, char**, GLint* ) = extension_funcs[EXT_glShaderSourceARB]; TRACE("(%d, %d, %p, %p)\n", shaderObj, count, string, length ); ENTER_GL(); func_glShaderSourceARB( shaderObj, count, string, length ); @@ -8314,7 +9804,7 @@ static void WINAPI wine_glShaderSourceARB( unsigned int shaderObj, GLsizei count } static void WINAPI wine_glSharpenTexFuncSGIS( GLenum target, GLsizei n, GLfloat* points ) { - void (*func_glSharpenTexFuncSGIS)( GLenum, GLsizei, GLfloat* ) = extension_funcs[1022]; + void (*func_glSharpenTexFuncSGIS)( GLenum, GLsizei, GLfloat* ) = extension_funcs[EXT_glSharpenTexFuncSGIS]; TRACE("(%d, %d, %p)\n", target, n, points ); ENTER_GL(); func_glSharpenTexFuncSGIS( target, n, points ); @@ -8322,7 +9812,7 @@ static void WINAPI wine_glSharpenTexFuncSGIS( GLenum target, GLsizei n, GLfloat* } static void WINAPI wine_glSpriteParameterfSGIX( GLenum pname, GLfloat param ) { - void (*func_glSpriteParameterfSGIX)( GLenum, GLfloat ) = extension_funcs[1023]; + void (*func_glSpriteParameterfSGIX)( GLenum, GLfloat ) = extension_funcs[EXT_glSpriteParameterfSGIX]; TRACE("(%d, %f)\n", pname, param ); ENTER_GL(); func_glSpriteParameterfSGIX( pname, param ); @@ -8330,7 +9820,7 @@ static void WINAPI wine_glSpriteParameterfSGIX( GLenum pname, GLfloat param ) { } static void WINAPI wine_glSpriteParameterfvSGIX( GLenum pname, GLfloat* params ) { - void (*func_glSpriteParameterfvSGIX)( GLenum, GLfloat* ) = extension_funcs[1024]; + void (*func_glSpriteParameterfvSGIX)( GLenum, GLfloat* ) = extension_funcs[EXT_glSpriteParameterfvSGIX]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glSpriteParameterfvSGIX( pname, params ); @@ -8338,7 +9828,7 @@ static void WINAPI wine_glSpriteParameterfvSGIX( GLenum pname, GLfloat* params ) } static void WINAPI wine_glSpriteParameteriSGIX( GLenum pname, GLint param ) { - void (*func_glSpriteParameteriSGIX)( GLenum, GLint ) = extension_funcs[1025]; + void (*func_glSpriteParameteriSGIX)( GLenum, GLint ) = extension_funcs[EXT_glSpriteParameteriSGIX]; TRACE("(%d, %d)\n", pname, param ); ENTER_GL(); func_glSpriteParameteriSGIX( pname, param ); @@ -8346,7 +9836,7 @@ static void WINAPI wine_glSpriteParameteriSGIX( GLenum pname, GLint param ) { } static void WINAPI wine_glSpriteParameterivSGIX( GLenum pname, GLint* params ) { - void (*func_glSpriteParameterivSGIX)( GLenum, GLint* ) = extension_funcs[1026]; + void (*func_glSpriteParameterivSGIX)( GLenum, GLint* ) = extension_funcs[EXT_glSpriteParameterivSGIX]; TRACE("(%d, %p)\n", pname, params ); ENTER_GL(); func_glSpriteParameterivSGIX( pname, params ); @@ -8354,7 +9844,7 @@ static void WINAPI wine_glSpriteParameterivSGIX( GLenum pname, GLint* params ) { } static void WINAPI wine_glStartInstrumentsSGIX( void ) { - void (*func_glStartInstrumentsSGIX)( void ) = extension_funcs[1027]; + void (*func_glStartInstrumentsSGIX)( void ) = extension_funcs[EXT_glStartInstrumentsSGIX]; TRACE("()\n"); ENTER_GL(); func_glStartInstrumentsSGIX( ); @@ -8362,7 +9852,7 @@ static void WINAPI wine_glStartInstrumentsSGIX( void ) { } static void WINAPI wine_glStencilClearTagEXT( GLsizei stencilTagBits, GLuint stencilClearTag ) { - void (*func_glStencilClearTagEXT)( GLsizei, GLuint ) = extension_funcs[1028]; + void (*func_glStencilClearTagEXT)( GLsizei, GLuint ) = extension_funcs[EXT_glStencilClearTagEXT]; TRACE("(%d, %d)\n", stencilTagBits, stencilClearTag ); ENTER_GL(); func_glStencilClearTagEXT( stencilTagBits, stencilClearTag ); @@ -8370,7 +9860,7 @@ static void WINAPI wine_glStencilClearTagEXT( GLsizei stencilTagBits, GLuint ste } static void WINAPI wine_glStencilFuncSeparate( GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask ) { - void (*func_glStencilFuncSeparate)( GLenum, GLenum, GLint, GLuint ) = extension_funcs[1029]; + void (*func_glStencilFuncSeparate)( GLenum, GLenum, GLint, GLuint ) = extension_funcs[EXT_glStencilFuncSeparate]; TRACE("(%d, %d, %d, %d)\n", frontfunc, backfunc, ref, mask ); ENTER_GL(); func_glStencilFuncSeparate( frontfunc, backfunc, ref, mask ); @@ -8378,7 +9868,7 @@ static void WINAPI wine_glStencilFuncSeparate( GLenum frontfunc, GLenum backfunc } static void WINAPI wine_glStencilFuncSeparateATI( GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask ) { - void (*func_glStencilFuncSeparateATI)( GLenum, GLenum, GLint, GLuint ) = extension_funcs[1030]; + void (*func_glStencilFuncSeparateATI)( GLenum, GLenum, GLint, GLuint ) = extension_funcs[EXT_glStencilFuncSeparateATI]; TRACE("(%d, %d, %d, %d)\n", frontfunc, backfunc, ref, mask ); ENTER_GL(); func_glStencilFuncSeparateATI( frontfunc, backfunc, ref, mask ); @@ -8386,7 +9876,7 @@ static void WINAPI wine_glStencilFuncSeparateATI( GLenum frontfunc, GLenum backf } static void WINAPI wine_glStencilMaskSeparate( GLenum face, GLuint mask ) { - void (*func_glStencilMaskSeparate)( GLenum, GLuint ) = extension_funcs[1031]; + void (*func_glStencilMaskSeparate)( GLenum, GLuint ) = extension_funcs[EXT_glStencilMaskSeparate]; TRACE("(%d, %d)\n", face, mask ); ENTER_GL(); func_glStencilMaskSeparate( face, mask ); @@ -8394,7 +9884,7 @@ static void WINAPI wine_glStencilMaskSeparate( GLenum face, GLuint mask ) { } static void WINAPI wine_glStencilOpSeparate( GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass ) { - void (*func_glStencilOpSeparate)( GLenum, GLenum, GLenum, GLenum ) = extension_funcs[1032]; + void (*func_glStencilOpSeparate)( GLenum, GLenum, GLenum, GLenum ) = extension_funcs[EXT_glStencilOpSeparate]; TRACE("(%d, %d, %d, %d)\n", face, sfail, dpfail, dppass ); ENTER_GL(); func_glStencilOpSeparate( face, sfail, dpfail, dppass ); @@ -8402,7 +9892,7 @@ static void WINAPI wine_glStencilOpSeparate( GLenum face, GLenum sfail, GLenum d } static void WINAPI wine_glStencilOpSeparateATI( GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass ) { - void (*func_glStencilOpSeparateATI)( GLenum, GLenum, GLenum, GLenum ) = extension_funcs[1033]; + void (*func_glStencilOpSeparateATI)( GLenum, GLenum, GLenum, GLenum ) = extension_funcs[EXT_glStencilOpSeparateATI]; TRACE("(%d, %d, %d, %d)\n", face, sfail, dpfail, dppass ); ENTER_GL(); func_glStencilOpSeparateATI( face, sfail, dpfail, dppass ); @@ -8410,7 +9900,7 @@ static void WINAPI wine_glStencilOpSeparateATI( GLenum face, GLenum sfail, GLenu } static void WINAPI wine_glStopInstrumentsSGIX( GLint marker ) { - void (*func_glStopInstrumentsSGIX)( GLint ) = extension_funcs[1034]; + void (*func_glStopInstrumentsSGIX)( GLint ) = extension_funcs[EXT_glStopInstrumentsSGIX]; TRACE("(%d)\n", marker ); ENTER_GL(); func_glStopInstrumentsSGIX( marker ); @@ -8418,7 +9908,7 @@ static void WINAPI wine_glStopInstrumentsSGIX( GLint marker ) { } static void WINAPI wine_glStringMarkerGREMEDY( GLsizei len, GLvoid* string ) { - void (*func_glStringMarkerGREMEDY)( GLsizei, GLvoid* ) = extension_funcs[1035]; + void (*func_glStringMarkerGREMEDY)( GLsizei, GLvoid* ) = extension_funcs[EXT_glStringMarkerGREMEDY]; TRACE("(%d, %p)\n", len, string ); ENTER_GL(); func_glStringMarkerGREMEDY( len, string ); @@ -8426,7 +9916,7 @@ static void WINAPI wine_glStringMarkerGREMEDY( GLsizei len, GLvoid* string ) { } static void WINAPI wine_glSwizzleEXT( GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW ) { - void (*func_glSwizzleEXT)( GLuint, GLuint, GLenum, GLenum, GLenum, GLenum ) = extension_funcs[1036]; + void (*func_glSwizzleEXT)( GLuint, GLuint, GLenum, GLenum, GLenum, GLenum ) = extension_funcs[EXT_glSwizzleEXT]; TRACE("(%d, %d, %d, %d, %d, %d)\n", res, in, outX, outY, outZ, outW ); ENTER_GL(); func_glSwizzleEXT( res, in, outX, outY, outZ, outW ); @@ -8434,7 +9924,7 @@ static void WINAPI wine_glSwizzleEXT( GLuint res, GLuint in, GLenum outX, GLenum } static void WINAPI wine_glTagSampleBufferSGIX( void ) { - void (*func_glTagSampleBufferSGIX)( void ) = extension_funcs[1037]; + void (*func_glTagSampleBufferSGIX)( void ) = extension_funcs[EXT_glTagSampleBufferSGIX]; TRACE("()\n"); ENTER_GL(); func_glTagSampleBufferSGIX( ); @@ -8442,7 +9932,7 @@ static void WINAPI wine_glTagSampleBufferSGIX( void ) { } static void WINAPI wine_glTangent3bEXT( GLbyte tx, GLbyte ty, GLbyte tz ) { - void (*func_glTangent3bEXT)( GLbyte, GLbyte, GLbyte ) = extension_funcs[1038]; + void (*func_glTangent3bEXT)( GLbyte, GLbyte, GLbyte ) = extension_funcs[EXT_glTangent3bEXT]; TRACE("(%d, %d, %d)\n", tx, ty, tz ); ENTER_GL(); func_glTangent3bEXT( tx, ty, tz ); @@ -8450,7 +9940,7 @@ static void WINAPI wine_glTangent3bEXT( GLbyte tx, GLbyte ty, GLbyte tz ) { } static void WINAPI wine_glTangent3bvEXT( GLbyte* v ) { - void (*func_glTangent3bvEXT)( GLbyte* ) = extension_funcs[1039]; + void (*func_glTangent3bvEXT)( GLbyte* ) = extension_funcs[EXT_glTangent3bvEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glTangent3bvEXT( v ); @@ -8458,7 +9948,7 @@ static void WINAPI wine_glTangent3bvEXT( GLbyte* v ) { } static void WINAPI wine_glTangent3dEXT( GLdouble tx, GLdouble ty, GLdouble tz ) { - void (*func_glTangent3dEXT)( GLdouble, GLdouble, GLdouble ) = extension_funcs[1040]; + void (*func_glTangent3dEXT)( GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glTangent3dEXT]; TRACE("(%f, %f, %f)\n", tx, ty, tz ); ENTER_GL(); func_glTangent3dEXT( tx, ty, tz ); @@ -8466,7 +9956,7 @@ static void WINAPI wine_glTangent3dEXT( GLdouble tx, GLdouble ty, GLdouble tz ) } static void WINAPI wine_glTangent3dvEXT( GLdouble* v ) { - void (*func_glTangent3dvEXT)( GLdouble* ) = extension_funcs[1041]; + void (*func_glTangent3dvEXT)( GLdouble* ) = extension_funcs[EXT_glTangent3dvEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glTangent3dvEXT( v ); @@ -8474,7 +9964,7 @@ static void WINAPI wine_glTangent3dvEXT( GLdouble* v ) { } static void WINAPI wine_glTangent3fEXT( GLfloat tx, GLfloat ty, GLfloat tz ) { - void (*func_glTangent3fEXT)( GLfloat, GLfloat, GLfloat ) = extension_funcs[1042]; + void (*func_glTangent3fEXT)( GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glTangent3fEXT]; TRACE("(%f, %f, %f)\n", tx, ty, tz ); ENTER_GL(); func_glTangent3fEXT( tx, ty, tz ); @@ -8482,7 +9972,7 @@ static void WINAPI wine_glTangent3fEXT( GLfloat tx, GLfloat ty, GLfloat tz ) { } static void WINAPI wine_glTangent3fvEXT( GLfloat* v ) { - void (*func_glTangent3fvEXT)( GLfloat* ) = extension_funcs[1043]; + void (*func_glTangent3fvEXT)( GLfloat* ) = extension_funcs[EXT_glTangent3fvEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glTangent3fvEXT( v ); @@ -8490,7 +9980,7 @@ static void WINAPI wine_glTangent3fvEXT( GLfloat* v ) { } static void WINAPI wine_glTangent3iEXT( GLint tx, GLint ty, GLint tz ) { - void (*func_glTangent3iEXT)( GLint, GLint, GLint ) = extension_funcs[1044]; + void (*func_glTangent3iEXT)( GLint, GLint, GLint ) = extension_funcs[EXT_glTangent3iEXT]; TRACE("(%d, %d, %d)\n", tx, ty, tz ); ENTER_GL(); func_glTangent3iEXT( tx, ty, tz ); @@ -8498,7 +9988,7 @@ static void WINAPI wine_glTangent3iEXT( GLint tx, GLint ty, GLint tz ) { } static void WINAPI wine_glTangent3ivEXT( GLint* v ) { - void (*func_glTangent3ivEXT)( GLint* ) = extension_funcs[1045]; + void (*func_glTangent3ivEXT)( GLint* ) = extension_funcs[EXT_glTangent3ivEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glTangent3ivEXT( v ); @@ -8506,7 +9996,7 @@ static void WINAPI wine_glTangent3ivEXT( GLint* v ) { } static void WINAPI wine_glTangent3sEXT( GLshort tx, GLshort ty, GLshort tz ) { - void (*func_glTangent3sEXT)( GLshort, GLshort, GLshort ) = extension_funcs[1046]; + void (*func_glTangent3sEXT)( GLshort, GLshort, GLshort ) = extension_funcs[EXT_glTangent3sEXT]; TRACE("(%d, %d, %d)\n", tx, ty, tz ); ENTER_GL(); func_glTangent3sEXT( tx, ty, tz ); @@ -8514,7 +10004,7 @@ static void WINAPI wine_glTangent3sEXT( GLshort tx, GLshort ty, GLshort tz ) { } static void WINAPI wine_glTangent3svEXT( GLshort* v ) { - void (*func_glTangent3svEXT)( GLshort* ) = extension_funcs[1047]; + void (*func_glTangent3svEXT)( GLshort* ) = extension_funcs[EXT_glTangent3svEXT]; TRACE("(%p)\n", v ); ENTER_GL(); func_glTangent3svEXT( v ); @@ -8522,7 +10012,7 @@ static void WINAPI wine_glTangent3svEXT( GLshort* v ) { } static void WINAPI wine_glTangentPointerEXT( GLenum type, GLsizei stride, GLvoid* pointer ) { - void (*func_glTangentPointerEXT)( GLenum, GLsizei, GLvoid* ) = extension_funcs[1048]; + void (*func_glTangentPointerEXT)( GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glTangentPointerEXT]; TRACE("(%d, %d, %p)\n", type, stride, pointer ); ENTER_GL(); func_glTangentPointerEXT( type, stride, pointer ); @@ -8530,7 +10020,7 @@ static void WINAPI wine_glTangentPointerEXT( GLenum type, GLsizei stride, GLvoid } static void WINAPI wine_glTbufferMask3DFX( GLuint mask ) { - void (*func_glTbufferMask3DFX)( GLuint ) = extension_funcs[1049]; + void (*func_glTbufferMask3DFX)( GLuint ) = extension_funcs[EXT_glTbufferMask3DFX]; TRACE("(%d)\n", mask ); ENTER_GL(); func_glTbufferMask3DFX( mask ); @@ -8539,7 +10029,7 @@ static void WINAPI wine_glTbufferMask3DFX( GLuint mask ) { static GLboolean WINAPI wine_glTestFenceAPPLE( GLuint fence ) { GLboolean ret_value; - GLboolean (*func_glTestFenceAPPLE)( GLuint ) = extension_funcs[1050]; + GLboolean (*func_glTestFenceAPPLE)( GLuint ) = extension_funcs[EXT_glTestFenceAPPLE]; TRACE("(%d)\n", fence ); ENTER_GL(); ret_value = func_glTestFenceAPPLE( fence ); @@ -8549,7 +10039,7 @@ static GLboolean WINAPI wine_glTestFenceAPPLE( GLuint fence ) { static GLboolean WINAPI wine_glTestFenceNV( GLuint fence ) { GLboolean ret_value; - GLboolean (*func_glTestFenceNV)( GLuint ) = extension_funcs[1051]; + GLboolean (*func_glTestFenceNV)( GLuint ) = extension_funcs[EXT_glTestFenceNV]; TRACE("(%d)\n", fence ); ENTER_GL(); ret_value = func_glTestFenceNV( fence ); @@ -8559,7 +10049,7 @@ static GLboolean WINAPI wine_glTestFenceNV( GLuint fence ) { static GLboolean WINAPI wine_glTestObjectAPPLE( GLenum object, GLuint name ) { GLboolean ret_value; - GLboolean (*func_glTestObjectAPPLE)( GLenum, GLuint ) = extension_funcs[1052]; + GLboolean (*func_glTestObjectAPPLE)( GLenum, GLuint ) = extension_funcs[EXT_glTestObjectAPPLE]; TRACE("(%d, %d)\n", object, name ); ENTER_GL(); ret_value = func_glTestObjectAPPLE( object, name ); @@ -8568,7 +10058,7 @@ static GLboolean WINAPI wine_glTestObjectAPPLE( GLenum object, GLuint name ) { } static void WINAPI wine_glTexBufferARB( GLenum target, GLenum internalformat, GLuint buffer ) { - void (*func_glTexBufferARB)( GLenum, GLenum, GLuint ) = extension_funcs[1053]; + void (*func_glTexBufferARB)( GLenum, GLenum, GLuint ) = extension_funcs[EXT_glTexBufferARB]; TRACE("(%d, %d, %d)\n", target, internalformat, buffer ); ENTER_GL(); func_glTexBufferARB( target, internalformat, buffer ); @@ -8576,7 +10066,7 @@ static void WINAPI wine_glTexBufferARB( GLenum target, GLenum internalformat, GL } static void WINAPI wine_glTexBufferEXT( GLenum target, GLenum internalformat, GLuint buffer ) { - void (*func_glTexBufferEXT)( GLenum, GLenum, GLuint ) = extension_funcs[1054]; + void (*func_glTexBufferEXT)( GLenum, GLenum, GLuint ) = extension_funcs[EXT_glTexBufferEXT]; TRACE("(%d, %d, %d)\n", target, internalformat, buffer ); ENTER_GL(); func_glTexBufferEXT( target, internalformat, buffer ); @@ -8584,7 +10074,7 @@ static void WINAPI wine_glTexBufferEXT( GLenum target, GLenum internalformat, GL } static void WINAPI wine_glTexBumpParameterfvATI( GLenum pname, GLfloat* param ) { - void (*func_glTexBumpParameterfvATI)( GLenum, GLfloat* ) = extension_funcs[1055]; + void (*func_glTexBumpParameterfvATI)( GLenum, GLfloat* ) = extension_funcs[EXT_glTexBumpParameterfvATI]; TRACE("(%d, %p)\n", pname, param ); ENTER_GL(); func_glTexBumpParameterfvATI( pname, param ); @@ -8592,7 +10082,7 @@ static void WINAPI wine_glTexBumpParameterfvATI( GLenum pname, GLfloat* param ) } static void WINAPI wine_glTexBumpParameterivATI( GLenum pname, GLint* param ) { - void (*func_glTexBumpParameterivATI)( GLenum, GLint* ) = extension_funcs[1056]; + void (*func_glTexBumpParameterivATI)( GLenum, GLint* ) = extension_funcs[EXT_glTexBumpParameterivATI]; TRACE("(%d, %p)\n", pname, param ); ENTER_GL(); func_glTexBumpParameterivATI( pname, param ); @@ -8600,7 +10090,7 @@ static void WINAPI wine_glTexBumpParameterivATI( GLenum pname, GLint* param ) { } static void WINAPI wine_glTexCoord1hNV( unsigned short s ) { - void (*func_glTexCoord1hNV)( unsigned short ) = extension_funcs[1057]; + void (*func_glTexCoord1hNV)( unsigned short ) = extension_funcs[EXT_glTexCoord1hNV]; TRACE("(%d)\n", s ); ENTER_GL(); func_glTexCoord1hNV( s ); @@ -8608,7 +10098,7 @@ static void WINAPI wine_glTexCoord1hNV( unsigned short s ) { } static void WINAPI wine_glTexCoord1hvNV( unsigned short* v ) { - void (*func_glTexCoord1hvNV)( unsigned short* ) = extension_funcs[1058]; + void (*func_glTexCoord1hvNV)( unsigned short* ) = extension_funcs[EXT_glTexCoord1hvNV]; TRACE("(%p)\n", v ); ENTER_GL(); func_glTexCoord1hvNV( v ); @@ -8616,7 +10106,7 @@ static void WINAPI wine_glTexCoord1hvNV( unsigned short* v ) { } static void WINAPI wine_glTexCoord2fColor3fVertex3fSUN( GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glTexCoord2fColor3fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[1059]; + void (*func_glTexCoord2fColor3fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glTexCoord2fColor3fVertex3fSUN]; TRACE("(%f, %f, %f, %f, %f, %f, %f, %f)\n", s, t, r, g, b, x, y, z ); ENTER_GL(); func_glTexCoord2fColor3fVertex3fSUN( s, t, r, g, b, x, y, z ); @@ -8624,7 +10114,7 @@ static void WINAPI wine_glTexCoord2fColor3fVertex3fSUN( GLfloat s, GLfloat t, GL } static void WINAPI wine_glTexCoord2fColor3fVertex3fvSUN( GLfloat* tc, GLfloat* c, GLfloat* v ) { - void (*func_glTexCoord2fColor3fVertex3fvSUN)( GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[1060]; + void (*func_glTexCoord2fColor3fVertex3fvSUN)( GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[EXT_glTexCoord2fColor3fVertex3fvSUN]; TRACE("(%p, %p, %p)\n", tc, c, v ); ENTER_GL(); func_glTexCoord2fColor3fVertex3fvSUN( tc, c, v ); @@ -8632,7 +10122,7 @@ static void WINAPI wine_glTexCoord2fColor3fVertex3fvSUN( GLfloat* tc, GLfloat* c } static void WINAPI wine_glTexCoord2fColor4fNormal3fVertex3fSUN( GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glTexCoord2fColor4fNormal3fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[1061]; + void (*func_glTexCoord2fColor4fNormal3fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glTexCoord2fColor4fNormal3fVertex3fSUN]; TRACE("(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f)\n", s, t, r, g, b, a, nx, ny, nz, x, y, z ); ENTER_GL(); func_glTexCoord2fColor4fNormal3fVertex3fSUN( s, t, r, g, b, a, nx, ny, nz, x, y, z ); @@ -8640,7 +10130,7 @@ static void WINAPI wine_glTexCoord2fColor4fNormal3fVertex3fSUN( GLfloat s, GLflo } static void WINAPI wine_glTexCoord2fColor4fNormal3fVertex3fvSUN( GLfloat* tc, GLfloat* c, GLfloat* n, GLfloat* v ) { - void (*func_glTexCoord2fColor4fNormal3fVertex3fvSUN)( GLfloat*, GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[1062]; + void (*func_glTexCoord2fColor4fNormal3fVertex3fvSUN)( GLfloat*, GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[EXT_glTexCoord2fColor4fNormal3fVertex3fvSUN]; TRACE("(%p, %p, %p, %p)\n", tc, c, n, v ); ENTER_GL(); func_glTexCoord2fColor4fNormal3fVertex3fvSUN( tc, c, n, v ); @@ -8648,7 +10138,7 @@ static void WINAPI wine_glTexCoord2fColor4fNormal3fVertex3fvSUN( GLfloat* tc, GL } static void WINAPI wine_glTexCoord2fColor4ubVertex3fSUN( GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glTexCoord2fColor4ubVertex3fSUN)( GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat ) = extension_funcs[1063]; + void (*func_glTexCoord2fColor4ubVertex3fSUN)( GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glTexCoord2fColor4ubVertex3fSUN]; TRACE("(%f, %f, %d, %d, %d, %d, %f, %f, %f)\n", s, t, r, g, b, a, x, y, z ); ENTER_GL(); func_glTexCoord2fColor4ubVertex3fSUN( s, t, r, g, b, a, x, y, z ); @@ -8656,7 +10146,7 @@ static void WINAPI wine_glTexCoord2fColor4ubVertex3fSUN( GLfloat s, GLfloat t, G } static void WINAPI wine_glTexCoord2fColor4ubVertex3fvSUN( GLfloat* tc, GLubyte* c, GLfloat* v ) { - void (*func_glTexCoord2fColor4ubVertex3fvSUN)( GLfloat*, GLubyte*, GLfloat* ) = extension_funcs[1064]; + void (*func_glTexCoord2fColor4ubVertex3fvSUN)( GLfloat*, GLubyte*, GLfloat* ) = extension_funcs[EXT_glTexCoord2fColor4ubVertex3fvSUN]; TRACE("(%p, %p, %p)\n", tc, c, v ); ENTER_GL(); func_glTexCoord2fColor4ubVertex3fvSUN( tc, c, v ); @@ -8664,7 +10154,7 @@ static void WINAPI wine_glTexCoord2fColor4ubVertex3fvSUN( GLfloat* tc, GLubyte* } static void WINAPI wine_glTexCoord2fNormal3fVertex3fSUN( GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glTexCoord2fNormal3fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[1065]; + void (*func_glTexCoord2fNormal3fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glTexCoord2fNormal3fVertex3fSUN]; TRACE("(%f, %f, %f, %f, %f, %f, %f, %f)\n", s, t, nx, ny, nz, x, y, z ); ENTER_GL(); func_glTexCoord2fNormal3fVertex3fSUN( s, t, nx, ny, nz, x, y, z ); @@ -8672,7 +10162,7 @@ static void WINAPI wine_glTexCoord2fNormal3fVertex3fSUN( GLfloat s, GLfloat t, G } static void WINAPI wine_glTexCoord2fNormal3fVertex3fvSUN( GLfloat* tc, GLfloat* n, GLfloat* v ) { - void (*func_glTexCoord2fNormal3fVertex3fvSUN)( GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[1066]; + void (*func_glTexCoord2fNormal3fVertex3fvSUN)( GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[EXT_glTexCoord2fNormal3fVertex3fvSUN]; TRACE("(%p, %p, %p)\n", tc, n, v ); ENTER_GL(); func_glTexCoord2fNormal3fVertex3fvSUN( tc, n, v ); @@ -8680,7 +10170,7 @@ static void WINAPI wine_glTexCoord2fNormal3fVertex3fvSUN( GLfloat* tc, GLfloat* } static void WINAPI wine_glTexCoord2fVertex3fSUN( GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glTexCoord2fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[1067]; + void (*func_glTexCoord2fVertex3fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glTexCoord2fVertex3fSUN]; TRACE("(%f, %f, %f, %f, %f)\n", s, t, x, y, z ); ENTER_GL(); func_glTexCoord2fVertex3fSUN( s, t, x, y, z ); @@ -8688,7 +10178,7 @@ static void WINAPI wine_glTexCoord2fVertex3fSUN( GLfloat s, GLfloat t, GLfloat x } static void WINAPI wine_glTexCoord2fVertex3fvSUN( GLfloat* tc, GLfloat* v ) { - void (*func_glTexCoord2fVertex3fvSUN)( GLfloat*, GLfloat* ) = extension_funcs[1068]; + void (*func_glTexCoord2fVertex3fvSUN)( GLfloat*, GLfloat* ) = extension_funcs[EXT_glTexCoord2fVertex3fvSUN]; TRACE("(%p, %p)\n", tc, v ); ENTER_GL(); func_glTexCoord2fVertex3fvSUN( tc, v ); @@ -8696,7 +10186,7 @@ static void WINAPI wine_glTexCoord2fVertex3fvSUN( GLfloat* tc, GLfloat* v ) { } static void WINAPI wine_glTexCoord2hNV( unsigned short s, unsigned short t ) { - void (*func_glTexCoord2hNV)( unsigned short, unsigned short ) = extension_funcs[1069]; + void (*func_glTexCoord2hNV)( unsigned short, unsigned short ) = extension_funcs[EXT_glTexCoord2hNV]; TRACE("(%d, %d)\n", s, t ); ENTER_GL(); func_glTexCoord2hNV( s, t ); @@ -8704,7 +10194,7 @@ static void WINAPI wine_glTexCoord2hNV( unsigned short s, unsigned short t ) { } static void WINAPI wine_glTexCoord2hvNV( unsigned short* v ) { - void (*func_glTexCoord2hvNV)( unsigned short* ) = extension_funcs[1070]; + void (*func_glTexCoord2hvNV)( unsigned short* ) = extension_funcs[EXT_glTexCoord2hvNV]; TRACE("(%p)\n", v ); ENTER_GL(); func_glTexCoord2hvNV( v ); @@ -8712,7 +10202,7 @@ static void WINAPI wine_glTexCoord2hvNV( unsigned short* v ) { } static void WINAPI wine_glTexCoord3hNV( unsigned short s, unsigned short t, unsigned short r ) { - void (*func_glTexCoord3hNV)( unsigned short, unsigned short, unsigned short ) = extension_funcs[1071]; + void (*func_glTexCoord3hNV)( unsigned short, unsigned short, unsigned short ) = extension_funcs[EXT_glTexCoord3hNV]; TRACE("(%d, %d, %d)\n", s, t, r ); ENTER_GL(); func_glTexCoord3hNV( s, t, r ); @@ -8720,7 +10210,7 @@ static void WINAPI wine_glTexCoord3hNV( unsigned short s, unsigned short t, unsi } static void WINAPI wine_glTexCoord3hvNV( unsigned short* v ) { - void (*func_glTexCoord3hvNV)( unsigned short* ) = extension_funcs[1072]; + void (*func_glTexCoord3hvNV)( unsigned short* ) = extension_funcs[EXT_glTexCoord3hvNV]; TRACE("(%p)\n", v ); ENTER_GL(); func_glTexCoord3hvNV( v ); @@ -8728,7 +10218,7 @@ static void WINAPI wine_glTexCoord3hvNV( unsigned short* v ) { } static void WINAPI wine_glTexCoord4fColor4fNormal3fVertex4fSUN( GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - void (*func_glTexCoord4fColor4fNormal3fVertex4fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[1073]; + void (*func_glTexCoord4fColor4fNormal3fVertex4fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glTexCoord4fColor4fNormal3fVertex4fSUN]; TRACE("(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f)\n", s, t, p, q, r, g, b, a, nx, ny, nz, x, y, z, w ); ENTER_GL(); func_glTexCoord4fColor4fNormal3fVertex4fSUN( s, t, p, q, r, g, b, a, nx, ny, nz, x, y, z, w ); @@ -8736,7 +10226,7 @@ static void WINAPI wine_glTexCoord4fColor4fNormal3fVertex4fSUN( GLfloat s, GLflo } static void WINAPI wine_glTexCoord4fColor4fNormal3fVertex4fvSUN( GLfloat* tc, GLfloat* c, GLfloat* n, GLfloat* v ) { - void (*func_glTexCoord4fColor4fNormal3fVertex4fvSUN)( GLfloat*, GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[1074]; + void (*func_glTexCoord4fColor4fNormal3fVertex4fvSUN)( GLfloat*, GLfloat*, GLfloat*, GLfloat* ) = extension_funcs[EXT_glTexCoord4fColor4fNormal3fVertex4fvSUN]; TRACE("(%p, %p, %p, %p)\n", tc, c, n, v ); ENTER_GL(); func_glTexCoord4fColor4fNormal3fVertex4fvSUN( tc, c, n, v ); @@ -8744,7 +10234,7 @@ static void WINAPI wine_glTexCoord4fColor4fNormal3fVertex4fvSUN( GLfloat* tc, GL } static void WINAPI wine_glTexCoord4fVertex4fSUN( GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - void (*func_glTexCoord4fVertex4fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[1075]; + void (*func_glTexCoord4fVertex4fSUN)( GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glTexCoord4fVertex4fSUN]; TRACE("(%f, %f, %f, %f, %f, %f, %f, %f)\n", s, t, p, q, x, y, z, w ); ENTER_GL(); func_glTexCoord4fVertex4fSUN( s, t, p, q, x, y, z, w ); @@ -8752,7 +10242,7 @@ static void WINAPI wine_glTexCoord4fVertex4fSUN( GLfloat s, GLfloat t, GLfloat p } static void WINAPI wine_glTexCoord4fVertex4fvSUN( GLfloat* tc, GLfloat* v ) { - void (*func_glTexCoord4fVertex4fvSUN)( GLfloat*, GLfloat* ) = extension_funcs[1076]; + void (*func_glTexCoord4fVertex4fvSUN)( GLfloat*, GLfloat* ) = extension_funcs[EXT_glTexCoord4fVertex4fvSUN]; TRACE("(%p, %p)\n", tc, v ); ENTER_GL(); func_glTexCoord4fVertex4fvSUN( tc, v ); @@ -8760,7 +10250,7 @@ static void WINAPI wine_glTexCoord4fVertex4fvSUN( GLfloat* tc, GLfloat* v ) { } static void WINAPI wine_glTexCoord4hNV( unsigned short s, unsigned short t, unsigned short r, unsigned short q ) { - void (*func_glTexCoord4hNV)( unsigned short, unsigned short, unsigned short, unsigned short ) = extension_funcs[1077]; + void (*func_glTexCoord4hNV)( unsigned short, unsigned short, unsigned short, unsigned short ) = extension_funcs[EXT_glTexCoord4hNV]; TRACE("(%d, %d, %d, %d)\n", s, t, r, q ); ENTER_GL(); func_glTexCoord4hNV( s, t, r, q ); @@ -8768,7 +10258,7 @@ static void WINAPI wine_glTexCoord4hNV( unsigned short s, unsigned short t, unsi } static void WINAPI wine_glTexCoord4hvNV( unsigned short* v ) { - void (*func_glTexCoord4hvNV)( unsigned short* ) = extension_funcs[1078]; + void (*func_glTexCoord4hvNV)( unsigned short* ) = extension_funcs[EXT_glTexCoord4hvNV]; TRACE("(%p)\n", v ); ENTER_GL(); func_glTexCoord4hvNV( v ); @@ -8776,7 +10266,7 @@ static void WINAPI wine_glTexCoord4hvNV( unsigned short* v ) { } static void WINAPI wine_glTexCoordPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer ) { - void (*func_glTexCoordPointerEXT)( GLint, GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[1079]; + void (*func_glTexCoordPointerEXT)( GLint, GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[EXT_glTexCoordPointerEXT]; TRACE("(%d, %d, %d, %d, %p)\n", size, type, stride, count, pointer ); ENTER_GL(); func_glTexCoordPointerEXT( size, type, stride, count, pointer ); @@ -8784,7 +10274,7 @@ static void WINAPI wine_glTexCoordPointerEXT( GLint size, GLenum type, GLsizei s } static void WINAPI wine_glTexCoordPointerListIBM( GLint size, GLenum type, GLint stride, GLvoid** pointer, GLint ptrstride ) { - void (*func_glTexCoordPointerListIBM)( GLint, GLenum, GLint, GLvoid**, GLint ) = extension_funcs[1080]; + void (*func_glTexCoordPointerListIBM)( GLint, GLenum, GLint, GLvoid**, GLint ) = extension_funcs[EXT_glTexCoordPointerListIBM]; TRACE("(%d, %d, %d, %p, %d)\n", size, type, stride, pointer, ptrstride ); ENTER_GL(); func_glTexCoordPointerListIBM( size, type, stride, pointer, ptrstride ); @@ -8792,7 +10282,7 @@ static void WINAPI wine_glTexCoordPointerListIBM( GLint size, GLenum type, GLint } static void WINAPI wine_glTexCoordPointervINTEL( GLint size, GLenum type, GLvoid** pointer ) { - void (*func_glTexCoordPointervINTEL)( GLint, GLenum, GLvoid** ) = extension_funcs[1081]; + void (*func_glTexCoordPointervINTEL)( GLint, GLenum, GLvoid** ) = extension_funcs[EXT_glTexCoordPointervINTEL]; TRACE("(%d, %d, %p)\n", size, type, pointer ); ENTER_GL(); func_glTexCoordPointervINTEL( size, type, pointer ); @@ -8800,7 +10290,7 @@ static void WINAPI wine_glTexCoordPointervINTEL( GLint size, GLenum type, GLvoid } static void WINAPI wine_glTexFilterFuncSGIS( GLenum target, GLenum filter, GLsizei n, GLfloat* weights ) { - void (*func_glTexFilterFuncSGIS)( GLenum, GLenum, GLsizei, GLfloat* ) = extension_funcs[1082]; + void (*func_glTexFilterFuncSGIS)( GLenum, GLenum, GLsizei, GLfloat* ) = extension_funcs[EXT_glTexFilterFuncSGIS]; TRACE("(%d, %d, %d, %p)\n", target, filter, n, weights ); ENTER_GL(); func_glTexFilterFuncSGIS( target, filter, n, weights ); @@ -8808,7 +10298,7 @@ static void WINAPI wine_glTexFilterFuncSGIS( GLenum target, GLenum filter, GLsiz } static void WINAPI wine_glTexImage3DEXT( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glTexImage3DEXT)( GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[1083]; + void (*func_glTexImage3DEXT)( GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glTexImage3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", target, level, internalformat, width, height, depth, border, format, type, pixels ); ENTER_GL(); func_glTexImage3DEXT( target, level, internalformat, width, height, depth, border, format, type, pixels ); @@ -8816,7 +10306,7 @@ static void WINAPI wine_glTexImage3DEXT( GLenum target, GLint level, GLenum inte } static void WINAPI wine_glTexImage4DSGIS( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glTexImage4DSGIS)( GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[1084]; + void (*func_glTexImage4DSGIS)( GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glTexImage4DSGIS]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", target, level, internalformat, width, height, depth, size4d, border, format, type, pixels ); ENTER_GL(); func_glTexImage4DSGIS( target, level, internalformat, width, height, depth, size4d, border, format, type, pixels ); @@ -8824,7 +10314,7 @@ static void WINAPI wine_glTexImage4DSGIS( GLenum target, GLint level, GLenum int } static void WINAPI wine_glTexParameterIiv( GLenum target, GLenum pname, GLint* params ) { - void (*func_glTexParameterIiv)( GLenum, GLenum, GLint* ) = extension_funcs[1085]; + void (*func_glTexParameterIiv)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glTexParameterIiv]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glTexParameterIiv( target, pname, params ); @@ -8832,7 +10322,7 @@ static void WINAPI wine_glTexParameterIiv( GLenum target, GLenum pname, GLint* p } static void WINAPI wine_glTexParameterIivEXT( GLenum target, GLenum pname, GLint* params ) { - void (*func_glTexParameterIivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[1086]; + void (*func_glTexParameterIivEXT)( GLenum, GLenum, GLint* ) = extension_funcs[EXT_glTexParameterIivEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glTexParameterIivEXT( target, pname, params ); @@ -8840,7 +10330,7 @@ static void WINAPI wine_glTexParameterIivEXT( GLenum target, GLenum pname, GLint } static void WINAPI wine_glTexParameterIuiv( GLenum target, GLenum pname, GLuint* params ) { - void (*func_glTexParameterIuiv)( GLenum, GLenum, GLuint* ) = extension_funcs[1087]; + void (*func_glTexParameterIuiv)( GLenum, GLenum, GLuint* ) = extension_funcs[EXT_glTexParameterIuiv]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glTexParameterIuiv( target, pname, params ); @@ -8848,7 +10338,7 @@ static void WINAPI wine_glTexParameterIuiv( GLenum target, GLenum pname, GLuint* } static void WINAPI wine_glTexParameterIuivEXT( GLenum target, GLenum pname, GLuint* params ) { - void (*func_glTexParameterIuivEXT)( GLenum, GLenum, GLuint* ) = extension_funcs[1088]; + void (*func_glTexParameterIuivEXT)( GLenum, GLenum, GLuint* ) = extension_funcs[EXT_glTexParameterIuivEXT]; TRACE("(%d, %d, %p)\n", target, pname, params ); ENTER_GL(); func_glTexParameterIuivEXT( target, pname, params ); @@ -8856,7 +10346,7 @@ static void WINAPI wine_glTexParameterIuivEXT( GLenum target, GLenum pname, GLui } static void WINAPI wine_glTexSubImage1DEXT( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glTexSubImage1DEXT)( GLenum, GLint, GLint, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[1089]; + void (*func_glTexSubImage1DEXT)( GLenum, GLint, GLint, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glTexSubImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %p)\n", target, level, xoffset, width, format, type, pixels ); ENTER_GL(); func_glTexSubImage1DEXT( target, level, xoffset, width, format, type, pixels ); @@ -8864,7 +10354,7 @@ static void WINAPI wine_glTexSubImage1DEXT( GLenum target, GLint level, GLint xo } static void WINAPI wine_glTexSubImage2DEXT( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glTexSubImage2DEXT)( GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[1090]; + void (*func_glTexSubImage2DEXT)( GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glTexSubImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %p)\n", target, level, xoffset, yoffset, width, height, format, type, pixels ); ENTER_GL(); func_glTexSubImage2DEXT( target, level, xoffset, yoffset, width, height, format, type, pixels ); @@ -8872,7 +10362,7 @@ static void WINAPI wine_glTexSubImage2DEXT( GLenum target, GLint level, GLint xo } static void WINAPI wine_glTexSubImage3DEXT( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glTexSubImage3DEXT)( GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[1091]; + void (*func_glTexSubImage3DEXT)( GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glTexSubImage3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels ); ENTER_GL(); func_glTexSubImage3DEXT( target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels ); @@ -8880,7 +10370,7 @@ static void WINAPI wine_glTexSubImage3DEXT( GLenum target, GLint level, GLint xo } static void WINAPI wine_glTexSubImage4DSGIS( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glTexSubImage4DSGIS)( GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[1092]; + void (*func_glTexSubImage4DSGIS)( GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glTexSubImage4DSGIS]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, size4d, format, type, pixels ); ENTER_GL(); func_glTexSubImage4DSGIS( target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, size4d, format, type, pixels ); @@ -8888,7 +10378,7 @@ static void WINAPI wine_glTexSubImage4DSGIS( GLenum target, GLint level, GLint x } static void WINAPI wine_glTextureBufferEXT( GLuint texture, GLenum target, GLenum internalformat, GLuint buffer ) { - void (*func_glTextureBufferEXT)( GLuint, GLenum, GLenum, GLuint ) = extension_funcs[1093]; + void (*func_glTextureBufferEXT)( GLuint, GLenum, GLenum, GLuint ) = extension_funcs[EXT_glTextureBufferEXT]; TRACE("(%d, %d, %d, %d)\n", texture, target, internalformat, buffer ); ENTER_GL(); func_glTextureBufferEXT( texture, target, internalformat, buffer ); @@ -8896,7 +10386,7 @@ static void WINAPI wine_glTextureBufferEXT( GLuint texture, GLenum target, GLenu } static void WINAPI wine_glTextureColorMaskSGIS( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ) { - void (*func_glTextureColorMaskSGIS)( GLboolean, GLboolean, GLboolean, GLboolean ) = extension_funcs[1094]; + void (*func_glTextureColorMaskSGIS)( GLboolean, GLboolean, GLboolean, GLboolean ) = extension_funcs[EXT_glTextureColorMaskSGIS]; TRACE("(%d, %d, %d, %d)\n", red, green, blue, alpha ); ENTER_GL(); func_glTextureColorMaskSGIS( red, green, blue, alpha ); @@ -8904,7 +10394,7 @@ static void WINAPI wine_glTextureColorMaskSGIS( GLboolean red, GLboolean green, } static void WINAPI wine_glTextureImage1DEXT( GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glTextureImage1DEXT)( GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[1095]; + void (*func_glTextureImage1DEXT)( GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glTextureImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texture, target, level, internalformat, width, border, format, type, pixels ); ENTER_GL(); func_glTextureImage1DEXT( texture, target, level, internalformat, width, border, format, type, pixels ); @@ -8912,7 +10402,7 @@ static void WINAPI wine_glTextureImage1DEXT( GLuint texture, GLenum target, GLin } static void WINAPI wine_glTextureImage2DEXT( GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glTextureImage2DEXT)( GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[1096]; + void (*func_glTextureImage2DEXT)( GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glTextureImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texture, target, level, internalformat, width, height, border, format, type, pixels ); ENTER_GL(); func_glTextureImage2DEXT( texture, target, level, internalformat, width, height, border, format, type, pixels ); @@ -8920,7 +10410,7 @@ static void WINAPI wine_glTextureImage2DEXT( GLuint texture, GLenum target, GLin } static void WINAPI wine_glTextureImage3DEXT( GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glTextureImage3DEXT)( GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[1097]; + void (*func_glTextureImage3DEXT)( GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glTextureImage3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texture, target, level, internalformat, width, height, depth, border, format, type, pixels ); ENTER_GL(); func_glTextureImage3DEXT( texture, target, level, internalformat, width, height, depth, border, format, type, pixels ); @@ -8928,7 +10418,7 @@ static void WINAPI wine_glTextureImage3DEXT( GLuint texture, GLenum target, GLin } static void WINAPI wine_glTextureLightEXT( GLenum pname ) { - void (*func_glTextureLightEXT)( GLenum ) = extension_funcs[1098]; + void (*func_glTextureLightEXT)( GLenum ) = extension_funcs[EXT_glTextureLightEXT]; TRACE("(%d)\n", pname ); ENTER_GL(); func_glTextureLightEXT( pname ); @@ -8936,7 +10426,7 @@ static void WINAPI wine_glTextureLightEXT( GLenum pname ) { } static void WINAPI wine_glTextureMaterialEXT( GLenum face, GLenum mode ) { - void (*func_glTextureMaterialEXT)( GLenum, GLenum ) = extension_funcs[1099]; + void (*func_glTextureMaterialEXT)( GLenum, GLenum ) = extension_funcs[EXT_glTextureMaterialEXT]; TRACE("(%d, %d)\n", face, mode ); ENTER_GL(); func_glTextureMaterialEXT( face, mode ); @@ -8944,7 +10434,7 @@ static void WINAPI wine_glTextureMaterialEXT( GLenum face, GLenum mode ) { } static void WINAPI wine_glTextureNormalEXT( GLenum mode ) { - void (*func_glTextureNormalEXT)( GLenum ) = extension_funcs[1100]; + void (*func_glTextureNormalEXT)( GLenum ) = extension_funcs[EXT_glTextureNormalEXT]; TRACE("(%d)\n", mode ); ENTER_GL(); func_glTextureNormalEXT( mode ); @@ -8952,7 +10442,7 @@ static void WINAPI wine_glTextureNormalEXT( GLenum mode ) { } static void WINAPI wine_glTextureParameterIivEXT( GLuint texture, GLenum target, GLenum pname, GLint* params ) { - void (*func_glTextureParameterIivEXT)( GLuint, GLenum, GLenum, GLint* ) = extension_funcs[1101]; + void (*func_glTextureParameterIivEXT)( GLuint, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glTextureParameterIivEXT]; TRACE("(%d, %d, %d, %p)\n", texture, target, pname, params ); ENTER_GL(); func_glTextureParameterIivEXT( texture, target, pname, params ); @@ -8960,7 +10450,7 @@ static void WINAPI wine_glTextureParameterIivEXT( GLuint texture, GLenum target, } static void WINAPI wine_glTextureParameterIuivEXT( GLuint texture, GLenum target, GLenum pname, GLuint* params ) { - void (*func_glTextureParameterIuivEXT)( GLuint, GLenum, GLenum, GLuint* ) = extension_funcs[1102]; + void (*func_glTextureParameterIuivEXT)( GLuint, GLenum, GLenum, GLuint* ) = extension_funcs[EXT_glTextureParameterIuivEXT]; TRACE("(%d, %d, %d, %p)\n", texture, target, pname, params ); ENTER_GL(); func_glTextureParameterIuivEXT( texture, target, pname, params ); @@ -8968,7 +10458,7 @@ static void WINAPI wine_glTextureParameterIuivEXT( GLuint texture, GLenum target } static void WINAPI wine_glTextureParameterfEXT( GLuint texture, GLenum target, GLenum pname, GLfloat param ) { - void (*func_glTextureParameterfEXT)( GLuint, GLenum, GLenum, GLfloat ) = extension_funcs[1103]; + void (*func_glTextureParameterfEXT)( GLuint, GLenum, GLenum, GLfloat ) = extension_funcs[EXT_glTextureParameterfEXT]; TRACE("(%d, %d, %d, %f)\n", texture, target, pname, param ); ENTER_GL(); func_glTextureParameterfEXT( texture, target, pname, param ); @@ -8976,7 +10466,7 @@ static void WINAPI wine_glTextureParameterfEXT( GLuint texture, GLenum target, G } static void WINAPI wine_glTextureParameterfvEXT( GLuint texture, GLenum target, GLenum pname, GLfloat* params ) { - void (*func_glTextureParameterfvEXT)( GLuint, GLenum, GLenum, GLfloat* ) = extension_funcs[1104]; + void (*func_glTextureParameterfvEXT)( GLuint, GLenum, GLenum, GLfloat* ) = extension_funcs[EXT_glTextureParameterfvEXT]; TRACE("(%d, %d, %d, %p)\n", texture, target, pname, params ); ENTER_GL(); func_glTextureParameterfvEXT( texture, target, pname, params ); @@ -8984,7 +10474,7 @@ static void WINAPI wine_glTextureParameterfvEXT( GLuint texture, GLenum target, } static void WINAPI wine_glTextureParameteriEXT( GLuint texture, GLenum target, GLenum pname, GLint param ) { - void (*func_glTextureParameteriEXT)( GLuint, GLenum, GLenum, GLint ) = extension_funcs[1105]; + void (*func_glTextureParameteriEXT)( GLuint, GLenum, GLenum, GLint ) = extension_funcs[EXT_glTextureParameteriEXT]; TRACE("(%d, %d, %d, %d)\n", texture, target, pname, param ); ENTER_GL(); func_glTextureParameteriEXT( texture, target, pname, param ); @@ -8992,7 +10482,7 @@ static void WINAPI wine_glTextureParameteriEXT( GLuint texture, GLenum target, G } static void WINAPI wine_glTextureParameterivEXT( GLuint texture, GLenum target, GLenum pname, GLint* params ) { - void (*func_glTextureParameterivEXT)( GLuint, GLenum, GLenum, GLint* ) = extension_funcs[1106]; + void (*func_glTextureParameterivEXT)( GLuint, GLenum, GLenum, GLint* ) = extension_funcs[EXT_glTextureParameterivEXT]; TRACE("(%d, %d, %d, %p)\n", texture, target, pname, params ); ENTER_GL(); func_glTextureParameterivEXT( texture, target, pname, params ); @@ -9000,7 +10490,7 @@ static void WINAPI wine_glTextureParameterivEXT( GLuint texture, GLenum target, } static void WINAPI wine_glTextureRenderbufferEXT( GLuint texture, GLenum target, GLuint renderbuffer ) { - void (*func_glTextureRenderbufferEXT)( GLuint, GLenum, GLuint ) = extension_funcs[1107]; + void (*func_glTextureRenderbufferEXT)( GLuint, GLenum, GLuint ) = extension_funcs[EXT_glTextureRenderbufferEXT]; TRACE("(%d, %d, %d)\n", texture, target, renderbuffer ); ENTER_GL(); func_glTextureRenderbufferEXT( texture, target, renderbuffer ); @@ -9008,7 +10498,7 @@ static void WINAPI wine_glTextureRenderbufferEXT( GLuint texture, GLenum target, } static void WINAPI wine_glTextureSubImage1DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glTextureSubImage1DEXT)( GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[1108]; + void (*func_glTextureSubImage1DEXT)( GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glTextureSubImage1DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %p)\n", texture, target, level, xoffset, width, format, type, pixels ); ENTER_GL(); func_glTextureSubImage1DEXT( texture, target, level, xoffset, width, format, type, pixels ); @@ -9016,7 +10506,7 @@ static void WINAPI wine_glTextureSubImage1DEXT( GLuint texture, GLenum target, G } static void WINAPI wine_glTextureSubImage2DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glTextureSubImage2DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[1109]; + void (*func_glTextureSubImage2DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glTextureSubImage2DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texture, target, level, xoffset, yoffset, width, height, format, type, pixels ); ENTER_GL(); func_glTextureSubImage2DEXT( texture, target, level, xoffset, yoffset, width, height, format, type, pixels ); @@ -9024,7 +10514,7 @@ static void WINAPI wine_glTextureSubImage2DEXT( GLuint texture, GLenum target, G } static void WINAPI wine_glTextureSubImage3DEXT( GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid* pixels ) { - void (*func_glTextureSubImage3DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[1110]; + void (*func_glTextureSubImage3DEXT)( GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ) = extension_funcs[EXT_glTextureSubImage3DEXT]; TRACE("(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %p)\n", texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels ); ENTER_GL(); func_glTextureSubImage3DEXT( texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels ); @@ -9032,7 +10522,7 @@ static void WINAPI wine_glTextureSubImage3DEXT( GLuint texture, GLenum target, G } static void WINAPI wine_glTrackMatrixNV( GLenum target, GLuint address, GLenum matrix, GLenum transform ) { - void (*func_glTrackMatrixNV)( GLenum, GLuint, GLenum, GLenum ) = extension_funcs[1111]; + void (*func_glTrackMatrixNV)( GLenum, GLuint, GLenum, GLenum ) = extension_funcs[EXT_glTrackMatrixNV]; TRACE("(%d, %d, %d, %d)\n", target, address, matrix, transform ); ENTER_GL(); func_glTrackMatrixNV( target, address, matrix, transform ); @@ -9040,7 +10530,7 @@ static void WINAPI wine_glTrackMatrixNV( GLenum target, GLuint address, GLenum m } static void WINAPI wine_glTransformFeedbackAttribsNV( GLuint count, GLint* attribs, GLenum bufferMode ) { - void (*func_glTransformFeedbackAttribsNV)( GLuint, GLint*, GLenum ) = extension_funcs[1112]; + void (*func_glTransformFeedbackAttribsNV)( GLuint, GLint*, GLenum ) = extension_funcs[EXT_glTransformFeedbackAttribsNV]; TRACE("(%d, %p, %d)\n", count, attribs, bufferMode ); ENTER_GL(); func_glTransformFeedbackAttribsNV( count, attribs, bufferMode ); @@ -9048,7 +10538,7 @@ static void WINAPI wine_glTransformFeedbackAttribsNV( GLuint count, GLint* attri } static void WINAPI wine_glTransformFeedbackVaryings( GLuint program, GLsizei count, GLint* locations, GLenum bufferMode ) { - void (*func_glTransformFeedbackVaryings)( GLuint, GLsizei, GLint*, GLenum ) = extension_funcs[1113]; + void (*func_glTransformFeedbackVaryings)( GLuint, GLsizei, GLint*, GLenum ) = extension_funcs[EXT_glTransformFeedbackVaryings]; TRACE("(%d, %d, %p, %d)\n", program, count, locations, bufferMode ); ENTER_GL(); func_glTransformFeedbackVaryings( program, count, locations, bufferMode ); @@ -9056,7 +10546,7 @@ static void WINAPI wine_glTransformFeedbackVaryings( GLuint program, GLsizei cou } static void WINAPI wine_glTransformFeedbackVaryingsEXT( GLuint program, GLsizei count, GLint* locations, GLenum bufferMode ) { - void (*func_glTransformFeedbackVaryingsEXT)( GLuint, GLsizei, GLint*, GLenum ) = extension_funcs[1114]; + void (*func_glTransformFeedbackVaryingsEXT)( GLuint, GLsizei, GLint*, GLenum ) = extension_funcs[EXT_glTransformFeedbackVaryingsEXT]; TRACE("(%d, %d, %p, %d)\n", program, count, locations, bufferMode ); ENTER_GL(); func_glTransformFeedbackVaryingsEXT( program, count, locations, bufferMode ); @@ -9064,7 +10554,7 @@ static void WINAPI wine_glTransformFeedbackVaryingsEXT( GLuint program, GLsizei } static void WINAPI wine_glTransformFeedbackVaryingsNV( GLuint program, GLsizei count, GLint* locations, GLenum bufferMode ) { - void (*func_glTransformFeedbackVaryingsNV)( GLuint, GLsizei, GLint*, GLenum ) = extension_funcs[1115]; + void (*func_glTransformFeedbackVaryingsNV)( GLuint, GLsizei, GLint*, GLenum ) = extension_funcs[EXT_glTransformFeedbackVaryingsNV]; TRACE("(%d, %d, %p, %d)\n", program, count, locations, bufferMode ); ENTER_GL(); func_glTransformFeedbackVaryingsNV( program, count, locations, bufferMode ); @@ -9072,7 +10562,7 @@ static void WINAPI wine_glTransformFeedbackVaryingsNV( GLuint program, GLsizei c } static void WINAPI wine_glUniform1f( GLint location, GLfloat v0 ) { - void (*func_glUniform1f)( GLint, GLfloat ) = extension_funcs[1116]; + void (*func_glUniform1f)( GLint, GLfloat ) = extension_funcs[EXT_glUniform1f]; TRACE("(%d, %f)\n", location, v0 ); ENTER_GL(); func_glUniform1f( location, v0 ); @@ -9080,7 +10570,7 @@ static void WINAPI wine_glUniform1f( GLint location, GLfloat v0 ) { } static void WINAPI wine_glUniform1fARB( GLint location, GLfloat v0 ) { - void (*func_glUniform1fARB)( GLint, GLfloat ) = extension_funcs[1117]; + void (*func_glUniform1fARB)( GLint, GLfloat ) = extension_funcs[EXT_glUniform1fARB]; TRACE("(%d, %f)\n", location, v0 ); ENTER_GL(); func_glUniform1fARB( location, v0 ); @@ -9088,7 +10578,7 @@ static void WINAPI wine_glUniform1fARB( GLint location, GLfloat v0 ) { } static void WINAPI wine_glUniform1fv( GLint location, GLsizei count, GLfloat* value ) { - void (*func_glUniform1fv)( GLint, GLsizei, GLfloat* ) = extension_funcs[1118]; + void (*func_glUniform1fv)( GLint, GLsizei, GLfloat* ) = extension_funcs[EXT_glUniform1fv]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform1fv( location, count, value ); @@ -9096,7 +10586,7 @@ static void WINAPI wine_glUniform1fv( GLint location, GLsizei count, GLfloat* va } static void WINAPI wine_glUniform1fvARB( GLint location, GLsizei count, GLfloat* value ) { - void (*func_glUniform1fvARB)( GLint, GLsizei, GLfloat* ) = extension_funcs[1119]; + void (*func_glUniform1fvARB)( GLint, GLsizei, GLfloat* ) = extension_funcs[EXT_glUniform1fvARB]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform1fvARB( location, count, value ); @@ -9104,7 +10594,7 @@ static void WINAPI wine_glUniform1fvARB( GLint location, GLsizei count, GLfloat* } static void WINAPI wine_glUniform1i( GLint location, GLint v0 ) { - void (*func_glUniform1i)( GLint, GLint ) = extension_funcs[1120]; + void (*func_glUniform1i)( GLint, GLint ) = extension_funcs[EXT_glUniform1i]; TRACE("(%d, %d)\n", location, v0 ); ENTER_GL(); func_glUniform1i( location, v0 ); @@ -9112,7 +10602,7 @@ static void WINAPI wine_glUniform1i( GLint location, GLint v0 ) { } static void WINAPI wine_glUniform1iARB( GLint location, GLint v0 ) { - void (*func_glUniform1iARB)( GLint, GLint ) = extension_funcs[1121]; + void (*func_glUniform1iARB)( GLint, GLint ) = extension_funcs[EXT_glUniform1iARB]; TRACE("(%d, %d)\n", location, v0 ); ENTER_GL(); func_glUniform1iARB( location, v0 ); @@ -9120,7 +10610,7 @@ static void WINAPI wine_glUniform1iARB( GLint location, GLint v0 ) { } static void WINAPI wine_glUniform1iv( GLint location, GLsizei count, GLint* value ) { - void (*func_glUniform1iv)( GLint, GLsizei, GLint* ) = extension_funcs[1122]; + void (*func_glUniform1iv)( GLint, GLsizei, GLint* ) = extension_funcs[EXT_glUniform1iv]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform1iv( location, count, value ); @@ -9128,7 +10618,7 @@ static void WINAPI wine_glUniform1iv( GLint location, GLsizei count, GLint* valu } static void WINAPI wine_glUniform1ivARB( GLint location, GLsizei count, GLint* value ) { - void (*func_glUniform1ivARB)( GLint, GLsizei, GLint* ) = extension_funcs[1123]; + void (*func_glUniform1ivARB)( GLint, GLsizei, GLint* ) = extension_funcs[EXT_glUniform1ivARB]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform1ivARB( location, count, value ); @@ -9136,7 +10626,7 @@ static void WINAPI wine_glUniform1ivARB( GLint location, GLsizei count, GLint* v } static void WINAPI wine_glUniform1ui( GLint location, GLuint v0 ) { - void (*func_glUniform1ui)( GLint, GLuint ) = extension_funcs[1124]; + void (*func_glUniform1ui)( GLint, GLuint ) = extension_funcs[EXT_glUniform1ui]; TRACE("(%d, %d)\n", location, v0 ); ENTER_GL(); func_glUniform1ui( location, v0 ); @@ -9144,7 +10634,7 @@ static void WINAPI wine_glUniform1ui( GLint location, GLuint v0 ) { } static void WINAPI wine_glUniform1uiEXT( GLint location, GLuint v0 ) { - void (*func_glUniform1uiEXT)( GLint, GLuint ) = extension_funcs[1125]; + void (*func_glUniform1uiEXT)( GLint, GLuint ) = extension_funcs[EXT_glUniform1uiEXT]; TRACE("(%d, %d)\n", location, v0 ); ENTER_GL(); func_glUniform1uiEXT( location, v0 ); @@ -9152,7 +10642,7 @@ static void WINAPI wine_glUniform1uiEXT( GLint location, GLuint v0 ) { } static void WINAPI wine_glUniform1uiv( GLint location, GLsizei count, GLuint* value ) { - void (*func_glUniform1uiv)( GLint, GLsizei, GLuint* ) = extension_funcs[1126]; + void (*func_glUniform1uiv)( GLint, GLsizei, GLuint* ) = extension_funcs[EXT_glUniform1uiv]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform1uiv( location, count, value ); @@ -9160,7 +10650,7 @@ static void WINAPI wine_glUniform1uiv( GLint location, GLsizei count, GLuint* va } static void WINAPI wine_glUniform1uivEXT( GLint location, GLsizei count, GLuint* value ) { - void (*func_glUniform1uivEXT)( GLint, GLsizei, GLuint* ) = extension_funcs[1127]; + void (*func_glUniform1uivEXT)( GLint, GLsizei, GLuint* ) = extension_funcs[EXT_glUniform1uivEXT]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform1uivEXT( location, count, value ); @@ -9168,7 +10658,7 @@ static void WINAPI wine_glUniform1uivEXT( GLint location, GLsizei count, GLuint* } static void WINAPI wine_glUniform2f( GLint location, GLfloat v0, GLfloat v1 ) { - void (*func_glUniform2f)( GLint, GLfloat, GLfloat ) = extension_funcs[1128]; + void (*func_glUniform2f)( GLint, GLfloat, GLfloat ) = extension_funcs[EXT_glUniform2f]; TRACE("(%d, %f, %f)\n", location, v0, v1 ); ENTER_GL(); func_glUniform2f( location, v0, v1 ); @@ -9176,7 +10666,7 @@ static void WINAPI wine_glUniform2f( GLint location, GLfloat v0, GLfloat v1 ) { } static void WINAPI wine_glUniform2fARB( GLint location, GLfloat v0, GLfloat v1 ) { - void (*func_glUniform2fARB)( GLint, GLfloat, GLfloat ) = extension_funcs[1129]; + void (*func_glUniform2fARB)( GLint, GLfloat, GLfloat ) = extension_funcs[EXT_glUniform2fARB]; TRACE("(%d, %f, %f)\n", location, v0, v1 ); ENTER_GL(); func_glUniform2fARB( location, v0, v1 ); @@ -9184,7 +10674,7 @@ static void WINAPI wine_glUniform2fARB( GLint location, GLfloat v0, GLfloat v1 ) } static void WINAPI wine_glUniform2fv( GLint location, GLsizei count, GLfloat* value ) { - void (*func_glUniform2fv)( GLint, GLsizei, GLfloat* ) = extension_funcs[1130]; + void (*func_glUniform2fv)( GLint, GLsizei, GLfloat* ) = extension_funcs[EXT_glUniform2fv]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform2fv( location, count, value ); @@ -9192,7 +10682,7 @@ static void WINAPI wine_glUniform2fv( GLint location, GLsizei count, GLfloat* va } static void WINAPI wine_glUniform2fvARB( GLint location, GLsizei count, GLfloat* value ) { - void (*func_glUniform2fvARB)( GLint, GLsizei, GLfloat* ) = extension_funcs[1131]; + void (*func_glUniform2fvARB)( GLint, GLsizei, GLfloat* ) = extension_funcs[EXT_glUniform2fvARB]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform2fvARB( location, count, value ); @@ -9200,7 +10690,7 @@ static void WINAPI wine_glUniform2fvARB( GLint location, GLsizei count, GLfloat* } static void WINAPI wine_glUniform2i( GLint location, GLint v0, GLint v1 ) { - void (*func_glUniform2i)( GLint, GLint, GLint ) = extension_funcs[1132]; + void (*func_glUniform2i)( GLint, GLint, GLint ) = extension_funcs[EXT_glUniform2i]; TRACE("(%d, %d, %d)\n", location, v0, v1 ); ENTER_GL(); func_glUniform2i( location, v0, v1 ); @@ -9208,7 +10698,7 @@ static void WINAPI wine_glUniform2i( GLint location, GLint v0, GLint v1 ) { } static void WINAPI wine_glUniform2iARB( GLint location, GLint v0, GLint v1 ) { - void (*func_glUniform2iARB)( GLint, GLint, GLint ) = extension_funcs[1133]; + void (*func_glUniform2iARB)( GLint, GLint, GLint ) = extension_funcs[EXT_glUniform2iARB]; TRACE("(%d, %d, %d)\n", location, v0, v1 ); ENTER_GL(); func_glUniform2iARB( location, v0, v1 ); @@ -9216,7 +10706,7 @@ static void WINAPI wine_glUniform2iARB( GLint location, GLint v0, GLint v1 ) { } static void WINAPI wine_glUniform2iv( GLint location, GLsizei count, GLint* value ) { - void (*func_glUniform2iv)( GLint, GLsizei, GLint* ) = extension_funcs[1134]; + void (*func_glUniform2iv)( GLint, GLsizei, GLint* ) = extension_funcs[EXT_glUniform2iv]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform2iv( location, count, value ); @@ -9224,7 +10714,7 @@ static void WINAPI wine_glUniform2iv( GLint location, GLsizei count, GLint* valu } static void WINAPI wine_glUniform2ivARB( GLint location, GLsizei count, GLint* value ) { - void (*func_glUniform2ivARB)( GLint, GLsizei, GLint* ) = extension_funcs[1135]; + void (*func_glUniform2ivARB)( GLint, GLsizei, GLint* ) = extension_funcs[EXT_glUniform2ivARB]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform2ivARB( location, count, value ); @@ -9232,7 +10722,7 @@ static void WINAPI wine_glUniform2ivARB( GLint location, GLsizei count, GLint* v } static void WINAPI wine_glUniform2ui( GLint location, GLuint v0, GLuint v1 ) { - void (*func_glUniform2ui)( GLint, GLuint, GLuint ) = extension_funcs[1136]; + void (*func_glUniform2ui)( GLint, GLuint, GLuint ) = extension_funcs[EXT_glUniform2ui]; TRACE("(%d, %d, %d)\n", location, v0, v1 ); ENTER_GL(); func_glUniform2ui( location, v0, v1 ); @@ -9240,7 +10730,7 @@ static void WINAPI wine_glUniform2ui( GLint location, GLuint v0, GLuint v1 ) { } static void WINAPI wine_glUniform2uiEXT( GLint location, GLuint v0, GLuint v1 ) { - void (*func_glUniform2uiEXT)( GLint, GLuint, GLuint ) = extension_funcs[1137]; + void (*func_glUniform2uiEXT)( GLint, GLuint, GLuint ) = extension_funcs[EXT_glUniform2uiEXT]; TRACE("(%d, %d, %d)\n", location, v0, v1 ); ENTER_GL(); func_glUniform2uiEXT( location, v0, v1 ); @@ -9248,7 +10738,7 @@ static void WINAPI wine_glUniform2uiEXT( GLint location, GLuint v0, GLuint v1 ) } static void WINAPI wine_glUniform2uiv( GLint location, GLsizei count, GLuint* value ) { - void (*func_glUniform2uiv)( GLint, GLsizei, GLuint* ) = extension_funcs[1138]; + void (*func_glUniform2uiv)( GLint, GLsizei, GLuint* ) = extension_funcs[EXT_glUniform2uiv]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform2uiv( location, count, value ); @@ -9256,7 +10746,7 @@ static void WINAPI wine_glUniform2uiv( GLint location, GLsizei count, GLuint* va } static void WINAPI wine_glUniform2uivEXT( GLint location, GLsizei count, GLuint* value ) { - void (*func_glUniform2uivEXT)( GLint, GLsizei, GLuint* ) = extension_funcs[1139]; + void (*func_glUniform2uivEXT)( GLint, GLsizei, GLuint* ) = extension_funcs[EXT_glUniform2uivEXT]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform2uivEXT( location, count, value ); @@ -9264,7 +10754,7 @@ static void WINAPI wine_glUniform2uivEXT( GLint location, GLsizei count, GLuint* } static void WINAPI wine_glUniform3f( GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ) { - void (*func_glUniform3f)( GLint, GLfloat, GLfloat, GLfloat ) = extension_funcs[1140]; + void (*func_glUniform3f)( GLint, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glUniform3f]; TRACE("(%d, %f, %f, %f)\n", location, v0, v1, v2 ); ENTER_GL(); func_glUniform3f( location, v0, v1, v2 ); @@ -9272,7 +10762,7 @@ static void WINAPI wine_glUniform3f( GLint location, GLfloat v0, GLfloat v1, GLf } static void WINAPI wine_glUniform3fARB( GLint location, GLfloat v0, GLfloat v1, GLfloat v2 ) { - void (*func_glUniform3fARB)( GLint, GLfloat, GLfloat, GLfloat ) = extension_funcs[1141]; + void (*func_glUniform3fARB)( GLint, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glUniform3fARB]; TRACE("(%d, %f, %f, %f)\n", location, v0, v1, v2 ); ENTER_GL(); func_glUniform3fARB( location, v0, v1, v2 ); @@ -9280,7 +10770,7 @@ static void WINAPI wine_glUniform3fARB( GLint location, GLfloat v0, GLfloat v1, } static void WINAPI wine_glUniform3fv( GLint location, GLsizei count, GLfloat* value ) { - void (*func_glUniform3fv)( GLint, GLsizei, GLfloat* ) = extension_funcs[1142]; + void (*func_glUniform3fv)( GLint, GLsizei, GLfloat* ) = extension_funcs[EXT_glUniform3fv]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform3fv( location, count, value ); @@ -9288,7 +10778,7 @@ static void WINAPI wine_glUniform3fv( GLint location, GLsizei count, GLfloat* va } static void WINAPI wine_glUniform3fvARB( GLint location, GLsizei count, GLfloat* value ) { - void (*func_glUniform3fvARB)( GLint, GLsizei, GLfloat* ) = extension_funcs[1143]; + void (*func_glUniform3fvARB)( GLint, GLsizei, GLfloat* ) = extension_funcs[EXT_glUniform3fvARB]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform3fvARB( location, count, value ); @@ -9296,7 +10786,7 @@ static void WINAPI wine_glUniform3fvARB( GLint location, GLsizei count, GLfloat* } static void WINAPI wine_glUniform3i( GLint location, GLint v0, GLint v1, GLint v2 ) { - void (*func_glUniform3i)( GLint, GLint, GLint, GLint ) = extension_funcs[1144]; + void (*func_glUniform3i)( GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glUniform3i]; TRACE("(%d, %d, %d, %d)\n", location, v0, v1, v2 ); ENTER_GL(); func_glUniform3i( location, v0, v1, v2 ); @@ -9304,7 +10794,7 @@ static void WINAPI wine_glUniform3i( GLint location, GLint v0, GLint v1, GLint v } static void WINAPI wine_glUniform3iARB( GLint location, GLint v0, GLint v1, GLint v2 ) { - void (*func_glUniform3iARB)( GLint, GLint, GLint, GLint ) = extension_funcs[1145]; + void (*func_glUniform3iARB)( GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glUniform3iARB]; TRACE("(%d, %d, %d, %d)\n", location, v0, v1, v2 ); ENTER_GL(); func_glUniform3iARB( location, v0, v1, v2 ); @@ -9312,7 +10802,7 @@ static void WINAPI wine_glUniform3iARB( GLint location, GLint v0, GLint v1, GLin } static void WINAPI wine_glUniform3iv( GLint location, GLsizei count, GLint* value ) { - void (*func_glUniform3iv)( GLint, GLsizei, GLint* ) = extension_funcs[1146]; + void (*func_glUniform3iv)( GLint, GLsizei, GLint* ) = extension_funcs[EXT_glUniform3iv]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform3iv( location, count, value ); @@ -9320,7 +10810,7 @@ static void WINAPI wine_glUniform3iv( GLint location, GLsizei count, GLint* valu } static void WINAPI wine_glUniform3ivARB( GLint location, GLsizei count, GLint* value ) { - void (*func_glUniform3ivARB)( GLint, GLsizei, GLint* ) = extension_funcs[1147]; + void (*func_glUniform3ivARB)( GLint, GLsizei, GLint* ) = extension_funcs[EXT_glUniform3ivARB]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform3ivARB( location, count, value ); @@ -9328,7 +10818,7 @@ static void WINAPI wine_glUniform3ivARB( GLint location, GLsizei count, GLint* v } static void WINAPI wine_glUniform3ui( GLint location, GLuint v0, GLuint v1, GLuint v2 ) { - void (*func_glUniform3ui)( GLint, GLuint, GLuint, GLuint ) = extension_funcs[1148]; + void (*func_glUniform3ui)( GLint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glUniform3ui]; TRACE("(%d, %d, %d, %d)\n", location, v0, v1, v2 ); ENTER_GL(); func_glUniform3ui( location, v0, v1, v2 ); @@ -9336,7 +10826,7 @@ static void WINAPI wine_glUniform3ui( GLint location, GLuint v0, GLuint v1, GLui } static void WINAPI wine_glUniform3uiEXT( GLint location, GLuint v0, GLuint v1, GLuint v2 ) { - void (*func_glUniform3uiEXT)( GLint, GLuint, GLuint, GLuint ) = extension_funcs[1149]; + void (*func_glUniform3uiEXT)( GLint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glUniform3uiEXT]; TRACE("(%d, %d, %d, %d)\n", location, v0, v1, v2 ); ENTER_GL(); func_glUniform3uiEXT( location, v0, v1, v2 ); @@ -9344,7 +10834,7 @@ static void WINAPI wine_glUniform3uiEXT( GLint location, GLuint v0, GLuint v1, G } static void WINAPI wine_glUniform3uiv( GLint location, GLsizei count, GLuint* value ) { - void (*func_glUniform3uiv)( GLint, GLsizei, GLuint* ) = extension_funcs[1150]; + void (*func_glUniform3uiv)( GLint, GLsizei, GLuint* ) = extension_funcs[EXT_glUniform3uiv]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform3uiv( location, count, value ); @@ -9352,7 +10842,7 @@ static void WINAPI wine_glUniform3uiv( GLint location, GLsizei count, GLuint* va } static void WINAPI wine_glUniform3uivEXT( GLint location, GLsizei count, GLuint* value ) { - void (*func_glUniform3uivEXT)( GLint, GLsizei, GLuint* ) = extension_funcs[1151]; + void (*func_glUniform3uivEXT)( GLint, GLsizei, GLuint* ) = extension_funcs[EXT_glUniform3uivEXT]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform3uivEXT( location, count, value ); @@ -9360,7 +10850,7 @@ static void WINAPI wine_glUniform3uivEXT( GLint location, GLsizei count, GLuint* } static void WINAPI wine_glUniform4f( GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) { - void (*func_glUniform4f)( GLint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[1152]; + void (*func_glUniform4f)( GLint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glUniform4f]; TRACE("(%d, %f, %f, %f, %f)\n", location, v0, v1, v2, v3 ); ENTER_GL(); func_glUniform4f( location, v0, v1, v2, v3 ); @@ -9368,7 +10858,7 @@ static void WINAPI wine_glUniform4f( GLint location, GLfloat v0, GLfloat v1, GLf } static void WINAPI wine_glUniform4fARB( GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) { - void (*func_glUniform4fARB)( GLint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[1153]; + void (*func_glUniform4fARB)( GLint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glUniform4fARB]; TRACE("(%d, %f, %f, %f, %f)\n", location, v0, v1, v2, v3 ); ENTER_GL(); func_glUniform4fARB( location, v0, v1, v2, v3 ); @@ -9376,7 +10866,7 @@ static void WINAPI wine_glUniform4fARB( GLint location, GLfloat v0, GLfloat v1, } static void WINAPI wine_glUniform4fv( GLint location, GLsizei count, GLfloat* value ) { - void (*func_glUniform4fv)( GLint, GLsizei, GLfloat* ) = extension_funcs[1154]; + void (*func_glUniform4fv)( GLint, GLsizei, GLfloat* ) = extension_funcs[EXT_glUniform4fv]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform4fv( location, count, value ); @@ -9384,7 +10874,7 @@ static void WINAPI wine_glUniform4fv( GLint location, GLsizei count, GLfloat* va } static void WINAPI wine_glUniform4fvARB( GLint location, GLsizei count, GLfloat* value ) { - void (*func_glUniform4fvARB)( GLint, GLsizei, GLfloat* ) = extension_funcs[1155]; + void (*func_glUniform4fvARB)( GLint, GLsizei, GLfloat* ) = extension_funcs[EXT_glUniform4fvARB]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform4fvARB( location, count, value ); @@ -9392,7 +10882,7 @@ static void WINAPI wine_glUniform4fvARB( GLint location, GLsizei count, GLfloat* } static void WINAPI wine_glUniform4i( GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ) { - void (*func_glUniform4i)( GLint, GLint, GLint, GLint, GLint ) = extension_funcs[1156]; + void (*func_glUniform4i)( GLint, GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glUniform4i]; TRACE("(%d, %d, %d, %d, %d)\n", location, v0, v1, v2, v3 ); ENTER_GL(); func_glUniform4i( location, v0, v1, v2, v3 ); @@ -9400,7 +10890,7 @@ static void WINAPI wine_glUniform4i( GLint location, GLint v0, GLint v1, GLint v } static void WINAPI wine_glUniform4iARB( GLint location, GLint v0, GLint v1, GLint v2, GLint v3 ) { - void (*func_glUniform4iARB)( GLint, GLint, GLint, GLint, GLint ) = extension_funcs[1157]; + void (*func_glUniform4iARB)( GLint, GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glUniform4iARB]; TRACE("(%d, %d, %d, %d, %d)\n", location, v0, v1, v2, v3 ); ENTER_GL(); func_glUniform4iARB( location, v0, v1, v2, v3 ); @@ -9408,7 +10898,7 @@ static void WINAPI wine_glUniform4iARB( GLint location, GLint v0, GLint v1, GLin } static void WINAPI wine_glUniform4iv( GLint location, GLsizei count, GLint* value ) { - void (*func_glUniform4iv)( GLint, GLsizei, GLint* ) = extension_funcs[1158]; + void (*func_glUniform4iv)( GLint, GLsizei, GLint* ) = extension_funcs[EXT_glUniform4iv]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform4iv( location, count, value ); @@ -9416,7 +10906,7 @@ static void WINAPI wine_glUniform4iv( GLint location, GLsizei count, GLint* valu } static void WINAPI wine_glUniform4ivARB( GLint location, GLsizei count, GLint* value ) { - void (*func_glUniform4ivARB)( GLint, GLsizei, GLint* ) = extension_funcs[1159]; + void (*func_glUniform4ivARB)( GLint, GLsizei, GLint* ) = extension_funcs[EXT_glUniform4ivARB]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform4ivARB( location, count, value ); @@ -9424,7 +10914,7 @@ static void WINAPI wine_glUniform4ivARB( GLint location, GLsizei count, GLint* v } static void WINAPI wine_glUniform4ui( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) { - void (*func_glUniform4ui)( GLint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[1160]; + void (*func_glUniform4ui)( GLint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glUniform4ui]; TRACE("(%d, %d, %d, %d, %d)\n", location, v0, v1, v2, v3 ); ENTER_GL(); func_glUniform4ui( location, v0, v1, v2, v3 ); @@ -9432,7 +10922,7 @@ static void WINAPI wine_glUniform4ui( GLint location, GLuint v0, GLuint v1, GLui } static void WINAPI wine_glUniform4uiEXT( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) { - void (*func_glUniform4uiEXT)( GLint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[1161]; + void (*func_glUniform4uiEXT)( GLint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glUniform4uiEXT]; TRACE("(%d, %d, %d, %d, %d)\n", location, v0, v1, v2, v3 ); ENTER_GL(); func_glUniform4uiEXT( location, v0, v1, v2, v3 ); @@ -9440,7 +10930,7 @@ static void WINAPI wine_glUniform4uiEXT( GLint location, GLuint v0, GLuint v1, G } static void WINAPI wine_glUniform4uiv( GLint location, GLsizei count, GLuint* value ) { - void (*func_glUniform4uiv)( GLint, GLsizei, GLuint* ) = extension_funcs[1162]; + void (*func_glUniform4uiv)( GLint, GLsizei, GLuint* ) = extension_funcs[EXT_glUniform4uiv]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform4uiv( location, count, value ); @@ -9448,7 +10938,7 @@ static void WINAPI wine_glUniform4uiv( GLint location, GLsizei count, GLuint* va } static void WINAPI wine_glUniform4uivEXT( GLint location, GLsizei count, GLuint* value ) { - void (*func_glUniform4uivEXT)( GLint, GLsizei, GLuint* ) = extension_funcs[1163]; + void (*func_glUniform4uivEXT)( GLint, GLsizei, GLuint* ) = extension_funcs[EXT_glUniform4uivEXT]; TRACE("(%d, %d, %p)\n", location, count, value ); ENTER_GL(); func_glUniform4uivEXT( location, count, value ); @@ -9456,7 +10946,7 @@ static void WINAPI wine_glUniform4uivEXT( GLint location, GLsizei count, GLuint* } static void WINAPI wine_glUniformBufferEXT( GLuint program, GLint location, GLuint buffer ) { - void (*func_glUniformBufferEXT)( GLuint, GLint, GLuint ) = extension_funcs[1164]; + void (*func_glUniformBufferEXT)( GLuint, GLint, GLuint ) = extension_funcs[EXT_glUniformBufferEXT]; TRACE("(%d, %d, %d)\n", program, location, buffer ); ENTER_GL(); func_glUniformBufferEXT( program, location, buffer ); @@ -9464,7 +10954,7 @@ static void WINAPI wine_glUniformBufferEXT( GLuint program, GLint location, GLui } static void WINAPI wine_glUniformMatrix2fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glUniformMatrix2fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[1165]; + void (*func_glUniformMatrix2fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix2fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); ENTER_GL(); func_glUniformMatrix2fv( location, count, transpose, value ); @@ -9472,7 +10962,7 @@ static void WINAPI wine_glUniformMatrix2fv( GLint location, GLsizei count, GLboo } static void WINAPI wine_glUniformMatrix2fvARB( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glUniformMatrix2fvARB)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[1166]; + void (*func_glUniformMatrix2fvARB)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix2fvARB]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); ENTER_GL(); func_glUniformMatrix2fvARB( location, count, transpose, value ); @@ -9480,7 +10970,7 @@ static void WINAPI wine_glUniformMatrix2fvARB( GLint location, GLsizei count, GL } static void WINAPI wine_glUniformMatrix2x3fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glUniformMatrix2x3fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[1167]; + void (*func_glUniformMatrix2x3fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix2x3fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); ENTER_GL(); func_glUniformMatrix2x3fv( location, count, transpose, value ); @@ -9488,7 +10978,7 @@ static void WINAPI wine_glUniformMatrix2x3fv( GLint location, GLsizei count, GLb } static void WINAPI wine_glUniformMatrix2x4fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glUniformMatrix2x4fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[1168]; + void (*func_glUniformMatrix2x4fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix2x4fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); ENTER_GL(); func_glUniformMatrix2x4fv( location, count, transpose, value ); @@ -9496,7 +10986,7 @@ static void WINAPI wine_glUniformMatrix2x4fv( GLint location, GLsizei count, GLb } static void WINAPI wine_glUniformMatrix3fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glUniformMatrix3fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[1169]; + void (*func_glUniformMatrix3fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix3fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); ENTER_GL(); func_glUniformMatrix3fv( location, count, transpose, value ); @@ -9504,7 +10994,7 @@ static void WINAPI wine_glUniformMatrix3fv( GLint location, GLsizei count, GLboo } static void WINAPI wine_glUniformMatrix3fvARB( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glUniformMatrix3fvARB)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[1170]; + void (*func_glUniformMatrix3fvARB)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix3fvARB]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); ENTER_GL(); func_glUniformMatrix3fvARB( location, count, transpose, value ); @@ -9512,7 +11002,7 @@ static void WINAPI wine_glUniformMatrix3fvARB( GLint location, GLsizei count, GL } static void WINAPI wine_glUniformMatrix3x2fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glUniformMatrix3x2fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[1171]; + void (*func_glUniformMatrix3x2fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix3x2fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); ENTER_GL(); func_glUniformMatrix3x2fv( location, count, transpose, value ); @@ -9520,7 +11010,7 @@ static void WINAPI wine_glUniformMatrix3x2fv( GLint location, GLsizei count, GLb } static void WINAPI wine_glUniformMatrix3x4fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glUniformMatrix3x4fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[1172]; + void (*func_glUniformMatrix3x4fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix3x4fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); ENTER_GL(); func_glUniformMatrix3x4fv( location, count, transpose, value ); @@ -9528,7 +11018,7 @@ static void WINAPI wine_glUniformMatrix3x4fv( GLint location, GLsizei count, GLb } static void WINAPI wine_glUniformMatrix4fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glUniformMatrix4fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[1173]; + void (*func_glUniformMatrix4fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix4fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); ENTER_GL(); func_glUniformMatrix4fv( location, count, transpose, value ); @@ -9536,7 +11026,7 @@ static void WINAPI wine_glUniformMatrix4fv( GLint location, GLsizei count, GLboo } static void WINAPI wine_glUniformMatrix4fvARB( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glUniformMatrix4fvARB)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[1174]; + void (*func_glUniformMatrix4fvARB)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix4fvARB]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); ENTER_GL(); func_glUniformMatrix4fvARB( location, count, transpose, value ); @@ -9544,7 +11034,7 @@ static void WINAPI wine_glUniformMatrix4fvARB( GLint location, GLsizei count, GL } static void WINAPI wine_glUniformMatrix4x2fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glUniformMatrix4x2fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[1175]; + void (*func_glUniformMatrix4x2fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix4x2fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); ENTER_GL(); func_glUniformMatrix4x2fv( location, count, transpose, value ); @@ -9552,7 +11042,7 @@ static void WINAPI wine_glUniformMatrix4x2fv( GLint location, GLsizei count, GLb } static void WINAPI wine_glUniformMatrix4x3fv( GLint location, GLsizei count, GLboolean transpose, GLfloat* value ) { - void (*func_glUniformMatrix4x3fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[1176]; + void (*func_glUniformMatrix4x3fv)( GLint, GLsizei, GLboolean, GLfloat* ) = extension_funcs[EXT_glUniformMatrix4x3fv]; TRACE("(%d, %d, %d, %p)\n", location, count, transpose, value ); ENTER_GL(); func_glUniformMatrix4x3fv( location, count, transpose, value ); @@ -9560,7 +11050,7 @@ static void WINAPI wine_glUniformMatrix4x3fv( GLint location, GLsizei count, GLb } static void WINAPI wine_glUnlockArraysEXT( void ) { - void (*func_glUnlockArraysEXT)( void ) = extension_funcs[1177]; + void (*func_glUnlockArraysEXT)( void ) = extension_funcs[EXT_glUnlockArraysEXT]; TRACE("()\n"); ENTER_GL(); func_glUnlockArraysEXT( ); @@ -9569,7 +11059,7 @@ static void WINAPI wine_glUnlockArraysEXT( void ) { static GLboolean WINAPI wine_glUnmapBuffer( GLenum target ) { GLboolean ret_value; - GLboolean (*func_glUnmapBuffer)( GLenum ) = extension_funcs[1178]; + GLboolean (*func_glUnmapBuffer)( GLenum ) = extension_funcs[EXT_glUnmapBuffer]; TRACE("(%d)\n", target ); ENTER_GL(); ret_value = func_glUnmapBuffer( target ); @@ -9579,7 +11069,7 @@ static GLboolean WINAPI wine_glUnmapBuffer( GLenum target ) { static GLboolean WINAPI wine_glUnmapBufferARB( GLenum target ) { GLboolean ret_value; - GLboolean (*func_glUnmapBufferARB)( GLenum ) = extension_funcs[1179]; + GLboolean (*func_glUnmapBufferARB)( GLenum ) = extension_funcs[EXT_glUnmapBufferARB]; TRACE("(%d)\n", target ); ENTER_GL(); ret_value = func_glUnmapBufferARB( target ); @@ -9589,7 +11079,7 @@ static GLboolean WINAPI wine_glUnmapBufferARB( GLenum target ) { static GLboolean WINAPI wine_glUnmapNamedBufferEXT( GLuint buffer ) { GLboolean ret_value; - GLboolean (*func_glUnmapNamedBufferEXT)( GLuint ) = extension_funcs[1180]; + GLboolean (*func_glUnmapNamedBufferEXT)( GLuint ) = extension_funcs[EXT_glUnmapNamedBufferEXT]; TRACE("(%d)\n", buffer ); ENTER_GL(); ret_value = func_glUnmapNamedBufferEXT( buffer ); @@ -9598,7 +11088,7 @@ static GLboolean WINAPI wine_glUnmapNamedBufferEXT( GLuint buffer ) { } static void WINAPI wine_glUnmapObjectBufferATI( GLuint buffer ) { - void (*func_glUnmapObjectBufferATI)( GLuint ) = extension_funcs[1181]; + void (*func_glUnmapObjectBufferATI)( GLuint ) = extension_funcs[EXT_glUnmapObjectBufferATI]; TRACE("(%d)\n", buffer ); ENTER_GL(); func_glUnmapObjectBufferATI( buffer ); @@ -9606,7 +11096,7 @@ static void WINAPI wine_glUnmapObjectBufferATI( GLuint buffer ) { } static void WINAPI wine_glUpdateObjectBufferATI( GLuint buffer, GLuint offset, GLsizei size, GLvoid* pointer, GLenum preserve ) { - void (*func_glUpdateObjectBufferATI)( GLuint, GLuint, GLsizei, GLvoid*, GLenum ) = extension_funcs[1182]; + void (*func_glUpdateObjectBufferATI)( GLuint, GLuint, GLsizei, GLvoid*, GLenum ) = extension_funcs[EXT_glUpdateObjectBufferATI]; TRACE("(%d, %d, %d, %p, %d)\n", buffer, offset, size, pointer, preserve ); ENTER_GL(); func_glUpdateObjectBufferATI( buffer, offset, size, pointer, preserve ); @@ -9614,7 +11104,7 @@ static void WINAPI wine_glUpdateObjectBufferATI( GLuint buffer, GLuint offset, G } static void WINAPI wine_glUseProgram( GLuint program ) { - void (*func_glUseProgram)( GLuint ) = extension_funcs[1183]; + void (*func_glUseProgram)( GLuint ) = extension_funcs[EXT_glUseProgram]; TRACE("(%d)\n", program ); ENTER_GL(); func_glUseProgram( program ); @@ -9622,7 +11112,7 @@ static void WINAPI wine_glUseProgram( GLuint program ) { } static void WINAPI wine_glUseProgramObjectARB( unsigned int programObj ) { - void (*func_glUseProgramObjectARB)( unsigned int ) = extension_funcs[1184]; + void (*func_glUseProgramObjectARB)( unsigned int ) = extension_funcs[EXT_glUseProgramObjectARB]; TRACE("(%d)\n", programObj ); ENTER_GL(); func_glUseProgramObjectARB( programObj ); @@ -9630,7 +11120,7 @@ static void WINAPI wine_glUseProgramObjectARB( unsigned int programObj ) { } static void WINAPI wine_glValidateProgram( GLuint program ) { - void (*func_glValidateProgram)( GLuint ) = extension_funcs[1185]; + void (*func_glValidateProgram)( GLuint ) = extension_funcs[EXT_glValidateProgram]; TRACE("(%d)\n", program ); ENTER_GL(); func_glValidateProgram( program ); @@ -9638,7 +11128,7 @@ static void WINAPI wine_glValidateProgram( GLuint program ) { } static void WINAPI wine_glValidateProgramARB( unsigned int programObj ) { - void (*func_glValidateProgramARB)( unsigned int ) = extension_funcs[1186]; + void (*func_glValidateProgramARB)( unsigned int ) = extension_funcs[EXT_glValidateProgramARB]; TRACE("(%d)\n", programObj ); ENTER_GL(); func_glValidateProgramARB( programObj ); @@ -9646,7 +11136,7 @@ static void WINAPI wine_glValidateProgramARB( unsigned int programObj ) { } static void WINAPI wine_glVariantArrayObjectATI( GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset ) { - void (*func_glVariantArrayObjectATI)( GLuint, GLenum, GLsizei, GLuint, GLuint ) = extension_funcs[1187]; + void (*func_glVariantArrayObjectATI)( GLuint, GLenum, GLsizei, GLuint, GLuint ) = extension_funcs[EXT_glVariantArrayObjectATI]; TRACE("(%d, %d, %d, %d, %d)\n", id, type, stride, buffer, offset ); ENTER_GL(); func_glVariantArrayObjectATI( id, type, stride, buffer, offset ); @@ -9654,7 +11144,7 @@ static void WINAPI wine_glVariantArrayObjectATI( GLuint id, GLenum type, GLsizei } static void WINAPI wine_glVariantPointerEXT( GLuint id, GLenum type, GLuint stride, GLvoid* addr ) { - void (*func_glVariantPointerEXT)( GLuint, GLenum, GLuint, GLvoid* ) = extension_funcs[1188]; + void (*func_glVariantPointerEXT)( GLuint, GLenum, GLuint, GLvoid* ) = extension_funcs[EXT_glVariantPointerEXT]; TRACE("(%d, %d, %d, %p)\n", id, type, stride, addr ); ENTER_GL(); func_glVariantPointerEXT( id, type, stride, addr ); @@ -9662,7 +11152,7 @@ static void WINAPI wine_glVariantPointerEXT( GLuint id, GLenum type, GLuint stri } static void WINAPI wine_glVariantbvEXT( GLuint id, GLbyte* addr ) { - void (*func_glVariantbvEXT)( GLuint, GLbyte* ) = extension_funcs[1189]; + void (*func_glVariantbvEXT)( GLuint, GLbyte* ) = extension_funcs[EXT_glVariantbvEXT]; TRACE("(%d, %p)\n", id, addr ); ENTER_GL(); func_glVariantbvEXT( id, addr ); @@ -9670,7 +11160,7 @@ static void WINAPI wine_glVariantbvEXT( GLuint id, GLbyte* addr ) { } static void WINAPI wine_glVariantdvEXT( GLuint id, GLdouble* addr ) { - void (*func_glVariantdvEXT)( GLuint, GLdouble* ) = extension_funcs[1190]; + void (*func_glVariantdvEXT)( GLuint, GLdouble* ) = extension_funcs[EXT_glVariantdvEXT]; TRACE("(%d, %p)\n", id, addr ); ENTER_GL(); func_glVariantdvEXT( id, addr ); @@ -9678,7 +11168,7 @@ static void WINAPI wine_glVariantdvEXT( GLuint id, GLdouble* addr ) { } static void WINAPI wine_glVariantfvEXT( GLuint id, GLfloat* addr ) { - void (*func_glVariantfvEXT)( GLuint, GLfloat* ) = extension_funcs[1191]; + void (*func_glVariantfvEXT)( GLuint, GLfloat* ) = extension_funcs[EXT_glVariantfvEXT]; TRACE("(%d, %p)\n", id, addr ); ENTER_GL(); func_glVariantfvEXT( id, addr ); @@ -9686,7 +11176,7 @@ static void WINAPI wine_glVariantfvEXT( GLuint id, GLfloat* addr ) { } static void WINAPI wine_glVariantivEXT( GLuint id, GLint* addr ) { - void (*func_glVariantivEXT)( GLuint, GLint* ) = extension_funcs[1192]; + void (*func_glVariantivEXT)( GLuint, GLint* ) = extension_funcs[EXT_glVariantivEXT]; TRACE("(%d, %p)\n", id, addr ); ENTER_GL(); func_glVariantivEXT( id, addr ); @@ -9694,7 +11184,7 @@ static void WINAPI wine_glVariantivEXT( GLuint id, GLint* addr ) { } static void WINAPI wine_glVariantsvEXT( GLuint id, GLshort* addr ) { - void (*func_glVariantsvEXT)( GLuint, GLshort* ) = extension_funcs[1193]; + void (*func_glVariantsvEXT)( GLuint, GLshort* ) = extension_funcs[EXT_glVariantsvEXT]; TRACE("(%d, %p)\n", id, addr ); ENTER_GL(); func_glVariantsvEXT( id, addr ); @@ -9702,7 +11192,7 @@ static void WINAPI wine_glVariantsvEXT( GLuint id, GLshort* addr ) { } static void WINAPI wine_glVariantubvEXT( GLuint id, GLubyte* addr ) { - void (*func_glVariantubvEXT)( GLuint, GLubyte* ) = extension_funcs[1194]; + void (*func_glVariantubvEXT)( GLuint, GLubyte* ) = extension_funcs[EXT_glVariantubvEXT]; TRACE("(%d, %p)\n", id, addr ); ENTER_GL(); func_glVariantubvEXT( id, addr ); @@ -9710,7 +11200,7 @@ static void WINAPI wine_glVariantubvEXT( GLuint id, GLubyte* addr ) { } static void WINAPI wine_glVariantuivEXT( GLuint id, GLuint* addr ) { - void (*func_glVariantuivEXT)( GLuint, GLuint* ) = extension_funcs[1195]; + void (*func_glVariantuivEXT)( GLuint, GLuint* ) = extension_funcs[EXT_glVariantuivEXT]; TRACE("(%d, %p)\n", id, addr ); ENTER_GL(); func_glVariantuivEXT( id, addr ); @@ -9718,7 +11208,7 @@ static void WINAPI wine_glVariantuivEXT( GLuint id, GLuint* addr ) { } static void WINAPI wine_glVariantusvEXT( GLuint id, GLushort* addr ) { - void (*func_glVariantusvEXT)( GLuint, GLushort* ) = extension_funcs[1196]; + void (*func_glVariantusvEXT)( GLuint, GLushort* ) = extension_funcs[EXT_glVariantusvEXT]; TRACE("(%d, %p)\n", id, addr ); ENTER_GL(); func_glVariantusvEXT( id, addr ); @@ -9726,7 +11216,7 @@ static void WINAPI wine_glVariantusvEXT( GLuint id, GLushort* addr ) { } static void WINAPI wine_glVertex2hNV( unsigned short x, unsigned short y ) { - void (*func_glVertex2hNV)( unsigned short, unsigned short ) = extension_funcs[1197]; + void (*func_glVertex2hNV)( unsigned short, unsigned short ) = extension_funcs[EXT_glVertex2hNV]; TRACE("(%d, %d)\n", x, y ); ENTER_GL(); func_glVertex2hNV( x, y ); @@ -9734,7 +11224,7 @@ static void WINAPI wine_glVertex2hNV( unsigned short x, unsigned short y ) { } static void WINAPI wine_glVertex2hvNV( unsigned short* v ) { - void (*func_glVertex2hvNV)( unsigned short* ) = extension_funcs[1198]; + void (*func_glVertex2hvNV)( unsigned short* ) = extension_funcs[EXT_glVertex2hvNV]; TRACE("(%p)\n", v ); ENTER_GL(); func_glVertex2hvNV( v ); @@ -9742,7 +11232,7 @@ static void WINAPI wine_glVertex2hvNV( unsigned short* v ) { } static void WINAPI wine_glVertex3hNV( unsigned short x, unsigned short y, unsigned short z ) { - void (*func_glVertex3hNV)( unsigned short, unsigned short, unsigned short ) = extension_funcs[1199]; + void (*func_glVertex3hNV)( unsigned short, unsigned short, unsigned short ) = extension_funcs[EXT_glVertex3hNV]; TRACE("(%d, %d, %d)\n", x, y, z ); ENTER_GL(); func_glVertex3hNV( x, y, z ); @@ -9750,7 +11240,7 @@ static void WINAPI wine_glVertex3hNV( unsigned short x, unsigned short y, unsign } static void WINAPI wine_glVertex3hvNV( unsigned short* v ) { - void (*func_glVertex3hvNV)( unsigned short* ) = extension_funcs[1200]; + void (*func_glVertex3hvNV)( unsigned short* ) = extension_funcs[EXT_glVertex3hvNV]; TRACE("(%p)\n", v ); ENTER_GL(); func_glVertex3hvNV( v ); @@ -9758,7 +11248,7 @@ static void WINAPI wine_glVertex3hvNV( unsigned short* v ) { } static void WINAPI wine_glVertex4hNV( unsigned short x, unsigned short y, unsigned short z, unsigned short w ) { - void (*func_glVertex4hNV)( unsigned short, unsigned short, unsigned short, unsigned short ) = extension_funcs[1201]; + void (*func_glVertex4hNV)( unsigned short, unsigned short, unsigned short, unsigned short ) = extension_funcs[EXT_glVertex4hNV]; TRACE("(%d, %d, %d, %d)\n", x, y, z, w ); ENTER_GL(); func_glVertex4hNV( x, y, z, w ); @@ -9766,7 +11256,7 @@ static void WINAPI wine_glVertex4hNV( unsigned short x, unsigned short y, unsign } static void WINAPI wine_glVertex4hvNV( unsigned short* v ) { - void (*func_glVertex4hvNV)( unsigned short* ) = extension_funcs[1202]; + void (*func_glVertex4hvNV)( unsigned short* ) = extension_funcs[EXT_glVertex4hvNV]; TRACE("(%p)\n", v ); ENTER_GL(); func_glVertex4hvNV( v ); @@ -9774,7 +11264,7 @@ static void WINAPI wine_glVertex4hvNV( unsigned short* v ) { } static void WINAPI wine_glVertexArrayParameteriAPPLE( GLenum pname, GLint param ) { - void (*func_glVertexArrayParameteriAPPLE)( GLenum, GLint ) = extension_funcs[1203]; + void (*func_glVertexArrayParameteriAPPLE)( GLenum, GLint ) = extension_funcs[EXT_glVertexArrayParameteriAPPLE]; TRACE("(%d, %d)\n", pname, param ); ENTER_GL(); func_glVertexArrayParameteriAPPLE( pname, param ); @@ -9782,7 +11272,7 @@ static void WINAPI wine_glVertexArrayParameteriAPPLE( GLenum pname, GLint param } static void WINAPI wine_glVertexArrayRangeAPPLE( GLsizei length, GLvoid* pointer ) { - void (*func_glVertexArrayRangeAPPLE)( GLsizei, GLvoid* ) = extension_funcs[1204]; + void (*func_glVertexArrayRangeAPPLE)( GLsizei, GLvoid* ) = extension_funcs[EXT_glVertexArrayRangeAPPLE]; TRACE("(%d, %p)\n", length, pointer ); ENTER_GL(); func_glVertexArrayRangeAPPLE( length, pointer ); @@ -9790,7 +11280,7 @@ static void WINAPI wine_glVertexArrayRangeAPPLE( GLsizei length, GLvoid* pointer } static void WINAPI wine_glVertexArrayRangeNV( GLsizei length, GLvoid* pointer ) { - void (*func_glVertexArrayRangeNV)( GLsizei, GLvoid* ) = extension_funcs[1205]; + void (*func_glVertexArrayRangeNV)( GLsizei, GLvoid* ) = extension_funcs[EXT_glVertexArrayRangeNV]; TRACE("(%d, %p)\n", length, pointer ); ENTER_GL(); func_glVertexArrayRangeNV( length, pointer ); @@ -9798,7 +11288,7 @@ static void WINAPI wine_glVertexArrayRangeNV( GLsizei length, GLvoid* pointer ) } static void WINAPI wine_glVertexAttrib1d( GLuint index, GLdouble x ) { - void (*func_glVertexAttrib1d)( GLuint, GLdouble ) = extension_funcs[1206]; + void (*func_glVertexAttrib1d)( GLuint, GLdouble ) = extension_funcs[EXT_glVertexAttrib1d]; TRACE("(%d, %f)\n", index, x ); ENTER_GL(); func_glVertexAttrib1d( index, x ); @@ -9806,7 +11296,7 @@ static void WINAPI wine_glVertexAttrib1d( GLuint index, GLdouble x ) { } static void WINAPI wine_glVertexAttrib1dARB( GLuint index, GLdouble x ) { - void (*func_glVertexAttrib1dARB)( GLuint, GLdouble ) = extension_funcs[1207]; + void (*func_glVertexAttrib1dARB)( GLuint, GLdouble ) = extension_funcs[EXT_glVertexAttrib1dARB]; TRACE("(%d, %f)\n", index, x ); ENTER_GL(); func_glVertexAttrib1dARB( index, x ); @@ -9814,7 +11304,7 @@ static void WINAPI wine_glVertexAttrib1dARB( GLuint index, GLdouble x ) { } static void WINAPI wine_glVertexAttrib1dNV( GLuint index, GLdouble x ) { - void (*func_glVertexAttrib1dNV)( GLuint, GLdouble ) = extension_funcs[1208]; + void (*func_glVertexAttrib1dNV)( GLuint, GLdouble ) = extension_funcs[EXT_glVertexAttrib1dNV]; TRACE("(%d, %f)\n", index, x ); ENTER_GL(); func_glVertexAttrib1dNV( index, x ); @@ -9822,7 +11312,7 @@ static void WINAPI wine_glVertexAttrib1dNV( GLuint index, GLdouble x ) { } static void WINAPI wine_glVertexAttrib1dv( GLuint index, GLdouble* v ) { - void (*func_glVertexAttrib1dv)( GLuint, GLdouble* ) = extension_funcs[1209]; + void (*func_glVertexAttrib1dv)( GLuint, GLdouble* ) = extension_funcs[EXT_glVertexAttrib1dv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib1dv( index, v ); @@ -9830,7 +11320,7 @@ static void WINAPI wine_glVertexAttrib1dv( GLuint index, GLdouble* v ) { } static void WINAPI wine_glVertexAttrib1dvARB( GLuint index, GLdouble* v ) { - void (*func_glVertexAttrib1dvARB)( GLuint, GLdouble* ) = extension_funcs[1210]; + void (*func_glVertexAttrib1dvARB)( GLuint, GLdouble* ) = extension_funcs[EXT_glVertexAttrib1dvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib1dvARB( index, v ); @@ -9838,7 +11328,7 @@ static void WINAPI wine_glVertexAttrib1dvARB( GLuint index, GLdouble* v ) { } static void WINAPI wine_glVertexAttrib1dvNV( GLuint index, GLdouble* v ) { - void (*func_glVertexAttrib1dvNV)( GLuint, GLdouble* ) = extension_funcs[1211]; + void (*func_glVertexAttrib1dvNV)( GLuint, GLdouble* ) = extension_funcs[EXT_glVertexAttrib1dvNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib1dvNV( index, v ); @@ -9846,7 +11336,7 @@ static void WINAPI wine_glVertexAttrib1dvNV( GLuint index, GLdouble* v ) { } static void WINAPI wine_glVertexAttrib1f( GLuint index, GLfloat x ) { - void (*func_glVertexAttrib1f)( GLuint, GLfloat ) = extension_funcs[1212]; + void (*func_glVertexAttrib1f)( GLuint, GLfloat ) = extension_funcs[EXT_glVertexAttrib1f]; TRACE("(%d, %f)\n", index, x ); ENTER_GL(); func_glVertexAttrib1f( index, x ); @@ -9854,7 +11344,7 @@ static void WINAPI wine_glVertexAttrib1f( GLuint index, GLfloat x ) { } static void WINAPI wine_glVertexAttrib1fARB( GLuint index, GLfloat x ) { - void (*func_glVertexAttrib1fARB)( GLuint, GLfloat ) = extension_funcs[1213]; + void (*func_glVertexAttrib1fARB)( GLuint, GLfloat ) = extension_funcs[EXT_glVertexAttrib1fARB]; TRACE("(%d, %f)\n", index, x ); ENTER_GL(); func_glVertexAttrib1fARB( index, x ); @@ -9862,7 +11352,7 @@ static void WINAPI wine_glVertexAttrib1fARB( GLuint index, GLfloat x ) { } static void WINAPI wine_glVertexAttrib1fNV( GLuint index, GLfloat x ) { - void (*func_glVertexAttrib1fNV)( GLuint, GLfloat ) = extension_funcs[1214]; + void (*func_glVertexAttrib1fNV)( GLuint, GLfloat ) = extension_funcs[EXT_glVertexAttrib1fNV]; TRACE("(%d, %f)\n", index, x ); ENTER_GL(); func_glVertexAttrib1fNV( index, x ); @@ -9870,7 +11360,7 @@ static void WINAPI wine_glVertexAttrib1fNV( GLuint index, GLfloat x ) { } static void WINAPI wine_glVertexAttrib1fv( GLuint index, GLfloat* v ) { - void (*func_glVertexAttrib1fv)( GLuint, GLfloat* ) = extension_funcs[1215]; + void (*func_glVertexAttrib1fv)( GLuint, GLfloat* ) = extension_funcs[EXT_glVertexAttrib1fv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib1fv( index, v ); @@ -9878,7 +11368,7 @@ static void WINAPI wine_glVertexAttrib1fv( GLuint index, GLfloat* v ) { } static void WINAPI wine_glVertexAttrib1fvARB( GLuint index, GLfloat* v ) { - void (*func_glVertexAttrib1fvARB)( GLuint, GLfloat* ) = extension_funcs[1216]; + void (*func_glVertexAttrib1fvARB)( GLuint, GLfloat* ) = extension_funcs[EXT_glVertexAttrib1fvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib1fvARB( index, v ); @@ -9886,7 +11376,7 @@ static void WINAPI wine_glVertexAttrib1fvARB( GLuint index, GLfloat* v ) { } static void WINAPI wine_glVertexAttrib1fvNV( GLuint index, GLfloat* v ) { - void (*func_glVertexAttrib1fvNV)( GLuint, GLfloat* ) = extension_funcs[1217]; + void (*func_glVertexAttrib1fvNV)( GLuint, GLfloat* ) = extension_funcs[EXT_glVertexAttrib1fvNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib1fvNV( index, v ); @@ -9894,7 +11384,7 @@ static void WINAPI wine_glVertexAttrib1fvNV( GLuint index, GLfloat* v ) { } static void WINAPI wine_glVertexAttrib1hNV( GLuint index, unsigned short x ) { - void (*func_glVertexAttrib1hNV)( GLuint, unsigned short ) = extension_funcs[1218]; + void (*func_glVertexAttrib1hNV)( GLuint, unsigned short ) = extension_funcs[EXT_glVertexAttrib1hNV]; TRACE("(%d, %d)\n", index, x ); ENTER_GL(); func_glVertexAttrib1hNV( index, x ); @@ -9902,7 +11392,7 @@ static void WINAPI wine_glVertexAttrib1hNV( GLuint index, unsigned short x ) { } static void WINAPI wine_glVertexAttrib1hvNV( GLuint index, unsigned short* v ) { - void (*func_glVertexAttrib1hvNV)( GLuint, unsigned short* ) = extension_funcs[1219]; + void (*func_glVertexAttrib1hvNV)( GLuint, unsigned short* ) = extension_funcs[EXT_glVertexAttrib1hvNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib1hvNV( index, v ); @@ -9910,7 +11400,7 @@ static void WINAPI wine_glVertexAttrib1hvNV( GLuint index, unsigned short* v ) { } static void WINAPI wine_glVertexAttrib1s( GLuint index, GLshort x ) { - void (*func_glVertexAttrib1s)( GLuint, GLshort ) = extension_funcs[1220]; + void (*func_glVertexAttrib1s)( GLuint, GLshort ) = extension_funcs[EXT_glVertexAttrib1s]; TRACE("(%d, %d)\n", index, x ); ENTER_GL(); func_glVertexAttrib1s( index, x ); @@ -9918,7 +11408,7 @@ static void WINAPI wine_glVertexAttrib1s( GLuint index, GLshort x ) { } static void WINAPI wine_glVertexAttrib1sARB( GLuint index, GLshort x ) { - void (*func_glVertexAttrib1sARB)( GLuint, GLshort ) = extension_funcs[1221]; + void (*func_glVertexAttrib1sARB)( GLuint, GLshort ) = extension_funcs[EXT_glVertexAttrib1sARB]; TRACE("(%d, %d)\n", index, x ); ENTER_GL(); func_glVertexAttrib1sARB( index, x ); @@ -9926,7 +11416,7 @@ static void WINAPI wine_glVertexAttrib1sARB( GLuint index, GLshort x ) { } static void WINAPI wine_glVertexAttrib1sNV( GLuint index, GLshort x ) { - void (*func_glVertexAttrib1sNV)( GLuint, GLshort ) = extension_funcs[1222]; + void (*func_glVertexAttrib1sNV)( GLuint, GLshort ) = extension_funcs[EXT_glVertexAttrib1sNV]; TRACE("(%d, %d)\n", index, x ); ENTER_GL(); func_glVertexAttrib1sNV( index, x ); @@ -9934,7 +11424,7 @@ static void WINAPI wine_glVertexAttrib1sNV( GLuint index, GLshort x ) { } static void WINAPI wine_glVertexAttrib1sv( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib1sv)( GLuint, GLshort* ) = extension_funcs[1223]; + void (*func_glVertexAttrib1sv)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib1sv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib1sv( index, v ); @@ -9942,7 +11432,7 @@ static void WINAPI wine_glVertexAttrib1sv( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib1svARB( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib1svARB)( GLuint, GLshort* ) = extension_funcs[1224]; + void (*func_glVertexAttrib1svARB)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib1svARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib1svARB( index, v ); @@ -9950,7 +11440,7 @@ static void WINAPI wine_glVertexAttrib1svARB( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib1svNV( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib1svNV)( GLuint, GLshort* ) = extension_funcs[1225]; + void (*func_glVertexAttrib1svNV)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib1svNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib1svNV( index, v ); @@ -9958,7 +11448,7 @@ static void WINAPI wine_glVertexAttrib1svNV( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib2d( GLuint index, GLdouble x, GLdouble y ) { - void (*func_glVertexAttrib2d)( GLuint, GLdouble, GLdouble ) = extension_funcs[1226]; + void (*func_glVertexAttrib2d)( GLuint, GLdouble, GLdouble ) = extension_funcs[EXT_glVertexAttrib2d]; TRACE("(%d, %f, %f)\n", index, x, y ); ENTER_GL(); func_glVertexAttrib2d( index, x, y ); @@ -9966,7 +11456,7 @@ static void WINAPI wine_glVertexAttrib2d( GLuint index, GLdouble x, GLdouble y ) } static void WINAPI wine_glVertexAttrib2dARB( GLuint index, GLdouble x, GLdouble y ) { - void (*func_glVertexAttrib2dARB)( GLuint, GLdouble, GLdouble ) = extension_funcs[1227]; + void (*func_glVertexAttrib2dARB)( GLuint, GLdouble, GLdouble ) = extension_funcs[EXT_glVertexAttrib2dARB]; TRACE("(%d, %f, %f)\n", index, x, y ); ENTER_GL(); func_glVertexAttrib2dARB( index, x, y ); @@ -9974,7 +11464,7 @@ static void WINAPI wine_glVertexAttrib2dARB( GLuint index, GLdouble x, GLdouble } static void WINAPI wine_glVertexAttrib2dNV( GLuint index, GLdouble x, GLdouble y ) { - void (*func_glVertexAttrib2dNV)( GLuint, GLdouble, GLdouble ) = extension_funcs[1228]; + void (*func_glVertexAttrib2dNV)( GLuint, GLdouble, GLdouble ) = extension_funcs[EXT_glVertexAttrib2dNV]; TRACE("(%d, %f, %f)\n", index, x, y ); ENTER_GL(); func_glVertexAttrib2dNV( index, x, y ); @@ -9982,7 +11472,7 @@ static void WINAPI wine_glVertexAttrib2dNV( GLuint index, GLdouble x, GLdouble y } static void WINAPI wine_glVertexAttrib2dv( GLuint index, GLdouble* v ) { - void (*func_glVertexAttrib2dv)( GLuint, GLdouble* ) = extension_funcs[1229]; + void (*func_glVertexAttrib2dv)( GLuint, GLdouble* ) = extension_funcs[EXT_glVertexAttrib2dv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib2dv( index, v ); @@ -9990,7 +11480,7 @@ static void WINAPI wine_glVertexAttrib2dv( GLuint index, GLdouble* v ) { } static void WINAPI wine_glVertexAttrib2dvARB( GLuint index, GLdouble* v ) { - void (*func_glVertexAttrib2dvARB)( GLuint, GLdouble* ) = extension_funcs[1230]; + void (*func_glVertexAttrib2dvARB)( GLuint, GLdouble* ) = extension_funcs[EXT_glVertexAttrib2dvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib2dvARB( index, v ); @@ -9998,7 +11488,7 @@ static void WINAPI wine_glVertexAttrib2dvARB( GLuint index, GLdouble* v ) { } static void WINAPI wine_glVertexAttrib2dvNV( GLuint index, GLdouble* v ) { - void (*func_glVertexAttrib2dvNV)( GLuint, GLdouble* ) = extension_funcs[1231]; + void (*func_glVertexAttrib2dvNV)( GLuint, GLdouble* ) = extension_funcs[EXT_glVertexAttrib2dvNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib2dvNV( index, v ); @@ -10006,7 +11496,7 @@ static void WINAPI wine_glVertexAttrib2dvNV( GLuint index, GLdouble* v ) { } static void WINAPI wine_glVertexAttrib2f( GLuint index, GLfloat x, GLfloat y ) { - void (*func_glVertexAttrib2f)( GLuint, GLfloat, GLfloat ) = extension_funcs[1232]; + void (*func_glVertexAttrib2f)( GLuint, GLfloat, GLfloat ) = extension_funcs[EXT_glVertexAttrib2f]; TRACE("(%d, %f, %f)\n", index, x, y ); ENTER_GL(); func_glVertexAttrib2f( index, x, y ); @@ -10014,7 +11504,7 @@ static void WINAPI wine_glVertexAttrib2f( GLuint index, GLfloat x, GLfloat y ) { } static void WINAPI wine_glVertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y ) { - void (*func_glVertexAttrib2fARB)( GLuint, GLfloat, GLfloat ) = extension_funcs[1233]; + void (*func_glVertexAttrib2fARB)( GLuint, GLfloat, GLfloat ) = extension_funcs[EXT_glVertexAttrib2fARB]; TRACE("(%d, %f, %f)\n", index, x, y ); ENTER_GL(); func_glVertexAttrib2fARB( index, x, y ); @@ -10022,7 +11512,7 @@ static void WINAPI wine_glVertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y } static void WINAPI wine_glVertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y ) { - void (*func_glVertexAttrib2fNV)( GLuint, GLfloat, GLfloat ) = extension_funcs[1234]; + void (*func_glVertexAttrib2fNV)( GLuint, GLfloat, GLfloat ) = extension_funcs[EXT_glVertexAttrib2fNV]; TRACE("(%d, %f, %f)\n", index, x, y ); ENTER_GL(); func_glVertexAttrib2fNV( index, x, y ); @@ -10030,7 +11520,7 @@ static void WINAPI wine_glVertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y ) } static void WINAPI wine_glVertexAttrib2fv( GLuint index, GLfloat* v ) { - void (*func_glVertexAttrib2fv)( GLuint, GLfloat* ) = extension_funcs[1235]; + void (*func_glVertexAttrib2fv)( GLuint, GLfloat* ) = extension_funcs[EXT_glVertexAttrib2fv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib2fv( index, v ); @@ -10038,7 +11528,7 @@ static void WINAPI wine_glVertexAttrib2fv( GLuint index, GLfloat* v ) { } static void WINAPI wine_glVertexAttrib2fvARB( GLuint index, GLfloat* v ) { - void (*func_glVertexAttrib2fvARB)( GLuint, GLfloat* ) = extension_funcs[1236]; + void (*func_glVertexAttrib2fvARB)( GLuint, GLfloat* ) = extension_funcs[EXT_glVertexAttrib2fvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib2fvARB( index, v ); @@ -10046,7 +11536,7 @@ static void WINAPI wine_glVertexAttrib2fvARB( GLuint index, GLfloat* v ) { } static void WINAPI wine_glVertexAttrib2fvNV( GLuint index, GLfloat* v ) { - void (*func_glVertexAttrib2fvNV)( GLuint, GLfloat* ) = extension_funcs[1237]; + void (*func_glVertexAttrib2fvNV)( GLuint, GLfloat* ) = extension_funcs[EXT_glVertexAttrib2fvNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib2fvNV( index, v ); @@ -10054,7 +11544,7 @@ static void WINAPI wine_glVertexAttrib2fvNV( GLuint index, GLfloat* v ) { } static void WINAPI wine_glVertexAttrib2hNV( GLuint index, unsigned short x, unsigned short y ) { - void (*func_glVertexAttrib2hNV)( GLuint, unsigned short, unsigned short ) = extension_funcs[1238]; + void (*func_glVertexAttrib2hNV)( GLuint, unsigned short, unsigned short ) = extension_funcs[EXT_glVertexAttrib2hNV]; TRACE("(%d, %d, %d)\n", index, x, y ); ENTER_GL(); func_glVertexAttrib2hNV( index, x, y ); @@ -10062,7 +11552,7 @@ static void WINAPI wine_glVertexAttrib2hNV( GLuint index, unsigned short x, unsi } static void WINAPI wine_glVertexAttrib2hvNV( GLuint index, unsigned short* v ) { - void (*func_glVertexAttrib2hvNV)( GLuint, unsigned short* ) = extension_funcs[1239]; + void (*func_glVertexAttrib2hvNV)( GLuint, unsigned short* ) = extension_funcs[EXT_glVertexAttrib2hvNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib2hvNV( index, v ); @@ -10070,7 +11560,7 @@ static void WINAPI wine_glVertexAttrib2hvNV( GLuint index, unsigned short* v ) { } static void WINAPI wine_glVertexAttrib2s( GLuint index, GLshort x, GLshort y ) { - void (*func_glVertexAttrib2s)( GLuint, GLshort, GLshort ) = extension_funcs[1240]; + void (*func_glVertexAttrib2s)( GLuint, GLshort, GLshort ) = extension_funcs[EXT_glVertexAttrib2s]; TRACE("(%d, %d, %d)\n", index, x, y ); ENTER_GL(); func_glVertexAttrib2s( index, x, y ); @@ -10078,7 +11568,7 @@ static void WINAPI wine_glVertexAttrib2s( GLuint index, GLshort x, GLshort y ) { } static void WINAPI wine_glVertexAttrib2sARB( GLuint index, GLshort x, GLshort y ) { - void (*func_glVertexAttrib2sARB)( GLuint, GLshort, GLshort ) = extension_funcs[1241]; + void (*func_glVertexAttrib2sARB)( GLuint, GLshort, GLshort ) = extension_funcs[EXT_glVertexAttrib2sARB]; TRACE("(%d, %d, %d)\n", index, x, y ); ENTER_GL(); func_glVertexAttrib2sARB( index, x, y ); @@ -10086,7 +11576,7 @@ static void WINAPI wine_glVertexAttrib2sARB( GLuint index, GLshort x, GLshort y } static void WINAPI wine_glVertexAttrib2sNV( GLuint index, GLshort x, GLshort y ) { - void (*func_glVertexAttrib2sNV)( GLuint, GLshort, GLshort ) = extension_funcs[1242]; + void (*func_glVertexAttrib2sNV)( GLuint, GLshort, GLshort ) = extension_funcs[EXT_glVertexAttrib2sNV]; TRACE("(%d, %d, %d)\n", index, x, y ); ENTER_GL(); func_glVertexAttrib2sNV( index, x, y ); @@ -10094,7 +11584,7 @@ static void WINAPI wine_glVertexAttrib2sNV( GLuint index, GLshort x, GLshort y ) } static void WINAPI wine_glVertexAttrib2sv( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib2sv)( GLuint, GLshort* ) = extension_funcs[1243]; + void (*func_glVertexAttrib2sv)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib2sv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib2sv( index, v ); @@ -10102,7 +11592,7 @@ static void WINAPI wine_glVertexAttrib2sv( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib2svARB( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib2svARB)( GLuint, GLshort* ) = extension_funcs[1244]; + void (*func_glVertexAttrib2svARB)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib2svARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib2svARB( index, v ); @@ -10110,7 +11600,7 @@ static void WINAPI wine_glVertexAttrib2svARB( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib2svNV( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib2svNV)( GLuint, GLshort* ) = extension_funcs[1245]; + void (*func_glVertexAttrib2svNV)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib2svNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib2svNV( index, v ); @@ -10118,7 +11608,7 @@ static void WINAPI wine_glVertexAttrib2svNV( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib3d( GLuint index, GLdouble x, GLdouble y, GLdouble z ) { - void (*func_glVertexAttrib3d)( GLuint, GLdouble, GLdouble, GLdouble ) = extension_funcs[1246]; + void (*func_glVertexAttrib3d)( GLuint, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glVertexAttrib3d]; TRACE("(%d, %f, %f, %f)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttrib3d( index, x, y, z ); @@ -10126,7 +11616,7 @@ static void WINAPI wine_glVertexAttrib3d( GLuint index, GLdouble x, GLdouble y, } static void WINAPI wine_glVertexAttrib3dARB( GLuint index, GLdouble x, GLdouble y, GLdouble z ) { - void (*func_glVertexAttrib3dARB)( GLuint, GLdouble, GLdouble, GLdouble ) = extension_funcs[1247]; + void (*func_glVertexAttrib3dARB)( GLuint, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glVertexAttrib3dARB]; TRACE("(%d, %f, %f, %f)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttrib3dARB( index, x, y, z ); @@ -10134,7 +11624,7 @@ static void WINAPI wine_glVertexAttrib3dARB( GLuint index, GLdouble x, GLdouble } static void WINAPI wine_glVertexAttrib3dNV( GLuint index, GLdouble x, GLdouble y, GLdouble z ) { - void (*func_glVertexAttrib3dNV)( GLuint, GLdouble, GLdouble, GLdouble ) = extension_funcs[1248]; + void (*func_glVertexAttrib3dNV)( GLuint, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glVertexAttrib3dNV]; TRACE("(%d, %f, %f, %f)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttrib3dNV( index, x, y, z ); @@ -10142,7 +11632,7 @@ static void WINAPI wine_glVertexAttrib3dNV( GLuint index, GLdouble x, GLdouble y } static void WINAPI wine_glVertexAttrib3dv( GLuint index, GLdouble* v ) { - void (*func_glVertexAttrib3dv)( GLuint, GLdouble* ) = extension_funcs[1249]; + void (*func_glVertexAttrib3dv)( GLuint, GLdouble* ) = extension_funcs[EXT_glVertexAttrib3dv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib3dv( index, v ); @@ -10150,7 +11640,7 @@ static void WINAPI wine_glVertexAttrib3dv( GLuint index, GLdouble* v ) { } static void WINAPI wine_glVertexAttrib3dvARB( GLuint index, GLdouble* v ) { - void (*func_glVertexAttrib3dvARB)( GLuint, GLdouble* ) = extension_funcs[1250]; + void (*func_glVertexAttrib3dvARB)( GLuint, GLdouble* ) = extension_funcs[EXT_glVertexAttrib3dvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib3dvARB( index, v ); @@ -10158,7 +11648,7 @@ static void WINAPI wine_glVertexAttrib3dvARB( GLuint index, GLdouble* v ) { } static void WINAPI wine_glVertexAttrib3dvNV( GLuint index, GLdouble* v ) { - void (*func_glVertexAttrib3dvNV)( GLuint, GLdouble* ) = extension_funcs[1251]; + void (*func_glVertexAttrib3dvNV)( GLuint, GLdouble* ) = extension_funcs[EXT_glVertexAttrib3dvNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib3dvNV( index, v ); @@ -10166,7 +11656,7 @@ static void WINAPI wine_glVertexAttrib3dvNV( GLuint index, GLdouble* v ) { } static void WINAPI wine_glVertexAttrib3f( GLuint index, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glVertexAttrib3f)( GLuint, GLfloat, GLfloat, GLfloat ) = extension_funcs[1252]; + void (*func_glVertexAttrib3f)( GLuint, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glVertexAttrib3f]; TRACE("(%d, %f, %f, %f)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttrib3f( index, x, y, z ); @@ -10174,7 +11664,7 @@ static void WINAPI wine_glVertexAttrib3f( GLuint index, GLfloat x, GLfloat y, GL } static void WINAPI wine_glVertexAttrib3fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glVertexAttrib3fARB)( GLuint, GLfloat, GLfloat, GLfloat ) = extension_funcs[1253]; + void (*func_glVertexAttrib3fARB)( GLuint, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glVertexAttrib3fARB]; TRACE("(%d, %f, %f, %f)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttrib3fARB( index, x, y, z ); @@ -10182,7 +11672,7 @@ static void WINAPI wine_glVertexAttrib3fARB( GLuint index, GLfloat x, GLfloat y, } static void WINAPI wine_glVertexAttrib3fNV( GLuint index, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glVertexAttrib3fNV)( GLuint, GLfloat, GLfloat, GLfloat ) = extension_funcs[1254]; + void (*func_glVertexAttrib3fNV)( GLuint, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glVertexAttrib3fNV]; TRACE("(%d, %f, %f, %f)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttrib3fNV( index, x, y, z ); @@ -10190,7 +11680,7 @@ static void WINAPI wine_glVertexAttrib3fNV( GLuint index, GLfloat x, GLfloat y, } static void WINAPI wine_glVertexAttrib3fv( GLuint index, GLfloat* v ) { - void (*func_glVertexAttrib3fv)( GLuint, GLfloat* ) = extension_funcs[1255]; + void (*func_glVertexAttrib3fv)( GLuint, GLfloat* ) = extension_funcs[EXT_glVertexAttrib3fv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib3fv( index, v ); @@ -10198,7 +11688,7 @@ static void WINAPI wine_glVertexAttrib3fv( GLuint index, GLfloat* v ) { } static void WINAPI wine_glVertexAttrib3fvARB( GLuint index, GLfloat* v ) { - void (*func_glVertexAttrib3fvARB)( GLuint, GLfloat* ) = extension_funcs[1256]; + void (*func_glVertexAttrib3fvARB)( GLuint, GLfloat* ) = extension_funcs[EXT_glVertexAttrib3fvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib3fvARB( index, v ); @@ -10206,7 +11696,7 @@ static void WINAPI wine_glVertexAttrib3fvARB( GLuint index, GLfloat* v ) { } static void WINAPI wine_glVertexAttrib3fvNV( GLuint index, GLfloat* v ) { - void (*func_glVertexAttrib3fvNV)( GLuint, GLfloat* ) = extension_funcs[1257]; + void (*func_glVertexAttrib3fvNV)( GLuint, GLfloat* ) = extension_funcs[EXT_glVertexAttrib3fvNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib3fvNV( index, v ); @@ -10214,7 +11704,7 @@ static void WINAPI wine_glVertexAttrib3fvNV( GLuint index, GLfloat* v ) { } static void WINAPI wine_glVertexAttrib3hNV( GLuint index, unsigned short x, unsigned short y, unsigned short z ) { - void (*func_glVertexAttrib3hNV)( GLuint, unsigned short, unsigned short, unsigned short ) = extension_funcs[1258]; + void (*func_glVertexAttrib3hNV)( GLuint, unsigned short, unsigned short, unsigned short ) = extension_funcs[EXT_glVertexAttrib3hNV]; TRACE("(%d, %d, %d, %d)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttrib3hNV( index, x, y, z ); @@ -10222,7 +11712,7 @@ static void WINAPI wine_glVertexAttrib3hNV( GLuint index, unsigned short x, unsi } static void WINAPI wine_glVertexAttrib3hvNV( GLuint index, unsigned short* v ) { - void (*func_glVertexAttrib3hvNV)( GLuint, unsigned short* ) = extension_funcs[1259]; + void (*func_glVertexAttrib3hvNV)( GLuint, unsigned short* ) = extension_funcs[EXT_glVertexAttrib3hvNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib3hvNV( index, v ); @@ -10230,7 +11720,7 @@ static void WINAPI wine_glVertexAttrib3hvNV( GLuint index, unsigned short* v ) { } static void WINAPI wine_glVertexAttrib3s( GLuint index, GLshort x, GLshort y, GLshort z ) { - void (*func_glVertexAttrib3s)( GLuint, GLshort, GLshort, GLshort ) = extension_funcs[1260]; + void (*func_glVertexAttrib3s)( GLuint, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glVertexAttrib3s]; TRACE("(%d, %d, %d, %d)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttrib3s( index, x, y, z ); @@ -10238,7 +11728,7 @@ static void WINAPI wine_glVertexAttrib3s( GLuint index, GLshort x, GLshort y, GL } static void WINAPI wine_glVertexAttrib3sARB( GLuint index, GLshort x, GLshort y, GLshort z ) { - void (*func_glVertexAttrib3sARB)( GLuint, GLshort, GLshort, GLshort ) = extension_funcs[1261]; + void (*func_glVertexAttrib3sARB)( GLuint, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glVertexAttrib3sARB]; TRACE("(%d, %d, %d, %d)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttrib3sARB( index, x, y, z ); @@ -10246,7 +11736,7 @@ static void WINAPI wine_glVertexAttrib3sARB( GLuint index, GLshort x, GLshort y, } static void WINAPI wine_glVertexAttrib3sNV( GLuint index, GLshort x, GLshort y, GLshort z ) { - void (*func_glVertexAttrib3sNV)( GLuint, GLshort, GLshort, GLshort ) = extension_funcs[1262]; + void (*func_glVertexAttrib3sNV)( GLuint, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glVertexAttrib3sNV]; TRACE("(%d, %d, %d, %d)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttrib3sNV( index, x, y, z ); @@ -10254,7 +11744,7 @@ static void WINAPI wine_glVertexAttrib3sNV( GLuint index, GLshort x, GLshort y, } static void WINAPI wine_glVertexAttrib3sv( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib3sv)( GLuint, GLshort* ) = extension_funcs[1263]; + void (*func_glVertexAttrib3sv)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib3sv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib3sv( index, v ); @@ -10262,7 +11752,7 @@ static void WINAPI wine_glVertexAttrib3sv( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib3svARB( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib3svARB)( GLuint, GLshort* ) = extension_funcs[1264]; + void (*func_glVertexAttrib3svARB)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib3svARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib3svARB( index, v ); @@ -10270,7 +11760,7 @@ static void WINAPI wine_glVertexAttrib3svARB( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib3svNV( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib3svNV)( GLuint, GLshort* ) = extension_funcs[1265]; + void (*func_glVertexAttrib3svNV)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib3svNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib3svNV( index, v ); @@ -10278,7 +11768,7 @@ static void WINAPI wine_glVertexAttrib3svNV( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib4Nbv( GLuint index, GLbyte* v ) { - void (*func_glVertexAttrib4Nbv)( GLuint, GLbyte* ) = extension_funcs[1266]; + void (*func_glVertexAttrib4Nbv)( GLuint, GLbyte* ) = extension_funcs[EXT_glVertexAttrib4Nbv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4Nbv( index, v ); @@ -10286,7 +11776,7 @@ static void WINAPI wine_glVertexAttrib4Nbv( GLuint index, GLbyte* v ) { } static void WINAPI wine_glVertexAttrib4NbvARB( GLuint index, GLbyte* v ) { - void (*func_glVertexAttrib4NbvARB)( GLuint, GLbyte* ) = extension_funcs[1267]; + void (*func_glVertexAttrib4NbvARB)( GLuint, GLbyte* ) = extension_funcs[EXT_glVertexAttrib4NbvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4NbvARB( index, v ); @@ -10294,7 +11784,7 @@ static void WINAPI wine_glVertexAttrib4NbvARB( GLuint index, GLbyte* v ) { } static void WINAPI wine_glVertexAttrib4Niv( GLuint index, GLint* v ) { - void (*func_glVertexAttrib4Niv)( GLuint, GLint* ) = extension_funcs[1268]; + void (*func_glVertexAttrib4Niv)( GLuint, GLint* ) = extension_funcs[EXT_glVertexAttrib4Niv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4Niv( index, v ); @@ -10302,7 +11792,7 @@ static void WINAPI wine_glVertexAttrib4Niv( GLuint index, GLint* v ) { } static void WINAPI wine_glVertexAttrib4NivARB( GLuint index, GLint* v ) { - void (*func_glVertexAttrib4NivARB)( GLuint, GLint* ) = extension_funcs[1269]; + void (*func_glVertexAttrib4NivARB)( GLuint, GLint* ) = extension_funcs[EXT_glVertexAttrib4NivARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4NivARB( index, v ); @@ -10310,7 +11800,7 @@ static void WINAPI wine_glVertexAttrib4NivARB( GLuint index, GLint* v ) { } static void WINAPI wine_glVertexAttrib4Nsv( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib4Nsv)( GLuint, GLshort* ) = extension_funcs[1270]; + void (*func_glVertexAttrib4Nsv)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib4Nsv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4Nsv( index, v ); @@ -10318,7 +11808,7 @@ static void WINAPI wine_glVertexAttrib4Nsv( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib4NsvARB( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib4NsvARB)( GLuint, GLshort* ) = extension_funcs[1271]; + void (*func_glVertexAttrib4NsvARB)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib4NsvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4NsvARB( index, v ); @@ -10326,7 +11816,7 @@ static void WINAPI wine_glVertexAttrib4NsvARB( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib4Nub( GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w ) { - void (*func_glVertexAttrib4Nub)( GLuint, GLubyte, GLubyte, GLubyte, GLubyte ) = extension_funcs[1272]; + void (*func_glVertexAttrib4Nub)( GLuint, GLubyte, GLubyte, GLubyte, GLubyte ) = extension_funcs[EXT_glVertexAttrib4Nub]; TRACE("(%d, %d, %d, %d, %d)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttrib4Nub( index, x, y, z, w ); @@ -10334,7 +11824,7 @@ static void WINAPI wine_glVertexAttrib4Nub( GLuint index, GLubyte x, GLubyte y, } static void WINAPI wine_glVertexAttrib4NubARB( GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w ) { - void (*func_glVertexAttrib4NubARB)( GLuint, GLubyte, GLubyte, GLubyte, GLubyte ) = extension_funcs[1273]; + void (*func_glVertexAttrib4NubARB)( GLuint, GLubyte, GLubyte, GLubyte, GLubyte ) = extension_funcs[EXT_glVertexAttrib4NubARB]; TRACE("(%d, %d, %d, %d, %d)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttrib4NubARB( index, x, y, z, w ); @@ -10342,7 +11832,7 @@ static void WINAPI wine_glVertexAttrib4NubARB( GLuint index, GLubyte x, GLubyte } static void WINAPI wine_glVertexAttrib4Nubv( GLuint index, GLubyte* v ) { - void (*func_glVertexAttrib4Nubv)( GLuint, GLubyte* ) = extension_funcs[1274]; + void (*func_glVertexAttrib4Nubv)( GLuint, GLubyte* ) = extension_funcs[EXT_glVertexAttrib4Nubv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4Nubv( index, v ); @@ -10350,7 +11840,7 @@ static void WINAPI wine_glVertexAttrib4Nubv( GLuint index, GLubyte* v ) { } static void WINAPI wine_glVertexAttrib4NubvARB( GLuint index, GLubyte* v ) { - void (*func_glVertexAttrib4NubvARB)( GLuint, GLubyte* ) = extension_funcs[1275]; + void (*func_glVertexAttrib4NubvARB)( GLuint, GLubyte* ) = extension_funcs[EXT_glVertexAttrib4NubvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4NubvARB( index, v ); @@ -10358,7 +11848,7 @@ static void WINAPI wine_glVertexAttrib4NubvARB( GLuint index, GLubyte* v ) { } static void WINAPI wine_glVertexAttrib4Nuiv( GLuint index, GLuint* v ) { - void (*func_glVertexAttrib4Nuiv)( GLuint, GLuint* ) = extension_funcs[1276]; + void (*func_glVertexAttrib4Nuiv)( GLuint, GLuint* ) = extension_funcs[EXT_glVertexAttrib4Nuiv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4Nuiv( index, v ); @@ -10366,7 +11856,7 @@ static void WINAPI wine_glVertexAttrib4Nuiv( GLuint index, GLuint* v ) { } static void WINAPI wine_glVertexAttrib4NuivARB( GLuint index, GLuint* v ) { - void (*func_glVertexAttrib4NuivARB)( GLuint, GLuint* ) = extension_funcs[1277]; + void (*func_glVertexAttrib4NuivARB)( GLuint, GLuint* ) = extension_funcs[EXT_glVertexAttrib4NuivARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4NuivARB( index, v ); @@ -10374,7 +11864,7 @@ static void WINAPI wine_glVertexAttrib4NuivARB( GLuint index, GLuint* v ) { } static void WINAPI wine_glVertexAttrib4Nusv( GLuint index, GLushort* v ) { - void (*func_glVertexAttrib4Nusv)( GLuint, GLushort* ) = extension_funcs[1278]; + void (*func_glVertexAttrib4Nusv)( GLuint, GLushort* ) = extension_funcs[EXT_glVertexAttrib4Nusv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4Nusv( index, v ); @@ -10382,7 +11872,7 @@ static void WINAPI wine_glVertexAttrib4Nusv( GLuint index, GLushort* v ) { } static void WINAPI wine_glVertexAttrib4NusvARB( GLuint index, GLushort* v ) { - void (*func_glVertexAttrib4NusvARB)( GLuint, GLushort* ) = extension_funcs[1279]; + void (*func_glVertexAttrib4NusvARB)( GLuint, GLushort* ) = extension_funcs[EXT_glVertexAttrib4NusvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4NusvARB( index, v ); @@ -10390,7 +11880,7 @@ static void WINAPI wine_glVertexAttrib4NusvARB( GLuint index, GLushort* v ) { } static void WINAPI wine_glVertexAttrib4bv( GLuint index, GLbyte* v ) { - void (*func_glVertexAttrib4bv)( GLuint, GLbyte* ) = extension_funcs[1280]; + void (*func_glVertexAttrib4bv)( GLuint, GLbyte* ) = extension_funcs[EXT_glVertexAttrib4bv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4bv( index, v ); @@ -10398,7 +11888,7 @@ static void WINAPI wine_glVertexAttrib4bv( GLuint index, GLbyte* v ) { } static void WINAPI wine_glVertexAttrib4bvARB( GLuint index, GLbyte* v ) { - void (*func_glVertexAttrib4bvARB)( GLuint, GLbyte* ) = extension_funcs[1281]; + void (*func_glVertexAttrib4bvARB)( GLuint, GLbyte* ) = extension_funcs[EXT_glVertexAttrib4bvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4bvARB( index, v ); @@ -10406,7 +11896,7 @@ static void WINAPI wine_glVertexAttrib4bvARB( GLuint index, GLbyte* v ) { } static void WINAPI wine_glVertexAttrib4d( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { - void (*func_glVertexAttrib4d)( GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[1282]; + void (*func_glVertexAttrib4d)( GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glVertexAttrib4d]; TRACE("(%d, %f, %f, %f, %f)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttrib4d( index, x, y, z, w ); @@ -10414,7 +11904,7 @@ static void WINAPI wine_glVertexAttrib4d( GLuint index, GLdouble x, GLdouble y, } static void WINAPI wine_glVertexAttrib4dARB( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { - void (*func_glVertexAttrib4dARB)( GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[1283]; + void (*func_glVertexAttrib4dARB)( GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glVertexAttrib4dARB]; TRACE("(%d, %f, %f, %f, %f)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttrib4dARB( index, x, y, z, w ); @@ -10422,7 +11912,7 @@ static void WINAPI wine_glVertexAttrib4dARB( GLuint index, GLdouble x, GLdouble } static void WINAPI wine_glVertexAttrib4dNV( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { - void (*func_glVertexAttrib4dNV)( GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[1284]; + void (*func_glVertexAttrib4dNV)( GLuint, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glVertexAttrib4dNV]; TRACE("(%d, %f, %f, %f, %f)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttrib4dNV( index, x, y, z, w ); @@ -10430,7 +11920,7 @@ static void WINAPI wine_glVertexAttrib4dNV( GLuint index, GLdouble x, GLdouble y } static void WINAPI wine_glVertexAttrib4dv( GLuint index, GLdouble* v ) { - void (*func_glVertexAttrib4dv)( GLuint, GLdouble* ) = extension_funcs[1285]; + void (*func_glVertexAttrib4dv)( GLuint, GLdouble* ) = extension_funcs[EXT_glVertexAttrib4dv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4dv( index, v ); @@ -10438,7 +11928,7 @@ static void WINAPI wine_glVertexAttrib4dv( GLuint index, GLdouble* v ) { } static void WINAPI wine_glVertexAttrib4dvARB( GLuint index, GLdouble* v ) { - void (*func_glVertexAttrib4dvARB)( GLuint, GLdouble* ) = extension_funcs[1286]; + void (*func_glVertexAttrib4dvARB)( GLuint, GLdouble* ) = extension_funcs[EXT_glVertexAttrib4dvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4dvARB( index, v ); @@ -10446,7 +11936,7 @@ static void WINAPI wine_glVertexAttrib4dvARB( GLuint index, GLdouble* v ) { } static void WINAPI wine_glVertexAttrib4dvNV( GLuint index, GLdouble* v ) { - void (*func_glVertexAttrib4dvNV)( GLuint, GLdouble* ) = extension_funcs[1287]; + void (*func_glVertexAttrib4dvNV)( GLuint, GLdouble* ) = extension_funcs[EXT_glVertexAttrib4dvNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4dvNV( index, v ); @@ -10454,7 +11944,7 @@ static void WINAPI wine_glVertexAttrib4dvNV( GLuint index, GLdouble* v ) { } static void WINAPI wine_glVertexAttrib4f( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - void (*func_glVertexAttrib4f)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[1288]; + void (*func_glVertexAttrib4f)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glVertexAttrib4f]; TRACE("(%d, %f, %f, %f, %f)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttrib4f( index, x, y, z, w ); @@ -10462,7 +11952,7 @@ static void WINAPI wine_glVertexAttrib4f( GLuint index, GLfloat x, GLfloat y, GL } static void WINAPI wine_glVertexAttrib4fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - void (*func_glVertexAttrib4fARB)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[1289]; + void (*func_glVertexAttrib4fARB)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glVertexAttrib4fARB]; TRACE("(%d, %f, %f, %f, %f)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttrib4fARB( index, x, y, z, w ); @@ -10470,7 +11960,7 @@ static void WINAPI wine_glVertexAttrib4fARB( GLuint index, GLfloat x, GLfloat y, } static void WINAPI wine_glVertexAttrib4fNV( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - void (*func_glVertexAttrib4fNV)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[1290]; + void (*func_glVertexAttrib4fNV)( GLuint, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glVertexAttrib4fNV]; TRACE("(%d, %f, %f, %f, %f)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttrib4fNV( index, x, y, z, w ); @@ -10478,7 +11968,7 @@ static void WINAPI wine_glVertexAttrib4fNV( GLuint index, GLfloat x, GLfloat y, } static void WINAPI wine_glVertexAttrib4fv( GLuint index, GLfloat* v ) { - void (*func_glVertexAttrib4fv)( GLuint, GLfloat* ) = extension_funcs[1291]; + void (*func_glVertexAttrib4fv)( GLuint, GLfloat* ) = extension_funcs[EXT_glVertexAttrib4fv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4fv( index, v ); @@ -10486,7 +11976,7 @@ static void WINAPI wine_glVertexAttrib4fv( GLuint index, GLfloat* v ) { } static void WINAPI wine_glVertexAttrib4fvARB( GLuint index, GLfloat* v ) { - void (*func_glVertexAttrib4fvARB)( GLuint, GLfloat* ) = extension_funcs[1292]; + void (*func_glVertexAttrib4fvARB)( GLuint, GLfloat* ) = extension_funcs[EXT_glVertexAttrib4fvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4fvARB( index, v ); @@ -10494,7 +11984,7 @@ static void WINAPI wine_glVertexAttrib4fvARB( GLuint index, GLfloat* v ) { } static void WINAPI wine_glVertexAttrib4fvNV( GLuint index, GLfloat* v ) { - void (*func_glVertexAttrib4fvNV)( GLuint, GLfloat* ) = extension_funcs[1293]; + void (*func_glVertexAttrib4fvNV)( GLuint, GLfloat* ) = extension_funcs[EXT_glVertexAttrib4fvNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4fvNV( index, v ); @@ -10502,7 +11992,7 @@ static void WINAPI wine_glVertexAttrib4fvNV( GLuint index, GLfloat* v ) { } static void WINAPI wine_glVertexAttrib4hNV( GLuint index, unsigned short x, unsigned short y, unsigned short z, unsigned short w ) { - void (*func_glVertexAttrib4hNV)( GLuint, unsigned short, unsigned short, unsigned short, unsigned short ) = extension_funcs[1294]; + void (*func_glVertexAttrib4hNV)( GLuint, unsigned short, unsigned short, unsigned short, unsigned short ) = extension_funcs[EXT_glVertexAttrib4hNV]; TRACE("(%d, %d, %d, %d, %d)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttrib4hNV( index, x, y, z, w ); @@ -10510,7 +12000,7 @@ static void WINAPI wine_glVertexAttrib4hNV( GLuint index, unsigned short x, unsi } static void WINAPI wine_glVertexAttrib4hvNV( GLuint index, unsigned short* v ) { - void (*func_glVertexAttrib4hvNV)( GLuint, unsigned short* ) = extension_funcs[1295]; + void (*func_glVertexAttrib4hvNV)( GLuint, unsigned short* ) = extension_funcs[EXT_glVertexAttrib4hvNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4hvNV( index, v ); @@ -10518,7 +12008,7 @@ static void WINAPI wine_glVertexAttrib4hvNV( GLuint index, unsigned short* v ) { } static void WINAPI wine_glVertexAttrib4iv( GLuint index, GLint* v ) { - void (*func_glVertexAttrib4iv)( GLuint, GLint* ) = extension_funcs[1296]; + void (*func_glVertexAttrib4iv)( GLuint, GLint* ) = extension_funcs[EXT_glVertexAttrib4iv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4iv( index, v ); @@ -10526,7 +12016,7 @@ static void WINAPI wine_glVertexAttrib4iv( GLuint index, GLint* v ) { } static void WINAPI wine_glVertexAttrib4ivARB( GLuint index, GLint* v ) { - void (*func_glVertexAttrib4ivARB)( GLuint, GLint* ) = extension_funcs[1297]; + void (*func_glVertexAttrib4ivARB)( GLuint, GLint* ) = extension_funcs[EXT_glVertexAttrib4ivARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4ivARB( index, v ); @@ -10534,7 +12024,7 @@ static void WINAPI wine_glVertexAttrib4ivARB( GLuint index, GLint* v ) { } static void WINAPI wine_glVertexAttrib4s( GLuint index, GLshort x, GLshort y, GLshort z, GLshort w ) { - void (*func_glVertexAttrib4s)( GLuint, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[1298]; + void (*func_glVertexAttrib4s)( GLuint, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glVertexAttrib4s]; TRACE("(%d, %d, %d, %d, %d)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttrib4s( index, x, y, z, w ); @@ -10542,7 +12032,7 @@ static void WINAPI wine_glVertexAttrib4s( GLuint index, GLshort x, GLshort y, GL } static void WINAPI wine_glVertexAttrib4sARB( GLuint index, GLshort x, GLshort y, GLshort z, GLshort w ) { - void (*func_glVertexAttrib4sARB)( GLuint, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[1299]; + void (*func_glVertexAttrib4sARB)( GLuint, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glVertexAttrib4sARB]; TRACE("(%d, %d, %d, %d, %d)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttrib4sARB( index, x, y, z, w ); @@ -10550,7 +12040,7 @@ static void WINAPI wine_glVertexAttrib4sARB( GLuint index, GLshort x, GLshort y, } static void WINAPI wine_glVertexAttrib4sNV( GLuint index, GLshort x, GLshort y, GLshort z, GLshort w ) { - void (*func_glVertexAttrib4sNV)( GLuint, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[1300]; + void (*func_glVertexAttrib4sNV)( GLuint, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glVertexAttrib4sNV]; TRACE("(%d, %d, %d, %d, %d)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttrib4sNV( index, x, y, z, w ); @@ -10558,7 +12048,7 @@ static void WINAPI wine_glVertexAttrib4sNV( GLuint index, GLshort x, GLshort y, } static void WINAPI wine_glVertexAttrib4sv( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib4sv)( GLuint, GLshort* ) = extension_funcs[1301]; + void (*func_glVertexAttrib4sv)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib4sv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4sv( index, v ); @@ -10566,7 +12056,7 @@ static void WINAPI wine_glVertexAttrib4sv( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib4svARB( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib4svARB)( GLuint, GLshort* ) = extension_funcs[1302]; + void (*func_glVertexAttrib4svARB)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib4svARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4svARB( index, v ); @@ -10574,7 +12064,7 @@ static void WINAPI wine_glVertexAttrib4svARB( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib4svNV( GLuint index, GLshort* v ) { - void (*func_glVertexAttrib4svNV)( GLuint, GLshort* ) = extension_funcs[1303]; + void (*func_glVertexAttrib4svNV)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttrib4svNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4svNV( index, v ); @@ -10582,7 +12072,7 @@ static void WINAPI wine_glVertexAttrib4svNV( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttrib4ubNV( GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w ) { - void (*func_glVertexAttrib4ubNV)( GLuint, GLubyte, GLubyte, GLubyte, GLubyte ) = extension_funcs[1304]; + void (*func_glVertexAttrib4ubNV)( GLuint, GLubyte, GLubyte, GLubyte, GLubyte ) = extension_funcs[EXT_glVertexAttrib4ubNV]; TRACE("(%d, %d, %d, %d, %d)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttrib4ubNV( index, x, y, z, w ); @@ -10590,7 +12080,7 @@ static void WINAPI wine_glVertexAttrib4ubNV( GLuint index, GLubyte x, GLubyte y, } static void WINAPI wine_glVertexAttrib4ubv( GLuint index, GLubyte* v ) { - void (*func_glVertexAttrib4ubv)( GLuint, GLubyte* ) = extension_funcs[1305]; + void (*func_glVertexAttrib4ubv)( GLuint, GLubyte* ) = extension_funcs[EXT_glVertexAttrib4ubv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4ubv( index, v ); @@ -10598,7 +12088,7 @@ static void WINAPI wine_glVertexAttrib4ubv( GLuint index, GLubyte* v ) { } static void WINAPI wine_glVertexAttrib4ubvARB( GLuint index, GLubyte* v ) { - void (*func_glVertexAttrib4ubvARB)( GLuint, GLubyte* ) = extension_funcs[1306]; + void (*func_glVertexAttrib4ubvARB)( GLuint, GLubyte* ) = extension_funcs[EXT_glVertexAttrib4ubvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4ubvARB( index, v ); @@ -10606,7 +12096,7 @@ static void WINAPI wine_glVertexAttrib4ubvARB( GLuint index, GLubyte* v ) { } static void WINAPI wine_glVertexAttrib4ubvNV( GLuint index, GLubyte* v ) { - void (*func_glVertexAttrib4ubvNV)( GLuint, GLubyte* ) = extension_funcs[1307]; + void (*func_glVertexAttrib4ubvNV)( GLuint, GLubyte* ) = extension_funcs[EXT_glVertexAttrib4ubvNV]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4ubvNV( index, v ); @@ -10614,7 +12104,7 @@ static void WINAPI wine_glVertexAttrib4ubvNV( GLuint index, GLubyte* v ) { } static void WINAPI wine_glVertexAttrib4uiv( GLuint index, GLuint* v ) { - void (*func_glVertexAttrib4uiv)( GLuint, GLuint* ) = extension_funcs[1308]; + void (*func_glVertexAttrib4uiv)( GLuint, GLuint* ) = extension_funcs[EXT_glVertexAttrib4uiv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4uiv( index, v ); @@ -10622,7 +12112,7 @@ static void WINAPI wine_glVertexAttrib4uiv( GLuint index, GLuint* v ) { } static void WINAPI wine_glVertexAttrib4uivARB( GLuint index, GLuint* v ) { - void (*func_glVertexAttrib4uivARB)( GLuint, GLuint* ) = extension_funcs[1309]; + void (*func_glVertexAttrib4uivARB)( GLuint, GLuint* ) = extension_funcs[EXT_glVertexAttrib4uivARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4uivARB( index, v ); @@ -10630,7 +12120,7 @@ static void WINAPI wine_glVertexAttrib4uivARB( GLuint index, GLuint* v ) { } static void WINAPI wine_glVertexAttrib4usv( GLuint index, GLushort* v ) { - void (*func_glVertexAttrib4usv)( GLuint, GLushort* ) = extension_funcs[1310]; + void (*func_glVertexAttrib4usv)( GLuint, GLushort* ) = extension_funcs[EXT_glVertexAttrib4usv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4usv( index, v ); @@ -10638,7 +12128,7 @@ static void WINAPI wine_glVertexAttrib4usv( GLuint index, GLushort* v ) { } static void WINAPI wine_glVertexAttrib4usvARB( GLuint index, GLushort* v ) { - void (*func_glVertexAttrib4usvARB)( GLuint, GLushort* ) = extension_funcs[1311]; + void (*func_glVertexAttrib4usvARB)( GLuint, GLushort* ) = extension_funcs[EXT_glVertexAttrib4usvARB]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttrib4usvARB( index, v ); @@ -10646,7 +12136,7 @@ static void WINAPI wine_glVertexAttrib4usvARB( GLuint index, GLushort* v ) { } static void WINAPI wine_glVertexAttribArrayObjectATI( GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset ) { - void (*func_glVertexAttribArrayObjectATI)( GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint ) = extension_funcs[1312]; + void (*func_glVertexAttribArrayObjectATI)( GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint ) = extension_funcs[EXT_glVertexAttribArrayObjectATI]; TRACE("(%d, %d, %d, %d, %d, %d, %d)\n", index, size, type, normalized, stride, buffer, offset ); ENTER_GL(); func_glVertexAttribArrayObjectATI( index, size, type, normalized, stride, buffer, offset ); @@ -10654,7 +12144,7 @@ static void WINAPI wine_glVertexAttribArrayObjectATI( GLuint index, GLint size, } static void WINAPI wine_glVertexAttribDivisor( GLuint index, GLuint divisor ) { - void (*func_glVertexAttribDivisor)( GLuint, GLuint ) = extension_funcs[1313]; + void (*func_glVertexAttribDivisor)( GLuint, GLuint ) = extension_funcs[EXT_glVertexAttribDivisor]; TRACE("(%d, %d)\n", index, divisor ); ENTER_GL(); func_glVertexAttribDivisor( index, divisor ); @@ -10662,7 +12152,7 @@ static void WINAPI wine_glVertexAttribDivisor( GLuint index, GLuint divisor ) { } static void WINAPI wine_glVertexAttribI1i( GLuint index, GLint x ) { - void (*func_glVertexAttribI1i)( GLuint, GLint ) = extension_funcs[1314]; + void (*func_glVertexAttribI1i)( GLuint, GLint ) = extension_funcs[EXT_glVertexAttribI1i]; TRACE("(%d, %d)\n", index, x ); ENTER_GL(); func_glVertexAttribI1i( index, x ); @@ -10670,7 +12160,7 @@ static void WINAPI wine_glVertexAttribI1i( GLuint index, GLint x ) { } static void WINAPI wine_glVertexAttribI1iEXT( GLuint index, GLint x ) { - void (*func_glVertexAttribI1iEXT)( GLuint, GLint ) = extension_funcs[1315]; + void (*func_glVertexAttribI1iEXT)( GLuint, GLint ) = extension_funcs[EXT_glVertexAttribI1iEXT]; TRACE("(%d, %d)\n", index, x ); ENTER_GL(); func_glVertexAttribI1iEXT( index, x ); @@ -10678,7 +12168,7 @@ static void WINAPI wine_glVertexAttribI1iEXT( GLuint index, GLint x ) { } static void WINAPI wine_glVertexAttribI1iv( GLuint index, GLint* v ) { - void (*func_glVertexAttribI1iv)( GLuint, GLint* ) = extension_funcs[1316]; + void (*func_glVertexAttribI1iv)( GLuint, GLint* ) = extension_funcs[EXT_glVertexAttribI1iv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI1iv( index, v ); @@ -10686,7 +12176,7 @@ static void WINAPI wine_glVertexAttribI1iv( GLuint index, GLint* v ) { } static void WINAPI wine_glVertexAttribI1ivEXT( GLuint index, GLint* v ) { - void (*func_glVertexAttribI1ivEXT)( GLuint, GLint* ) = extension_funcs[1317]; + void (*func_glVertexAttribI1ivEXT)( GLuint, GLint* ) = extension_funcs[EXT_glVertexAttribI1ivEXT]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI1ivEXT( index, v ); @@ -10694,7 +12184,7 @@ static void WINAPI wine_glVertexAttribI1ivEXT( GLuint index, GLint* v ) { } static void WINAPI wine_glVertexAttribI1ui( GLuint index, GLuint x ) { - void (*func_glVertexAttribI1ui)( GLuint, GLuint ) = extension_funcs[1318]; + void (*func_glVertexAttribI1ui)( GLuint, GLuint ) = extension_funcs[EXT_glVertexAttribI1ui]; TRACE("(%d, %d)\n", index, x ); ENTER_GL(); func_glVertexAttribI1ui( index, x ); @@ -10702,7 +12192,7 @@ static void WINAPI wine_glVertexAttribI1ui( GLuint index, GLuint x ) { } static void WINAPI wine_glVertexAttribI1uiEXT( GLuint index, GLuint x ) { - void (*func_glVertexAttribI1uiEXT)( GLuint, GLuint ) = extension_funcs[1319]; + void (*func_glVertexAttribI1uiEXT)( GLuint, GLuint ) = extension_funcs[EXT_glVertexAttribI1uiEXT]; TRACE("(%d, %d)\n", index, x ); ENTER_GL(); func_glVertexAttribI1uiEXT( index, x ); @@ -10710,7 +12200,7 @@ static void WINAPI wine_glVertexAttribI1uiEXT( GLuint index, GLuint x ) { } static void WINAPI wine_glVertexAttribI1uiv( GLuint index, GLuint* v ) { - void (*func_glVertexAttribI1uiv)( GLuint, GLuint* ) = extension_funcs[1320]; + void (*func_glVertexAttribI1uiv)( GLuint, GLuint* ) = extension_funcs[EXT_glVertexAttribI1uiv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI1uiv( index, v ); @@ -10718,7 +12208,7 @@ static void WINAPI wine_glVertexAttribI1uiv( GLuint index, GLuint* v ) { } static void WINAPI wine_glVertexAttribI1uivEXT( GLuint index, GLuint* v ) { - void (*func_glVertexAttribI1uivEXT)( GLuint, GLuint* ) = extension_funcs[1321]; + void (*func_glVertexAttribI1uivEXT)( GLuint, GLuint* ) = extension_funcs[EXT_glVertexAttribI1uivEXT]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI1uivEXT( index, v ); @@ -10726,7 +12216,7 @@ static void WINAPI wine_glVertexAttribI1uivEXT( GLuint index, GLuint* v ) { } static void WINAPI wine_glVertexAttribI2i( GLuint index, GLint x, GLint y ) { - void (*func_glVertexAttribI2i)( GLuint, GLint, GLint ) = extension_funcs[1322]; + void (*func_glVertexAttribI2i)( GLuint, GLint, GLint ) = extension_funcs[EXT_glVertexAttribI2i]; TRACE("(%d, %d, %d)\n", index, x, y ); ENTER_GL(); func_glVertexAttribI2i( index, x, y ); @@ -10734,7 +12224,7 @@ static void WINAPI wine_glVertexAttribI2i( GLuint index, GLint x, GLint y ) { } static void WINAPI wine_glVertexAttribI2iEXT( GLuint index, GLint x, GLint y ) { - void (*func_glVertexAttribI2iEXT)( GLuint, GLint, GLint ) = extension_funcs[1323]; + void (*func_glVertexAttribI2iEXT)( GLuint, GLint, GLint ) = extension_funcs[EXT_glVertexAttribI2iEXT]; TRACE("(%d, %d, %d)\n", index, x, y ); ENTER_GL(); func_glVertexAttribI2iEXT( index, x, y ); @@ -10742,7 +12232,7 @@ static void WINAPI wine_glVertexAttribI2iEXT( GLuint index, GLint x, GLint y ) { } static void WINAPI wine_glVertexAttribI2iv( GLuint index, GLint* v ) { - void (*func_glVertexAttribI2iv)( GLuint, GLint* ) = extension_funcs[1324]; + void (*func_glVertexAttribI2iv)( GLuint, GLint* ) = extension_funcs[EXT_glVertexAttribI2iv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI2iv( index, v ); @@ -10750,7 +12240,7 @@ static void WINAPI wine_glVertexAttribI2iv( GLuint index, GLint* v ) { } static void WINAPI wine_glVertexAttribI2ivEXT( GLuint index, GLint* v ) { - void (*func_glVertexAttribI2ivEXT)( GLuint, GLint* ) = extension_funcs[1325]; + void (*func_glVertexAttribI2ivEXT)( GLuint, GLint* ) = extension_funcs[EXT_glVertexAttribI2ivEXT]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI2ivEXT( index, v ); @@ -10758,7 +12248,7 @@ static void WINAPI wine_glVertexAttribI2ivEXT( GLuint index, GLint* v ) { } static void WINAPI wine_glVertexAttribI2ui( GLuint index, GLuint x, GLuint y ) { - void (*func_glVertexAttribI2ui)( GLuint, GLuint, GLuint ) = extension_funcs[1326]; + void (*func_glVertexAttribI2ui)( GLuint, GLuint, GLuint ) = extension_funcs[EXT_glVertexAttribI2ui]; TRACE("(%d, %d, %d)\n", index, x, y ); ENTER_GL(); func_glVertexAttribI2ui( index, x, y ); @@ -10766,7 +12256,7 @@ static void WINAPI wine_glVertexAttribI2ui( GLuint index, GLuint x, GLuint y ) { } static void WINAPI wine_glVertexAttribI2uiEXT( GLuint index, GLuint x, GLuint y ) { - void (*func_glVertexAttribI2uiEXT)( GLuint, GLuint, GLuint ) = extension_funcs[1327]; + void (*func_glVertexAttribI2uiEXT)( GLuint, GLuint, GLuint ) = extension_funcs[EXT_glVertexAttribI2uiEXT]; TRACE("(%d, %d, %d)\n", index, x, y ); ENTER_GL(); func_glVertexAttribI2uiEXT( index, x, y ); @@ -10774,7 +12264,7 @@ static void WINAPI wine_glVertexAttribI2uiEXT( GLuint index, GLuint x, GLuint y } static void WINAPI wine_glVertexAttribI2uiv( GLuint index, GLuint* v ) { - void (*func_glVertexAttribI2uiv)( GLuint, GLuint* ) = extension_funcs[1328]; + void (*func_glVertexAttribI2uiv)( GLuint, GLuint* ) = extension_funcs[EXT_glVertexAttribI2uiv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI2uiv( index, v ); @@ -10782,7 +12272,7 @@ static void WINAPI wine_glVertexAttribI2uiv( GLuint index, GLuint* v ) { } static void WINAPI wine_glVertexAttribI2uivEXT( GLuint index, GLuint* v ) { - void (*func_glVertexAttribI2uivEXT)( GLuint, GLuint* ) = extension_funcs[1329]; + void (*func_glVertexAttribI2uivEXT)( GLuint, GLuint* ) = extension_funcs[EXT_glVertexAttribI2uivEXT]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI2uivEXT( index, v ); @@ -10790,7 +12280,7 @@ static void WINAPI wine_glVertexAttribI2uivEXT( GLuint index, GLuint* v ) { } static void WINAPI wine_glVertexAttribI3i( GLuint index, GLint x, GLint y, GLint z ) { - void (*func_glVertexAttribI3i)( GLuint, GLint, GLint, GLint ) = extension_funcs[1330]; + void (*func_glVertexAttribI3i)( GLuint, GLint, GLint, GLint ) = extension_funcs[EXT_glVertexAttribI3i]; TRACE("(%d, %d, %d, %d)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttribI3i( index, x, y, z ); @@ -10798,7 +12288,7 @@ static void WINAPI wine_glVertexAttribI3i( GLuint index, GLint x, GLint y, GLint } static void WINAPI wine_glVertexAttribI3iEXT( GLuint index, GLint x, GLint y, GLint z ) { - void (*func_glVertexAttribI3iEXT)( GLuint, GLint, GLint, GLint ) = extension_funcs[1331]; + void (*func_glVertexAttribI3iEXT)( GLuint, GLint, GLint, GLint ) = extension_funcs[EXT_glVertexAttribI3iEXT]; TRACE("(%d, %d, %d, %d)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttribI3iEXT( index, x, y, z ); @@ -10806,7 +12296,7 @@ static void WINAPI wine_glVertexAttribI3iEXT( GLuint index, GLint x, GLint y, GL } static void WINAPI wine_glVertexAttribI3iv( GLuint index, GLint* v ) { - void (*func_glVertexAttribI3iv)( GLuint, GLint* ) = extension_funcs[1332]; + void (*func_glVertexAttribI3iv)( GLuint, GLint* ) = extension_funcs[EXT_glVertexAttribI3iv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI3iv( index, v ); @@ -10814,7 +12304,7 @@ static void WINAPI wine_glVertexAttribI3iv( GLuint index, GLint* v ) { } static void WINAPI wine_glVertexAttribI3ivEXT( GLuint index, GLint* v ) { - void (*func_glVertexAttribI3ivEXT)( GLuint, GLint* ) = extension_funcs[1333]; + void (*func_glVertexAttribI3ivEXT)( GLuint, GLint* ) = extension_funcs[EXT_glVertexAttribI3ivEXT]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI3ivEXT( index, v ); @@ -10822,7 +12312,7 @@ static void WINAPI wine_glVertexAttribI3ivEXT( GLuint index, GLint* v ) { } static void WINAPI wine_glVertexAttribI3ui( GLuint index, GLuint x, GLuint y, GLuint z ) { - void (*func_glVertexAttribI3ui)( GLuint, GLuint, GLuint, GLuint ) = extension_funcs[1334]; + void (*func_glVertexAttribI3ui)( GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glVertexAttribI3ui]; TRACE("(%d, %d, %d, %d)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttribI3ui( index, x, y, z ); @@ -10830,7 +12320,7 @@ static void WINAPI wine_glVertexAttribI3ui( GLuint index, GLuint x, GLuint y, GL } static void WINAPI wine_glVertexAttribI3uiEXT( GLuint index, GLuint x, GLuint y, GLuint z ) { - void (*func_glVertexAttribI3uiEXT)( GLuint, GLuint, GLuint, GLuint ) = extension_funcs[1335]; + void (*func_glVertexAttribI3uiEXT)( GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glVertexAttribI3uiEXT]; TRACE("(%d, %d, %d, %d)\n", index, x, y, z ); ENTER_GL(); func_glVertexAttribI3uiEXT( index, x, y, z ); @@ -10838,7 +12328,7 @@ static void WINAPI wine_glVertexAttribI3uiEXT( GLuint index, GLuint x, GLuint y, } static void WINAPI wine_glVertexAttribI3uiv( GLuint index, GLuint* v ) { - void (*func_glVertexAttribI3uiv)( GLuint, GLuint* ) = extension_funcs[1336]; + void (*func_glVertexAttribI3uiv)( GLuint, GLuint* ) = extension_funcs[EXT_glVertexAttribI3uiv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI3uiv( index, v ); @@ -10846,7 +12336,7 @@ static void WINAPI wine_glVertexAttribI3uiv( GLuint index, GLuint* v ) { } static void WINAPI wine_glVertexAttribI3uivEXT( GLuint index, GLuint* v ) { - void (*func_glVertexAttribI3uivEXT)( GLuint, GLuint* ) = extension_funcs[1337]; + void (*func_glVertexAttribI3uivEXT)( GLuint, GLuint* ) = extension_funcs[EXT_glVertexAttribI3uivEXT]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI3uivEXT( index, v ); @@ -10854,7 +12344,7 @@ static void WINAPI wine_glVertexAttribI3uivEXT( GLuint index, GLuint* v ) { } static void WINAPI wine_glVertexAttribI4bv( GLuint index, GLbyte* v ) { - void (*func_glVertexAttribI4bv)( GLuint, GLbyte* ) = extension_funcs[1338]; + void (*func_glVertexAttribI4bv)( GLuint, GLbyte* ) = extension_funcs[EXT_glVertexAttribI4bv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI4bv( index, v ); @@ -10862,7 +12352,7 @@ static void WINAPI wine_glVertexAttribI4bv( GLuint index, GLbyte* v ) { } static void WINAPI wine_glVertexAttribI4bvEXT( GLuint index, GLbyte* v ) { - void (*func_glVertexAttribI4bvEXT)( GLuint, GLbyte* ) = extension_funcs[1339]; + void (*func_glVertexAttribI4bvEXT)( GLuint, GLbyte* ) = extension_funcs[EXT_glVertexAttribI4bvEXT]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI4bvEXT( index, v ); @@ -10870,7 +12360,7 @@ static void WINAPI wine_glVertexAttribI4bvEXT( GLuint index, GLbyte* v ) { } static void WINAPI wine_glVertexAttribI4i( GLuint index, GLint x, GLint y, GLint z, GLint w ) { - void (*func_glVertexAttribI4i)( GLuint, GLint, GLint, GLint, GLint ) = extension_funcs[1340]; + void (*func_glVertexAttribI4i)( GLuint, GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glVertexAttribI4i]; TRACE("(%d, %d, %d, %d, %d)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttribI4i( index, x, y, z, w ); @@ -10878,7 +12368,7 @@ static void WINAPI wine_glVertexAttribI4i( GLuint index, GLint x, GLint y, GLint } static void WINAPI wine_glVertexAttribI4iEXT( GLuint index, GLint x, GLint y, GLint z, GLint w ) { - void (*func_glVertexAttribI4iEXT)( GLuint, GLint, GLint, GLint, GLint ) = extension_funcs[1341]; + void (*func_glVertexAttribI4iEXT)( GLuint, GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glVertexAttribI4iEXT]; TRACE("(%d, %d, %d, %d, %d)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttribI4iEXT( index, x, y, z, w ); @@ -10886,7 +12376,7 @@ static void WINAPI wine_glVertexAttribI4iEXT( GLuint index, GLint x, GLint y, GL } static void WINAPI wine_glVertexAttribI4iv( GLuint index, GLint* v ) { - void (*func_glVertexAttribI4iv)( GLuint, GLint* ) = extension_funcs[1342]; + void (*func_glVertexAttribI4iv)( GLuint, GLint* ) = extension_funcs[EXT_glVertexAttribI4iv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI4iv( index, v ); @@ -10894,7 +12384,7 @@ static void WINAPI wine_glVertexAttribI4iv( GLuint index, GLint* v ) { } static void WINAPI wine_glVertexAttribI4ivEXT( GLuint index, GLint* v ) { - void (*func_glVertexAttribI4ivEXT)( GLuint, GLint* ) = extension_funcs[1343]; + void (*func_glVertexAttribI4ivEXT)( GLuint, GLint* ) = extension_funcs[EXT_glVertexAttribI4ivEXT]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI4ivEXT( index, v ); @@ -10902,7 +12392,7 @@ static void WINAPI wine_glVertexAttribI4ivEXT( GLuint index, GLint* v ) { } static void WINAPI wine_glVertexAttribI4sv( GLuint index, GLshort* v ) { - void (*func_glVertexAttribI4sv)( GLuint, GLshort* ) = extension_funcs[1344]; + void (*func_glVertexAttribI4sv)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttribI4sv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI4sv( index, v ); @@ -10910,7 +12400,7 @@ static void WINAPI wine_glVertexAttribI4sv( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttribI4svEXT( GLuint index, GLshort* v ) { - void (*func_glVertexAttribI4svEXT)( GLuint, GLshort* ) = extension_funcs[1345]; + void (*func_glVertexAttribI4svEXT)( GLuint, GLshort* ) = extension_funcs[EXT_glVertexAttribI4svEXT]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI4svEXT( index, v ); @@ -10918,7 +12408,7 @@ static void WINAPI wine_glVertexAttribI4svEXT( GLuint index, GLshort* v ) { } static void WINAPI wine_glVertexAttribI4ubv( GLuint index, GLubyte* v ) { - void (*func_glVertexAttribI4ubv)( GLuint, GLubyte* ) = extension_funcs[1346]; + void (*func_glVertexAttribI4ubv)( GLuint, GLubyte* ) = extension_funcs[EXT_glVertexAttribI4ubv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI4ubv( index, v ); @@ -10926,7 +12416,7 @@ static void WINAPI wine_glVertexAttribI4ubv( GLuint index, GLubyte* v ) { } static void WINAPI wine_glVertexAttribI4ubvEXT( GLuint index, GLubyte* v ) { - void (*func_glVertexAttribI4ubvEXT)( GLuint, GLubyte* ) = extension_funcs[1347]; + void (*func_glVertexAttribI4ubvEXT)( GLuint, GLubyte* ) = extension_funcs[EXT_glVertexAttribI4ubvEXT]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI4ubvEXT( index, v ); @@ -10934,7 +12424,7 @@ static void WINAPI wine_glVertexAttribI4ubvEXT( GLuint index, GLubyte* v ) { } static void WINAPI wine_glVertexAttribI4ui( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) { - void (*func_glVertexAttribI4ui)( GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[1348]; + void (*func_glVertexAttribI4ui)( GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glVertexAttribI4ui]; TRACE("(%d, %d, %d, %d, %d)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttribI4ui( index, x, y, z, w ); @@ -10942,7 +12432,7 @@ static void WINAPI wine_glVertexAttribI4ui( GLuint index, GLuint x, GLuint y, GL } static void WINAPI wine_glVertexAttribI4uiEXT( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) { - void (*func_glVertexAttribI4uiEXT)( GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[1349]; + void (*func_glVertexAttribI4uiEXT)( GLuint, GLuint, GLuint, GLuint, GLuint ) = extension_funcs[EXT_glVertexAttribI4uiEXT]; TRACE("(%d, %d, %d, %d, %d)\n", index, x, y, z, w ); ENTER_GL(); func_glVertexAttribI4uiEXT( index, x, y, z, w ); @@ -10950,7 +12440,7 @@ static void WINAPI wine_glVertexAttribI4uiEXT( GLuint index, GLuint x, GLuint y, } static void WINAPI wine_glVertexAttribI4uiv( GLuint index, GLuint* v ) { - void (*func_glVertexAttribI4uiv)( GLuint, GLuint* ) = extension_funcs[1350]; + void (*func_glVertexAttribI4uiv)( GLuint, GLuint* ) = extension_funcs[EXT_glVertexAttribI4uiv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI4uiv( index, v ); @@ -10958,7 +12448,7 @@ static void WINAPI wine_glVertexAttribI4uiv( GLuint index, GLuint* v ) { } static void WINAPI wine_glVertexAttribI4uivEXT( GLuint index, GLuint* v ) { - void (*func_glVertexAttribI4uivEXT)( GLuint, GLuint* ) = extension_funcs[1351]; + void (*func_glVertexAttribI4uivEXT)( GLuint, GLuint* ) = extension_funcs[EXT_glVertexAttribI4uivEXT]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI4uivEXT( index, v ); @@ -10966,7 +12456,7 @@ static void WINAPI wine_glVertexAttribI4uivEXT( GLuint index, GLuint* v ) { } static void WINAPI wine_glVertexAttribI4usv( GLuint index, GLushort* v ) { - void (*func_glVertexAttribI4usv)( GLuint, GLushort* ) = extension_funcs[1352]; + void (*func_glVertexAttribI4usv)( GLuint, GLushort* ) = extension_funcs[EXT_glVertexAttribI4usv]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI4usv( index, v ); @@ -10974,7 +12464,7 @@ static void WINAPI wine_glVertexAttribI4usv( GLuint index, GLushort* v ) { } static void WINAPI wine_glVertexAttribI4usvEXT( GLuint index, GLushort* v ) { - void (*func_glVertexAttribI4usvEXT)( GLuint, GLushort* ) = extension_funcs[1353]; + void (*func_glVertexAttribI4usvEXT)( GLuint, GLushort* ) = extension_funcs[EXT_glVertexAttribI4usvEXT]; TRACE("(%d, %p)\n", index, v ); ENTER_GL(); func_glVertexAttribI4usvEXT( index, v ); @@ -10982,7 +12472,7 @@ static void WINAPI wine_glVertexAttribI4usvEXT( GLuint index, GLushort* v ) { } static void WINAPI wine_glVertexAttribIPointer( GLuint index, GLint size, GLenum type, GLsizei stride, GLvoid* pointer ) { - void (*func_glVertexAttribIPointer)( GLuint, GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[1354]; + void (*func_glVertexAttribIPointer)( GLuint, GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glVertexAttribIPointer]; TRACE("(%d, %d, %d, %d, %p)\n", index, size, type, stride, pointer ); ENTER_GL(); func_glVertexAttribIPointer( index, size, type, stride, pointer ); @@ -10990,7 +12480,7 @@ static void WINAPI wine_glVertexAttribIPointer( GLuint index, GLint size, GLenum } static void WINAPI wine_glVertexAttribIPointerEXT( GLuint index, GLint size, GLenum type, GLsizei stride, GLvoid* pointer ) { - void (*func_glVertexAttribIPointerEXT)( GLuint, GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[1355]; + void (*func_glVertexAttribIPointerEXT)( GLuint, GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glVertexAttribIPointerEXT]; TRACE("(%d, %d, %d, %d, %p)\n", index, size, type, stride, pointer ); ENTER_GL(); func_glVertexAttribIPointerEXT( index, size, type, stride, pointer ); @@ -10998,7 +12488,7 @@ static void WINAPI wine_glVertexAttribIPointerEXT( GLuint index, GLint size, GLe } static void WINAPI wine_glVertexAttribPointer( GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLvoid* pointer ) { - void (*func_glVertexAttribPointer)( GLuint, GLint, GLenum, GLboolean, GLsizei, GLvoid* ) = extension_funcs[1356]; + void (*func_glVertexAttribPointer)( GLuint, GLint, GLenum, GLboolean, GLsizei, GLvoid* ) = extension_funcs[EXT_glVertexAttribPointer]; TRACE("(%d, %d, %d, %d, %d, %p)\n", index, size, type, normalized, stride, pointer ); ENTER_GL(); func_glVertexAttribPointer( index, size, type, normalized, stride, pointer ); @@ -11006,7 +12496,7 @@ static void WINAPI wine_glVertexAttribPointer( GLuint index, GLint size, GLenum } static void WINAPI wine_glVertexAttribPointerARB( GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLvoid* pointer ) { - void (*func_glVertexAttribPointerARB)( GLuint, GLint, GLenum, GLboolean, GLsizei, GLvoid* ) = extension_funcs[1357]; + void (*func_glVertexAttribPointerARB)( GLuint, GLint, GLenum, GLboolean, GLsizei, GLvoid* ) = extension_funcs[EXT_glVertexAttribPointerARB]; TRACE("(%d, %d, %d, %d, %d, %p)\n", index, size, type, normalized, stride, pointer ); ENTER_GL(); func_glVertexAttribPointerARB( index, size, type, normalized, stride, pointer ); @@ -11014,7 +12504,7 @@ static void WINAPI wine_glVertexAttribPointerARB( GLuint index, GLint size, GLen } static void WINAPI wine_glVertexAttribPointerNV( GLuint index, GLint fsize, GLenum type, GLsizei stride, GLvoid* pointer ) { - void (*func_glVertexAttribPointerNV)( GLuint, GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[1358]; + void (*func_glVertexAttribPointerNV)( GLuint, GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glVertexAttribPointerNV]; TRACE("(%d, %d, %d, %d, %p)\n", index, fsize, type, stride, pointer ); ENTER_GL(); func_glVertexAttribPointerNV( index, fsize, type, stride, pointer ); @@ -11022,7 +12512,7 @@ static void WINAPI wine_glVertexAttribPointerNV( GLuint index, GLint fsize, GLen } static void WINAPI wine_glVertexAttribs1dvNV( GLuint index, GLsizei count, GLdouble* v ) { - void (*func_glVertexAttribs1dvNV)( GLuint, GLsizei, GLdouble* ) = extension_funcs[1359]; + void (*func_glVertexAttribs1dvNV)( GLuint, GLsizei, GLdouble* ) = extension_funcs[EXT_glVertexAttribs1dvNV]; TRACE("(%d, %d, %p)\n", index, count, v ); ENTER_GL(); func_glVertexAttribs1dvNV( index, count, v ); @@ -11030,7 +12520,7 @@ static void WINAPI wine_glVertexAttribs1dvNV( GLuint index, GLsizei count, GLdou } static void WINAPI wine_glVertexAttribs1fvNV( GLuint index, GLsizei count, GLfloat* v ) { - void (*func_glVertexAttribs1fvNV)( GLuint, GLsizei, GLfloat* ) = extension_funcs[1360]; + void (*func_glVertexAttribs1fvNV)( GLuint, GLsizei, GLfloat* ) = extension_funcs[EXT_glVertexAttribs1fvNV]; TRACE("(%d, %d, %p)\n", index, count, v ); ENTER_GL(); func_glVertexAttribs1fvNV( index, count, v ); @@ -11038,7 +12528,7 @@ static void WINAPI wine_glVertexAttribs1fvNV( GLuint index, GLsizei count, GLflo } static void WINAPI wine_glVertexAttribs1hvNV( GLuint index, GLsizei n, unsigned short* v ) { - void (*func_glVertexAttribs1hvNV)( GLuint, GLsizei, unsigned short* ) = extension_funcs[1361]; + void (*func_glVertexAttribs1hvNV)( GLuint, GLsizei, unsigned short* ) = extension_funcs[EXT_glVertexAttribs1hvNV]; TRACE("(%d, %d, %p)\n", index, n, v ); ENTER_GL(); func_glVertexAttribs1hvNV( index, n, v ); @@ -11046,7 +12536,7 @@ static void WINAPI wine_glVertexAttribs1hvNV( GLuint index, GLsizei n, unsigned } static void WINAPI wine_glVertexAttribs1svNV( GLuint index, GLsizei count, GLshort* v ) { - void (*func_glVertexAttribs1svNV)( GLuint, GLsizei, GLshort* ) = extension_funcs[1362]; + void (*func_glVertexAttribs1svNV)( GLuint, GLsizei, GLshort* ) = extension_funcs[EXT_glVertexAttribs1svNV]; TRACE("(%d, %d, %p)\n", index, count, v ); ENTER_GL(); func_glVertexAttribs1svNV( index, count, v ); @@ -11054,7 +12544,7 @@ static void WINAPI wine_glVertexAttribs1svNV( GLuint index, GLsizei count, GLsho } static void WINAPI wine_glVertexAttribs2dvNV( GLuint index, GLsizei count, GLdouble* v ) { - void (*func_glVertexAttribs2dvNV)( GLuint, GLsizei, GLdouble* ) = extension_funcs[1363]; + void (*func_glVertexAttribs2dvNV)( GLuint, GLsizei, GLdouble* ) = extension_funcs[EXT_glVertexAttribs2dvNV]; TRACE("(%d, %d, %p)\n", index, count, v ); ENTER_GL(); func_glVertexAttribs2dvNV( index, count, v ); @@ -11062,7 +12552,7 @@ static void WINAPI wine_glVertexAttribs2dvNV( GLuint index, GLsizei count, GLdou } static void WINAPI wine_glVertexAttribs2fvNV( GLuint index, GLsizei count, GLfloat* v ) { - void (*func_glVertexAttribs2fvNV)( GLuint, GLsizei, GLfloat* ) = extension_funcs[1364]; + void (*func_glVertexAttribs2fvNV)( GLuint, GLsizei, GLfloat* ) = extension_funcs[EXT_glVertexAttribs2fvNV]; TRACE("(%d, %d, %p)\n", index, count, v ); ENTER_GL(); func_glVertexAttribs2fvNV( index, count, v ); @@ -11070,7 +12560,7 @@ static void WINAPI wine_glVertexAttribs2fvNV( GLuint index, GLsizei count, GLflo } static void WINAPI wine_glVertexAttribs2hvNV( GLuint index, GLsizei n, unsigned short* v ) { - void (*func_glVertexAttribs2hvNV)( GLuint, GLsizei, unsigned short* ) = extension_funcs[1365]; + void (*func_glVertexAttribs2hvNV)( GLuint, GLsizei, unsigned short* ) = extension_funcs[EXT_glVertexAttribs2hvNV]; TRACE("(%d, %d, %p)\n", index, n, v ); ENTER_GL(); func_glVertexAttribs2hvNV( index, n, v ); @@ -11078,7 +12568,7 @@ static void WINAPI wine_glVertexAttribs2hvNV( GLuint index, GLsizei n, unsigned } static void WINAPI wine_glVertexAttribs2svNV( GLuint index, GLsizei count, GLshort* v ) { - void (*func_glVertexAttribs2svNV)( GLuint, GLsizei, GLshort* ) = extension_funcs[1366]; + void (*func_glVertexAttribs2svNV)( GLuint, GLsizei, GLshort* ) = extension_funcs[EXT_glVertexAttribs2svNV]; TRACE("(%d, %d, %p)\n", index, count, v ); ENTER_GL(); func_glVertexAttribs2svNV( index, count, v ); @@ -11086,7 +12576,7 @@ static void WINAPI wine_glVertexAttribs2svNV( GLuint index, GLsizei count, GLsho } static void WINAPI wine_glVertexAttribs3dvNV( GLuint index, GLsizei count, GLdouble* v ) { - void (*func_glVertexAttribs3dvNV)( GLuint, GLsizei, GLdouble* ) = extension_funcs[1367]; + void (*func_glVertexAttribs3dvNV)( GLuint, GLsizei, GLdouble* ) = extension_funcs[EXT_glVertexAttribs3dvNV]; TRACE("(%d, %d, %p)\n", index, count, v ); ENTER_GL(); func_glVertexAttribs3dvNV( index, count, v ); @@ -11094,7 +12584,7 @@ static void WINAPI wine_glVertexAttribs3dvNV( GLuint index, GLsizei count, GLdou } static void WINAPI wine_glVertexAttribs3fvNV( GLuint index, GLsizei count, GLfloat* v ) { - void (*func_glVertexAttribs3fvNV)( GLuint, GLsizei, GLfloat* ) = extension_funcs[1368]; + void (*func_glVertexAttribs3fvNV)( GLuint, GLsizei, GLfloat* ) = extension_funcs[EXT_glVertexAttribs3fvNV]; TRACE("(%d, %d, %p)\n", index, count, v ); ENTER_GL(); func_glVertexAttribs3fvNV( index, count, v ); @@ -11102,7 +12592,7 @@ static void WINAPI wine_glVertexAttribs3fvNV( GLuint index, GLsizei count, GLflo } static void WINAPI wine_glVertexAttribs3hvNV( GLuint index, GLsizei n, unsigned short* v ) { - void (*func_glVertexAttribs3hvNV)( GLuint, GLsizei, unsigned short* ) = extension_funcs[1369]; + void (*func_glVertexAttribs3hvNV)( GLuint, GLsizei, unsigned short* ) = extension_funcs[EXT_glVertexAttribs3hvNV]; TRACE("(%d, %d, %p)\n", index, n, v ); ENTER_GL(); func_glVertexAttribs3hvNV( index, n, v ); @@ -11110,7 +12600,7 @@ static void WINAPI wine_glVertexAttribs3hvNV( GLuint index, GLsizei n, unsigned } static void WINAPI wine_glVertexAttribs3svNV( GLuint index, GLsizei count, GLshort* v ) { - void (*func_glVertexAttribs3svNV)( GLuint, GLsizei, GLshort* ) = extension_funcs[1370]; + void (*func_glVertexAttribs3svNV)( GLuint, GLsizei, GLshort* ) = extension_funcs[EXT_glVertexAttribs3svNV]; TRACE("(%d, %d, %p)\n", index, count, v ); ENTER_GL(); func_glVertexAttribs3svNV( index, count, v ); @@ -11118,7 +12608,7 @@ static void WINAPI wine_glVertexAttribs3svNV( GLuint index, GLsizei count, GLsho } static void WINAPI wine_glVertexAttribs4dvNV( GLuint index, GLsizei count, GLdouble* v ) { - void (*func_glVertexAttribs4dvNV)( GLuint, GLsizei, GLdouble* ) = extension_funcs[1371]; + void (*func_glVertexAttribs4dvNV)( GLuint, GLsizei, GLdouble* ) = extension_funcs[EXT_glVertexAttribs4dvNV]; TRACE("(%d, %d, %p)\n", index, count, v ); ENTER_GL(); func_glVertexAttribs4dvNV( index, count, v ); @@ -11126,7 +12616,7 @@ static void WINAPI wine_glVertexAttribs4dvNV( GLuint index, GLsizei count, GLdou } static void WINAPI wine_glVertexAttribs4fvNV( GLuint index, GLsizei count, GLfloat* v ) { - void (*func_glVertexAttribs4fvNV)( GLuint, GLsizei, GLfloat* ) = extension_funcs[1372]; + void (*func_glVertexAttribs4fvNV)( GLuint, GLsizei, GLfloat* ) = extension_funcs[EXT_glVertexAttribs4fvNV]; TRACE("(%d, %d, %p)\n", index, count, v ); ENTER_GL(); func_glVertexAttribs4fvNV( index, count, v ); @@ -11134,7 +12624,7 @@ static void WINAPI wine_glVertexAttribs4fvNV( GLuint index, GLsizei count, GLflo } static void WINAPI wine_glVertexAttribs4hvNV( GLuint index, GLsizei n, unsigned short* v ) { - void (*func_glVertexAttribs4hvNV)( GLuint, GLsizei, unsigned short* ) = extension_funcs[1373]; + void (*func_glVertexAttribs4hvNV)( GLuint, GLsizei, unsigned short* ) = extension_funcs[EXT_glVertexAttribs4hvNV]; TRACE("(%d, %d, %p)\n", index, n, v ); ENTER_GL(); func_glVertexAttribs4hvNV( index, n, v ); @@ -11142,7 +12632,7 @@ static void WINAPI wine_glVertexAttribs4hvNV( GLuint index, GLsizei n, unsigned } static void WINAPI wine_glVertexAttribs4svNV( GLuint index, GLsizei count, GLshort* v ) { - void (*func_glVertexAttribs4svNV)( GLuint, GLsizei, GLshort* ) = extension_funcs[1374]; + void (*func_glVertexAttribs4svNV)( GLuint, GLsizei, GLshort* ) = extension_funcs[EXT_glVertexAttribs4svNV]; TRACE("(%d, %d, %p)\n", index, count, v ); ENTER_GL(); func_glVertexAttribs4svNV( index, count, v ); @@ -11150,7 +12640,7 @@ static void WINAPI wine_glVertexAttribs4svNV( GLuint index, GLsizei count, GLsho } static void WINAPI wine_glVertexAttribs4ubvNV( GLuint index, GLsizei count, GLubyte* v ) { - void (*func_glVertexAttribs4ubvNV)( GLuint, GLsizei, GLubyte* ) = extension_funcs[1375]; + void (*func_glVertexAttribs4ubvNV)( GLuint, GLsizei, GLubyte* ) = extension_funcs[EXT_glVertexAttribs4ubvNV]; TRACE("(%d, %d, %p)\n", index, count, v ); ENTER_GL(); func_glVertexAttribs4ubvNV( index, count, v ); @@ -11158,7 +12648,7 @@ static void WINAPI wine_glVertexAttribs4ubvNV( GLuint index, GLsizei count, GLub } static void WINAPI wine_glVertexBlendARB( GLint count ) { - void (*func_glVertexBlendARB)( GLint ) = extension_funcs[1376]; + void (*func_glVertexBlendARB)( GLint ) = extension_funcs[EXT_glVertexBlendARB]; TRACE("(%d)\n", count ); ENTER_GL(); func_glVertexBlendARB( count ); @@ -11166,7 +12656,7 @@ static void WINAPI wine_glVertexBlendARB( GLint count ) { } static void WINAPI wine_glVertexBlendEnvfATI( GLenum pname, GLfloat param ) { - void (*func_glVertexBlendEnvfATI)( GLenum, GLfloat ) = extension_funcs[1377]; + void (*func_glVertexBlendEnvfATI)( GLenum, GLfloat ) = extension_funcs[EXT_glVertexBlendEnvfATI]; TRACE("(%d, %f)\n", pname, param ); ENTER_GL(); func_glVertexBlendEnvfATI( pname, param ); @@ -11174,7 +12664,7 @@ static void WINAPI wine_glVertexBlendEnvfATI( GLenum pname, GLfloat param ) { } static void WINAPI wine_glVertexBlendEnviATI( GLenum pname, GLint param ) { - void (*func_glVertexBlendEnviATI)( GLenum, GLint ) = extension_funcs[1378]; + void (*func_glVertexBlendEnviATI)( GLenum, GLint ) = extension_funcs[EXT_glVertexBlendEnviATI]; TRACE("(%d, %d)\n", pname, param ); ENTER_GL(); func_glVertexBlendEnviATI( pname, param ); @@ -11182,7 +12672,7 @@ static void WINAPI wine_glVertexBlendEnviATI( GLenum pname, GLint param ) { } static void WINAPI wine_glVertexPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer ) { - void (*func_glVertexPointerEXT)( GLint, GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[1379]; + void (*func_glVertexPointerEXT)( GLint, GLenum, GLsizei, GLsizei, GLvoid* ) = extension_funcs[EXT_glVertexPointerEXT]; TRACE("(%d, %d, %d, %d, %p)\n", size, type, stride, count, pointer ); ENTER_GL(); func_glVertexPointerEXT( size, type, stride, count, pointer ); @@ -11190,7 +12680,7 @@ static void WINAPI wine_glVertexPointerEXT( GLint size, GLenum type, GLsizei str } static void WINAPI wine_glVertexPointerListIBM( GLint size, GLenum type, GLint stride, GLvoid** pointer, GLint ptrstride ) { - void (*func_glVertexPointerListIBM)( GLint, GLenum, GLint, GLvoid**, GLint ) = extension_funcs[1380]; + void (*func_glVertexPointerListIBM)( GLint, GLenum, GLint, GLvoid**, GLint ) = extension_funcs[EXT_glVertexPointerListIBM]; TRACE("(%d, %d, %d, %p, %d)\n", size, type, stride, pointer, ptrstride ); ENTER_GL(); func_glVertexPointerListIBM( size, type, stride, pointer, ptrstride ); @@ -11198,7 +12688,7 @@ static void WINAPI wine_glVertexPointerListIBM( GLint size, GLenum type, GLint s } static void WINAPI wine_glVertexPointervINTEL( GLint size, GLenum type, GLvoid** pointer ) { - void (*func_glVertexPointervINTEL)( GLint, GLenum, GLvoid** ) = extension_funcs[1381]; + void (*func_glVertexPointervINTEL)( GLint, GLenum, GLvoid** ) = extension_funcs[EXT_glVertexPointervINTEL]; TRACE("(%d, %d, %p)\n", size, type, pointer ); ENTER_GL(); func_glVertexPointervINTEL( size, type, pointer ); @@ -11206,7 +12696,7 @@ static void WINAPI wine_glVertexPointervINTEL( GLint size, GLenum type, GLvoid** } static void WINAPI wine_glVertexStream1dATI( GLenum stream, GLdouble x ) { - void (*func_glVertexStream1dATI)( GLenum, GLdouble ) = extension_funcs[1382]; + void (*func_glVertexStream1dATI)( GLenum, GLdouble ) = extension_funcs[EXT_glVertexStream1dATI]; TRACE("(%d, %f)\n", stream, x ); ENTER_GL(); func_glVertexStream1dATI( stream, x ); @@ -11214,7 +12704,7 @@ static void WINAPI wine_glVertexStream1dATI( GLenum stream, GLdouble x ) { } static void WINAPI wine_glVertexStream1dvATI( GLenum stream, GLdouble* coords ) { - void (*func_glVertexStream1dvATI)( GLenum, GLdouble* ) = extension_funcs[1383]; + void (*func_glVertexStream1dvATI)( GLenum, GLdouble* ) = extension_funcs[EXT_glVertexStream1dvATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream1dvATI( stream, coords ); @@ -11222,7 +12712,7 @@ static void WINAPI wine_glVertexStream1dvATI( GLenum stream, GLdouble* coords ) } static void WINAPI wine_glVertexStream1fATI( GLenum stream, GLfloat x ) { - void (*func_glVertexStream1fATI)( GLenum, GLfloat ) = extension_funcs[1384]; + void (*func_glVertexStream1fATI)( GLenum, GLfloat ) = extension_funcs[EXT_glVertexStream1fATI]; TRACE("(%d, %f)\n", stream, x ); ENTER_GL(); func_glVertexStream1fATI( stream, x ); @@ -11230,7 +12720,7 @@ static void WINAPI wine_glVertexStream1fATI( GLenum stream, GLfloat x ) { } static void WINAPI wine_glVertexStream1fvATI( GLenum stream, GLfloat* coords ) { - void (*func_glVertexStream1fvATI)( GLenum, GLfloat* ) = extension_funcs[1385]; + void (*func_glVertexStream1fvATI)( GLenum, GLfloat* ) = extension_funcs[EXT_glVertexStream1fvATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream1fvATI( stream, coords ); @@ -11238,7 +12728,7 @@ static void WINAPI wine_glVertexStream1fvATI( GLenum stream, GLfloat* coords ) { } static void WINAPI wine_glVertexStream1iATI( GLenum stream, GLint x ) { - void (*func_glVertexStream1iATI)( GLenum, GLint ) = extension_funcs[1386]; + void (*func_glVertexStream1iATI)( GLenum, GLint ) = extension_funcs[EXT_glVertexStream1iATI]; TRACE("(%d, %d)\n", stream, x ); ENTER_GL(); func_glVertexStream1iATI( stream, x ); @@ -11246,7 +12736,7 @@ static void WINAPI wine_glVertexStream1iATI( GLenum stream, GLint x ) { } static void WINAPI wine_glVertexStream1ivATI( GLenum stream, GLint* coords ) { - void (*func_glVertexStream1ivATI)( GLenum, GLint* ) = extension_funcs[1387]; + void (*func_glVertexStream1ivATI)( GLenum, GLint* ) = extension_funcs[EXT_glVertexStream1ivATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream1ivATI( stream, coords ); @@ -11254,7 +12744,7 @@ static void WINAPI wine_glVertexStream1ivATI( GLenum stream, GLint* coords ) { } static void WINAPI wine_glVertexStream1sATI( GLenum stream, GLshort x ) { - void (*func_glVertexStream1sATI)( GLenum, GLshort ) = extension_funcs[1388]; + void (*func_glVertexStream1sATI)( GLenum, GLshort ) = extension_funcs[EXT_glVertexStream1sATI]; TRACE("(%d, %d)\n", stream, x ); ENTER_GL(); func_glVertexStream1sATI( stream, x ); @@ -11262,7 +12752,7 @@ static void WINAPI wine_glVertexStream1sATI( GLenum stream, GLshort x ) { } static void WINAPI wine_glVertexStream1svATI( GLenum stream, GLshort* coords ) { - void (*func_glVertexStream1svATI)( GLenum, GLshort* ) = extension_funcs[1389]; + void (*func_glVertexStream1svATI)( GLenum, GLshort* ) = extension_funcs[EXT_glVertexStream1svATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream1svATI( stream, coords ); @@ -11270,7 +12760,7 @@ static void WINAPI wine_glVertexStream1svATI( GLenum stream, GLshort* coords ) { } static void WINAPI wine_glVertexStream2dATI( GLenum stream, GLdouble x, GLdouble y ) { - void (*func_glVertexStream2dATI)( GLenum, GLdouble, GLdouble ) = extension_funcs[1390]; + void (*func_glVertexStream2dATI)( GLenum, GLdouble, GLdouble ) = extension_funcs[EXT_glVertexStream2dATI]; TRACE("(%d, %f, %f)\n", stream, x, y ); ENTER_GL(); func_glVertexStream2dATI( stream, x, y ); @@ -11278,7 +12768,7 @@ static void WINAPI wine_glVertexStream2dATI( GLenum stream, GLdouble x, GLdouble } static void WINAPI wine_glVertexStream2dvATI( GLenum stream, GLdouble* coords ) { - void (*func_glVertexStream2dvATI)( GLenum, GLdouble* ) = extension_funcs[1391]; + void (*func_glVertexStream2dvATI)( GLenum, GLdouble* ) = extension_funcs[EXT_glVertexStream2dvATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream2dvATI( stream, coords ); @@ -11286,7 +12776,7 @@ static void WINAPI wine_glVertexStream2dvATI( GLenum stream, GLdouble* coords ) } static void WINAPI wine_glVertexStream2fATI( GLenum stream, GLfloat x, GLfloat y ) { - void (*func_glVertexStream2fATI)( GLenum, GLfloat, GLfloat ) = extension_funcs[1392]; + void (*func_glVertexStream2fATI)( GLenum, GLfloat, GLfloat ) = extension_funcs[EXT_glVertexStream2fATI]; TRACE("(%d, %f, %f)\n", stream, x, y ); ENTER_GL(); func_glVertexStream2fATI( stream, x, y ); @@ -11294,7 +12784,7 @@ static void WINAPI wine_glVertexStream2fATI( GLenum stream, GLfloat x, GLfloat y } static void WINAPI wine_glVertexStream2fvATI( GLenum stream, GLfloat* coords ) { - void (*func_glVertexStream2fvATI)( GLenum, GLfloat* ) = extension_funcs[1393]; + void (*func_glVertexStream2fvATI)( GLenum, GLfloat* ) = extension_funcs[EXT_glVertexStream2fvATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream2fvATI( stream, coords ); @@ -11302,7 +12792,7 @@ static void WINAPI wine_glVertexStream2fvATI( GLenum stream, GLfloat* coords ) { } static void WINAPI wine_glVertexStream2iATI( GLenum stream, GLint x, GLint y ) { - void (*func_glVertexStream2iATI)( GLenum, GLint, GLint ) = extension_funcs[1394]; + void (*func_glVertexStream2iATI)( GLenum, GLint, GLint ) = extension_funcs[EXT_glVertexStream2iATI]; TRACE("(%d, %d, %d)\n", stream, x, y ); ENTER_GL(); func_glVertexStream2iATI( stream, x, y ); @@ -11310,7 +12800,7 @@ static void WINAPI wine_glVertexStream2iATI( GLenum stream, GLint x, GLint y ) { } static void WINAPI wine_glVertexStream2ivATI( GLenum stream, GLint* coords ) { - void (*func_glVertexStream2ivATI)( GLenum, GLint* ) = extension_funcs[1395]; + void (*func_glVertexStream2ivATI)( GLenum, GLint* ) = extension_funcs[EXT_glVertexStream2ivATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream2ivATI( stream, coords ); @@ -11318,7 +12808,7 @@ static void WINAPI wine_glVertexStream2ivATI( GLenum stream, GLint* coords ) { } static void WINAPI wine_glVertexStream2sATI( GLenum stream, GLshort x, GLshort y ) { - void (*func_glVertexStream2sATI)( GLenum, GLshort, GLshort ) = extension_funcs[1396]; + void (*func_glVertexStream2sATI)( GLenum, GLshort, GLshort ) = extension_funcs[EXT_glVertexStream2sATI]; TRACE("(%d, %d, %d)\n", stream, x, y ); ENTER_GL(); func_glVertexStream2sATI( stream, x, y ); @@ -11326,7 +12816,7 @@ static void WINAPI wine_glVertexStream2sATI( GLenum stream, GLshort x, GLshort y } static void WINAPI wine_glVertexStream2svATI( GLenum stream, GLshort* coords ) { - void (*func_glVertexStream2svATI)( GLenum, GLshort* ) = extension_funcs[1397]; + void (*func_glVertexStream2svATI)( GLenum, GLshort* ) = extension_funcs[EXT_glVertexStream2svATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream2svATI( stream, coords ); @@ -11334,7 +12824,7 @@ static void WINAPI wine_glVertexStream2svATI( GLenum stream, GLshort* coords ) { } static void WINAPI wine_glVertexStream3dATI( GLenum stream, GLdouble x, GLdouble y, GLdouble z ) { - void (*func_glVertexStream3dATI)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[1398]; + void (*func_glVertexStream3dATI)( GLenum, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glVertexStream3dATI]; TRACE("(%d, %f, %f, %f)\n", stream, x, y, z ); ENTER_GL(); func_glVertexStream3dATI( stream, x, y, z ); @@ -11342,7 +12832,7 @@ static void WINAPI wine_glVertexStream3dATI( GLenum stream, GLdouble x, GLdouble } static void WINAPI wine_glVertexStream3dvATI( GLenum stream, GLdouble* coords ) { - void (*func_glVertexStream3dvATI)( GLenum, GLdouble* ) = extension_funcs[1399]; + void (*func_glVertexStream3dvATI)( GLenum, GLdouble* ) = extension_funcs[EXT_glVertexStream3dvATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream3dvATI( stream, coords ); @@ -11350,7 +12840,7 @@ static void WINAPI wine_glVertexStream3dvATI( GLenum stream, GLdouble* coords ) } static void WINAPI wine_glVertexStream3fATI( GLenum stream, GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glVertexStream3fATI)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[1400]; + void (*func_glVertexStream3fATI)( GLenum, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glVertexStream3fATI]; TRACE("(%d, %f, %f, %f)\n", stream, x, y, z ); ENTER_GL(); func_glVertexStream3fATI( stream, x, y, z ); @@ -11358,7 +12848,7 @@ static void WINAPI wine_glVertexStream3fATI( GLenum stream, GLfloat x, GLfloat y } static void WINAPI wine_glVertexStream3fvATI( GLenum stream, GLfloat* coords ) { - void (*func_glVertexStream3fvATI)( GLenum, GLfloat* ) = extension_funcs[1401]; + void (*func_glVertexStream3fvATI)( GLenum, GLfloat* ) = extension_funcs[EXT_glVertexStream3fvATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream3fvATI( stream, coords ); @@ -11366,7 +12856,7 @@ static void WINAPI wine_glVertexStream3fvATI( GLenum stream, GLfloat* coords ) { } static void WINAPI wine_glVertexStream3iATI( GLenum stream, GLint x, GLint y, GLint z ) { - void (*func_glVertexStream3iATI)( GLenum, GLint, GLint, GLint ) = extension_funcs[1402]; + void (*func_glVertexStream3iATI)( GLenum, GLint, GLint, GLint ) = extension_funcs[EXT_glVertexStream3iATI]; TRACE("(%d, %d, %d, %d)\n", stream, x, y, z ); ENTER_GL(); func_glVertexStream3iATI( stream, x, y, z ); @@ -11374,7 +12864,7 @@ static void WINAPI wine_glVertexStream3iATI( GLenum stream, GLint x, GLint y, GL } static void WINAPI wine_glVertexStream3ivATI( GLenum stream, GLint* coords ) { - void (*func_glVertexStream3ivATI)( GLenum, GLint* ) = extension_funcs[1403]; + void (*func_glVertexStream3ivATI)( GLenum, GLint* ) = extension_funcs[EXT_glVertexStream3ivATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream3ivATI( stream, coords ); @@ -11382,7 +12872,7 @@ static void WINAPI wine_glVertexStream3ivATI( GLenum stream, GLint* coords ) { } static void WINAPI wine_glVertexStream3sATI( GLenum stream, GLshort x, GLshort y, GLshort z ) { - void (*func_glVertexStream3sATI)( GLenum, GLshort, GLshort, GLshort ) = extension_funcs[1404]; + void (*func_glVertexStream3sATI)( GLenum, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glVertexStream3sATI]; TRACE("(%d, %d, %d, %d)\n", stream, x, y, z ); ENTER_GL(); func_glVertexStream3sATI( stream, x, y, z ); @@ -11390,7 +12880,7 @@ static void WINAPI wine_glVertexStream3sATI( GLenum stream, GLshort x, GLshort y } static void WINAPI wine_glVertexStream3svATI( GLenum stream, GLshort* coords ) { - void (*func_glVertexStream3svATI)( GLenum, GLshort* ) = extension_funcs[1405]; + void (*func_glVertexStream3svATI)( GLenum, GLshort* ) = extension_funcs[EXT_glVertexStream3svATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream3svATI( stream, coords ); @@ -11398,7 +12888,7 @@ static void WINAPI wine_glVertexStream3svATI( GLenum stream, GLshort* coords ) { } static void WINAPI wine_glVertexStream4dATI( GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { - void (*func_glVertexStream4dATI)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[1406]; + void (*func_glVertexStream4dATI)( GLenum, GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glVertexStream4dATI]; TRACE("(%d, %f, %f, %f, %f)\n", stream, x, y, z, w ); ENTER_GL(); func_glVertexStream4dATI( stream, x, y, z, w ); @@ -11406,7 +12896,7 @@ static void WINAPI wine_glVertexStream4dATI( GLenum stream, GLdouble x, GLdouble } static void WINAPI wine_glVertexStream4dvATI( GLenum stream, GLdouble* coords ) { - void (*func_glVertexStream4dvATI)( GLenum, GLdouble* ) = extension_funcs[1407]; + void (*func_glVertexStream4dvATI)( GLenum, GLdouble* ) = extension_funcs[EXT_glVertexStream4dvATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream4dvATI( stream, coords ); @@ -11414,7 +12904,7 @@ static void WINAPI wine_glVertexStream4dvATI( GLenum stream, GLdouble* coords ) } static void WINAPI wine_glVertexStream4fATI( GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - void (*func_glVertexStream4fATI)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[1408]; + void (*func_glVertexStream4fATI)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glVertexStream4fATI]; TRACE("(%d, %f, %f, %f, %f)\n", stream, x, y, z, w ); ENTER_GL(); func_glVertexStream4fATI( stream, x, y, z, w ); @@ -11422,7 +12912,7 @@ static void WINAPI wine_glVertexStream4fATI( GLenum stream, GLfloat x, GLfloat y } static void WINAPI wine_glVertexStream4fvATI( GLenum stream, GLfloat* coords ) { - void (*func_glVertexStream4fvATI)( GLenum, GLfloat* ) = extension_funcs[1409]; + void (*func_glVertexStream4fvATI)( GLenum, GLfloat* ) = extension_funcs[EXT_glVertexStream4fvATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream4fvATI( stream, coords ); @@ -11430,7 +12920,7 @@ static void WINAPI wine_glVertexStream4fvATI( GLenum stream, GLfloat* coords ) { } static void WINAPI wine_glVertexStream4iATI( GLenum stream, GLint x, GLint y, GLint z, GLint w ) { - void (*func_glVertexStream4iATI)( GLenum, GLint, GLint, GLint, GLint ) = extension_funcs[1410]; + void (*func_glVertexStream4iATI)( GLenum, GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glVertexStream4iATI]; TRACE("(%d, %d, %d, %d, %d)\n", stream, x, y, z, w ); ENTER_GL(); func_glVertexStream4iATI( stream, x, y, z, w ); @@ -11438,7 +12928,7 @@ static void WINAPI wine_glVertexStream4iATI( GLenum stream, GLint x, GLint y, GL } static void WINAPI wine_glVertexStream4ivATI( GLenum stream, GLint* coords ) { - void (*func_glVertexStream4ivATI)( GLenum, GLint* ) = extension_funcs[1411]; + void (*func_glVertexStream4ivATI)( GLenum, GLint* ) = extension_funcs[EXT_glVertexStream4ivATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream4ivATI( stream, coords ); @@ -11446,7 +12936,7 @@ static void WINAPI wine_glVertexStream4ivATI( GLenum stream, GLint* coords ) { } static void WINAPI wine_glVertexStream4sATI( GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w ) { - void (*func_glVertexStream4sATI)( GLenum, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[1412]; + void (*func_glVertexStream4sATI)( GLenum, GLshort, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glVertexStream4sATI]; TRACE("(%d, %d, %d, %d, %d)\n", stream, x, y, z, w ); ENTER_GL(); func_glVertexStream4sATI( stream, x, y, z, w ); @@ -11454,7 +12944,7 @@ static void WINAPI wine_glVertexStream4sATI( GLenum stream, GLshort x, GLshort y } static void WINAPI wine_glVertexStream4svATI( GLenum stream, GLshort* coords ) { - void (*func_glVertexStream4svATI)( GLenum, GLshort* ) = extension_funcs[1413]; + void (*func_glVertexStream4svATI)( GLenum, GLshort* ) = extension_funcs[EXT_glVertexStream4svATI]; TRACE("(%d, %p)\n", stream, coords ); ENTER_GL(); func_glVertexStream4svATI( stream, coords ); @@ -11462,7 +12952,7 @@ static void WINAPI wine_glVertexStream4svATI( GLenum stream, GLshort* coords ) { } static void WINAPI wine_glVertexWeightPointerEXT( GLsizei size, GLenum type, GLsizei stride, GLvoid* pointer ) { - void (*func_glVertexWeightPointerEXT)( GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[1414]; + void (*func_glVertexWeightPointerEXT)( GLsizei, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glVertexWeightPointerEXT]; TRACE("(%d, %d, %d, %p)\n", size, type, stride, pointer ); ENTER_GL(); func_glVertexWeightPointerEXT( size, type, stride, pointer ); @@ -11470,7 +12960,7 @@ static void WINAPI wine_glVertexWeightPointerEXT( GLsizei size, GLenum type, GLs } static void WINAPI wine_glVertexWeightfEXT( GLfloat weight ) { - void (*func_glVertexWeightfEXT)( GLfloat ) = extension_funcs[1415]; + void (*func_glVertexWeightfEXT)( GLfloat ) = extension_funcs[EXT_glVertexWeightfEXT]; TRACE("(%f)\n", weight ); ENTER_GL(); func_glVertexWeightfEXT( weight ); @@ -11478,7 +12968,7 @@ static void WINAPI wine_glVertexWeightfEXT( GLfloat weight ) { } static void WINAPI wine_glVertexWeightfvEXT( GLfloat* weight ) { - void (*func_glVertexWeightfvEXT)( GLfloat* ) = extension_funcs[1416]; + void (*func_glVertexWeightfvEXT)( GLfloat* ) = extension_funcs[EXT_glVertexWeightfvEXT]; TRACE("(%p)\n", weight ); ENTER_GL(); func_glVertexWeightfvEXT( weight ); @@ -11486,7 +12976,7 @@ static void WINAPI wine_glVertexWeightfvEXT( GLfloat* weight ) { } static void WINAPI wine_glVertexWeighthNV( unsigned short weight ) { - void (*func_glVertexWeighthNV)( unsigned short ) = extension_funcs[1417]; + void (*func_glVertexWeighthNV)( unsigned short ) = extension_funcs[EXT_glVertexWeighthNV]; TRACE("(%d)\n", weight ); ENTER_GL(); func_glVertexWeighthNV( weight ); @@ -11494,7 +12984,7 @@ static void WINAPI wine_glVertexWeighthNV( unsigned short weight ) { } static void WINAPI wine_glVertexWeighthvNV( unsigned short* weight ) { - void (*func_glVertexWeighthvNV)( unsigned short* ) = extension_funcs[1418]; + void (*func_glVertexWeighthvNV)( unsigned short* ) = extension_funcs[EXT_glVertexWeighthvNV]; TRACE("(%p)\n", weight ); ENTER_GL(); func_glVertexWeighthvNV( weight ); @@ -11502,7 +12992,7 @@ static void WINAPI wine_glVertexWeighthvNV( unsigned short* weight ) { } static void WINAPI wine_glWeightPointerARB( GLint size, GLenum type, GLsizei stride, GLvoid* pointer ) { - void (*func_glWeightPointerARB)( GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[1419]; + void (*func_glWeightPointerARB)( GLint, GLenum, GLsizei, GLvoid* ) = extension_funcs[EXT_glWeightPointerARB]; TRACE("(%d, %d, %d, %p)\n", size, type, stride, pointer ); ENTER_GL(); func_glWeightPointerARB( size, type, stride, pointer ); @@ -11510,7 +13000,7 @@ static void WINAPI wine_glWeightPointerARB( GLint size, GLenum type, GLsizei str } static void WINAPI wine_glWeightbvARB( GLint size, GLbyte* weights ) { - void (*func_glWeightbvARB)( GLint, GLbyte* ) = extension_funcs[1420]; + void (*func_glWeightbvARB)( GLint, GLbyte* ) = extension_funcs[EXT_glWeightbvARB]; TRACE("(%d, %p)\n", size, weights ); ENTER_GL(); func_glWeightbvARB( size, weights ); @@ -11518,7 +13008,7 @@ static void WINAPI wine_glWeightbvARB( GLint size, GLbyte* weights ) { } static void WINAPI wine_glWeightdvARB( GLint size, GLdouble* weights ) { - void (*func_glWeightdvARB)( GLint, GLdouble* ) = extension_funcs[1421]; + void (*func_glWeightdvARB)( GLint, GLdouble* ) = extension_funcs[EXT_glWeightdvARB]; TRACE("(%d, %p)\n", size, weights ); ENTER_GL(); func_glWeightdvARB( size, weights ); @@ -11526,7 +13016,7 @@ static void WINAPI wine_glWeightdvARB( GLint size, GLdouble* weights ) { } static void WINAPI wine_glWeightfvARB( GLint size, GLfloat* weights ) { - void (*func_glWeightfvARB)( GLint, GLfloat* ) = extension_funcs[1422]; + void (*func_glWeightfvARB)( GLint, GLfloat* ) = extension_funcs[EXT_glWeightfvARB]; TRACE("(%d, %p)\n", size, weights ); ENTER_GL(); func_glWeightfvARB( size, weights ); @@ -11534,7 +13024,7 @@ static void WINAPI wine_glWeightfvARB( GLint size, GLfloat* weights ) { } static void WINAPI wine_glWeightivARB( GLint size, GLint* weights ) { - void (*func_glWeightivARB)( GLint, GLint* ) = extension_funcs[1423]; + void (*func_glWeightivARB)( GLint, GLint* ) = extension_funcs[EXT_glWeightivARB]; TRACE("(%d, %p)\n", size, weights ); ENTER_GL(); func_glWeightivARB( size, weights ); @@ -11542,7 +13032,7 @@ static void WINAPI wine_glWeightivARB( GLint size, GLint* weights ) { } static void WINAPI wine_glWeightsvARB( GLint size, GLshort* weights ) { - void (*func_glWeightsvARB)( GLint, GLshort* ) = extension_funcs[1424]; + void (*func_glWeightsvARB)( GLint, GLshort* ) = extension_funcs[EXT_glWeightsvARB]; TRACE("(%d, %p)\n", size, weights ); ENTER_GL(); func_glWeightsvARB( size, weights ); @@ -11550,7 +13040,7 @@ static void WINAPI wine_glWeightsvARB( GLint size, GLshort* weights ) { } static void WINAPI wine_glWeightubvARB( GLint size, GLubyte* weights ) { - void (*func_glWeightubvARB)( GLint, GLubyte* ) = extension_funcs[1425]; + void (*func_glWeightubvARB)( GLint, GLubyte* ) = extension_funcs[EXT_glWeightubvARB]; TRACE("(%d, %p)\n", size, weights ); ENTER_GL(); func_glWeightubvARB( size, weights ); @@ -11558,7 +13048,7 @@ static void WINAPI wine_glWeightubvARB( GLint size, GLubyte* weights ) { } static void WINAPI wine_glWeightuivARB( GLint size, GLuint* weights ) { - void (*func_glWeightuivARB)( GLint, GLuint* ) = extension_funcs[1426]; + void (*func_glWeightuivARB)( GLint, GLuint* ) = extension_funcs[EXT_glWeightuivARB]; TRACE("(%d, %p)\n", size, weights ); ENTER_GL(); func_glWeightuivARB( size, weights ); @@ -11566,7 +13056,7 @@ static void WINAPI wine_glWeightuivARB( GLint size, GLuint* weights ) { } static void WINAPI wine_glWeightusvARB( GLint size, GLushort* weights ) { - void (*func_glWeightusvARB)( GLint, GLushort* ) = extension_funcs[1427]; + void (*func_glWeightusvARB)( GLint, GLushort* ) = extension_funcs[EXT_glWeightusvARB]; TRACE("(%d, %p)\n", size, weights ); ENTER_GL(); func_glWeightusvARB( size, weights ); @@ -11574,7 +13064,7 @@ static void WINAPI wine_glWeightusvARB( GLint size, GLushort* weights ) { } static void WINAPI wine_glWindowPos2d( GLdouble x, GLdouble y ) { - void (*func_glWindowPos2d)( GLdouble, GLdouble ) = extension_funcs[1428]; + void (*func_glWindowPos2d)( GLdouble, GLdouble ) = extension_funcs[EXT_glWindowPos2d]; TRACE("(%f, %f)\n", x, y ); ENTER_GL(); func_glWindowPos2d( x, y ); @@ -11582,7 +13072,7 @@ static void WINAPI wine_glWindowPos2d( GLdouble x, GLdouble y ) { } static void WINAPI wine_glWindowPos2dARB( GLdouble x, GLdouble y ) { - void (*func_glWindowPos2dARB)( GLdouble, GLdouble ) = extension_funcs[1429]; + void (*func_glWindowPos2dARB)( GLdouble, GLdouble ) = extension_funcs[EXT_glWindowPos2dARB]; TRACE("(%f, %f)\n", x, y ); ENTER_GL(); func_glWindowPos2dARB( x, y ); @@ -11590,7 +13080,7 @@ static void WINAPI wine_glWindowPos2dARB( GLdouble x, GLdouble y ) { } static void WINAPI wine_glWindowPos2dMESA( GLdouble x, GLdouble y ) { - void (*func_glWindowPos2dMESA)( GLdouble, GLdouble ) = extension_funcs[1430]; + void (*func_glWindowPos2dMESA)( GLdouble, GLdouble ) = extension_funcs[EXT_glWindowPos2dMESA]; TRACE("(%f, %f)\n", x, y ); ENTER_GL(); func_glWindowPos2dMESA( x, y ); @@ -11598,7 +13088,7 @@ static void WINAPI wine_glWindowPos2dMESA( GLdouble x, GLdouble y ) { } static void WINAPI wine_glWindowPos2dv( GLdouble* v ) { - void (*func_glWindowPos2dv)( GLdouble* ) = extension_funcs[1431]; + void (*func_glWindowPos2dv)( GLdouble* ) = extension_funcs[EXT_glWindowPos2dv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos2dv( v ); @@ -11606,7 +13096,7 @@ static void WINAPI wine_glWindowPos2dv( GLdouble* v ) { } static void WINAPI wine_glWindowPos2dvARB( GLdouble* v ) { - void (*func_glWindowPos2dvARB)( GLdouble* ) = extension_funcs[1432]; + void (*func_glWindowPos2dvARB)( GLdouble* ) = extension_funcs[EXT_glWindowPos2dvARB]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos2dvARB( v ); @@ -11614,7 +13104,7 @@ static void WINAPI wine_glWindowPos2dvARB( GLdouble* v ) { } static void WINAPI wine_glWindowPos2dvMESA( GLdouble* v ) { - void (*func_glWindowPos2dvMESA)( GLdouble* ) = extension_funcs[1433]; + void (*func_glWindowPos2dvMESA)( GLdouble* ) = extension_funcs[EXT_glWindowPos2dvMESA]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos2dvMESA( v ); @@ -11622,7 +13112,7 @@ static void WINAPI wine_glWindowPos2dvMESA( GLdouble* v ) { } static void WINAPI wine_glWindowPos2f( GLfloat x, GLfloat y ) { - void (*func_glWindowPos2f)( GLfloat, GLfloat ) = extension_funcs[1434]; + void (*func_glWindowPos2f)( GLfloat, GLfloat ) = extension_funcs[EXT_glWindowPos2f]; TRACE("(%f, %f)\n", x, y ); ENTER_GL(); func_glWindowPos2f( x, y ); @@ -11630,7 +13120,7 @@ static void WINAPI wine_glWindowPos2f( GLfloat x, GLfloat y ) { } static void WINAPI wine_glWindowPos2fARB( GLfloat x, GLfloat y ) { - void (*func_glWindowPos2fARB)( GLfloat, GLfloat ) = extension_funcs[1435]; + void (*func_glWindowPos2fARB)( GLfloat, GLfloat ) = extension_funcs[EXT_glWindowPos2fARB]; TRACE("(%f, %f)\n", x, y ); ENTER_GL(); func_glWindowPos2fARB( x, y ); @@ -11638,7 +13128,7 @@ static void WINAPI wine_glWindowPos2fARB( GLfloat x, GLfloat y ) { } static void WINAPI wine_glWindowPos2fMESA( GLfloat x, GLfloat y ) { - void (*func_glWindowPos2fMESA)( GLfloat, GLfloat ) = extension_funcs[1436]; + void (*func_glWindowPos2fMESA)( GLfloat, GLfloat ) = extension_funcs[EXT_glWindowPos2fMESA]; TRACE("(%f, %f)\n", x, y ); ENTER_GL(); func_glWindowPos2fMESA( x, y ); @@ -11646,7 +13136,7 @@ static void WINAPI wine_glWindowPos2fMESA( GLfloat x, GLfloat y ) { } static void WINAPI wine_glWindowPos2fv( GLfloat* v ) { - void (*func_glWindowPos2fv)( GLfloat* ) = extension_funcs[1437]; + void (*func_glWindowPos2fv)( GLfloat* ) = extension_funcs[EXT_glWindowPos2fv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos2fv( v ); @@ -11654,7 +13144,7 @@ static void WINAPI wine_glWindowPos2fv( GLfloat* v ) { } static void WINAPI wine_glWindowPos2fvARB( GLfloat* v ) { - void (*func_glWindowPos2fvARB)( GLfloat* ) = extension_funcs[1438]; + void (*func_glWindowPos2fvARB)( GLfloat* ) = extension_funcs[EXT_glWindowPos2fvARB]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos2fvARB( v ); @@ -11662,7 +13152,7 @@ static void WINAPI wine_glWindowPos2fvARB( GLfloat* v ) { } static void WINAPI wine_glWindowPos2fvMESA( GLfloat* v ) { - void (*func_glWindowPos2fvMESA)( GLfloat* ) = extension_funcs[1439]; + void (*func_glWindowPos2fvMESA)( GLfloat* ) = extension_funcs[EXT_glWindowPos2fvMESA]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos2fvMESA( v ); @@ -11670,7 +13160,7 @@ static void WINAPI wine_glWindowPos2fvMESA( GLfloat* v ) { } static void WINAPI wine_glWindowPos2i( GLint x, GLint y ) { - void (*func_glWindowPos2i)( GLint, GLint ) = extension_funcs[1440]; + void (*func_glWindowPos2i)( GLint, GLint ) = extension_funcs[EXT_glWindowPos2i]; TRACE("(%d, %d)\n", x, y ); ENTER_GL(); func_glWindowPos2i( x, y ); @@ -11678,7 +13168,7 @@ static void WINAPI wine_glWindowPos2i( GLint x, GLint y ) { } static void WINAPI wine_glWindowPos2iARB( GLint x, GLint y ) { - void (*func_glWindowPos2iARB)( GLint, GLint ) = extension_funcs[1441]; + void (*func_glWindowPos2iARB)( GLint, GLint ) = extension_funcs[EXT_glWindowPos2iARB]; TRACE("(%d, %d)\n", x, y ); ENTER_GL(); func_glWindowPos2iARB( x, y ); @@ -11686,7 +13176,7 @@ static void WINAPI wine_glWindowPos2iARB( GLint x, GLint y ) { } static void WINAPI wine_glWindowPos2iMESA( GLint x, GLint y ) { - void (*func_glWindowPos2iMESA)( GLint, GLint ) = extension_funcs[1442]; + void (*func_glWindowPos2iMESA)( GLint, GLint ) = extension_funcs[EXT_glWindowPos2iMESA]; TRACE("(%d, %d)\n", x, y ); ENTER_GL(); func_glWindowPos2iMESA( x, y ); @@ -11694,7 +13184,7 @@ static void WINAPI wine_glWindowPos2iMESA( GLint x, GLint y ) { } static void WINAPI wine_glWindowPos2iv( GLint* v ) { - void (*func_glWindowPos2iv)( GLint* ) = extension_funcs[1443]; + void (*func_glWindowPos2iv)( GLint* ) = extension_funcs[EXT_glWindowPos2iv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos2iv( v ); @@ -11702,7 +13192,7 @@ static void WINAPI wine_glWindowPos2iv( GLint* v ) { } static void WINAPI wine_glWindowPos2ivARB( GLint* v ) { - void (*func_glWindowPos2ivARB)( GLint* ) = extension_funcs[1444]; + void (*func_glWindowPos2ivARB)( GLint* ) = extension_funcs[EXT_glWindowPos2ivARB]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos2ivARB( v ); @@ -11710,7 +13200,7 @@ static void WINAPI wine_glWindowPos2ivARB( GLint* v ) { } static void WINAPI wine_glWindowPos2ivMESA( GLint* v ) { - void (*func_glWindowPos2ivMESA)( GLint* ) = extension_funcs[1445]; + void (*func_glWindowPos2ivMESA)( GLint* ) = extension_funcs[EXT_glWindowPos2ivMESA]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos2ivMESA( v ); @@ -11718,7 +13208,7 @@ static void WINAPI wine_glWindowPos2ivMESA( GLint* v ) { } static void WINAPI wine_glWindowPos2s( GLshort x, GLshort y ) { - void (*func_glWindowPos2s)( GLshort, GLshort ) = extension_funcs[1446]; + void (*func_glWindowPos2s)( GLshort, GLshort ) = extension_funcs[EXT_glWindowPos2s]; TRACE("(%d, %d)\n", x, y ); ENTER_GL(); func_glWindowPos2s( x, y ); @@ -11726,7 +13216,7 @@ static void WINAPI wine_glWindowPos2s( GLshort x, GLshort y ) { } static void WINAPI wine_glWindowPos2sARB( GLshort x, GLshort y ) { - void (*func_glWindowPos2sARB)( GLshort, GLshort ) = extension_funcs[1447]; + void (*func_glWindowPos2sARB)( GLshort, GLshort ) = extension_funcs[EXT_glWindowPos2sARB]; TRACE("(%d, %d)\n", x, y ); ENTER_GL(); func_glWindowPos2sARB( x, y ); @@ -11734,7 +13224,7 @@ static void WINAPI wine_glWindowPos2sARB( GLshort x, GLshort y ) { } static void WINAPI wine_glWindowPos2sMESA( GLshort x, GLshort y ) { - void (*func_glWindowPos2sMESA)( GLshort, GLshort ) = extension_funcs[1448]; + void (*func_glWindowPos2sMESA)( GLshort, GLshort ) = extension_funcs[EXT_glWindowPos2sMESA]; TRACE("(%d, %d)\n", x, y ); ENTER_GL(); func_glWindowPos2sMESA( x, y ); @@ -11742,7 +13232,7 @@ static void WINAPI wine_glWindowPos2sMESA( GLshort x, GLshort y ) { } static void WINAPI wine_glWindowPos2sv( GLshort* v ) { - void (*func_glWindowPos2sv)( GLshort* ) = extension_funcs[1449]; + void (*func_glWindowPos2sv)( GLshort* ) = extension_funcs[EXT_glWindowPos2sv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos2sv( v ); @@ -11750,7 +13240,7 @@ static void WINAPI wine_glWindowPos2sv( GLshort* v ) { } static void WINAPI wine_glWindowPos2svARB( GLshort* v ) { - void (*func_glWindowPos2svARB)( GLshort* ) = extension_funcs[1450]; + void (*func_glWindowPos2svARB)( GLshort* ) = extension_funcs[EXT_glWindowPos2svARB]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos2svARB( v ); @@ -11758,7 +13248,7 @@ static void WINAPI wine_glWindowPos2svARB( GLshort* v ) { } static void WINAPI wine_glWindowPos2svMESA( GLshort* v ) { - void (*func_glWindowPos2svMESA)( GLshort* ) = extension_funcs[1451]; + void (*func_glWindowPos2svMESA)( GLshort* ) = extension_funcs[EXT_glWindowPos2svMESA]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos2svMESA( v ); @@ -11766,7 +13256,7 @@ static void WINAPI wine_glWindowPos2svMESA( GLshort* v ) { } static void WINAPI wine_glWindowPos3d( GLdouble x, GLdouble y, GLdouble z ) { - void (*func_glWindowPos3d)( GLdouble, GLdouble, GLdouble ) = extension_funcs[1452]; + void (*func_glWindowPos3d)( GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glWindowPos3d]; TRACE("(%f, %f, %f)\n", x, y, z ); ENTER_GL(); func_glWindowPos3d( x, y, z ); @@ -11774,7 +13264,7 @@ static void WINAPI wine_glWindowPos3d( GLdouble x, GLdouble y, GLdouble z ) { } static void WINAPI wine_glWindowPos3dARB( GLdouble x, GLdouble y, GLdouble z ) { - void (*func_glWindowPos3dARB)( GLdouble, GLdouble, GLdouble ) = extension_funcs[1453]; + void (*func_glWindowPos3dARB)( GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glWindowPos3dARB]; TRACE("(%f, %f, %f)\n", x, y, z ); ENTER_GL(); func_glWindowPos3dARB( x, y, z ); @@ -11782,7 +13272,7 @@ static void WINAPI wine_glWindowPos3dARB( GLdouble x, GLdouble y, GLdouble z ) { } static void WINAPI wine_glWindowPos3dMESA( GLdouble x, GLdouble y, GLdouble z ) { - void (*func_glWindowPos3dMESA)( GLdouble, GLdouble, GLdouble ) = extension_funcs[1454]; + void (*func_glWindowPos3dMESA)( GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glWindowPos3dMESA]; TRACE("(%f, %f, %f)\n", x, y, z ); ENTER_GL(); func_glWindowPos3dMESA( x, y, z ); @@ -11790,7 +13280,7 @@ static void WINAPI wine_glWindowPos3dMESA( GLdouble x, GLdouble y, GLdouble z ) } static void WINAPI wine_glWindowPos3dv( GLdouble* v ) { - void (*func_glWindowPos3dv)( GLdouble* ) = extension_funcs[1455]; + void (*func_glWindowPos3dv)( GLdouble* ) = extension_funcs[EXT_glWindowPos3dv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos3dv( v ); @@ -11798,7 +13288,7 @@ static void WINAPI wine_glWindowPos3dv( GLdouble* v ) { } static void WINAPI wine_glWindowPos3dvARB( GLdouble* v ) { - void (*func_glWindowPos3dvARB)( GLdouble* ) = extension_funcs[1456]; + void (*func_glWindowPos3dvARB)( GLdouble* ) = extension_funcs[EXT_glWindowPos3dvARB]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos3dvARB( v ); @@ -11806,7 +13296,7 @@ static void WINAPI wine_glWindowPos3dvARB( GLdouble* v ) { } static void WINAPI wine_glWindowPos3dvMESA( GLdouble* v ) { - void (*func_glWindowPos3dvMESA)( GLdouble* ) = extension_funcs[1457]; + void (*func_glWindowPos3dvMESA)( GLdouble* ) = extension_funcs[EXT_glWindowPos3dvMESA]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos3dvMESA( v ); @@ -11814,7 +13304,7 @@ static void WINAPI wine_glWindowPos3dvMESA( GLdouble* v ) { } static void WINAPI wine_glWindowPos3f( GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glWindowPos3f)( GLfloat, GLfloat, GLfloat ) = extension_funcs[1458]; + void (*func_glWindowPos3f)( GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glWindowPos3f]; TRACE("(%f, %f, %f)\n", x, y, z ); ENTER_GL(); func_glWindowPos3f( x, y, z ); @@ -11822,7 +13312,7 @@ static void WINAPI wine_glWindowPos3f( GLfloat x, GLfloat y, GLfloat z ) { } static void WINAPI wine_glWindowPos3fARB( GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glWindowPos3fARB)( GLfloat, GLfloat, GLfloat ) = extension_funcs[1459]; + void (*func_glWindowPos3fARB)( GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glWindowPos3fARB]; TRACE("(%f, %f, %f)\n", x, y, z ); ENTER_GL(); func_glWindowPos3fARB( x, y, z ); @@ -11830,7 +13320,7 @@ static void WINAPI wine_glWindowPos3fARB( GLfloat x, GLfloat y, GLfloat z ) { } static void WINAPI wine_glWindowPos3fMESA( GLfloat x, GLfloat y, GLfloat z ) { - void (*func_glWindowPos3fMESA)( GLfloat, GLfloat, GLfloat ) = extension_funcs[1460]; + void (*func_glWindowPos3fMESA)( GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glWindowPos3fMESA]; TRACE("(%f, %f, %f)\n", x, y, z ); ENTER_GL(); func_glWindowPos3fMESA( x, y, z ); @@ -11838,7 +13328,7 @@ static void WINAPI wine_glWindowPos3fMESA( GLfloat x, GLfloat y, GLfloat z ) { } static void WINAPI wine_glWindowPos3fv( GLfloat* v ) { - void (*func_glWindowPos3fv)( GLfloat* ) = extension_funcs[1461]; + void (*func_glWindowPos3fv)( GLfloat* ) = extension_funcs[EXT_glWindowPos3fv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos3fv( v ); @@ -11846,7 +13336,7 @@ static void WINAPI wine_glWindowPos3fv( GLfloat* v ) { } static void WINAPI wine_glWindowPos3fvARB( GLfloat* v ) { - void (*func_glWindowPos3fvARB)( GLfloat* ) = extension_funcs[1462]; + void (*func_glWindowPos3fvARB)( GLfloat* ) = extension_funcs[EXT_glWindowPos3fvARB]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos3fvARB( v ); @@ -11854,7 +13344,7 @@ static void WINAPI wine_glWindowPos3fvARB( GLfloat* v ) { } static void WINAPI wine_glWindowPos3fvMESA( GLfloat* v ) { - void (*func_glWindowPos3fvMESA)( GLfloat* ) = extension_funcs[1463]; + void (*func_glWindowPos3fvMESA)( GLfloat* ) = extension_funcs[EXT_glWindowPos3fvMESA]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos3fvMESA( v ); @@ -11862,7 +13352,7 @@ static void WINAPI wine_glWindowPos3fvMESA( GLfloat* v ) { } static void WINAPI wine_glWindowPos3i( GLint x, GLint y, GLint z ) { - void (*func_glWindowPos3i)( GLint, GLint, GLint ) = extension_funcs[1464]; + void (*func_glWindowPos3i)( GLint, GLint, GLint ) = extension_funcs[EXT_glWindowPos3i]; TRACE("(%d, %d, %d)\n", x, y, z ); ENTER_GL(); func_glWindowPos3i( x, y, z ); @@ -11870,7 +13360,7 @@ static void WINAPI wine_glWindowPos3i( GLint x, GLint y, GLint z ) { } static void WINAPI wine_glWindowPos3iARB( GLint x, GLint y, GLint z ) { - void (*func_glWindowPos3iARB)( GLint, GLint, GLint ) = extension_funcs[1465]; + void (*func_glWindowPos3iARB)( GLint, GLint, GLint ) = extension_funcs[EXT_glWindowPos3iARB]; TRACE("(%d, %d, %d)\n", x, y, z ); ENTER_GL(); func_glWindowPos3iARB( x, y, z ); @@ -11878,7 +13368,7 @@ static void WINAPI wine_glWindowPos3iARB( GLint x, GLint y, GLint z ) { } static void WINAPI wine_glWindowPos3iMESA( GLint x, GLint y, GLint z ) { - void (*func_glWindowPos3iMESA)( GLint, GLint, GLint ) = extension_funcs[1466]; + void (*func_glWindowPos3iMESA)( GLint, GLint, GLint ) = extension_funcs[EXT_glWindowPos3iMESA]; TRACE("(%d, %d, %d)\n", x, y, z ); ENTER_GL(); func_glWindowPos3iMESA( x, y, z ); @@ -11886,7 +13376,7 @@ static void WINAPI wine_glWindowPos3iMESA( GLint x, GLint y, GLint z ) { } static void WINAPI wine_glWindowPos3iv( GLint* v ) { - void (*func_glWindowPos3iv)( GLint* ) = extension_funcs[1467]; + void (*func_glWindowPos3iv)( GLint* ) = extension_funcs[EXT_glWindowPos3iv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos3iv( v ); @@ -11894,7 +13384,7 @@ static void WINAPI wine_glWindowPos3iv( GLint* v ) { } static void WINAPI wine_glWindowPos3ivARB( GLint* v ) { - void (*func_glWindowPos3ivARB)( GLint* ) = extension_funcs[1468]; + void (*func_glWindowPos3ivARB)( GLint* ) = extension_funcs[EXT_glWindowPos3ivARB]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos3ivARB( v ); @@ -11902,7 +13392,7 @@ static void WINAPI wine_glWindowPos3ivARB( GLint* v ) { } static void WINAPI wine_glWindowPos3ivMESA( GLint* v ) { - void (*func_glWindowPos3ivMESA)( GLint* ) = extension_funcs[1469]; + void (*func_glWindowPos3ivMESA)( GLint* ) = extension_funcs[EXT_glWindowPos3ivMESA]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos3ivMESA( v ); @@ -11910,7 +13400,7 @@ static void WINAPI wine_glWindowPos3ivMESA( GLint* v ) { } static void WINAPI wine_glWindowPos3s( GLshort x, GLshort y, GLshort z ) { - void (*func_glWindowPos3s)( GLshort, GLshort, GLshort ) = extension_funcs[1470]; + void (*func_glWindowPos3s)( GLshort, GLshort, GLshort ) = extension_funcs[EXT_glWindowPos3s]; TRACE("(%d, %d, %d)\n", x, y, z ); ENTER_GL(); func_glWindowPos3s( x, y, z ); @@ -11918,7 +13408,7 @@ static void WINAPI wine_glWindowPos3s( GLshort x, GLshort y, GLshort z ) { } static void WINAPI wine_glWindowPos3sARB( GLshort x, GLshort y, GLshort z ) { - void (*func_glWindowPos3sARB)( GLshort, GLshort, GLshort ) = extension_funcs[1471]; + void (*func_glWindowPos3sARB)( GLshort, GLshort, GLshort ) = extension_funcs[EXT_glWindowPos3sARB]; TRACE("(%d, %d, %d)\n", x, y, z ); ENTER_GL(); func_glWindowPos3sARB( x, y, z ); @@ -11926,7 +13416,7 @@ static void WINAPI wine_glWindowPos3sARB( GLshort x, GLshort y, GLshort z ) { } static void WINAPI wine_glWindowPos3sMESA( GLshort x, GLshort y, GLshort z ) { - void (*func_glWindowPos3sMESA)( GLshort, GLshort, GLshort ) = extension_funcs[1472]; + void (*func_glWindowPos3sMESA)( GLshort, GLshort, GLshort ) = extension_funcs[EXT_glWindowPos3sMESA]; TRACE("(%d, %d, %d)\n", x, y, z ); ENTER_GL(); func_glWindowPos3sMESA( x, y, z ); @@ -11934,7 +13424,7 @@ static void WINAPI wine_glWindowPos3sMESA( GLshort x, GLshort y, GLshort z ) { } static void WINAPI wine_glWindowPos3sv( GLshort* v ) { - void (*func_glWindowPos3sv)( GLshort* ) = extension_funcs[1473]; + void (*func_glWindowPos3sv)( GLshort* ) = extension_funcs[EXT_glWindowPos3sv]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos3sv( v ); @@ -11942,7 +13432,7 @@ static void WINAPI wine_glWindowPos3sv( GLshort* v ) { } static void WINAPI wine_glWindowPos3svARB( GLshort* v ) { - void (*func_glWindowPos3svARB)( GLshort* ) = extension_funcs[1474]; + void (*func_glWindowPos3svARB)( GLshort* ) = extension_funcs[EXT_glWindowPos3svARB]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos3svARB( v ); @@ -11950,7 +13440,7 @@ static void WINAPI wine_glWindowPos3svARB( GLshort* v ) { } static void WINAPI wine_glWindowPos3svMESA( GLshort* v ) { - void (*func_glWindowPos3svMESA)( GLshort* ) = extension_funcs[1475]; + void (*func_glWindowPos3svMESA)( GLshort* ) = extension_funcs[EXT_glWindowPos3svMESA]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos3svMESA( v ); @@ -11958,7 +13448,7 @@ static void WINAPI wine_glWindowPos3svMESA( GLshort* v ) { } static void WINAPI wine_glWindowPos4dMESA( GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { - void (*func_glWindowPos4dMESA)( GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[1476]; + void (*func_glWindowPos4dMESA)( GLdouble, GLdouble, GLdouble, GLdouble ) = extension_funcs[EXT_glWindowPos4dMESA]; TRACE("(%f, %f, %f, %f)\n", x, y, z, w ); ENTER_GL(); func_glWindowPos4dMESA( x, y, z, w ); @@ -11966,7 +13456,7 @@ static void WINAPI wine_glWindowPos4dMESA( GLdouble x, GLdouble y, GLdouble z, G } static void WINAPI wine_glWindowPos4dvMESA( GLdouble* v ) { - void (*func_glWindowPos4dvMESA)( GLdouble* ) = extension_funcs[1477]; + void (*func_glWindowPos4dvMESA)( GLdouble* ) = extension_funcs[EXT_glWindowPos4dvMESA]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos4dvMESA( v ); @@ -11974,7 +13464,7 @@ static void WINAPI wine_glWindowPos4dvMESA( GLdouble* v ) { } static void WINAPI wine_glWindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - void (*func_glWindowPos4fMESA)( GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[1478]; + void (*func_glWindowPos4fMESA)( GLfloat, GLfloat, GLfloat, GLfloat ) = extension_funcs[EXT_glWindowPos4fMESA]; TRACE("(%f, %f, %f, %f)\n", x, y, z, w ); ENTER_GL(); func_glWindowPos4fMESA( x, y, z, w ); @@ -11982,7 +13472,7 @@ static void WINAPI wine_glWindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfl } static void WINAPI wine_glWindowPos4fvMESA( GLfloat* v ) { - void (*func_glWindowPos4fvMESA)( GLfloat* ) = extension_funcs[1479]; + void (*func_glWindowPos4fvMESA)( GLfloat* ) = extension_funcs[EXT_glWindowPos4fvMESA]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos4fvMESA( v ); @@ -11990,7 +13480,7 @@ static void WINAPI wine_glWindowPos4fvMESA( GLfloat* v ) { } static void WINAPI wine_glWindowPos4iMESA( GLint x, GLint y, GLint z, GLint w ) { - void (*func_glWindowPos4iMESA)( GLint, GLint, GLint, GLint ) = extension_funcs[1480]; + void (*func_glWindowPos4iMESA)( GLint, GLint, GLint, GLint ) = extension_funcs[EXT_glWindowPos4iMESA]; TRACE("(%d, %d, %d, %d)\n", x, y, z, w ); ENTER_GL(); func_glWindowPos4iMESA( x, y, z, w ); @@ -11998,7 +13488,7 @@ static void WINAPI wine_glWindowPos4iMESA( GLint x, GLint y, GLint z, GLint w ) } static void WINAPI wine_glWindowPos4ivMESA( GLint* v ) { - void (*func_glWindowPos4ivMESA)( GLint* ) = extension_funcs[1481]; + void (*func_glWindowPos4ivMESA)( GLint* ) = extension_funcs[EXT_glWindowPos4ivMESA]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos4ivMESA( v ); @@ -12006,7 +13496,7 @@ static void WINAPI wine_glWindowPos4ivMESA( GLint* v ) { } static void WINAPI wine_glWindowPos4sMESA( GLshort x, GLshort y, GLshort z, GLshort w ) { - void (*func_glWindowPos4sMESA)( GLshort, GLshort, GLshort, GLshort ) = extension_funcs[1482]; + void (*func_glWindowPos4sMESA)( GLshort, GLshort, GLshort, GLshort ) = extension_funcs[EXT_glWindowPos4sMESA]; TRACE("(%d, %d, %d, %d)\n", x, y, z, w ); ENTER_GL(); func_glWindowPos4sMESA( x, y, z, w ); @@ -12014,7 +13504,7 @@ static void WINAPI wine_glWindowPos4sMESA( GLshort x, GLshort y, GLshort z, GLsh } static void WINAPI wine_glWindowPos4svMESA( GLshort* v ) { - void (*func_glWindowPos4svMESA)( GLshort* ) = extension_funcs[1483]; + void (*func_glWindowPos4svMESA)( GLshort* ) = extension_funcs[EXT_glWindowPos4svMESA]; TRACE("(%p)\n", v ); ENTER_GL(); func_glWindowPos4svMESA( v ); @@ -12022,7 +13512,7 @@ static void WINAPI wine_glWindowPos4svMESA( GLshort* v ) { } static void WINAPI wine_glWriteMaskEXT( GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW ) { - void (*func_glWriteMaskEXT)( GLuint, GLuint, GLenum, GLenum, GLenum, GLenum ) = extension_funcs[1484]; + void (*func_glWriteMaskEXT)( GLuint, GLuint, GLenum, GLenum, GLenum, GLenum ) = extension_funcs[EXT_glWriteMaskEXT]; TRACE("(%d, %d, %d, %d, %d, %d)\n", res, in, outX, outY, outZ, outW ); ENTER_GL(); func_glWriteMaskEXT( res, in, outX, outY, outZ, outW ); @@ -12031,1490 +13521,1490 @@ static void WINAPI wine_glWriteMaskEXT( GLuint res, GLuint in, GLenum outX, GLen /* The table giving the correspondence between names and functions */ -const OpenGL_extension extension_registry[1485] = { - { "glActiveStencilFaceEXT", "GL_EXT_stencil_two_side", (void *) wine_glActiveStencilFaceEXT }, - { "glActiveTexture", "GL_VERSION_1_3", (void *) wine_glActiveTexture }, - { "glActiveTextureARB", "GL_ARB_multitexture", (void *) wine_glActiveTextureARB }, - { "glActiveVaryingNV", "GL_NV_transform_feedback", (void *) wine_glActiveVaryingNV }, - { "glAlphaFragmentOp1ATI", "GL_ATI_fragment_shader", (void *) wine_glAlphaFragmentOp1ATI }, - { "glAlphaFragmentOp2ATI", "GL_ATI_fragment_shader", (void *) wine_glAlphaFragmentOp2ATI }, - { "glAlphaFragmentOp3ATI", "GL_ATI_fragment_shader", (void *) wine_glAlphaFragmentOp3ATI }, - { "glApplyTextureEXT", "GL_EXT_light_texture", (void *) wine_glApplyTextureEXT }, - { "glAreProgramsResidentNV", "GL_NV_vertex_program", (void *) wine_glAreProgramsResidentNV }, - { "glAreTexturesResidentEXT", "GL_EXT_texture_object", (void *) wine_glAreTexturesResidentEXT }, - { "glArrayElementEXT", "GL_EXT_vertex_array", (void *) wine_glArrayElementEXT }, - { "glArrayObjectATI", "GL_ATI_vertex_array_object", (void *) wine_glArrayObjectATI }, - { "glAsyncMarkerSGIX", "GL_SGIX_async", (void *) wine_glAsyncMarkerSGIX }, - { "glAttachObjectARB", "GL_ARB_shader_objects", (void *) wine_glAttachObjectARB }, - { "glAttachShader", "GL_VERSION_2_0", (void *) wine_glAttachShader }, - { "glBeginConditionalRender", "GL_VERSION_3_0", (void *) wine_glBeginConditionalRender }, - { "glBeginConditionalRenderNV", "GL_NV_conditional_render", (void *) wine_glBeginConditionalRenderNV }, - { "glBeginFragmentShaderATI", "GL_ATI_fragment_shader", (void *) wine_glBeginFragmentShaderATI }, - { "glBeginOcclusionQueryNV", "GL_NV_occlusion_query", (void *) wine_glBeginOcclusionQueryNV }, - { "glBeginQuery", "GL_VERSION_1_5", (void *) wine_glBeginQuery }, - { "glBeginQueryARB", "GL_ARB_occlusion_query", (void *) wine_glBeginQueryARB }, - { "glBeginTransformFeedback", "GL_VERSION_3_0", (void *) wine_glBeginTransformFeedback }, - { "glBeginTransformFeedbackEXT", "GL_EXT_transform_feedback", (void *) wine_glBeginTransformFeedbackEXT }, - { "glBeginTransformFeedbackNV", "GL_NV_transform_feedback", (void *) wine_glBeginTransformFeedbackNV }, - { "glBeginVertexShaderEXT", "GL_EXT_vertex_shader", (void *) wine_glBeginVertexShaderEXT }, - { "glBindAttribLocation", "GL_VERSION_2_0", (void *) wine_glBindAttribLocation }, - { "glBindAttribLocationARB", "GL_ARB_vertex_shader", (void *) wine_glBindAttribLocationARB }, - { "glBindBuffer", "GL_VERSION_1_5", (void *) wine_glBindBuffer }, - { "glBindBufferARB", "GL_ARB_vertex_buffer_object", (void *) wine_glBindBufferARB }, - { "glBindBufferBase", "GL_VERSION_3_0", (void *) wine_glBindBufferBase }, - { "glBindBufferBaseEXT", "GL_EXT_transform_feedback", (void *) wine_glBindBufferBaseEXT }, - { "glBindBufferBaseNV", "GL_NV_transform_feedback", (void *) wine_glBindBufferBaseNV }, - { "glBindBufferOffsetEXT", "GL_EXT_transform_feedback", (void *) wine_glBindBufferOffsetEXT }, - { "glBindBufferOffsetNV", "GL_NV_transform_feedback", (void *) wine_glBindBufferOffsetNV }, - { "glBindBufferRange", "GL_VERSION_3_0", (void *) wine_glBindBufferRange }, - { "glBindBufferRangeEXT", "GL_EXT_transform_feedback", (void *) wine_glBindBufferRangeEXT }, - { "glBindBufferRangeNV", "GL_NV_transform_feedback", (void *) wine_glBindBufferRangeNV }, - { "glBindFragDataLocation", "GL_VERSION_3_0", (void *) wine_glBindFragDataLocation }, - { "glBindFragDataLocationEXT", "GL_EXT_gpu_shader4", (void *) wine_glBindFragDataLocationEXT }, - { "glBindFragmentShaderATI", "GL_ATI_fragment_shader", (void *) wine_glBindFragmentShaderATI }, - { "glBindFramebuffer", "GL_ARB_framebuffer_object", (void *) wine_glBindFramebuffer }, - { "glBindFramebufferEXT", "GL_EXT_framebuffer_object", (void *) wine_glBindFramebufferEXT }, - { "glBindLightParameterEXT", "GL_EXT_vertex_shader", (void *) wine_glBindLightParameterEXT }, - { "glBindMaterialParameterEXT", "GL_EXT_vertex_shader", (void *) wine_glBindMaterialParameterEXT }, - { "glBindMultiTextureEXT", "GL_EXT_direct_state_access", (void *) wine_glBindMultiTextureEXT }, - { "glBindParameterEXT", "GL_EXT_vertex_shader", (void *) wine_glBindParameterEXT }, - { "glBindProgramARB", "GL_ARB_vertex_program", (void *) wine_glBindProgramARB }, - { "glBindProgramNV", "GL_NV_vertex_program", (void *) wine_glBindProgramNV }, - { "glBindRenderbuffer", "GL_ARB_framebuffer_object", (void *) wine_glBindRenderbuffer }, - { "glBindRenderbufferEXT", "GL_EXT_framebuffer_object", (void *) wine_glBindRenderbufferEXT }, - { "glBindTexGenParameterEXT", "GL_EXT_vertex_shader", (void *) wine_glBindTexGenParameterEXT }, - { "glBindTextureEXT", "GL_EXT_texture_object", (void *) wine_glBindTextureEXT }, - { "glBindTextureUnitParameterEXT", "GL_EXT_vertex_shader", (void *) wine_glBindTextureUnitParameterEXT }, - { "glBindVertexArray", "GL_ARB_vertex_array_object", (void *) wine_glBindVertexArray }, - { "glBindVertexArrayAPPLE", "GL_APPLE_vertex_array_object", (void *) wine_glBindVertexArrayAPPLE }, - { "glBindVertexShaderEXT", "GL_EXT_vertex_shader", (void *) wine_glBindVertexShaderEXT }, - { "glBinormal3bEXT", "GL_EXT_coordinate_frame", (void *) wine_glBinormal3bEXT }, - { "glBinormal3bvEXT", "GL_EXT_coordinate_frame", (void *) wine_glBinormal3bvEXT }, - { "glBinormal3dEXT", "GL_EXT_coordinate_frame", (void *) wine_glBinormal3dEXT }, - { "glBinormal3dvEXT", "GL_EXT_coordinate_frame", (void *) wine_glBinormal3dvEXT }, - { "glBinormal3fEXT", "GL_EXT_coordinate_frame", (void *) wine_glBinormal3fEXT }, - { "glBinormal3fvEXT", "GL_EXT_coordinate_frame", (void *) wine_glBinormal3fvEXT }, - { "glBinormal3iEXT", "GL_EXT_coordinate_frame", (void *) wine_glBinormal3iEXT }, - { "glBinormal3ivEXT", "GL_EXT_coordinate_frame", (void *) wine_glBinormal3ivEXT }, - { "glBinormal3sEXT", "GL_EXT_coordinate_frame", (void *) wine_glBinormal3sEXT }, - { "glBinormal3svEXT", "GL_EXT_coordinate_frame", (void *) wine_glBinormal3svEXT }, - { "glBinormalPointerEXT", "GL_EXT_coordinate_frame", (void *) wine_glBinormalPointerEXT }, - { "glBlendColorEXT", "GL_EXT_blend_color", (void *) wine_glBlendColorEXT }, - { "glBlendEquationEXT", "GL_EXT_blend_minmax", (void *) wine_glBlendEquationEXT }, - { "glBlendEquationSeparate", "GL_VERSION_2_0", (void *) wine_glBlendEquationSeparate }, - { "glBlendEquationSeparateEXT", "GL_EXT_blend_equation_separate", (void *) wine_glBlendEquationSeparateEXT }, - { "glBlendFuncSeparate", "GL_VERSION_1_4", (void *) wine_glBlendFuncSeparate }, - { "glBlendFuncSeparateEXT", "GL_EXT_blend_func_separate", (void *) wine_glBlendFuncSeparateEXT }, - { "glBlendFuncSeparateINGR", "GL_INGR_blend_func_separate", (void *) wine_glBlendFuncSeparateINGR }, - { "glBlitFramebuffer", "GL_ARB_framebuffer_object", (void *) wine_glBlitFramebuffer }, - { "glBlitFramebufferEXT", "GL_EXT_framebuffer_blit", (void *) wine_glBlitFramebufferEXT }, - { "glBufferData", "GL_VERSION_1_5", (void *) wine_glBufferData }, - { "glBufferDataARB", "GL_ARB_vertex_buffer_object", (void *) wine_glBufferDataARB }, - { "glBufferParameteriAPPLE", "GL_APPLE_flush_buffer_range", (void *) wine_glBufferParameteriAPPLE }, - { "glBufferRegionEnabled", "GL_KTX_buffer_region", (void *) wine_glBufferRegionEnabled }, - { "glBufferSubData", "GL_VERSION_1_5", (void *) wine_glBufferSubData }, - { "glBufferSubDataARB", "GL_ARB_vertex_buffer_object", (void *) wine_glBufferSubDataARB }, - { "glCheckFramebufferStatus", "GL_ARB_framebuffer_object", (void *) wine_glCheckFramebufferStatus }, - { "glCheckFramebufferStatusEXT", "GL_EXT_framebuffer_object", (void *) wine_glCheckFramebufferStatusEXT }, - { "glCheckNamedFramebufferStatusEXT", "GL_EXT_direct_state_access", (void *) wine_glCheckNamedFramebufferStatusEXT }, - { "glClampColor", "GL_VERSION_3_0", (void *) wine_glClampColor }, - { "glClampColorARB", "GL_ARB_color_buffer_float", (void *) wine_glClampColorARB }, - { "glClearBufferfi", "GL_VERSION_3_0", (void *) wine_glClearBufferfi }, - { "glClearBufferfv", "GL_VERSION_3_0", (void *) wine_glClearBufferfv }, - { "glClearBufferiv", "GL_VERSION_3_0", (void *) wine_glClearBufferiv }, - { "glClearBufferuiv", "GL_VERSION_3_0", (void *) wine_glClearBufferuiv }, - { "glClearColorIiEXT", "GL_EXT_texture_integer", (void *) wine_glClearColorIiEXT }, - { "glClearColorIuiEXT", "GL_EXT_texture_integer", (void *) wine_glClearColorIuiEXT }, - { "glClearDepthdNV", "GL_NV_depth_buffer_float", (void *) wine_glClearDepthdNV }, - { "glClientActiveTexture", "GL_VERSION_1_3", (void *) wine_glClientActiveTexture }, - { "glClientActiveTextureARB", "GL_ARB_multitexture", (void *) wine_glClientActiveTextureARB }, - { "glClientActiveVertexStreamATI", "GL_ATI_vertex_streams", (void *) wine_glClientActiveVertexStreamATI }, - { "glClientAttribDefaultEXT", "GL_EXT_direct_state_access", (void *) wine_glClientAttribDefaultEXT }, - { "glColor3fVertex3fSUN", "GL_SUN_vertex", (void *) wine_glColor3fVertex3fSUN }, - { "glColor3fVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glColor3fVertex3fvSUN }, - { "glColor3hNV", "GL_NV_half_float", (void *) wine_glColor3hNV }, - { "glColor3hvNV", "GL_NV_half_float", (void *) wine_glColor3hvNV }, - { "glColor4fNormal3fVertex3fSUN", "GL_SUN_vertex", (void *) wine_glColor4fNormal3fVertex3fSUN }, - { "glColor4fNormal3fVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glColor4fNormal3fVertex3fvSUN }, - { "glColor4hNV", "GL_NV_half_float", (void *) wine_glColor4hNV }, - { "glColor4hvNV", "GL_NV_half_float", (void *) wine_glColor4hvNV }, - { "glColor4ubVertex2fSUN", "GL_SUN_vertex", (void *) wine_glColor4ubVertex2fSUN }, - { "glColor4ubVertex2fvSUN", "GL_SUN_vertex", (void *) wine_glColor4ubVertex2fvSUN }, - { "glColor4ubVertex3fSUN", "GL_SUN_vertex", (void *) wine_glColor4ubVertex3fSUN }, - { "glColor4ubVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glColor4ubVertex3fvSUN }, - { "glColorFragmentOp1ATI", "GL_ATI_fragment_shader", (void *) wine_glColorFragmentOp1ATI }, - { "glColorFragmentOp2ATI", "GL_ATI_fragment_shader", (void *) wine_glColorFragmentOp2ATI }, - { "glColorFragmentOp3ATI", "GL_ATI_fragment_shader", (void *) wine_glColorFragmentOp3ATI }, - { "glColorMaskIndexedEXT", "GL_EXT_draw_buffers2", (void *) wine_glColorMaskIndexedEXT }, - { "glColorMaski", "GL_VERSION_3_0", (void *) wine_glColorMaski }, - { "glColorPointerEXT", "GL_EXT_vertex_array", (void *) wine_glColorPointerEXT }, - { "glColorPointerListIBM", "GL_IBM_vertex_array_lists", (void *) wine_glColorPointerListIBM }, - { "glColorPointervINTEL", "GL_INTEL_parallel_arrays", (void *) wine_glColorPointervINTEL }, - { "glColorSubTableEXT", "GL_EXT_color_subtable", (void *) wine_glColorSubTableEXT }, - { "glColorTableEXT", "GL_EXT_paletted_texture", (void *) wine_glColorTableEXT }, - { "glColorTableParameterfvSGI", "GL_SGI_color_table", (void *) wine_glColorTableParameterfvSGI }, - { "glColorTableParameterivSGI", "GL_SGI_color_table", (void *) wine_glColorTableParameterivSGI }, - { "glColorTableSGI", "GL_SGI_color_table", (void *) wine_glColorTableSGI }, - { "glCombinerInputNV", "GL_NV_register_combiners", (void *) wine_glCombinerInputNV }, - { "glCombinerOutputNV", "GL_NV_register_combiners", (void *) wine_glCombinerOutputNV }, - { "glCombinerParameterfNV", "GL_NV_register_combiners", (void *) wine_glCombinerParameterfNV }, - { "glCombinerParameterfvNV", "GL_NV_register_combiners", (void *) wine_glCombinerParameterfvNV }, - { "glCombinerParameteriNV", "GL_NV_register_combiners", (void *) wine_glCombinerParameteriNV }, - { "glCombinerParameterivNV", "GL_NV_register_combiners", (void *) wine_glCombinerParameterivNV }, - { "glCombinerStageParameterfvNV", "GL_NV_register_combiners2", (void *) wine_glCombinerStageParameterfvNV }, - { "glCompileShader", "GL_VERSION_2_0", (void *) wine_glCompileShader }, - { "glCompileShaderARB", "GL_ARB_shader_objects", (void *) wine_glCompileShaderARB }, - { "glCompressedMultiTexImage1DEXT", "GL_EXT_direct_state_access", (void *) wine_glCompressedMultiTexImage1DEXT }, - { "glCompressedMultiTexImage2DEXT", "GL_EXT_direct_state_access", (void *) wine_glCompressedMultiTexImage2DEXT }, - { "glCompressedMultiTexImage3DEXT", "GL_EXT_direct_state_access", (void *) wine_glCompressedMultiTexImage3DEXT }, - { "glCompressedMultiTexSubImage1DEXT", "GL_EXT_direct_state_access", (void *) wine_glCompressedMultiTexSubImage1DEXT }, - { "glCompressedMultiTexSubImage2DEXT", "GL_EXT_direct_state_access", (void *) wine_glCompressedMultiTexSubImage2DEXT }, - { "glCompressedMultiTexSubImage3DEXT", "GL_EXT_direct_state_access", (void *) wine_glCompressedMultiTexSubImage3DEXT }, - { "glCompressedTexImage1D", "GL_VERSION_1_3", (void *) wine_glCompressedTexImage1D }, - { "glCompressedTexImage1DARB", "GL_ARB_texture_compression", (void *) wine_glCompressedTexImage1DARB }, - { "glCompressedTexImage2D", "GL_VERSION_1_3", (void *) wine_glCompressedTexImage2D }, - { "glCompressedTexImage2DARB", "GL_ARB_texture_compression", (void *) wine_glCompressedTexImage2DARB }, - { "glCompressedTexImage3D", "GL_VERSION_1_3", (void *) wine_glCompressedTexImage3D }, - { "glCompressedTexImage3DARB", "GL_ARB_texture_compression", (void *) wine_glCompressedTexImage3DARB }, - { "glCompressedTexSubImage1D", "GL_VERSION_1_3", (void *) wine_glCompressedTexSubImage1D }, - { "glCompressedTexSubImage1DARB", "GL_ARB_texture_compression", (void *) wine_glCompressedTexSubImage1DARB }, - { "glCompressedTexSubImage2D", "GL_VERSION_1_3", (void *) wine_glCompressedTexSubImage2D }, - { "glCompressedTexSubImage2DARB", "GL_ARB_texture_compression", (void *) wine_glCompressedTexSubImage2DARB }, - { "glCompressedTexSubImage3D", "GL_VERSION_1_3", (void *) wine_glCompressedTexSubImage3D }, - { "glCompressedTexSubImage3DARB", "GL_ARB_texture_compression", (void *) wine_glCompressedTexSubImage3DARB }, - { "glCompressedTextureImage1DEXT", "GL_EXT_direct_state_access", (void *) wine_glCompressedTextureImage1DEXT }, - { "glCompressedTextureImage2DEXT", "GL_EXT_direct_state_access", (void *) wine_glCompressedTextureImage2DEXT }, - { "glCompressedTextureImage3DEXT", "GL_EXT_direct_state_access", (void *) wine_glCompressedTextureImage3DEXT }, - { "glCompressedTextureSubImage1DEXT", "GL_EXT_direct_state_access", (void *) wine_glCompressedTextureSubImage1DEXT }, - { "glCompressedTextureSubImage2DEXT", "GL_EXT_direct_state_access", (void *) wine_glCompressedTextureSubImage2DEXT }, - { "glCompressedTextureSubImage3DEXT", "GL_EXT_direct_state_access", (void *) wine_glCompressedTextureSubImage3DEXT }, - { "glConvolutionFilter1DEXT", "GL_EXT_convolution", (void *) wine_glConvolutionFilter1DEXT }, - { "glConvolutionFilter2DEXT", "GL_EXT_convolution", (void *) wine_glConvolutionFilter2DEXT }, - { "glConvolutionParameterfEXT", "GL_EXT_convolution", (void *) wine_glConvolutionParameterfEXT }, - { "glConvolutionParameterfvEXT", "GL_EXT_convolution", (void *) wine_glConvolutionParameterfvEXT }, - { "glConvolutionParameteriEXT", "GL_EXT_convolution", (void *) wine_glConvolutionParameteriEXT }, - { "glConvolutionParameterivEXT", "GL_EXT_convolution", (void *) wine_glConvolutionParameterivEXT }, - { "glCopyColorSubTableEXT", "GL_EXT_color_subtable", (void *) wine_glCopyColorSubTableEXT }, - { "glCopyColorTableSGI", "GL_SGI_color_table", (void *) wine_glCopyColorTableSGI }, - { "glCopyConvolutionFilter1DEXT", "GL_EXT_convolution", (void *) wine_glCopyConvolutionFilter1DEXT }, - { "glCopyConvolutionFilter2DEXT", "GL_EXT_convolution", (void *) wine_glCopyConvolutionFilter2DEXT }, - { "glCopyMultiTexImage1DEXT", "GL_EXT_direct_state_access", (void *) wine_glCopyMultiTexImage1DEXT }, - { "glCopyMultiTexImage2DEXT", "GL_EXT_direct_state_access", (void *) wine_glCopyMultiTexImage2DEXT }, - { "glCopyMultiTexSubImage1DEXT", "GL_EXT_direct_state_access", (void *) wine_glCopyMultiTexSubImage1DEXT }, - { "glCopyMultiTexSubImage2DEXT", "GL_EXT_direct_state_access", (void *) wine_glCopyMultiTexSubImage2DEXT }, - { "glCopyMultiTexSubImage3DEXT", "GL_EXT_direct_state_access", (void *) wine_glCopyMultiTexSubImage3DEXT }, - { "glCopyTexImage1DEXT", "GL_EXT_copy_texture", (void *) wine_glCopyTexImage1DEXT }, - { "glCopyTexImage2DEXT", "GL_EXT_copy_texture", (void *) wine_glCopyTexImage2DEXT }, - { "glCopyTexSubImage1DEXT", "GL_EXT_copy_texture", (void *) wine_glCopyTexSubImage1DEXT }, - { "glCopyTexSubImage2DEXT", "GL_EXT_copy_texture", (void *) wine_glCopyTexSubImage2DEXT }, - { "glCopyTexSubImage3DEXT", "GL_EXT_copy_texture", (void *) wine_glCopyTexSubImage3DEXT }, - { "glCopyTextureImage1DEXT", "GL_EXT_direct_state_access", (void *) wine_glCopyTextureImage1DEXT }, - { "glCopyTextureImage2DEXT", "GL_EXT_direct_state_access", (void *) wine_glCopyTextureImage2DEXT }, - { "glCopyTextureSubImage1DEXT", "GL_EXT_direct_state_access", (void *) wine_glCopyTextureSubImage1DEXT }, - { "glCopyTextureSubImage2DEXT", "GL_EXT_direct_state_access", (void *) wine_glCopyTextureSubImage2DEXT }, - { "glCopyTextureSubImage3DEXT", "GL_EXT_direct_state_access", (void *) wine_glCopyTextureSubImage3DEXT }, - { "glCreateProgram", "GL_VERSION_2_0", (void *) wine_glCreateProgram }, - { "glCreateProgramObjectARB", "GL_ARB_shader_objects", (void *) wine_glCreateProgramObjectARB }, - { "glCreateShader", "GL_VERSION_2_0", (void *) wine_glCreateShader }, - { "glCreateShaderObjectARB", "GL_ARB_shader_objects", (void *) wine_glCreateShaderObjectARB }, - { "glCullParameterdvEXT", "GL_EXT_cull_vertex", (void *) wine_glCullParameterdvEXT }, - { "glCullParameterfvEXT", "GL_EXT_cull_vertex", (void *) wine_glCullParameterfvEXT }, - { "glCurrentPaletteMatrixARB", "GL_ARB_matrix_palette", (void *) wine_glCurrentPaletteMatrixARB }, - { "glDeformSGIX", "GL_SGIX_polynomial_ffd", (void *) wine_glDeformSGIX }, - { "glDeformationMap3dSGIX", "GL_SGIX_polynomial_ffd", (void *) wine_glDeformationMap3dSGIX }, - { "glDeformationMap3fSGIX", "GL_SGIX_polynomial_ffd", (void *) wine_glDeformationMap3fSGIX }, - { "glDeleteAsyncMarkersSGIX", "GL_SGIX_async", (void *) wine_glDeleteAsyncMarkersSGIX }, - { "glDeleteBufferRegion", "GL_KTX_buffer_region", (void *) wine_glDeleteBufferRegion }, - { "glDeleteBuffers", "GL_VERSION_1_5", (void *) wine_glDeleteBuffers }, - { "glDeleteBuffersARB", "GL_ARB_vertex_buffer_object", (void *) wine_glDeleteBuffersARB }, - { "glDeleteFencesAPPLE", "GL_APPLE_fence", (void *) wine_glDeleteFencesAPPLE }, - { "glDeleteFencesNV", "GL_NV_fence", (void *) wine_glDeleteFencesNV }, - { "glDeleteFragmentShaderATI", "GL_ATI_fragment_shader", (void *) wine_glDeleteFragmentShaderATI }, - { "glDeleteFramebuffers", "GL_ARB_framebuffer_object", (void *) wine_glDeleteFramebuffers }, - { "glDeleteFramebuffersEXT", "GL_EXT_framebuffer_object", (void *) wine_glDeleteFramebuffersEXT }, - { "glDeleteObjectARB", "GL_ARB_shader_objects", (void *) wine_glDeleteObjectARB }, - { "glDeleteObjectBufferATI", "GL_ATI_vertex_array_object", (void *) wine_glDeleteObjectBufferATI }, - { "glDeleteOcclusionQueriesNV", "GL_NV_occlusion_query", (void *) wine_glDeleteOcclusionQueriesNV }, - { "glDeleteProgram", "GL_VERSION_2_0", (void *) wine_glDeleteProgram }, - { "glDeleteProgramsARB", "GL_ARB_vertex_program", (void *) wine_glDeleteProgramsARB }, - { "glDeleteProgramsNV", "GL_NV_vertex_program", (void *) wine_glDeleteProgramsNV }, - { "glDeleteQueries", "GL_VERSION_1_5", (void *) wine_glDeleteQueries }, - { "glDeleteQueriesARB", "GL_ARB_occlusion_query", (void *) wine_glDeleteQueriesARB }, - { "glDeleteRenderbuffers", "GL_ARB_framebuffer_object", (void *) wine_glDeleteRenderbuffers }, - { "glDeleteRenderbuffersEXT", "GL_EXT_framebuffer_object", (void *) wine_glDeleteRenderbuffersEXT }, - { "glDeleteShader", "GL_VERSION_2_0", (void *) wine_glDeleteShader }, - { "glDeleteTexturesEXT", "GL_EXT_texture_object", (void *) wine_glDeleteTexturesEXT }, - { "glDeleteVertexArrays", "GL_ARB_vertex_array_object", (void *) wine_glDeleteVertexArrays }, - { "glDeleteVertexArraysAPPLE", "GL_APPLE_vertex_array_object", (void *) wine_glDeleteVertexArraysAPPLE }, - { "glDeleteVertexShaderEXT", "GL_EXT_vertex_shader", (void *) wine_glDeleteVertexShaderEXT }, - { "glDepthBoundsEXT", "GL_EXT_depth_bounds_test", (void *) wine_glDepthBoundsEXT }, - { "glDepthBoundsdNV", "GL_NV_depth_buffer_float", (void *) wine_glDepthBoundsdNV }, - { "glDepthRangedNV", "GL_NV_depth_buffer_float", (void *) wine_glDepthRangedNV }, - { "glDetachObjectARB", "GL_ARB_shader_objects", (void *) wine_glDetachObjectARB }, - { "glDetachShader", "GL_VERSION_2_0", (void *) wine_glDetachShader }, - { "glDetailTexFuncSGIS", "GL_SGIS_detail_texture", (void *) wine_glDetailTexFuncSGIS }, - { "glDisableClientStateIndexedEXT", "GL_EXT_direct_state_access", (void *) wine_glDisableClientStateIndexedEXT }, - { "glDisableIndexedEXT", "GL_EXT_draw_buffers2", (void *) wine_glDisableIndexedEXT }, - { "glDisableVariantClientStateEXT", "GL_EXT_vertex_shader", (void *) wine_glDisableVariantClientStateEXT }, - { "glDisableVertexAttribArray", "GL_VERSION_2_0", (void *) wine_glDisableVertexAttribArray }, - { "glDisableVertexAttribArrayARB", "GL_ARB_vertex_program", (void *) wine_glDisableVertexAttribArrayARB }, - { "glDisablei", "GL_VERSION_3_0", (void *) wine_glDisablei }, - { "glDrawArraysEXT", "GL_EXT_vertex_array", (void *) wine_glDrawArraysEXT }, - { "glDrawArraysInstancedARB", "GL_ARB_draw_instanced", (void *) wine_glDrawArraysInstancedARB }, - { "glDrawArraysInstancedEXT", "GL_EXT_draw_instanced", (void *) wine_glDrawArraysInstancedEXT }, - { "glDrawBufferRegion", "GL_KTX_buffer_region", (void *) wine_glDrawBufferRegion }, - { "glDrawBuffers", "GL_VERSION_2_0", (void *) wine_glDrawBuffers }, - { "glDrawBuffersARB", "GL_ARB_draw_buffers", (void *) wine_glDrawBuffersARB }, - { "glDrawBuffersATI", "GL_ATI_draw_buffers", (void *) wine_glDrawBuffersATI }, - { "glDrawElementArrayAPPLE", "GL_APPLE_element_array", (void *) wine_glDrawElementArrayAPPLE }, - { "glDrawElementArrayATI", "GL_ATI_element_array", (void *) wine_glDrawElementArrayATI }, - { "glDrawElementsInstancedARB", "GL_ARB_draw_instanced", (void *) wine_glDrawElementsInstancedARB }, - { "glDrawElementsInstancedEXT", "GL_EXT_draw_instanced", (void *) wine_glDrawElementsInstancedEXT }, - { "glDrawMeshArraysSUN", "GL_SUN_mesh_array", (void *) wine_glDrawMeshArraysSUN }, - { "glDrawRangeElementArrayAPPLE", "GL_APPLE_element_array", (void *) wine_glDrawRangeElementArrayAPPLE }, - { "glDrawRangeElementArrayATI", "GL_ATI_element_array", (void *) wine_glDrawRangeElementArrayATI }, - { "glDrawRangeElementsEXT", "GL_EXT_draw_range_elements", (void *) wine_glDrawRangeElementsEXT }, - { "glEdgeFlagPointerEXT", "GL_EXT_vertex_array", (void *) wine_glEdgeFlagPointerEXT }, - { "glEdgeFlagPointerListIBM", "GL_IBM_vertex_array_lists", (void *) wine_glEdgeFlagPointerListIBM }, - { "glElementPointerAPPLE", "GL_APPLE_element_array", (void *) wine_glElementPointerAPPLE }, - { "glElementPointerATI", "GL_ATI_element_array", (void *) wine_glElementPointerATI }, - { "glEnableClientStateIndexedEXT", "GL_EXT_direct_state_access", (void *) wine_glEnableClientStateIndexedEXT }, - { "glEnableIndexedEXT", "GL_EXT_draw_buffers2", (void *) wine_glEnableIndexedEXT }, - { "glEnableVariantClientStateEXT", "GL_EXT_vertex_shader", (void *) wine_glEnableVariantClientStateEXT }, - { "glEnableVertexAttribArray", "GL_VERSION_2_0", (void *) wine_glEnableVertexAttribArray }, - { "glEnableVertexAttribArrayARB", "GL_ARB_vertex_program", (void *) wine_glEnableVertexAttribArrayARB }, - { "glEnablei", "GL_VERSION_3_0", (void *) wine_glEnablei }, - { "glEndConditionalRender", "GL_VERSION_3_0", (void *) wine_glEndConditionalRender }, - { "glEndConditionalRenderNV", "GL_NV_conditional_render", (void *) wine_glEndConditionalRenderNV }, - { "glEndFragmentShaderATI", "GL_ATI_fragment_shader", (void *) wine_glEndFragmentShaderATI }, - { "glEndOcclusionQueryNV", "GL_NV_occlusion_query", (void *) wine_glEndOcclusionQueryNV }, - { "glEndQuery", "GL_VERSION_1_5", (void *) wine_glEndQuery }, - { "glEndQueryARB", "GL_ARB_occlusion_query", (void *) wine_glEndQueryARB }, - { "glEndTransformFeedback", "GL_VERSION_3_0", (void *) wine_glEndTransformFeedback }, - { "glEndTransformFeedbackEXT", "GL_EXT_transform_feedback", (void *) wine_glEndTransformFeedbackEXT }, - { "glEndTransformFeedbackNV", "GL_NV_transform_feedback", (void *) wine_glEndTransformFeedbackNV }, - { "glEndVertexShaderEXT", "GL_EXT_vertex_shader", (void *) wine_glEndVertexShaderEXT }, - { "glEvalMapsNV", "GL_NV_evaluators", (void *) wine_glEvalMapsNV }, - { "glExecuteProgramNV", "GL_NV_vertex_program", (void *) wine_glExecuteProgramNV }, - { "glExtractComponentEXT", "GL_EXT_vertex_shader", (void *) wine_glExtractComponentEXT }, - { "glFinalCombinerInputNV", "GL_NV_register_combiners", (void *) wine_glFinalCombinerInputNV }, - { "glFinishAsyncSGIX", "GL_SGIX_async", (void *) wine_glFinishAsyncSGIX }, - { "glFinishFenceAPPLE", "GL_APPLE_fence", (void *) wine_glFinishFenceAPPLE }, - { "glFinishFenceNV", "GL_NV_fence", (void *) wine_glFinishFenceNV }, - { "glFinishObjectAPPLE", "GL_APPLE_fence", (void *) wine_glFinishObjectAPPLE }, - { "glFinishTextureSUNX", "GL_SUNX_constant_data", (void *) wine_glFinishTextureSUNX }, - { "glFlushMappedBufferRange", "GL_ARB_map_buffer_range", (void *) wine_glFlushMappedBufferRange }, - { "glFlushMappedBufferRangeAPPLE", "GL_APPLE_flush_buffer_range", (void *) wine_glFlushMappedBufferRangeAPPLE }, - { "glFlushPixelDataRangeNV", "GL_NV_pixel_data_range", (void *) wine_glFlushPixelDataRangeNV }, - { "glFlushRasterSGIX", "GL_SGIX_flush_raster", (void *) wine_glFlushRasterSGIX }, - { "glFlushVertexArrayRangeAPPLE", "GL_APPLE_vertex_array_range", (void *) wine_glFlushVertexArrayRangeAPPLE }, - { "glFlushVertexArrayRangeNV", "GL_NV_vertex_array_range", (void *) wine_glFlushVertexArrayRangeNV }, - { "glFogCoordPointer", "GL_VERSION_1_4", (void *) wine_glFogCoordPointer }, - { "glFogCoordPointerEXT", "GL_EXT_fog_coord", (void *) wine_glFogCoordPointerEXT }, - { "glFogCoordPointerListIBM", "GL_IBM_vertex_array_lists", (void *) wine_glFogCoordPointerListIBM }, - { "glFogCoordd", "GL_VERSION_1_4", (void *) wine_glFogCoordd }, - { "glFogCoorddEXT", "GL_EXT_fog_coord", (void *) wine_glFogCoorddEXT }, - { "glFogCoorddv", "GL_VERSION_1_4", (void *) wine_glFogCoorddv }, - { "glFogCoorddvEXT", "GL_EXT_fog_coord", (void *) wine_glFogCoorddvEXT }, - { "glFogCoordf", "GL_VERSION_1_4", (void *) wine_glFogCoordf }, - { "glFogCoordfEXT", "GL_EXT_fog_coord", (void *) wine_glFogCoordfEXT }, - { "glFogCoordfv", "GL_VERSION_1_4", (void *) wine_glFogCoordfv }, - { "glFogCoordfvEXT", "GL_EXT_fog_coord", (void *) wine_glFogCoordfvEXT }, - { "glFogCoordhNV", "GL_NV_half_float", (void *) wine_glFogCoordhNV }, - { "glFogCoordhvNV", "GL_NV_half_float", (void *) wine_glFogCoordhvNV }, - { "glFogFuncSGIS", "GL_SGIS_fog_function", (void *) wine_glFogFuncSGIS }, - { "glFragmentColorMaterialSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glFragmentColorMaterialSGIX }, - { "glFragmentLightModelfSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glFragmentLightModelfSGIX }, - { "glFragmentLightModelfvSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glFragmentLightModelfvSGIX }, - { "glFragmentLightModeliSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glFragmentLightModeliSGIX }, - { "glFragmentLightModelivSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glFragmentLightModelivSGIX }, - { "glFragmentLightfSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glFragmentLightfSGIX }, - { "glFragmentLightfvSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glFragmentLightfvSGIX }, - { "glFragmentLightiSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glFragmentLightiSGIX }, - { "glFragmentLightivSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glFragmentLightivSGIX }, - { "glFragmentMaterialfSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glFragmentMaterialfSGIX }, - { "glFragmentMaterialfvSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glFragmentMaterialfvSGIX }, - { "glFragmentMaterialiSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glFragmentMaterialiSGIX }, - { "glFragmentMaterialivSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glFragmentMaterialivSGIX }, - { "glFrameTerminatorGREMEDY", "GL_GREMEDY_frame_terminator", (void *) wine_glFrameTerminatorGREMEDY }, - { "glFrameZoomSGIX", "GL_SGIX_framezoom", (void *) wine_glFrameZoomSGIX }, - { "glFramebufferDrawBufferEXT", "GL_EXT_direct_state_access", (void *) wine_glFramebufferDrawBufferEXT }, - { "glFramebufferDrawBuffersEXT", "GL_EXT_direct_state_access", (void *) wine_glFramebufferDrawBuffersEXT }, - { "glFramebufferReadBufferEXT", "GL_EXT_direct_state_access", (void *) wine_glFramebufferReadBufferEXT }, - { "glFramebufferRenderbuffer", "GL_ARB_framebuffer_object", (void *) wine_glFramebufferRenderbuffer }, - { "glFramebufferRenderbufferEXT", "GL_EXT_framebuffer_object", (void *) wine_glFramebufferRenderbufferEXT }, - { "glFramebufferTexture1D", "GL_ARB_framebuffer_object", (void *) wine_glFramebufferTexture1D }, - { "glFramebufferTexture1DEXT", "GL_EXT_framebuffer_object", (void *) wine_glFramebufferTexture1DEXT }, - { "glFramebufferTexture2D", "GL_ARB_framebuffer_object", (void *) wine_glFramebufferTexture2D }, - { "glFramebufferTexture2DEXT", "GL_EXT_framebuffer_object", (void *) wine_glFramebufferTexture2DEXT }, - { "glFramebufferTexture3D", "GL_ARB_framebuffer_object", (void *) wine_glFramebufferTexture3D }, - { "glFramebufferTexture3DEXT", "GL_EXT_framebuffer_object", (void *) wine_glFramebufferTexture3DEXT }, - { "glFramebufferTextureARB", "GL_ARB_geometry_shader4", (void *) wine_glFramebufferTextureARB }, - { "glFramebufferTextureEXT", "GL_NV_geometry_program4", (void *) wine_glFramebufferTextureEXT }, - { "glFramebufferTextureFaceARB", "GL_ARB_geometry_shader4", (void *) wine_glFramebufferTextureFaceARB }, - { "glFramebufferTextureFaceEXT", "GL_NV_geometry_program4", (void *) wine_glFramebufferTextureFaceEXT }, - { "glFramebufferTextureLayer", "GL_ARB_framebuffer_object", (void *) wine_glFramebufferTextureLayer }, - { "glFramebufferTextureLayerARB", "GL_ARB_geometry_shader4", (void *) wine_glFramebufferTextureLayerARB }, - { "glFramebufferTextureLayerEXT", "GL_NV_geometry_program4", (void *) wine_glFramebufferTextureLayerEXT }, - { "glFreeObjectBufferATI", "GL_ATI_vertex_array_object", (void *) wine_glFreeObjectBufferATI }, - { "glGenAsyncMarkersSGIX", "GL_SGIX_async", (void *) wine_glGenAsyncMarkersSGIX }, - { "glGenBuffers", "GL_VERSION_1_5", (void *) wine_glGenBuffers }, - { "glGenBuffersARB", "GL_ARB_vertex_buffer_object", (void *) wine_glGenBuffersARB }, - { "glGenFencesAPPLE", "GL_APPLE_fence", (void *) wine_glGenFencesAPPLE }, - { "glGenFencesNV", "GL_NV_fence", (void *) wine_glGenFencesNV }, - { "glGenFragmentShadersATI", "GL_ATI_fragment_shader", (void *) wine_glGenFragmentShadersATI }, - { "glGenFramebuffers", "GL_ARB_framebuffer_object", (void *) wine_glGenFramebuffers }, - { "glGenFramebuffersEXT", "GL_EXT_framebuffer_object", (void *) wine_glGenFramebuffersEXT }, - { "glGenOcclusionQueriesNV", "GL_NV_occlusion_query", (void *) wine_glGenOcclusionQueriesNV }, - { "glGenProgramsARB", "GL_ARB_vertex_program", (void *) wine_glGenProgramsARB }, - { "glGenProgramsNV", "GL_NV_vertex_program", (void *) wine_glGenProgramsNV }, - { "glGenQueries", "GL_VERSION_1_5", (void *) wine_glGenQueries }, - { "glGenQueriesARB", "GL_ARB_occlusion_query", (void *) wine_glGenQueriesARB }, - { "glGenRenderbuffers", "GL_ARB_framebuffer_object", (void *) wine_glGenRenderbuffers }, - { "glGenRenderbuffersEXT", "GL_EXT_framebuffer_object", (void *) wine_glGenRenderbuffersEXT }, - { "glGenSymbolsEXT", "GL_EXT_vertex_shader", (void *) wine_glGenSymbolsEXT }, - { "glGenTexturesEXT", "GL_EXT_texture_object", (void *) wine_glGenTexturesEXT }, - { "glGenVertexArrays", "GL_ARB_vertex_array_object", (void *) wine_glGenVertexArrays }, - { "glGenVertexArraysAPPLE", "GL_APPLE_vertex_array_object", (void *) wine_glGenVertexArraysAPPLE }, - { "glGenVertexShadersEXT", "GL_EXT_vertex_shader", (void *) wine_glGenVertexShadersEXT }, - { "glGenerateMipmap", "GL_ARB_framebuffer_object", (void *) wine_glGenerateMipmap }, - { "glGenerateMipmapEXT", "GL_EXT_framebuffer_object", (void *) wine_glGenerateMipmapEXT }, - { "glGenerateMultiTexMipmapEXT", "GL_EXT_direct_state_access", (void *) wine_glGenerateMultiTexMipmapEXT }, - { "glGenerateTextureMipmapEXT", "GL_EXT_direct_state_access", (void *) wine_glGenerateTextureMipmapEXT }, - { "glGetActiveAttrib", "GL_VERSION_2_0", (void *) wine_glGetActiveAttrib }, - { "glGetActiveAttribARB", "GL_ARB_vertex_shader", (void *) wine_glGetActiveAttribARB }, - { "glGetActiveUniform", "GL_VERSION_2_0", (void *) wine_glGetActiveUniform }, - { "glGetActiveUniformARB", "GL_ARB_shader_objects", (void *) wine_glGetActiveUniformARB }, - { "glGetActiveVaryingNV", "GL_NV_transform_feedback", (void *) wine_glGetActiveVaryingNV }, - { "glGetArrayObjectfvATI", "GL_ATI_vertex_array_object", (void *) wine_glGetArrayObjectfvATI }, - { "glGetArrayObjectivATI", "GL_ATI_vertex_array_object", (void *) wine_glGetArrayObjectivATI }, - { "glGetAttachedObjectsARB", "GL_ARB_shader_objects", (void *) wine_glGetAttachedObjectsARB }, - { "glGetAttachedShaders", "GL_VERSION_2_0", (void *) wine_glGetAttachedShaders }, - { "glGetAttribLocation", "GL_VERSION_2_0", (void *) wine_glGetAttribLocation }, - { "glGetAttribLocationARB", "GL_ARB_vertex_shader", (void *) wine_glGetAttribLocationARB }, - { "glGetBooleanIndexedvEXT", "GL_EXT_draw_buffers2", (void *) wine_glGetBooleanIndexedvEXT }, - { "glGetBooleani_v", "GL_VERSION_3_0", (void *) wine_glGetBooleani_v }, - { "glGetBufferParameteriv", "GL_VERSION_1_5", (void *) wine_glGetBufferParameteriv }, - { "glGetBufferParameterivARB", "GL_ARB_vertex_buffer_object", (void *) wine_glGetBufferParameterivARB }, - { "glGetBufferPointerv", "GL_VERSION_1_5", (void *) wine_glGetBufferPointerv }, - { "glGetBufferPointervARB", "GL_ARB_vertex_buffer_object", (void *) wine_glGetBufferPointervARB }, - { "glGetBufferSubData", "GL_VERSION_1_5", (void *) wine_glGetBufferSubData }, - { "glGetBufferSubDataARB", "GL_ARB_vertex_buffer_object", (void *) wine_glGetBufferSubDataARB }, - { "glGetColorTableEXT", "GL_EXT_paletted_texture", (void *) wine_glGetColorTableEXT }, - { "glGetColorTableParameterfvEXT", "GL_EXT_paletted_texture", (void *) wine_glGetColorTableParameterfvEXT }, - { "glGetColorTableParameterfvSGI", "GL_SGI_color_table", (void *) wine_glGetColorTableParameterfvSGI }, - { "glGetColorTableParameterivEXT", "GL_EXT_paletted_texture", (void *) wine_glGetColorTableParameterivEXT }, - { "glGetColorTableParameterivSGI", "GL_SGI_color_table", (void *) wine_glGetColorTableParameterivSGI }, - { "glGetColorTableSGI", "GL_SGI_color_table", (void *) wine_glGetColorTableSGI }, - { "glGetCombinerInputParameterfvNV", "GL_NV_register_combiners", (void *) wine_glGetCombinerInputParameterfvNV }, - { "glGetCombinerInputParameterivNV", "GL_NV_register_combiners", (void *) wine_glGetCombinerInputParameterivNV }, - { "glGetCombinerOutputParameterfvNV", "GL_NV_register_combiners", (void *) wine_glGetCombinerOutputParameterfvNV }, - { "glGetCombinerOutputParameterivNV", "GL_NV_register_combiners", (void *) wine_glGetCombinerOutputParameterivNV }, - { "glGetCombinerStageParameterfvNV", "GL_NV_register_combiners2", (void *) wine_glGetCombinerStageParameterfvNV }, - { "glGetCompressedMultiTexImageEXT", "GL_EXT_direct_state_access", (void *) wine_glGetCompressedMultiTexImageEXT }, - { "glGetCompressedTexImage", "GL_VERSION_1_3", (void *) wine_glGetCompressedTexImage }, - { "glGetCompressedTexImageARB", "GL_ARB_texture_compression", (void *) wine_glGetCompressedTexImageARB }, - { "glGetCompressedTextureImageEXT", "GL_EXT_direct_state_access", (void *) wine_glGetCompressedTextureImageEXT }, - { "glGetConvolutionFilterEXT", "GL_EXT_convolution", (void *) wine_glGetConvolutionFilterEXT }, - { "glGetConvolutionParameterfvEXT", "GL_EXT_convolution", (void *) wine_glGetConvolutionParameterfvEXT }, - { "glGetConvolutionParameterivEXT", "GL_EXT_convolution", (void *) wine_glGetConvolutionParameterivEXT }, - { "glGetDetailTexFuncSGIS", "GL_SGIS_detail_texture", (void *) wine_glGetDetailTexFuncSGIS }, - { "glGetDoubleIndexedvEXT", "GL_EXT_direct_state_access", (void *) wine_glGetDoubleIndexedvEXT }, - { "glGetFenceivNV", "GL_NV_fence", (void *) wine_glGetFenceivNV }, - { "glGetFinalCombinerInputParameterfvNV", "GL_NV_register_combiners", (void *) wine_glGetFinalCombinerInputParameterfvNV }, - { "glGetFinalCombinerInputParameterivNV", "GL_NV_register_combiners", (void *) wine_glGetFinalCombinerInputParameterivNV }, - { "glGetFloatIndexedvEXT", "GL_EXT_direct_state_access", (void *) wine_glGetFloatIndexedvEXT }, - { "glGetFogFuncSGIS", "GL_SGIS_fog_function", (void *) wine_glGetFogFuncSGIS }, - { "glGetFragDataLocation", "GL_VERSION_3_0", (void *) wine_glGetFragDataLocation }, - { "glGetFragDataLocationEXT", "GL_EXT_gpu_shader4", (void *) wine_glGetFragDataLocationEXT }, - { "glGetFragmentLightfvSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glGetFragmentLightfvSGIX }, - { "glGetFragmentLightivSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glGetFragmentLightivSGIX }, - { "glGetFragmentMaterialfvSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glGetFragmentMaterialfvSGIX }, - { "glGetFragmentMaterialivSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glGetFragmentMaterialivSGIX }, - { "glGetFramebufferAttachmentParameteriv", "GL_ARB_framebuffer_object", (void *) wine_glGetFramebufferAttachmentParameteriv }, - { "glGetFramebufferAttachmentParameterivEXT", "GL_EXT_framebuffer_object", (void *) wine_glGetFramebufferAttachmentParameterivEXT }, - { "glGetFramebufferParameterivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetFramebufferParameterivEXT }, - { "glGetHandleARB", "GL_ARB_shader_objects", (void *) wine_glGetHandleARB }, - { "glGetHistogramEXT", "GL_EXT_histogram", (void *) wine_glGetHistogramEXT }, - { "glGetHistogramParameterfvEXT", "GL_EXT_histogram", (void *) wine_glGetHistogramParameterfvEXT }, - { "glGetHistogramParameterivEXT", "GL_EXT_histogram", (void *) wine_glGetHistogramParameterivEXT }, - { "glGetImageTransformParameterfvHP", "GL_HP_image_transform", (void *) wine_glGetImageTransformParameterfvHP }, - { "glGetImageTransformParameterivHP", "GL_HP_image_transform", (void *) wine_glGetImageTransformParameterivHP }, - { "glGetInfoLogARB", "GL_ARB_shader_objects", (void *) wine_glGetInfoLogARB }, - { "glGetInstrumentsSGIX", "GL_SGIX_instruments", (void *) wine_glGetInstrumentsSGIX }, - { "glGetIntegerIndexedvEXT", "GL_EXT_draw_buffers2", (void *) wine_glGetIntegerIndexedvEXT }, - { "glGetIntegeri_v", "GL_VERSION_3_0", (void *) wine_glGetIntegeri_v }, - { "glGetInvariantBooleanvEXT", "GL_EXT_vertex_shader", (void *) wine_glGetInvariantBooleanvEXT }, - { "glGetInvariantFloatvEXT", "GL_EXT_vertex_shader", (void *) wine_glGetInvariantFloatvEXT }, - { "glGetInvariantIntegervEXT", "GL_EXT_vertex_shader", (void *) wine_glGetInvariantIntegervEXT }, - { "glGetListParameterfvSGIX", "GL_SGIX_list_priority", (void *) wine_glGetListParameterfvSGIX }, - { "glGetListParameterivSGIX", "GL_SGIX_list_priority", (void *) wine_glGetListParameterivSGIX }, - { "glGetLocalConstantBooleanvEXT", "GL_EXT_vertex_shader", (void *) wine_glGetLocalConstantBooleanvEXT }, - { "glGetLocalConstantFloatvEXT", "GL_EXT_vertex_shader", (void *) wine_glGetLocalConstantFloatvEXT }, - { "glGetLocalConstantIntegervEXT", "GL_EXT_vertex_shader", (void *) wine_glGetLocalConstantIntegervEXT }, - { "glGetMapAttribParameterfvNV", "GL_NV_evaluators", (void *) wine_glGetMapAttribParameterfvNV }, - { "glGetMapAttribParameterivNV", "GL_NV_evaluators", (void *) wine_glGetMapAttribParameterivNV }, - { "glGetMapControlPointsNV", "GL_NV_evaluators", (void *) wine_glGetMapControlPointsNV }, - { "glGetMapParameterfvNV", "GL_NV_evaluators", (void *) wine_glGetMapParameterfvNV }, - { "glGetMapParameterivNV", "GL_NV_evaluators", (void *) wine_glGetMapParameterivNV }, - { "glGetMinmaxEXT", "GL_EXT_histogram", (void *) wine_glGetMinmaxEXT }, - { "glGetMinmaxParameterfvEXT", "GL_EXT_histogram", (void *) wine_glGetMinmaxParameterfvEXT }, - { "glGetMinmaxParameterivEXT", "GL_EXT_histogram", (void *) wine_glGetMinmaxParameterivEXT }, - { "glGetMultiTexEnvfvEXT", "GL_EXT_direct_state_access", (void *) wine_glGetMultiTexEnvfvEXT }, - { "glGetMultiTexEnvivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetMultiTexEnvivEXT }, - { "glGetMultiTexGendvEXT", "GL_EXT_direct_state_access", (void *) wine_glGetMultiTexGendvEXT }, - { "glGetMultiTexGenfvEXT", "GL_EXT_direct_state_access", (void *) wine_glGetMultiTexGenfvEXT }, - { "glGetMultiTexGenivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetMultiTexGenivEXT }, - { "glGetMultiTexImageEXT", "GL_EXT_direct_state_access", (void *) wine_glGetMultiTexImageEXT }, - { "glGetMultiTexLevelParameterfvEXT", "GL_EXT_direct_state_access", (void *) wine_glGetMultiTexLevelParameterfvEXT }, - { "glGetMultiTexLevelParameterivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetMultiTexLevelParameterivEXT }, - { "glGetMultiTexParameterIivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetMultiTexParameterIivEXT }, - { "glGetMultiTexParameterIuivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetMultiTexParameterIuivEXT }, - { "glGetMultiTexParameterfvEXT", "GL_EXT_direct_state_access", (void *) wine_glGetMultiTexParameterfvEXT }, - { "glGetMultiTexParameterivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetMultiTexParameterivEXT }, - { "glGetNamedBufferParameterivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetNamedBufferParameterivEXT }, - { "glGetNamedBufferPointervEXT", "GL_EXT_direct_state_access", (void *) wine_glGetNamedBufferPointervEXT }, - { "glGetNamedBufferSubDataEXT", "GL_EXT_direct_state_access", (void *) wine_glGetNamedBufferSubDataEXT }, - { "glGetNamedFramebufferAttachmentParameterivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetNamedFramebufferAttachmentParameterivEXT }, - { "glGetNamedProgramLocalParameterIivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetNamedProgramLocalParameterIivEXT }, - { "glGetNamedProgramLocalParameterIuivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetNamedProgramLocalParameterIuivEXT }, - { "glGetNamedProgramLocalParameterdvEXT", "GL_EXT_direct_state_access", (void *) wine_glGetNamedProgramLocalParameterdvEXT }, - { "glGetNamedProgramLocalParameterfvEXT", "GL_EXT_direct_state_access", (void *) wine_glGetNamedProgramLocalParameterfvEXT }, - { "glGetNamedProgramStringEXT", "GL_EXT_direct_state_access", (void *) wine_glGetNamedProgramStringEXT }, - { "glGetNamedProgramivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetNamedProgramivEXT }, - { "glGetNamedRenderbufferParameterivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetNamedRenderbufferParameterivEXT }, - { "glGetObjectBufferfvATI", "GL_ATI_vertex_array_object", (void *) wine_glGetObjectBufferfvATI }, - { "glGetObjectBufferivATI", "GL_ATI_vertex_array_object", (void *) wine_glGetObjectBufferivATI }, - { "glGetObjectParameterfvARB", "GL_ARB_shader_objects", (void *) wine_glGetObjectParameterfvARB }, - { "glGetObjectParameterivARB", "GL_ARB_shader_objects", (void *) wine_glGetObjectParameterivARB }, - { "glGetOcclusionQueryivNV", "GL_NV_occlusion_query", (void *) wine_glGetOcclusionQueryivNV }, - { "glGetOcclusionQueryuivNV", "GL_NV_occlusion_query", (void *) wine_glGetOcclusionQueryuivNV }, - { "glGetPixelTexGenParameterfvSGIS", "GL_SGIS_pixel_texture", (void *) wine_glGetPixelTexGenParameterfvSGIS }, - { "glGetPixelTexGenParameterivSGIS", "GL_SGIS_pixel_texture", (void *) wine_glGetPixelTexGenParameterivSGIS }, - { "glGetPointerIndexedvEXT", "GL_EXT_direct_state_access", (void *) wine_glGetPointerIndexedvEXT }, - { "glGetPointervEXT", "GL_EXT_vertex_array", (void *) wine_glGetPointervEXT }, - { "glGetProgramEnvParameterIivNV", "GL_NV_gpu_program4", (void *) wine_glGetProgramEnvParameterIivNV }, - { "glGetProgramEnvParameterIuivNV", "GL_NV_gpu_program4", (void *) wine_glGetProgramEnvParameterIuivNV }, - { "glGetProgramEnvParameterdvARB", "GL_ARB_vertex_program", (void *) wine_glGetProgramEnvParameterdvARB }, - { "glGetProgramEnvParameterfvARB", "GL_ARB_vertex_program", (void *) wine_glGetProgramEnvParameterfvARB }, - { "glGetProgramInfoLog", "GL_VERSION_2_0", (void *) wine_glGetProgramInfoLog }, - { "glGetProgramLocalParameterIivNV", "GL_NV_gpu_program4", (void *) wine_glGetProgramLocalParameterIivNV }, - { "glGetProgramLocalParameterIuivNV", "GL_NV_gpu_program4", (void *) wine_glGetProgramLocalParameterIuivNV }, - { "glGetProgramLocalParameterdvARB", "GL_ARB_vertex_program", (void *) wine_glGetProgramLocalParameterdvARB }, - { "glGetProgramLocalParameterfvARB", "GL_ARB_vertex_program", (void *) wine_glGetProgramLocalParameterfvARB }, - { "glGetProgramNamedParameterdvNV", "GL_NV_fragment_program", (void *) wine_glGetProgramNamedParameterdvNV }, - { "glGetProgramNamedParameterfvNV", "GL_NV_fragment_program", (void *) wine_glGetProgramNamedParameterfvNV }, - { "glGetProgramParameterdvNV", "GL_NV_vertex_program", (void *) wine_glGetProgramParameterdvNV }, - { "glGetProgramParameterfvNV", "GL_NV_vertex_program", (void *) wine_glGetProgramParameterfvNV }, - { "glGetProgramStringARB", "GL_ARB_vertex_program", (void *) wine_glGetProgramStringARB }, - { "glGetProgramStringNV", "GL_NV_vertex_program", (void *) wine_glGetProgramStringNV }, - { "glGetProgramiv", "GL_VERSION_2_0", (void *) wine_glGetProgramiv }, - { "glGetProgramivARB", "GL_ARB_vertex_program", (void *) wine_glGetProgramivARB }, - { "glGetProgramivNV", "GL_NV_vertex_program", (void *) wine_glGetProgramivNV }, - { "glGetQueryObjecti64vEXT", "GL_EXT_timer_query", (void *) wine_glGetQueryObjecti64vEXT }, - { "glGetQueryObjectiv", "GL_VERSION_1_5", (void *) wine_glGetQueryObjectiv }, - { "glGetQueryObjectivARB", "GL_ARB_occlusion_query", (void *) wine_glGetQueryObjectivARB }, - { "glGetQueryObjectui64vEXT", "GL_EXT_timer_query", (void *) wine_glGetQueryObjectui64vEXT }, - { "glGetQueryObjectuiv", "GL_VERSION_1_5", (void *) wine_glGetQueryObjectuiv }, - { "glGetQueryObjectuivARB", "GL_ARB_occlusion_query", (void *) wine_glGetQueryObjectuivARB }, - { "glGetQueryiv", "GL_VERSION_1_5", (void *) wine_glGetQueryiv }, - { "glGetQueryivARB", "GL_ARB_occlusion_query", (void *) wine_glGetQueryivARB }, - { "glGetRenderbufferParameteriv", "GL_ARB_framebuffer_object", (void *) wine_glGetRenderbufferParameteriv }, - { "glGetRenderbufferParameterivEXT", "GL_EXT_framebuffer_object", (void *) wine_glGetRenderbufferParameterivEXT }, - { "glGetSeparableFilterEXT", "GL_EXT_convolution", (void *) wine_glGetSeparableFilterEXT }, - { "glGetShaderInfoLog", "GL_VERSION_2_0", (void *) wine_glGetShaderInfoLog }, - { "glGetShaderSource", "GL_VERSION_2_0", (void *) wine_glGetShaderSource }, - { "glGetShaderSourceARB", "GL_ARB_shader_objects", (void *) wine_glGetShaderSourceARB }, - { "glGetShaderiv", "GL_VERSION_2_0", (void *) wine_glGetShaderiv }, - { "glGetSharpenTexFuncSGIS", "GL_SGIS_sharpen_texture", (void *) wine_glGetSharpenTexFuncSGIS }, - { "glGetStringi", "GL_VERSION_3_0", (void *) wine_glGetStringi }, - { "glGetTexBumpParameterfvATI", "GL_ATI_envmap_bumpmap", (void *) wine_glGetTexBumpParameterfvATI }, - { "glGetTexBumpParameterivATI", "GL_ATI_envmap_bumpmap", (void *) wine_glGetTexBumpParameterivATI }, - { "glGetTexFilterFuncSGIS", "GL_SGIS_texture_filter4", (void *) wine_glGetTexFilterFuncSGIS }, - { "glGetTexParameterIiv", "GL_VERSION_3_0", (void *) wine_glGetTexParameterIiv }, - { "glGetTexParameterIivEXT", "GL_EXT_texture_integer", (void *) wine_glGetTexParameterIivEXT }, - { "glGetTexParameterIuiv", "GL_VERSION_3_0", (void *) wine_glGetTexParameterIuiv }, - { "glGetTexParameterIuivEXT", "GL_EXT_texture_integer", (void *) wine_glGetTexParameterIuivEXT }, - { "glGetTextureImageEXT", "GL_EXT_direct_state_access", (void *) wine_glGetTextureImageEXT }, - { "glGetTextureLevelParameterfvEXT", "GL_EXT_direct_state_access", (void *) wine_glGetTextureLevelParameterfvEXT }, - { "glGetTextureLevelParameterivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetTextureLevelParameterivEXT }, - { "glGetTextureParameterIivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetTextureParameterIivEXT }, - { "glGetTextureParameterIuivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetTextureParameterIuivEXT }, - { "glGetTextureParameterfvEXT", "GL_EXT_direct_state_access", (void *) wine_glGetTextureParameterfvEXT }, - { "glGetTextureParameterivEXT", "GL_EXT_direct_state_access", (void *) wine_glGetTextureParameterivEXT }, - { "glGetTrackMatrixivNV", "GL_NV_vertex_program", (void *) wine_glGetTrackMatrixivNV }, - { "glGetTransformFeedbackVarying", "GL_VERSION_3_0", (void *) wine_glGetTransformFeedbackVarying }, - { "glGetTransformFeedbackVaryingEXT", "GL_EXT_transform_feedback", (void *) wine_glGetTransformFeedbackVaryingEXT }, - { "glGetTransformFeedbackVaryingNV", "GL_NV_transform_feedback", (void *) wine_glGetTransformFeedbackVaryingNV }, - { "glGetUniformBufferSizeEXT", "GL_EXT_bindable_uniform", (void *) wine_glGetUniformBufferSizeEXT }, - { "glGetUniformLocation", "GL_VERSION_2_0", (void *) wine_glGetUniformLocation }, - { "glGetUniformLocationARB", "GL_ARB_shader_objects", (void *) wine_glGetUniformLocationARB }, - { "glGetUniformOffsetEXT", "GL_EXT_bindable_uniform", (void *) wine_glGetUniformOffsetEXT }, - { "glGetUniformfv", "GL_VERSION_2_0", (void *) wine_glGetUniformfv }, - { "glGetUniformfvARB", "GL_ARB_shader_objects", (void *) wine_glGetUniformfvARB }, - { "glGetUniformiv", "GL_VERSION_2_0", (void *) wine_glGetUniformiv }, - { "glGetUniformivARB", "GL_ARB_shader_objects", (void *) wine_glGetUniformivARB }, - { "glGetUniformuiv", "GL_VERSION_3_0", (void *) wine_glGetUniformuiv }, - { "glGetUniformuivEXT", "GL_EXT_gpu_shader4", (void *) wine_glGetUniformuivEXT }, - { "glGetVariantArrayObjectfvATI", "GL_ATI_vertex_array_object", (void *) wine_glGetVariantArrayObjectfvATI }, - { "glGetVariantArrayObjectivATI", "GL_ATI_vertex_array_object", (void *) wine_glGetVariantArrayObjectivATI }, - { "glGetVariantBooleanvEXT", "GL_EXT_vertex_shader", (void *) wine_glGetVariantBooleanvEXT }, - { "glGetVariantFloatvEXT", "GL_EXT_vertex_shader", (void *) wine_glGetVariantFloatvEXT }, - { "glGetVariantIntegervEXT", "GL_EXT_vertex_shader", (void *) wine_glGetVariantIntegervEXT }, - { "glGetVariantPointervEXT", "GL_EXT_vertex_shader", (void *) wine_glGetVariantPointervEXT }, - { "glGetVaryingLocationNV", "GL_NV_transform_feedback", (void *) wine_glGetVaryingLocationNV }, - { "glGetVertexAttribArrayObjectfvATI", "GL_ATI_vertex_attrib_array_object", (void *) wine_glGetVertexAttribArrayObjectfvATI }, - { "glGetVertexAttribArrayObjectivATI", "GL_ATI_vertex_attrib_array_object", (void *) wine_glGetVertexAttribArrayObjectivATI }, - { "glGetVertexAttribIiv", "GL_VERSION_3_0", (void *) wine_glGetVertexAttribIiv }, - { "glGetVertexAttribIivEXT", "GL_NV_vertex_program4", (void *) wine_glGetVertexAttribIivEXT }, - { "glGetVertexAttribIuiv", "GL_VERSION_3_0", (void *) wine_glGetVertexAttribIuiv }, - { "glGetVertexAttribIuivEXT", "GL_NV_vertex_program4", (void *) wine_glGetVertexAttribIuivEXT }, - { "glGetVertexAttribPointerv", "GL_VERSION_2_0", (void *) wine_glGetVertexAttribPointerv }, - { "glGetVertexAttribPointervARB", "GL_ARB_vertex_program", (void *) wine_glGetVertexAttribPointervARB }, - { "glGetVertexAttribPointervNV", "GL_NV_vertex_program", (void *) wine_glGetVertexAttribPointervNV }, - { "glGetVertexAttribdv", "GL_VERSION_2_0", (void *) wine_glGetVertexAttribdv }, - { "glGetVertexAttribdvARB", "GL_ARB_vertex_program", (void *) wine_glGetVertexAttribdvARB }, - { "glGetVertexAttribdvNV", "GL_NV_vertex_program", (void *) wine_glGetVertexAttribdvNV }, - { "glGetVertexAttribfv", "GL_VERSION_2_0", (void *) wine_glGetVertexAttribfv }, - { "glGetVertexAttribfvARB", "GL_ARB_vertex_program", (void *) wine_glGetVertexAttribfvARB }, - { "glGetVertexAttribfvNV", "GL_NV_vertex_program", (void *) wine_glGetVertexAttribfvNV }, - { "glGetVertexAttribiv", "GL_VERSION_2_0", (void *) wine_glGetVertexAttribiv }, - { "glGetVertexAttribivARB", "GL_ARB_vertex_program", (void *) wine_glGetVertexAttribivARB }, - { "glGetVertexAttribivNV", "GL_NV_vertex_program", (void *) wine_glGetVertexAttribivNV }, - { "glGlobalAlphaFactorbSUN", "GL_SUN_global_alpha", (void *) wine_glGlobalAlphaFactorbSUN }, - { "glGlobalAlphaFactordSUN", "GL_SUN_global_alpha", (void *) wine_glGlobalAlphaFactordSUN }, - { "glGlobalAlphaFactorfSUN", "GL_SUN_global_alpha", (void *) wine_glGlobalAlphaFactorfSUN }, - { "glGlobalAlphaFactoriSUN", "GL_SUN_global_alpha", (void *) wine_glGlobalAlphaFactoriSUN }, - { "glGlobalAlphaFactorsSUN", "GL_SUN_global_alpha", (void *) wine_glGlobalAlphaFactorsSUN }, - { "glGlobalAlphaFactorubSUN", "GL_SUN_global_alpha", (void *) wine_glGlobalAlphaFactorubSUN }, - { "glGlobalAlphaFactoruiSUN", "GL_SUN_global_alpha", (void *) wine_glGlobalAlphaFactoruiSUN }, - { "glGlobalAlphaFactorusSUN", "GL_SUN_global_alpha", (void *) wine_glGlobalAlphaFactorusSUN }, - { "glHintPGI", "GL_PGI_misc_hints", (void *) wine_glHintPGI }, - { "glHistogramEXT", "GL_EXT_histogram", (void *) wine_glHistogramEXT }, - { "glIglooInterfaceSGIX", "GL_SGIX_igloo_interface", (void *) wine_glIglooInterfaceSGIX }, - { "glImageTransformParameterfHP", "GL_HP_image_transform", (void *) wine_glImageTransformParameterfHP }, - { "glImageTransformParameterfvHP", "GL_HP_image_transform", (void *) wine_glImageTransformParameterfvHP }, - { "glImageTransformParameteriHP", "GL_HP_image_transform", (void *) wine_glImageTransformParameteriHP }, - { "glImageTransformParameterivHP", "GL_HP_image_transform", (void *) wine_glImageTransformParameterivHP }, - { "glIndexFuncEXT", "GL_EXT_index_func", (void *) wine_glIndexFuncEXT }, - { "glIndexMaterialEXT", "GL_EXT_index_material", (void *) wine_glIndexMaterialEXT }, - { "glIndexPointerEXT", "GL_EXT_vertex_array", (void *) wine_glIndexPointerEXT }, - { "glIndexPointerListIBM", "GL_IBM_vertex_array_lists", (void *) wine_glIndexPointerListIBM }, - { "glInsertComponentEXT", "GL_EXT_vertex_shader", (void *) wine_glInsertComponentEXT }, - { "glInstrumentsBufferSGIX", "GL_SGIX_instruments", (void *) wine_glInstrumentsBufferSGIX }, - { "glIsAsyncMarkerSGIX", "GL_SGIX_async", (void *) wine_glIsAsyncMarkerSGIX }, - { "glIsBuffer", "GL_VERSION_1_5", (void *) wine_glIsBuffer }, - { "glIsBufferARB", "GL_ARB_vertex_buffer_object", (void *) wine_glIsBufferARB }, - { "glIsEnabledIndexedEXT", "GL_EXT_draw_buffers2", (void *) wine_glIsEnabledIndexedEXT }, - { "glIsEnabledi", "GL_VERSION_3_0", (void *) wine_glIsEnabledi }, - { "glIsFenceAPPLE", "GL_APPLE_fence", (void *) wine_glIsFenceAPPLE }, - { "glIsFenceNV", "GL_NV_fence", (void *) wine_glIsFenceNV }, - { "glIsFramebuffer", "GL_ARB_framebuffer_object", (void *) wine_glIsFramebuffer }, - { "glIsFramebufferEXT", "GL_EXT_framebuffer_object", (void *) wine_glIsFramebufferEXT }, - { "glIsObjectBufferATI", "GL_ATI_vertex_array_object", (void *) wine_glIsObjectBufferATI }, - { "glIsOcclusionQueryNV", "GL_NV_occlusion_query", (void *) wine_glIsOcclusionQueryNV }, - { "glIsProgram", "GL_VERSION_2_0", (void *) wine_glIsProgram }, - { "glIsProgramARB", "GL_ARB_vertex_program", (void *) wine_glIsProgramARB }, - { "glIsProgramNV", "GL_NV_vertex_program", (void *) wine_glIsProgramNV }, - { "glIsQuery", "GL_VERSION_1_5", (void *) wine_glIsQuery }, - { "glIsQueryARB", "GL_ARB_occlusion_query", (void *) wine_glIsQueryARB }, - { "glIsRenderbuffer", "GL_ARB_framebuffer_object", (void *) wine_glIsRenderbuffer }, - { "glIsRenderbufferEXT", "GL_EXT_framebuffer_object", (void *) wine_glIsRenderbufferEXT }, - { "glIsShader", "GL_VERSION_2_0", (void *) wine_glIsShader }, - { "glIsTextureEXT", "GL_EXT_texture_object", (void *) wine_glIsTextureEXT }, - { "glIsVariantEnabledEXT", "GL_EXT_vertex_shader", (void *) wine_glIsVariantEnabledEXT }, - { "glIsVertexArray", "GL_ARB_vertex_array_object", (void *) wine_glIsVertexArray }, - { "glIsVertexArrayAPPLE", "GL_APPLE_vertex_array_object", (void *) wine_glIsVertexArrayAPPLE }, - { "glLightEnviSGIX", "GL_SGIX_fragment_lighting", (void *) wine_glLightEnviSGIX }, - { "glLinkProgram", "GL_VERSION_2_0", (void *) wine_glLinkProgram }, - { "glLinkProgramARB", "GL_ARB_shader_objects", (void *) wine_glLinkProgramARB }, - { "glListParameterfSGIX", "GL_SGIX_list_priority", (void *) wine_glListParameterfSGIX }, - { "glListParameterfvSGIX", "GL_SGIX_list_priority", (void *) wine_glListParameterfvSGIX }, - { "glListParameteriSGIX", "GL_SGIX_list_priority", (void *) wine_glListParameteriSGIX }, - { "glListParameterivSGIX", "GL_SGIX_list_priority", (void *) wine_glListParameterivSGIX }, - { "glLoadIdentityDeformationMapSGIX", "GL_SGIX_polynomial_ffd", (void *) wine_glLoadIdentityDeformationMapSGIX }, - { "glLoadProgramNV", "GL_NV_vertex_program", (void *) wine_glLoadProgramNV }, - { "glLoadTransposeMatrixd", "GL_VERSION_1_3", (void *) wine_glLoadTransposeMatrixd }, - { "glLoadTransposeMatrixdARB", "GL_ARB_transpose_matrix", (void *) wine_glLoadTransposeMatrixdARB }, - { "glLoadTransposeMatrixf", "GL_VERSION_1_3", (void *) wine_glLoadTransposeMatrixf }, - { "glLoadTransposeMatrixfARB", "GL_ARB_transpose_matrix", (void *) wine_glLoadTransposeMatrixfARB }, - { "glLockArraysEXT", "GL_EXT_compiled_vertex_array", (void *) wine_glLockArraysEXT }, - { "glMTexCoord2fSGIS", "GL_SGIS_multitexture", (void *) wine_glMTexCoord2fSGIS }, - { "glMTexCoord2fvSGIS", "GL_SGIS_multitexture", (void *) wine_glMTexCoord2fvSGIS }, - { "glMapBuffer", "GL_VERSION_1_5", (void *) wine_glMapBuffer }, - { "glMapBufferARB", "GL_ARB_vertex_buffer_object", (void *) wine_glMapBufferARB }, - { "glMapBufferRange", "GL_ARB_map_buffer_range", (void *) wine_glMapBufferRange }, - { "glMapControlPointsNV", "GL_NV_evaluators", (void *) wine_glMapControlPointsNV }, - { "glMapNamedBufferEXT", "GL_EXT_direct_state_access", (void *) wine_glMapNamedBufferEXT }, - { "glMapObjectBufferATI", "GL_ATI_map_object_buffer", (void *) wine_glMapObjectBufferATI }, - { "glMapParameterfvNV", "GL_NV_evaluators", (void *) wine_glMapParameterfvNV }, - { "glMapParameterivNV", "GL_NV_evaluators", (void *) wine_glMapParameterivNV }, - { "glMatrixFrustumEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixFrustumEXT }, - { "glMatrixIndexPointerARB", "GL_ARB_matrix_palette", (void *) wine_glMatrixIndexPointerARB }, - { "glMatrixIndexubvARB", "GL_ARB_matrix_palette", (void *) wine_glMatrixIndexubvARB }, - { "glMatrixIndexuivARB", "GL_ARB_matrix_palette", (void *) wine_glMatrixIndexuivARB }, - { "glMatrixIndexusvARB", "GL_ARB_matrix_palette", (void *) wine_glMatrixIndexusvARB }, - { "glMatrixLoadIdentityEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixLoadIdentityEXT }, - { "glMatrixLoadTransposedEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixLoadTransposedEXT }, - { "glMatrixLoadTransposefEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixLoadTransposefEXT }, - { "glMatrixLoaddEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixLoaddEXT }, - { "glMatrixLoadfEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixLoadfEXT }, - { "glMatrixMultTransposedEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixMultTransposedEXT }, - { "glMatrixMultTransposefEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixMultTransposefEXT }, - { "glMatrixMultdEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixMultdEXT }, - { "glMatrixMultfEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixMultfEXT }, - { "glMatrixOrthoEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixOrthoEXT }, - { "glMatrixPopEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixPopEXT }, - { "glMatrixPushEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixPushEXT }, - { "glMatrixRotatedEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixRotatedEXT }, - { "glMatrixRotatefEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixRotatefEXT }, - { "glMatrixScaledEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixScaledEXT }, - { "glMatrixScalefEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixScalefEXT }, - { "glMatrixTranslatedEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixTranslatedEXT }, - { "glMatrixTranslatefEXT", "GL_EXT_direct_state_access", (void *) wine_glMatrixTranslatefEXT }, - { "glMinmaxEXT", "GL_EXT_histogram", (void *) wine_glMinmaxEXT }, - { "glMultTransposeMatrixd", "GL_VERSION_1_3", (void *) wine_glMultTransposeMatrixd }, - { "glMultTransposeMatrixdARB", "GL_ARB_transpose_matrix", (void *) wine_glMultTransposeMatrixdARB }, - { "glMultTransposeMatrixf", "GL_VERSION_1_3", (void *) wine_glMultTransposeMatrixf }, - { "glMultTransposeMatrixfARB", "GL_ARB_transpose_matrix", (void *) wine_glMultTransposeMatrixfARB }, - { "glMultiDrawArrays", "GL_VERSION_1_4", (void *) wine_glMultiDrawArrays }, - { "glMultiDrawArraysEXT", "GL_EXT_multi_draw_arrays", (void *) wine_glMultiDrawArraysEXT }, - { "glMultiDrawElementArrayAPPLE", "GL_APPLE_element_array", (void *) wine_glMultiDrawElementArrayAPPLE }, - { "glMultiDrawElements", "GL_VERSION_1_4", (void *) wine_glMultiDrawElements }, - { "glMultiDrawElementsEXT", "GL_EXT_multi_draw_arrays", (void *) wine_glMultiDrawElementsEXT }, - { "glMultiDrawRangeElementArrayAPPLE", "GL_APPLE_element_array", (void *) wine_glMultiDrawRangeElementArrayAPPLE }, - { "glMultiModeDrawArraysIBM", "GL_IBM_multimode_draw_arrays", (void *) wine_glMultiModeDrawArraysIBM }, - { "glMultiModeDrawElementsIBM", "GL_IBM_multimode_draw_arrays", (void *) wine_glMultiModeDrawElementsIBM }, - { "glMultiTexBufferEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexBufferEXT }, - { "glMultiTexCoord1d", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord1d }, - { "glMultiTexCoord1dARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord1dARB }, - { "glMultiTexCoord1dSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord1dSGIS }, - { "glMultiTexCoord1dv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord1dv }, - { "glMultiTexCoord1dvARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord1dvARB }, - { "glMultiTexCoord1dvSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord1dvSGIS }, - { "glMultiTexCoord1f", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord1f }, - { "glMultiTexCoord1fARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord1fARB }, - { "glMultiTexCoord1fSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord1fSGIS }, - { "glMultiTexCoord1fv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord1fv }, - { "glMultiTexCoord1fvARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord1fvARB }, - { "glMultiTexCoord1fvSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord1fvSGIS }, - { "glMultiTexCoord1hNV", "GL_NV_half_float", (void *) wine_glMultiTexCoord1hNV }, - { "glMultiTexCoord1hvNV", "GL_NV_half_float", (void *) wine_glMultiTexCoord1hvNV }, - { "glMultiTexCoord1i", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord1i }, - { "glMultiTexCoord1iARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord1iARB }, - { "glMultiTexCoord1iSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord1iSGIS }, - { "glMultiTexCoord1iv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord1iv }, - { "glMultiTexCoord1ivARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord1ivARB }, - { "glMultiTexCoord1ivSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord1ivSGIS }, - { "glMultiTexCoord1s", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord1s }, - { "glMultiTexCoord1sARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord1sARB }, - { "glMultiTexCoord1sSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord1sSGIS }, - { "glMultiTexCoord1sv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord1sv }, - { "glMultiTexCoord1svARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord1svARB }, - { "glMultiTexCoord1svSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord1svSGIS }, - { "glMultiTexCoord2d", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord2d }, - { "glMultiTexCoord2dARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord2dARB }, - { "glMultiTexCoord2dSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord2dSGIS }, - { "glMultiTexCoord2dv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord2dv }, - { "glMultiTexCoord2dvARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord2dvARB }, - { "glMultiTexCoord2dvSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord2dvSGIS }, - { "glMultiTexCoord2f", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord2f }, - { "glMultiTexCoord2fARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord2fARB }, - { "glMultiTexCoord2fSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord2fSGIS }, - { "glMultiTexCoord2fv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord2fv }, - { "glMultiTexCoord2fvARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord2fvARB }, - { "glMultiTexCoord2fvSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord2fvSGIS }, - { "glMultiTexCoord2hNV", "GL_NV_half_float", (void *) wine_glMultiTexCoord2hNV }, - { "glMultiTexCoord2hvNV", "GL_NV_half_float", (void *) wine_glMultiTexCoord2hvNV }, - { "glMultiTexCoord2i", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord2i }, - { "glMultiTexCoord2iARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord2iARB }, - { "glMultiTexCoord2iSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord2iSGIS }, - { "glMultiTexCoord2iv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord2iv }, - { "glMultiTexCoord2ivARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord2ivARB }, - { "glMultiTexCoord2ivSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord2ivSGIS }, - { "glMultiTexCoord2s", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord2s }, - { "glMultiTexCoord2sARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord2sARB }, - { "glMultiTexCoord2sSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord2sSGIS }, - { "glMultiTexCoord2sv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord2sv }, - { "glMultiTexCoord2svARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord2svARB }, - { "glMultiTexCoord2svSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord2svSGIS }, - { "glMultiTexCoord3d", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord3d }, - { "glMultiTexCoord3dARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord3dARB }, - { "glMultiTexCoord3dSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord3dSGIS }, - { "glMultiTexCoord3dv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord3dv }, - { "glMultiTexCoord3dvARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord3dvARB }, - { "glMultiTexCoord3dvSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord3dvSGIS }, - { "glMultiTexCoord3f", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord3f }, - { "glMultiTexCoord3fARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord3fARB }, - { "glMultiTexCoord3fSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord3fSGIS }, - { "glMultiTexCoord3fv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord3fv }, - { "glMultiTexCoord3fvARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord3fvARB }, - { "glMultiTexCoord3fvSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord3fvSGIS }, - { "glMultiTexCoord3hNV", "GL_NV_half_float", (void *) wine_glMultiTexCoord3hNV }, - { "glMultiTexCoord3hvNV", "GL_NV_half_float", (void *) wine_glMultiTexCoord3hvNV }, - { "glMultiTexCoord3i", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord3i }, - { "glMultiTexCoord3iARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord3iARB }, - { "glMultiTexCoord3iSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord3iSGIS }, - { "glMultiTexCoord3iv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord3iv }, - { "glMultiTexCoord3ivARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord3ivARB }, - { "glMultiTexCoord3ivSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord3ivSGIS }, - { "glMultiTexCoord3s", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord3s }, - { "glMultiTexCoord3sARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord3sARB }, - { "glMultiTexCoord3sSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord3sSGIS }, - { "glMultiTexCoord3sv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord3sv }, - { "glMultiTexCoord3svARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord3svARB }, - { "glMultiTexCoord3svSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord3svSGIS }, - { "glMultiTexCoord4d", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord4d }, - { "glMultiTexCoord4dARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord4dARB }, - { "glMultiTexCoord4dSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord4dSGIS }, - { "glMultiTexCoord4dv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord4dv }, - { "glMultiTexCoord4dvARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord4dvARB }, - { "glMultiTexCoord4dvSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord4dvSGIS }, - { "glMultiTexCoord4f", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord4f }, - { "glMultiTexCoord4fARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord4fARB }, - { "glMultiTexCoord4fSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord4fSGIS }, - { "glMultiTexCoord4fv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord4fv }, - { "glMultiTexCoord4fvARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord4fvARB }, - { "glMultiTexCoord4fvSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord4fvSGIS }, - { "glMultiTexCoord4hNV", "GL_NV_half_float", (void *) wine_glMultiTexCoord4hNV }, - { "glMultiTexCoord4hvNV", "GL_NV_half_float", (void *) wine_glMultiTexCoord4hvNV }, - { "glMultiTexCoord4i", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord4i }, - { "glMultiTexCoord4iARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord4iARB }, - { "glMultiTexCoord4iSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord4iSGIS }, - { "glMultiTexCoord4iv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord4iv }, - { "glMultiTexCoord4ivARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord4ivARB }, - { "glMultiTexCoord4ivSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord4ivSGIS }, - { "glMultiTexCoord4s", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord4s }, - { "glMultiTexCoord4sARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord4sARB }, - { "glMultiTexCoord4sSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord4sSGIS }, - { "glMultiTexCoord4sv", "GL_VERSION_1_3", (void *) wine_glMultiTexCoord4sv }, - { "glMultiTexCoord4svARB", "GL_ARB_multitexture", (void *) wine_glMultiTexCoord4svARB }, - { "glMultiTexCoord4svSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoord4svSGIS }, - { "glMultiTexCoordPointerEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexCoordPointerEXT }, - { "glMultiTexCoordPointerSGIS", "GL_SGIS_multitexture", (void *) wine_glMultiTexCoordPointerSGIS }, - { "glMultiTexEnvfEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexEnvfEXT }, - { "glMultiTexEnvfvEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexEnvfvEXT }, - { "glMultiTexEnviEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexEnviEXT }, - { "glMultiTexEnvivEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexEnvivEXT }, - { "glMultiTexGendEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexGendEXT }, - { "glMultiTexGendvEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexGendvEXT }, - { "glMultiTexGenfEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexGenfEXT }, - { "glMultiTexGenfvEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexGenfvEXT }, - { "glMultiTexGeniEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexGeniEXT }, - { "glMultiTexGenivEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexGenivEXT }, - { "glMultiTexImage1DEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexImage1DEXT }, - { "glMultiTexImage2DEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexImage2DEXT }, - { "glMultiTexImage3DEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexImage3DEXT }, - { "glMultiTexParameterIivEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexParameterIivEXT }, - { "glMultiTexParameterIuivEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexParameterIuivEXT }, - { "glMultiTexParameterfEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexParameterfEXT }, - { "glMultiTexParameterfvEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexParameterfvEXT }, - { "glMultiTexParameteriEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexParameteriEXT }, - { "glMultiTexParameterivEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexParameterivEXT }, - { "glMultiTexRenderbufferEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexRenderbufferEXT }, - { "glMultiTexSubImage1DEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexSubImage1DEXT }, - { "glMultiTexSubImage2DEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexSubImage2DEXT }, - { "glMultiTexSubImage3DEXT", "GL_EXT_direct_state_access", (void *) wine_glMultiTexSubImage3DEXT }, - { "glNamedBufferDataEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedBufferDataEXT }, - { "glNamedBufferSubDataEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedBufferSubDataEXT }, - { "glNamedFramebufferRenderbufferEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedFramebufferRenderbufferEXT }, - { "glNamedFramebufferTexture1DEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedFramebufferTexture1DEXT }, - { "glNamedFramebufferTexture2DEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedFramebufferTexture2DEXT }, - { "glNamedFramebufferTexture3DEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedFramebufferTexture3DEXT }, - { "glNamedFramebufferTextureEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedFramebufferTextureEXT }, - { "glNamedFramebufferTextureFaceEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedFramebufferTextureFaceEXT }, - { "glNamedFramebufferTextureLayerEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedFramebufferTextureLayerEXT }, - { "glNamedProgramLocalParameter4dEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedProgramLocalParameter4dEXT }, - { "glNamedProgramLocalParameter4dvEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedProgramLocalParameter4dvEXT }, - { "glNamedProgramLocalParameter4fEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedProgramLocalParameter4fEXT }, - { "glNamedProgramLocalParameter4fvEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedProgramLocalParameter4fvEXT }, - { "glNamedProgramLocalParameterI4iEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedProgramLocalParameterI4iEXT }, - { "glNamedProgramLocalParameterI4ivEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedProgramLocalParameterI4ivEXT }, - { "glNamedProgramLocalParameterI4uiEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedProgramLocalParameterI4uiEXT }, - { "glNamedProgramLocalParameterI4uivEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedProgramLocalParameterI4uivEXT }, - { "glNamedProgramLocalParameters4fvEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedProgramLocalParameters4fvEXT }, - { "glNamedProgramLocalParametersI4ivEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedProgramLocalParametersI4ivEXT }, - { "glNamedProgramLocalParametersI4uivEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedProgramLocalParametersI4uivEXT }, - { "glNamedProgramStringEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedProgramStringEXT }, - { "glNamedRenderbufferStorageEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedRenderbufferStorageEXT }, - { "glNamedRenderbufferStorageMultisampleCoverageEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedRenderbufferStorageMultisampleCoverageEXT }, - { "glNamedRenderbufferStorageMultisampleEXT", "GL_EXT_direct_state_access", (void *) wine_glNamedRenderbufferStorageMultisampleEXT }, - { "glNewBufferRegion", "GL_KTX_buffer_region", (void *) wine_glNewBufferRegion }, - { "glNewObjectBufferATI", "GL_ATI_vertex_array_object", (void *) wine_glNewObjectBufferATI }, - { "glNormal3fVertex3fSUN", "GL_SUN_vertex", (void *) wine_glNormal3fVertex3fSUN }, - { "glNormal3fVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glNormal3fVertex3fvSUN }, - { "glNormal3hNV", "GL_NV_half_float", (void *) wine_glNormal3hNV }, - { "glNormal3hvNV", "GL_NV_half_float", (void *) wine_glNormal3hvNV }, - { "glNormalPointerEXT", "GL_EXT_vertex_array", (void *) wine_glNormalPointerEXT }, - { "glNormalPointerListIBM", "GL_IBM_vertex_array_lists", (void *) wine_glNormalPointerListIBM }, - { "glNormalPointervINTEL", "GL_INTEL_parallel_arrays", (void *) wine_glNormalPointervINTEL }, - { "glNormalStream3bATI", "GL_ATI_vertex_streams", (void *) wine_glNormalStream3bATI }, - { "glNormalStream3bvATI", "GL_ATI_vertex_streams", (void *) wine_glNormalStream3bvATI }, - { "glNormalStream3dATI", "GL_ATI_vertex_streams", (void *) wine_glNormalStream3dATI }, - { "glNormalStream3dvATI", "GL_ATI_vertex_streams", (void *) wine_glNormalStream3dvATI }, - { "glNormalStream3fATI", "GL_ATI_vertex_streams", (void *) wine_glNormalStream3fATI }, - { "glNormalStream3fvATI", "GL_ATI_vertex_streams", (void *) wine_glNormalStream3fvATI }, - { "glNormalStream3iATI", "GL_ATI_vertex_streams", (void *) wine_glNormalStream3iATI }, - { "glNormalStream3ivATI", "GL_ATI_vertex_streams", (void *) wine_glNormalStream3ivATI }, - { "glNormalStream3sATI", "GL_ATI_vertex_streams", (void *) wine_glNormalStream3sATI }, - { "glNormalStream3svATI", "GL_ATI_vertex_streams", (void *) wine_glNormalStream3svATI }, - { "glPNTrianglesfATI", "GL_ATI_pn_triangles", (void *) wine_glPNTrianglesfATI }, - { "glPNTrianglesiATI", "GL_ATI_pn_triangles", (void *) wine_glPNTrianglesiATI }, - { "glPassTexCoordATI", "GL_ATI_fragment_shader", (void *) wine_glPassTexCoordATI }, - { "glPixelDataRangeNV", "GL_NV_pixel_data_range", (void *) wine_glPixelDataRangeNV }, - { "glPixelTexGenParameterfSGIS", "GL_SGIS_pixel_texture", (void *) wine_glPixelTexGenParameterfSGIS }, - { "glPixelTexGenParameterfvSGIS", "GL_SGIS_pixel_texture", (void *) wine_glPixelTexGenParameterfvSGIS }, - { "glPixelTexGenParameteriSGIS", "GL_SGIS_pixel_texture", (void *) wine_glPixelTexGenParameteriSGIS }, - { "glPixelTexGenParameterivSGIS", "GL_SGIS_pixel_texture", (void *) wine_glPixelTexGenParameterivSGIS }, - { "glPixelTexGenSGIX", "GL_SGIX_pixel_texture", (void *) wine_glPixelTexGenSGIX }, - { "glPixelTransformParameterfEXT", "GL_EXT_pixel_transform", (void *) wine_glPixelTransformParameterfEXT }, - { "glPixelTransformParameterfvEXT", "GL_EXT_pixel_transform", (void *) wine_glPixelTransformParameterfvEXT }, - { "glPixelTransformParameteriEXT", "GL_EXT_pixel_transform", (void *) wine_glPixelTransformParameteriEXT }, - { "glPixelTransformParameterivEXT", "GL_EXT_pixel_transform", (void *) wine_glPixelTransformParameterivEXT }, - { "glPointParameterf", "GL_VERSION_1_4", (void *) wine_glPointParameterf }, - { "glPointParameterfARB", "GL_ARB_point_parameters", (void *) wine_glPointParameterfARB }, - { "glPointParameterfEXT", "GL_EXT_point_parameters", (void *) wine_glPointParameterfEXT }, - { "glPointParameterfSGIS", "GL_SGIS_point_parameters", (void *) wine_glPointParameterfSGIS }, - { "glPointParameterfv", "GL_VERSION_1_4", (void *) wine_glPointParameterfv }, - { "glPointParameterfvARB", "GL_ARB_point_parameters", (void *) wine_glPointParameterfvARB }, - { "glPointParameterfvEXT", "GL_EXT_point_parameters", (void *) wine_glPointParameterfvEXT }, - { "glPointParameterfvSGIS", "GL_SGIS_point_parameters", (void *) wine_glPointParameterfvSGIS }, - { "glPointParameteri", "GL_VERSION_1_4", (void *) wine_glPointParameteri }, - { "glPointParameteriNV", "GL_NV_point_sprite", (void *) wine_glPointParameteriNV }, - { "glPointParameteriv", "GL_VERSION_1_4", (void *) wine_glPointParameteriv }, - { "glPointParameterivNV", "GL_NV_point_sprite", (void *) wine_glPointParameterivNV }, - { "glPollAsyncSGIX", "GL_SGIX_async", (void *) wine_glPollAsyncSGIX }, - { "glPollInstrumentsSGIX", "GL_SGIX_instruments", (void *) wine_glPollInstrumentsSGIX }, - { "glPolygonOffsetEXT", "GL_EXT_polygon_offset", (void *) wine_glPolygonOffsetEXT }, - { "glPrimitiveRestartIndexNV", "GL_NV_primitive_restart", (void *) wine_glPrimitiveRestartIndexNV }, - { "glPrimitiveRestartNV", "GL_NV_primitive_restart", (void *) wine_glPrimitiveRestartNV }, - { "glPrioritizeTexturesEXT", "GL_EXT_texture_object", (void *) wine_glPrioritizeTexturesEXT }, - { "glProgramBufferParametersIivNV", "GL_NV_parameter_buffer_object", (void *) wine_glProgramBufferParametersIivNV }, - { "glProgramBufferParametersIuivNV", "GL_NV_parameter_buffer_object", (void *) wine_glProgramBufferParametersIuivNV }, - { "glProgramBufferParametersfvNV", "GL_NV_parameter_buffer_object", (void *) wine_glProgramBufferParametersfvNV }, - { "glProgramEnvParameter4dARB", "GL_ARB_vertex_program", (void *) wine_glProgramEnvParameter4dARB }, - { "glProgramEnvParameter4dvARB", "GL_ARB_vertex_program", (void *) wine_glProgramEnvParameter4dvARB }, - { "glProgramEnvParameter4fARB", "GL_ARB_vertex_program", (void *) wine_glProgramEnvParameter4fARB }, - { "glProgramEnvParameter4fvARB", "GL_ARB_vertex_program", (void *) wine_glProgramEnvParameter4fvARB }, - { "glProgramEnvParameterI4iNV", "GL_NV_gpu_program4", (void *) wine_glProgramEnvParameterI4iNV }, - { "glProgramEnvParameterI4ivNV", "GL_NV_gpu_program4", (void *) wine_glProgramEnvParameterI4ivNV }, - { "glProgramEnvParameterI4uiNV", "GL_NV_gpu_program4", (void *) wine_glProgramEnvParameterI4uiNV }, - { "glProgramEnvParameterI4uivNV", "GL_NV_gpu_program4", (void *) wine_glProgramEnvParameterI4uivNV }, - { "glProgramEnvParameters4fvEXT", "GL_EXT_gpu_program_parameters", (void *) wine_glProgramEnvParameters4fvEXT }, - { "glProgramEnvParametersI4ivNV", "GL_NV_gpu_program4", (void *) wine_glProgramEnvParametersI4ivNV }, - { "glProgramEnvParametersI4uivNV", "GL_NV_gpu_program4", (void *) wine_glProgramEnvParametersI4uivNV }, - { "glProgramLocalParameter4dARB", "GL_ARB_vertex_program", (void *) wine_glProgramLocalParameter4dARB }, - { "glProgramLocalParameter4dvARB", "GL_ARB_vertex_program", (void *) wine_glProgramLocalParameter4dvARB }, - { "glProgramLocalParameter4fARB", "GL_ARB_vertex_program", (void *) wine_glProgramLocalParameter4fARB }, - { "glProgramLocalParameter4fvARB", "GL_ARB_vertex_program", (void *) wine_glProgramLocalParameter4fvARB }, - { "glProgramLocalParameterI4iNV", "GL_NV_gpu_program4", (void *) wine_glProgramLocalParameterI4iNV }, - { "glProgramLocalParameterI4ivNV", "GL_NV_gpu_program4", (void *) wine_glProgramLocalParameterI4ivNV }, - { "glProgramLocalParameterI4uiNV", "GL_NV_gpu_program4", (void *) wine_glProgramLocalParameterI4uiNV }, - { "glProgramLocalParameterI4uivNV", "GL_NV_gpu_program4", (void *) wine_glProgramLocalParameterI4uivNV }, - { "glProgramLocalParameters4fvEXT", "GL_EXT_gpu_program_parameters", (void *) wine_glProgramLocalParameters4fvEXT }, - { "glProgramLocalParametersI4ivNV", "GL_NV_gpu_program4", (void *) wine_glProgramLocalParametersI4ivNV }, - { "glProgramLocalParametersI4uivNV", "GL_NV_gpu_program4", (void *) wine_glProgramLocalParametersI4uivNV }, - { "glProgramNamedParameter4dNV", "GL_NV_fragment_program", (void *) wine_glProgramNamedParameter4dNV }, - { "glProgramNamedParameter4dvNV", "GL_NV_fragment_program", (void *) wine_glProgramNamedParameter4dvNV }, - { "glProgramNamedParameter4fNV", "GL_NV_fragment_program", (void *) wine_glProgramNamedParameter4fNV }, - { "glProgramNamedParameter4fvNV", "GL_NV_fragment_program", (void *) wine_glProgramNamedParameter4fvNV }, - { "glProgramParameter4dNV", "GL_NV_vertex_program", (void *) wine_glProgramParameter4dNV }, - { "glProgramParameter4dvNV", "GL_NV_vertex_program", (void *) wine_glProgramParameter4dvNV }, - { "glProgramParameter4fNV", "GL_NV_vertex_program", (void *) wine_glProgramParameter4fNV }, - { "glProgramParameter4fvNV", "GL_NV_vertex_program", (void *) wine_glProgramParameter4fvNV }, - { "glProgramParameteriARB", "GL_ARB_geometry_shader4", (void *) wine_glProgramParameteriARB }, - { "glProgramParameteriEXT", "GL_EXT_geometry_shader4", (void *) wine_glProgramParameteriEXT }, - { "glProgramParameters4dvNV", "GL_NV_vertex_program", (void *) wine_glProgramParameters4dvNV }, - { "glProgramParameters4fvNV", "GL_NV_vertex_program", (void *) wine_glProgramParameters4fvNV }, - { "glProgramStringARB", "GL_ARB_vertex_program", (void *) wine_glProgramStringARB }, - { "glProgramUniform1fEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform1fEXT }, - { "glProgramUniform1fvEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform1fvEXT }, - { "glProgramUniform1iEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform1iEXT }, - { "glProgramUniform1ivEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform1ivEXT }, - { "glProgramUniform1uiEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform1uiEXT }, - { "glProgramUniform1uivEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform1uivEXT }, - { "glProgramUniform2fEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform2fEXT }, - { "glProgramUniform2fvEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform2fvEXT }, - { "glProgramUniform2iEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform2iEXT }, - { "glProgramUniform2ivEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform2ivEXT }, - { "glProgramUniform2uiEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform2uiEXT }, - { "glProgramUniform2uivEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform2uivEXT }, - { "glProgramUniform3fEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform3fEXT }, - { "glProgramUniform3fvEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform3fvEXT }, - { "glProgramUniform3iEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform3iEXT }, - { "glProgramUniform3ivEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform3ivEXT }, - { "glProgramUniform3uiEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform3uiEXT }, - { "glProgramUniform3uivEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform3uivEXT }, - { "glProgramUniform4fEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform4fEXT }, - { "glProgramUniform4fvEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform4fvEXT }, - { "glProgramUniform4iEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform4iEXT }, - { "glProgramUniform4ivEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform4ivEXT }, - { "glProgramUniform4uiEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform4uiEXT }, - { "glProgramUniform4uivEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniform4uivEXT }, - { "glProgramUniformMatrix2fvEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniformMatrix2fvEXT }, - { "glProgramUniformMatrix2x3fvEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniformMatrix2x3fvEXT }, - { "glProgramUniformMatrix2x4fvEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniformMatrix2x4fvEXT }, - { "glProgramUniformMatrix3fvEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniformMatrix3fvEXT }, - { "glProgramUniformMatrix3x2fvEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniformMatrix3x2fvEXT }, - { "glProgramUniformMatrix3x4fvEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniformMatrix3x4fvEXT }, - { "glProgramUniformMatrix4fvEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniformMatrix4fvEXT }, - { "glProgramUniformMatrix4x2fvEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniformMatrix4x2fvEXT }, - { "glProgramUniformMatrix4x3fvEXT", "GL_EXT_direct_state_access", (void *) wine_glProgramUniformMatrix4x3fvEXT }, - { "glProgramVertexLimitNV", "GL_NV_geometry_program4", (void *) wine_glProgramVertexLimitNV }, - { "glPushClientAttribDefaultEXT", "GL_EXT_direct_state_access", (void *) wine_glPushClientAttribDefaultEXT }, - { "glReadBufferRegion", "GL_KTX_buffer_region", (void *) wine_glReadBufferRegion }, - { "glReadInstrumentsSGIX", "GL_SGIX_instruments", (void *) wine_glReadInstrumentsSGIX }, - { "glReferencePlaneSGIX", "GL_SGIX_reference_plane", (void *) wine_glReferencePlaneSGIX }, - { "glRenderbufferStorage", "GL_ARB_framebuffer_object", (void *) wine_glRenderbufferStorage }, - { "glRenderbufferStorageEXT", "GL_EXT_framebuffer_object", (void *) wine_glRenderbufferStorageEXT }, - { "glRenderbufferStorageMultisample", "GL_ARB_framebuffer_object", (void *) wine_glRenderbufferStorageMultisample }, - { "glRenderbufferStorageMultisampleCoverageNV", "GL_NV_framebuffer_multisample_coverage", (void *) wine_glRenderbufferStorageMultisampleCoverageNV }, - { "glRenderbufferStorageMultisampleEXT", "GL_EXT_framebuffer_multisample", (void *) wine_glRenderbufferStorageMultisampleEXT }, - { "glReplacementCodePointerSUN", "GL_SUN_triangle_list", (void *) wine_glReplacementCodePointerSUN }, - { "glReplacementCodeubSUN", "GL_SUN_triangle_list", (void *) wine_glReplacementCodeubSUN }, - { "glReplacementCodeubvSUN", "GL_SUN_triangle_list", (void *) wine_glReplacementCodeubvSUN }, - { "glReplacementCodeuiColor3fVertex3fSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiColor3fVertex3fSUN }, - { "glReplacementCodeuiColor3fVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiColor3fVertex3fvSUN }, - { "glReplacementCodeuiColor4fNormal3fVertex3fSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiColor4fNormal3fVertex3fSUN }, - { "glReplacementCodeuiColor4fNormal3fVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiColor4fNormal3fVertex3fvSUN }, - { "glReplacementCodeuiColor4ubVertex3fSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiColor4ubVertex3fSUN }, - { "glReplacementCodeuiColor4ubVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiColor4ubVertex3fvSUN }, - { "glReplacementCodeuiNormal3fVertex3fSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiNormal3fVertex3fSUN }, - { "glReplacementCodeuiNormal3fVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiNormal3fVertex3fvSUN }, - { "glReplacementCodeuiSUN", "GL_SUN_triangle_list", (void *) wine_glReplacementCodeuiSUN }, - { "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN }, - { "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN }, - { "glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN }, - { "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN }, - { "glReplacementCodeuiTexCoord2fVertex3fSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiTexCoord2fVertex3fSUN }, - { "glReplacementCodeuiTexCoord2fVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiTexCoord2fVertex3fvSUN }, - { "glReplacementCodeuiVertex3fSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiVertex3fSUN }, - { "glReplacementCodeuiVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glReplacementCodeuiVertex3fvSUN }, - { "glReplacementCodeuivSUN", "GL_SUN_triangle_list", (void *) wine_glReplacementCodeuivSUN }, - { "glReplacementCodeusSUN", "GL_SUN_triangle_list", (void *) wine_glReplacementCodeusSUN }, - { "glReplacementCodeusvSUN", "GL_SUN_triangle_list", (void *) wine_glReplacementCodeusvSUN }, - { "glRequestResidentProgramsNV", "GL_NV_vertex_program", (void *) wine_glRequestResidentProgramsNV }, - { "glResetHistogramEXT", "GL_EXT_histogram", (void *) wine_glResetHistogramEXT }, - { "glResetMinmaxEXT", "GL_EXT_histogram", (void *) wine_glResetMinmaxEXT }, - { "glResizeBuffersMESA", "GL_MESA_resize_buffers", (void *) wine_glResizeBuffersMESA }, - { "glSampleCoverage", "GL_VERSION_1_3", (void *) wine_glSampleCoverage }, - { "glSampleCoverageARB", "GL_ARB_multisample", (void *) wine_glSampleCoverageARB }, - { "glSampleMapATI", "GL_ATI_fragment_shader", (void *) wine_glSampleMapATI }, - { "glSampleMaskEXT", "GL_EXT_multisample", (void *) wine_glSampleMaskEXT }, - { "glSampleMaskSGIS", "GL_SGIS_multisample", (void *) wine_glSampleMaskSGIS }, - { "glSamplePatternEXT", "GL_EXT_multisample", (void *) wine_glSamplePatternEXT }, - { "glSamplePatternSGIS", "GL_SGIS_multisample", (void *) wine_glSamplePatternSGIS }, - { "glSecondaryColor3b", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3b }, - { "glSecondaryColor3bEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3bEXT }, - { "glSecondaryColor3bv", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3bv }, - { "glSecondaryColor3bvEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3bvEXT }, - { "glSecondaryColor3d", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3d }, - { "glSecondaryColor3dEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3dEXT }, - { "glSecondaryColor3dv", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3dv }, - { "glSecondaryColor3dvEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3dvEXT }, - { "glSecondaryColor3f", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3f }, - { "glSecondaryColor3fEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3fEXT }, - { "glSecondaryColor3fv", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3fv }, - { "glSecondaryColor3fvEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3fvEXT }, - { "glSecondaryColor3hNV", "GL_NV_half_float", (void *) wine_glSecondaryColor3hNV }, - { "glSecondaryColor3hvNV", "GL_NV_half_float", (void *) wine_glSecondaryColor3hvNV }, - { "glSecondaryColor3i", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3i }, - { "glSecondaryColor3iEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3iEXT }, - { "glSecondaryColor3iv", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3iv }, - { "glSecondaryColor3ivEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3ivEXT }, - { "glSecondaryColor3s", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3s }, - { "glSecondaryColor3sEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3sEXT }, - { "glSecondaryColor3sv", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3sv }, - { "glSecondaryColor3svEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3svEXT }, - { "glSecondaryColor3ub", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3ub }, - { "glSecondaryColor3ubEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3ubEXT }, - { "glSecondaryColor3ubv", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3ubv }, - { "glSecondaryColor3ubvEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3ubvEXT }, - { "glSecondaryColor3ui", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3ui }, - { "glSecondaryColor3uiEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3uiEXT }, - { "glSecondaryColor3uiv", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3uiv }, - { "glSecondaryColor3uivEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3uivEXT }, - { "glSecondaryColor3us", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3us }, - { "glSecondaryColor3usEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3usEXT }, - { "glSecondaryColor3usv", "GL_VERSION_1_4", (void *) wine_glSecondaryColor3usv }, - { "glSecondaryColor3usvEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColor3usvEXT }, - { "glSecondaryColorPointer", "GL_VERSION_1_4", (void *) wine_glSecondaryColorPointer }, - { "glSecondaryColorPointerEXT", "GL_EXT_secondary_color", (void *) wine_glSecondaryColorPointerEXT }, - { "glSecondaryColorPointerListIBM", "GL_IBM_vertex_array_lists", (void *) wine_glSecondaryColorPointerListIBM }, - { "glSelectTextureCoordSetSGIS", "GL_SGIS_multitexture", (void *) wine_glSelectTextureCoordSetSGIS }, - { "glSelectTextureSGIS", "GL_SGIS_multitexture", (void *) wine_glSelectTextureSGIS }, - { "glSeparableFilter2DEXT", "GL_EXT_convolution", (void *) wine_glSeparableFilter2DEXT }, - { "glSetFenceAPPLE", "GL_APPLE_fence", (void *) wine_glSetFenceAPPLE }, - { "glSetFenceNV", "GL_NV_fence", (void *) wine_glSetFenceNV }, - { "glSetFragmentShaderConstantATI", "GL_ATI_fragment_shader", (void *) wine_glSetFragmentShaderConstantATI }, - { "glSetInvariantEXT", "GL_EXT_vertex_shader", (void *) wine_glSetInvariantEXT }, - { "glSetLocalConstantEXT", "GL_EXT_vertex_shader", (void *) wine_glSetLocalConstantEXT }, - { "glShaderOp1EXT", "GL_EXT_vertex_shader", (void *) wine_glShaderOp1EXT }, - { "glShaderOp2EXT", "GL_EXT_vertex_shader", (void *) wine_glShaderOp2EXT }, - { "glShaderOp3EXT", "GL_EXT_vertex_shader", (void *) wine_glShaderOp3EXT }, - { "glShaderSource", "GL_VERSION_2_0", (void *) wine_glShaderSource }, - { "glShaderSourceARB", "GL_ARB_shader_objects", (void *) wine_glShaderSourceARB }, - { "glSharpenTexFuncSGIS", "GL_SGIS_sharpen_texture", (void *) wine_glSharpenTexFuncSGIS }, - { "glSpriteParameterfSGIX", "GL_SGIX_sprite", (void *) wine_glSpriteParameterfSGIX }, - { "glSpriteParameterfvSGIX", "GL_SGIX_sprite", (void *) wine_glSpriteParameterfvSGIX }, - { "glSpriteParameteriSGIX", "GL_SGIX_sprite", (void *) wine_glSpriteParameteriSGIX }, - { "glSpriteParameterivSGIX", "GL_SGIX_sprite", (void *) wine_glSpriteParameterivSGIX }, - { "glStartInstrumentsSGIX", "GL_SGIX_instruments", (void *) wine_glStartInstrumentsSGIX }, - { "glStencilClearTagEXT", "GL_EXT_stencil_clear_tag", (void *) wine_glStencilClearTagEXT }, - { "glStencilFuncSeparate", "GL_VERSION_2_0", (void *) wine_glStencilFuncSeparate }, - { "glStencilFuncSeparateATI", "GL_ATI_separate_stencil", (void *) wine_glStencilFuncSeparateATI }, - { "glStencilMaskSeparate", "GL_VERSION_2_0", (void *) wine_glStencilMaskSeparate }, - { "glStencilOpSeparate", "GL_VERSION_2_0", (void *) wine_glStencilOpSeparate }, - { "glStencilOpSeparateATI", "GL_ATI_separate_stencil", (void *) wine_glStencilOpSeparateATI }, - { "glStopInstrumentsSGIX", "GL_SGIX_instruments", (void *) wine_glStopInstrumentsSGIX }, - { "glStringMarkerGREMEDY", "GL_GREMEDY_string_marker", (void *) wine_glStringMarkerGREMEDY }, - { "glSwizzleEXT", "GL_EXT_vertex_shader", (void *) wine_glSwizzleEXT }, - { "glTagSampleBufferSGIX", "GL_SGIX_tag_sample_buffer", (void *) wine_glTagSampleBufferSGIX }, - { "glTangent3bEXT", "GL_EXT_coordinate_frame", (void *) wine_glTangent3bEXT }, - { "glTangent3bvEXT", "GL_EXT_coordinate_frame", (void *) wine_glTangent3bvEXT }, - { "glTangent3dEXT", "GL_EXT_coordinate_frame", (void *) wine_glTangent3dEXT }, - { "glTangent3dvEXT", "GL_EXT_coordinate_frame", (void *) wine_glTangent3dvEXT }, - { "glTangent3fEXT", "GL_EXT_coordinate_frame", (void *) wine_glTangent3fEXT }, - { "glTangent3fvEXT", "GL_EXT_coordinate_frame", (void *) wine_glTangent3fvEXT }, - { "glTangent3iEXT", "GL_EXT_coordinate_frame", (void *) wine_glTangent3iEXT }, - { "glTangent3ivEXT", "GL_EXT_coordinate_frame", (void *) wine_glTangent3ivEXT }, - { "glTangent3sEXT", "GL_EXT_coordinate_frame", (void *) wine_glTangent3sEXT }, - { "glTangent3svEXT", "GL_EXT_coordinate_frame", (void *) wine_glTangent3svEXT }, - { "glTangentPointerEXT", "GL_EXT_coordinate_frame", (void *) wine_glTangentPointerEXT }, - { "glTbufferMask3DFX", "GL_3DFX_tbuffer", (void *) wine_glTbufferMask3DFX }, - { "glTestFenceAPPLE", "GL_APPLE_fence", (void *) wine_glTestFenceAPPLE }, - { "glTestFenceNV", "GL_NV_fence", (void *) wine_glTestFenceNV }, - { "glTestObjectAPPLE", "GL_APPLE_fence", (void *) wine_glTestObjectAPPLE }, - { "glTexBufferARB", "GL_ARB_texture_buffer_object", (void *) wine_glTexBufferARB }, - { "glTexBufferEXT", "GL_EXT_texture_buffer_object", (void *) wine_glTexBufferEXT }, - { "glTexBumpParameterfvATI", "GL_ATI_envmap_bumpmap", (void *) wine_glTexBumpParameterfvATI }, - { "glTexBumpParameterivATI", "GL_ATI_envmap_bumpmap", (void *) wine_glTexBumpParameterivATI }, - { "glTexCoord1hNV", "GL_NV_half_float", (void *) wine_glTexCoord1hNV }, - { "glTexCoord1hvNV", "GL_NV_half_float", (void *) wine_glTexCoord1hvNV }, - { "glTexCoord2fColor3fVertex3fSUN", "GL_SUN_vertex", (void *) wine_glTexCoord2fColor3fVertex3fSUN }, - { "glTexCoord2fColor3fVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glTexCoord2fColor3fVertex3fvSUN }, - { "glTexCoord2fColor4fNormal3fVertex3fSUN", "GL_SUN_vertex", (void *) wine_glTexCoord2fColor4fNormal3fVertex3fSUN }, - { "glTexCoord2fColor4fNormal3fVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glTexCoord2fColor4fNormal3fVertex3fvSUN }, - { "glTexCoord2fColor4ubVertex3fSUN", "GL_SUN_vertex", (void *) wine_glTexCoord2fColor4ubVertex3fSUN }, - { "glTexCoord2fColor4ubVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glTexCoord2fColor4ubVertex3fvSUN }, - { "glTexCoord2fNormal3fVertex3fSUN", "GL_SUN_vertex", (void *) wine_glTexCoord2fNormal3fVertex3fSUN }, - { "glTexCoord2fNormal3fVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glTexCoord2fNormal3fVertex3fvSUN }, - { "glTexCoord2fVertex3fSUN", "GL_SUN_vertex", (void *) wine_glTexCoord2fVertex3fSUN }, - { "glTexCoord2fVertex3fvSUN", "GL_SUN_vertex", (void *) wine_glTexCoord2fVertex3fvSUN }, - { "glTexCoord2hNV", "GL_NV_half_float", (void *) wine_glTexCoord2hNV }, - { "glTexCoord2hvNV", "GL_NV_half_float", (void *) wine_glTexCoord2hvNV }, - { "glTexCoord3hNV", "GL_NV_half_float", (void *) wine_glTexCoord3hNV }, - { "glTexCoord3hvNV", "GL_NV_half_float", (void *) wine_glTexCoord3hvNV }, - { "glTexCoord4fColor4fNormal3fVertex4fSUN", "GL_SUN_vertex", (void *) wine_glTexCoord4fColor4fNormal3fVertex4fSUN }, - { "glTexCoord4fColor4fNormal3fVertex4fvSUN", "GL_SUN_vertex", (void *) wine_glTexCoord4fColor4fNormal3fVertex4fvSUN }, - { "glTexCoord4fVertex4fSUN", "GL_SUN_vertex", (void *) wine_glTexCoord4fVertex4fSUN }, - { "glTexCoord4fVertex4fvSUN", "GL_SUN_vertex", (void *) wine_glTexCoord4fVertex4fvSUN }, - { "glTexCoord4hNV", "GL_NV_half_float", (void *) wine_glTexCoord4hNV }, - { "glTexCoord4hvNV", "GL_NV_half_float", (void *) wine_glTexCoord4hvNV }, - { "glTexCoordPointerEXT", "GL_EXT_vertex_array", (void *) wine_glTexCoordPointerEXT }, - { "glTexCoordPointerListIBM", "GL_IBM_vertex_array_lists", (void *) wine_glTexCoordPointerListIBM }, - { "glTexCoordPointervINTEL", "GL_INTEL_parallel_arrays", (void *) wine_glTexCoordPointervINTEL }, - { "glTexFilterFuncSGIS", "GL_SGIS_texture_filter4", (void *) wine_glTexFilterFuncSGIS }, - { "glTexImage3DEXT", "GL_EXT_texture3D", (void *) wine_glTexImage3DEXT }, - { "glTexImage4DSGIS", "GL_SGIS_texture4D", (void *) wine_glTexImage4DSGIS }, - { "glTexParameterIiv", "GL_VERSION_3_0", (void *) wine_glTexParameterIiv }, - { "glTexParameterIivEXT", "GL_EXT_texture_integer", (void *) wine_glTexParameterIivEXT }, - { "glTexParameterIuiv", "GL_VERSION_3_0", (void *) wine_glTexParameterIuiv }, - { "glTexParameterIuivEXT", "GL_EXT_texture_integer", (void *) wine_glTexParameterIuivEXT }, - { "glTexSubImage1DEXT", "GL_EXT_subtexture", (void *) wine_glTexSubImage1DEXT }, - { "glTexSubImage2DEXT", "GL_EXT_subtexture", (void *) wine_glTexSubImage2DEXT }, - { "glTexSubImage3DEXT", "GL_EXT_texture3D", (void *) wine_glTexSubImage3DEXT }, - { "glTexSubImage4DSGIS", "GL_SGIS_texture4D", (void *) wine_glTexSubImage4DSGIS }, - { "glTextureBufferEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureBufferEXT }, - { "glTextureColorMaskSGIS", "GL_SGIS_texture_color_mask", (void *) wine_glTextureColorMaskSGIS }, - { "glTextureImage1DEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureImage1DEXT }, - { "glTextureImage2DEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureImage2DEXT }, - { "glTextureImage3DEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureImage3DEXT }, - { "glTextureLightEXT", "GL_EXT_light_texture", (void *) wine_glTextureLightEXT }, - { "glTextureMaterialEXT", "GL_EXT_light_texture", (void *) wine_glTextureMaterialEXT }, - { "glTextureNormalEXT", "GL_EXT_texture_perturb_normal", (void *) wine_glTextureNormalEXT }, - { "glTextureParameterIivEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureParameterIivEXT }, - { "glTextureParameterIuivEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureParameterIuivEXT }, - { "glTextureParameterfEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureParameterfEXT }, - { "glTextureParameterfvEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureParameterfvEXT }, - { "glTextureParameteriEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureParameteriEXT }, - { "glTextureParameterivEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureParameterivEXT }, - { "glTextureRenderbufferEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureRenderbufferEXT }, - { "glTextureSubImage1DEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureSubImage1DEXT }, - { "glTextureSubImage2DEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureSubImage2DEXT }, - { "glTextureSubImage3DEXT", "GL_EXT_direct_state_access", (void *) wine_glTextureSubImage3DEXT }, - { "glTrackMatrixNV", "GL_NV_vertex_program", (void *) wine_glTrackMatrixNV }, - { "glTransformFeedbackAttribsNV", "GL_NV_transform_feedback", (void *) wine_glTransformFeedbackAttribsNV }, - { "glTransformFeedbackVaryings", "GL_VERSION_3_0", (void *) wine_glTransformFeedbackVaryings }, - { "glTransformFeedbackVaryingsEXT", "GL_EXT_transform_feedback", (void *) wine_glTransformFeedbackVaryingsEXT }, - { "glTransformFeedbackVaryingsNV", "GL_NV_transform_feedback", (void *) wine_glTransformFeedbackVaryingsNV }, - { "glUniform1f", "GL_VERSION_2_0", (void *) wine_glUniform1f }, - { "glUniform1fARB", "GL_ARB_shader_objects", (void *) wine_glUniform1fARB }, - { "glUniform1fv", "GL_VERSION_2_0", (void *) wine_glUniform1fv }, - { "glUniform1fvARB", "GL_ARB_shader_objects", (void *) wine_glUniform1fvARB }, - { "glUniform1i", "GL_VERSION_2_0", (void *) wine_glUniform1i }, - { "glUniform1iARB", "GL_ARB_shader_objects", (void *) wine_glUniform1iARB }, - { "glUniform1iv", "GL_VERSION_2_0", (void *) wine_glUniform1iv }, - { "glUniform1ivARB", "GL_ARB_shader_objects", (void *) wine_glUniform1ivARB }, - { "glUniform1ui", "GL_VERSION_3_0", (void *) wine_glUniform1ui }, - { "glUniform1uiEXT", "GL_EXT_gpu_shader4", (void *) wine_glUniform1uiEXT }, - { "glUniform1uiv", "GL_VERSION_3_0", (void *) wine_glUniform1uiv }, - { "glUniform1uivEXT", "GL_EXT_gpu_shader4", (void *) wine_glUniform1uivEXT }, - { "glUniform2f", "GL_VERSION_2_0", (void *) wine_glUniform2f }, - { "glUniform2fARB", "GL_ARB_shader_objects", (void *) wine_glUniform2fARB }, - { "glUniform2fv", "GL_VERSION_2_0", (void *) wine_glUniform2fv }, - { "glUniform2fvARB", "GL_ARB_shader_objects", (void *) wine_glUniform2fvARB }, - { "glUniform2i", "GL_VERSION_2_0", (void *) wine_glUniform2i }, - { "glUniform2iARB", "GL_ARB_shader_objects", (void *) wine_glUniform2iARB }, - { "glUniform2iv", "GL_VERSION_2_0", (void *) wine_glUniform2iv }, - { "glUniform2ivARB", "GL_ARB_shader_objects", (void *) wine_glUniform2ivARB }, - { "glUniform2ui", "GL_VERSION_3_0", (void *) wine_glUniform2ui }, - { "glUniform2uiEXT", "GL_EXT_gpu_shader4", (void *) wine_glUniform2uiEXT }, - { "glUniform2uiv", "GL_VERSION_3_0", (void *) wine_glUniform2uiv }, - { "glUniform2uivEXT", "GL_EXT_gpu_shader4", (void *) wine_glUniform2uivEXT }, - { "glUniform3f", "GL_VERSION_2_0", (void *) wine_glUniform3f }, - { "glUniform3fARB", "GL_ARB_shader_objects", (void *) wine_glUniform3fARB }, - { "glUniform3fv", "GL_VERSION_2_0", (void *) wine_glUniform3fv }, - { "glUniform3fvARB", "GL_ARB_shader_objects", (void *) wine_glUniform3fvARB }, - { "glUniform3i", "GL_VERSION_2_0", (void *) wine_glUniform3i }, - { "glUniform3iARB", "GL_ARB_shader_objects", (void *) wine_glUniform3iARB }, - { "glUniform3iv", "GL_VERSION_2_0", (void *) wine_glUniform3iv }, - { "glUniform3ivARB", "GL_ARB_shader_objects", (void *) wine_glUniform3ivARB }, - { "glUniform3ui", "GL_VERSION_3_0", (void *) wine_glUniform3ui }, - { "glUniform3uiEXT", "GL_EXT_gpu_shader4", (void *) wine_glUniform3uiEXT }, - { "glUniform3uiv", "GL_VERSION_3_0", (void *) wine_glUniform3uiv }, - { "glUniform3uivEXT", "GL_EXT_gpu_shader4", (void *) wine_glUniform3uivEXT }, - { "glUniform4f", "GL_VERSION_2_0", (void *) wine_glUniform4f }, - { "glUniform4fARB", "GL_ARB_shader_objects", (void *) wine_glUniform4fARB }, - { "glUniform4fv", "GL_VERSION_2_0", (void *) wine_glUniform4fv }, - { "glUniform4fvARB", "GL_ARB_shader_objects", (void *) wine_glUniform4fvARB }, - { "glUniform4i", "GL_VERSION_2_0", (void *) wine_glUniform4i }, - { "glUniform4iARB", "GL_ARB_shader_objects", (void *) wine_glUniform4iARB }, - { "glUniform4iv", "GL_VERSION_2_0", (void *) wine_glUniform4iv }, - { "glUniform4ivARB", "GL_ARB_shader_objects", (void *) wine_glUniform4ivARB }, - { "glUniform4ui", "GL_VERSION_3_0", (void *) wine_glUniform4ui }, - { "glUniform4uiEXT", "GL_EXT_gpu_shader4", (void *) wine_glUniform4uiEXT }, - { "glUniform4uiv", "GL_VERSION_3_0", (void *) wine_glUniform4uiv }, - { "glUniform4uivEXT", "GL_EXT_gpu_shader4", (void *) wine_glUniform4uivEXT }, - { "glUniformBufferEXT", "GL_EXT_bindable_uniform", (void *) wine_glUniformBufferEXT }, - { "glUniformMatrix2fv", "GL_VERSION_2_0", (void *) wine_glUniformMatrix2fv }, - { "glUniformMatrix2fvARB", "GL_ARB_shader_objects", (void *) wine_glUniformMatrix2fvARB }, - { "glUniformMatrix2x3fv", "GL_VERSION_2_1", (void *) wine_glUniformMatrix2x3fv }, - { "glUniformMatrix2x4fv", "GL_VERSION_2_1", (void *) wine_glUniformMatrix2x4fv }, - { "glUniformMatrix3fv", "GL_VERSION_2_0", (void *) wine_glUniformMatrix3fv }, - { "glUniformMatrix3fvARB", "GL_ARB_shader_objects", (void *) wine_glUniformMatrix3fvARB }, - { "glUniformMatrix3x2fv", "GL_VERSION_2_1", (void *) wine_glUniformMatrix3x2fv }, - { "glUniformMatrix3x4fv", "GL_VERSION_2_1", (void *) wine_glUniformMatrix3x4fv }, - { "glUniformMatrix4fv", "GL_VERSION_2_0", (void *) wine_glUniformMatrix4fv }, - { "glUniformMatrix4fvARB", "GL_ARB_shader_objects", (void *) wine_glUniformMatrix4fvARB }, - { "glUniformMatrix4x2fv", "GL_VERSION_2_1", (void *) wine_glUniformMatrix4x2fv }, - { "glUniformMatrix4x3fv", "GL_VERSION_2_1", (void *) wine_glUniformMatrix4x3fv }, - { "glUnlockArraysEXT", "GL_EXT_compiled_vertex_array", (void *) wine_glUnlockArraysEXT }, - { "glUnmapBuffer", "GL_VERSION_1_5", (void *) wine_glUnmapBuffer }, - { "glUnmapBufferARB", "GL_ARB_vertex_buffer_object", (void *) wine_glUnmapBufferARB }, - { "glUnmapNamedBufferEXT", "GL_EXT_direct_state_access", (void *) wine_glUnmapNamedBufferEXT }, - { "glUnmapObjectBufferATI", "GL_ATI_map_object_buffer", (void *) wine_glUnmapObjectBufferATI }, - { "glUpdateObjectBufferATI", "GL_ATI_vertex_array_object", (void *) wine_glUpdateObjectBufferATI }, - { "glUseProgram", "GL_VERSION_2_0", (void *) wine_glUseProgram }, - { "glUseProgramObjectARB", "GL_ARB_shader_objects", (void *) wine_glUseProgramObjectARB }, - { "glValidateProgram", "GL_VERSION_2_0", (void *) wine_glValidateProgram }, - { "glValidateProgramARB", "GL_ARB_shader_objects", (void *) wine_glValidateProgramARB }, - { "glVariantArrayObjectATI", "GL_ATI_vertex_array_object", (void *) wine_glVariantArrayObjectATI }, - { "glVariantPointerEXT", "GL_EXT_vertex_shader", (void *) wine_glVariantPointerEXT }, - { "glVariantbvEXT", "GL_EXT_vertex_shader", (void *) wine_glVariantbvEXT }, - { "glVariantdvEXT", "GL_EXT_vertex_shader", (void *) wine_glVariantdvEXT }, - { "glVariantfvEXT", "GL_EXT_vertex_shader", (void *) wine_glVariantfvEXT }, - { "glVariantivEXT", "GL_EXT_vertex_shader", (void *) wine_glVariantivEXT }, - { "glVariantsvEXT", "GL_EXT_vertex_shader", (void *) wine_glVariantsvEXT }, - { "glVariantubvEXT", "GL_EXT_vertex_shader", (void *) wine_glVariantubvEXT }, - { "glVariantuivEXT", "GL_EXT_vertex_shader", (void *) wine_glVariantuivEXT }, - { "glVariantusvEXT", "GL_EXT_vertex_shader", (void *) wine_glVariantusvEXT }, - { "glVertex2hNV", "GL_NV_half_float", (void *) wine_glVertex2hNV }, - { "glVertex2hvNV", "GL_NV_half_float", (void *) wine_glVertex2hvNV }, - { "glVertex3hNV", "GL_NV_half_float", (void *) wine_glVertex3hNV }, - { "glVertex3hvNV", "GL_NV_half_float", (void *) wine_glVertex3hvNV }, - { "glVertex4hNV", "GL_NV_half_float", (void *) wine_glVertex4hNV }, - { "glVertex4hvNV", "GL_NV_half_float", (void *) wine_glVertex4hvNV }, - { "glVertexArrayParameteriAPPLE", "GL_APPLE_vertex_array_range", (void *) wine_glVertexArrayParameteriAPPLE }, - { "glVertexArrayRangeAPPLE", "GL_APPLE_vertex_array_range", (void *) wine_glVertexArrayRangeAPPLE }, - { "glVertexArrayRangeNV", "GL_NV_vertex_array_range", (void *) wine_glVertexArrayRangeNV }, - { "glVertexAttrib1d", "GL_VERSION_2_0", (void *) wine_glVertexAttrib1d }, - { "glVertexAttrib1dARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib1dARB }, - { "glVertexAttrib1dNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib1dNV }, - { "glVertexAttrib1dv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib1dv }, - { "glVertexAttrib1dvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib1dvARB }, - { "glVertexAttrib1dvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib1dvNV }, - { "glVertexAttrib1f", "GL_VERSION_2_0", (void *) wine_glVertexAttrib1f }, - { "glVertexAttrib1fARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib1fARB }, - { "glVertexAttrib1fNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib1fNV }, - { "glVertexAttrib1fv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib1fv }, - { "glVertexAttrib1fvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib1fvARB }, - { "glVertexAttrib1fvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib1fvNV }, - { "glVertexAttrib1hNV", "GL_NV_half_float", (void *) wine_glVertexAttrib1hNV }, - { "glVertexAttrib1hvNV", "GL_NV_half_float", (void *) wine_glVertexAttrib1hvNV }, - { "glVertexAttrib1s", "GL_VERSION_2_0", (void *) wine_glVertexAttrib1s }, - { "glVertexAttrib1sARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib1sARB }, - { "glVertexAttrib1sNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib1sNV }, - { "glVertexAttrib1sv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib1sv }, - { "glVertexAttrib1svARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib1svARB }, - { "glVertexAttrib1svNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib1svNV }, - { "glVertexAttrib2d", "GL_VERSION_2_0", (void *) wine_glVertexAttrib2d }, - { "glVertexAttrib2dARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib2dARB }, - { "glVertexAttrib2dNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib2dNV }, - { "glVertexAttrib2dv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib2dv }, - { "glVertexAttrib2dvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib2dvARB }, - { "glVertexAttrib2dvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib2dvNV }, - { "glVertexAttrib2f", "GL_VERSION_2_0", (void *) wine_glVertexAttrib2f }, - { "glVertexAttrib2fARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib2fARB }, - { "glVertexAttrib2fNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib2fNV }, - { "glVertexAttrib2fv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib2fv }, - { "glVertexAttrib2fvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib2fvARB }, - { "glVertexAttrib2fvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib2fvNV }, - { "glVertexAttrib2hNV", "GL_NV_half_float", (void *) wine_glVertexAttrib2hNV }, - { "glVertexAttrib2hvNV", "GL_NV_half_float", (void *) wine_glVertexAttrib2hvNV }, - { "glVertexAttrib2s", "GL_VERSION_2_0", (void *) wine_glVertexAttrib2s }, - { "glVertexAttrib2sARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib2sARB }, - { "glVertexAttrib2sNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib2sNV }, - { "glVertexAttrib2sv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib2sv }, - { "glVertexAttrib2svARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib2svARB }, - { "glVertexAttrib2svNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib2svNV }, - { "glVertexAttrib3d", "GL_VERSION_2_0", (void *) wine_glVertexAttrib3d }, - { "glVertexAttrib3dARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib3dARB }, - { "glVertexAttrib3dNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib3dNV }, - { "glVertexAttrib3dv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib3dv }, - { "glVertexAttrib3dvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib3dvARB }, - { "glVertexAttrib3dvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib3dvNV }, - { "glVertexAttrib3f", "GL_VERSION_2_0", (void *) wine_glVertexAttrib3f }, - { "glVertexAttrib3fARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib3fARB }, - { "glVertexAttrib3fNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib3fNV }, - { "glVertexAttrib3fv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib3fv }, - { "glVertexAttrib3fvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib3fvARB }, - { "glVertexAttrib3fvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib3fvNV }, - { "glVertexAttrib3hNV", "GL_NV_half_float", (void *) wine_glVertexAttrib3hNV }, - { "glVertexAttrib3hvNV", "GL_NV_half_float", (void *) wine_glVertexAttrib3hvNV }, - { "glVertexAttrib3s", "GL_VERSION_2_0", (void *) wine_glVertexAttrib3s }, - { "glVertexAttrib3sARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib3sARB }, - { "glVertexAttrib3sNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib3sNV }, - { "glVertexAttrib3sv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib3sv }, - { "glVertexAttrib3svARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib3svARB }, - { "glVertexAttrib3svNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib3svNV }, - { "glVertexAttrib4Nbv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4Nbv }, - { "glVertexAttrib4NbvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4NbvARB }, - { "glVertexAttrib4Niv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4Niv }, - { "glVertexAttrib4NivARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4NivARB }, - { "glVertexAttrib4Nsv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4Nsv }, - { "glVertexAttrib4NsvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4NsvARB }, - { "glVertexAttrib4Nub", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4Nub }, - { "glVertexAttrib4NubARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4NubARB }, - { "glVertexAttrib4Nubv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4Nubv }, - { "glVertexAttrib4NubvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4NubvARB }, - { "glVertexAttrib4Nuiv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4Nuiv }, - { "glVertexAttrib4NuivARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4NuivARB }, - { "glVertexAttrib4Nusv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4Nusv }, - { "glVertexAttrib4NusvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4NusvARB }, - { "glVertexAttrib4bv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4bv }, - { "glVertexAttrib4bvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4bvARB }, - { "glVertexAttrib4d", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4d }, - { "glVertexAttrib4dARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4dARB }, - { "glVertexAttrib4dNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib4dNV }, - { "glVertexAttrib4dv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4dv }, - { "glVertexAttrib4dvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4dvARB }, - { "glVertexAttrib4dvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib4dvNV }, - { "glVertexAttrib4f", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4f }, - { "glVertexAttrib4fARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4fARB }, - { "glVertexAttrib4fNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib4fNV }, - { "glVertexAttrib4fv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4fv }, - { "glVertexAttrib4fvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4fvARB }, - { "glVertexAttrib4fvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib4fvNV }, - { "glVertexAttrib4hNV", "GL_NV_half_float", (void *) wine_glVertexAttrib4hNV }, - { "glVertexAttrib4hvNV", "GL_NV_half_float", (void *) wine_glVertexAttrib4hvNV }, - { "glVertexAttrib4iv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4iv }, - { "glVertexAttrib4ivARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4ivARB }, - { "glVertexAttrib4s", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4s }, - { "glVertexAttrib4sARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4sARB }, - { "glVertexAttrib4sNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib4sNV }, - { "glVertexAttrib4sv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4sv }, - { "glVertexAttrib4svARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4svARB }, - { "glVertexAttrib4svNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib4svNV }, - { "glVertexAttrib4ubNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib4ubNV }, - { "glVertexAttrib4ubv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4ubv }, - { "glVertexAttrib4ubvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4ubvARB }, - { "glVertexAttrib4ubvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttrib4ubvNV }, - { "glVertexAttrib4uiv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4uiv }, - { "glVertexAttrib4uivARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4uivARB }, - { "glVertexAttrib4usv", "GL_VERSION_2_0", (void *) wine_glVertexAttrib4usv }, - { "glVertexAttrib4usvARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttrib4usvARB }, - { "glVertexAttribArrayObjectATI", "GL_ATI_vertex_attrib_array_object", (void *) wine_glVertexAttribArrayObjectATI }, - { "glVertexAttribDivisor", "GL_ARB_instanced_arrays", (void *) wine_glVertexAttribDivisor }, - { "glVertexAttribI1i", "GL_VERSION_3_0", (void *) wine_glVertexAttribI1i }, - { "glVertexAttribI1iEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI1iEXT }, - { "glVertexAttribI1iv", "GL_VERSION_3_0", (void *) wine_glVertexAttribI1iv }, - { "glVertexAttribI1ivEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI1ivEXT }, - { "glVertexAttribI1ui", "GL_VERSION_3_0", (void *) wine_glVertexAttribI1ui }, - { "glVertexAttribI1uiEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI1uiEXT }, - { "glVertexAttribI1uiv", "GL_VERSION_3_0", (void *) wine_glVertexAttribI1uiv }, - { "glVertexAttribI1uivEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI1uivEXT }, - { "glVertexAttribI2i", "GL_VERSION_3_0", (void *) wine_glVertexAttribI2i }, - { "glVertexAttribI2iEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI2iEXT }, - { "glVertexAttribI2iv", "GL_VERSION_3_0", (void *) wine_glVertexAttribI2iv }, - { "glVertexAttribI2ivEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI2ivEXT }, - { "glVertexAttribI2ui", "GL_VERSION_3_0", (void *) wine_glVertexAttribI2ui }, - { "glVertexAttribI2uiEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI2uiEXT }, - { "glVertexAttribI2uiv", "GL_VERSION_3_0", (void *) wine_glVertexAttribI2uiv }, - { "glVertexAttribI2uivEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI2uivEXT }, - { "glVertexAttribI3i", "GL_VERSION_3_0", (void *) wine_glVertexAttribI3i }, - { "glVertexAttribI3iEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI3iEXT }, - { "glVertexAttribI3iv", "GL_VERSION_3_0", (void *) wine_glVertexAttribI3iv }, - { "glVertexAttribI3ivEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI3ivEXT }, - { "glVertexAttribI3ui", "GL_VERSION_3_0", (void *) wine_glVertexAttribI3ui }, - { "glVertexAttribI3uiEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI3uiEXT }, - { "glVertexAttribI3uiv", "GL_VERSION_3_0", (void *) wine_glVertexAttribI3uiv }, - { "glVertexAttribI3uivEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI3uivEXT }, - { "glVertexAttribI4bv", "GL_VERSION_3_0", (void *) wine_glVertexAttribI4bv }, - { "glVertexAttribI4bvEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI4bvEXT }, - { "glVertexAttribI4i", "GL_VERSION_3_0", (void *) wine_glVertexAttribI4i }, - { "glVertexAttribI4iEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI4iEXT }, - { "glVertexAttribI4iv", "GL_VERSION_3_0", (void *) wine_glVertexAttribI4iv }, - { "glVertexAttribI4ivEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI4ivEXT }, - { "glVertexAttribI4sv", "GL_VERSION_3_0", (void *) wine_glVertexAttribI4sv }, - { "glVertexAttribI4svEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI4svEXT }, - { "glVertexAttribI4ubv", "GL_VERSION_3_0", (void *) wine_glVertexAttribI4ubv }, - { "glVertexAttribI4ubvEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI4ubvEXT }, - { "glVertexAttribI4ui", "GL_VERSION_3_0", (void *) wine_glVertexAttribI4ui }, - { "glVertexAttribI4uiEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI4uiEXT }, - { "glVertexAttribI4uiv", "GL_VERSION_3_0", (void *) wine_glVertexAttribI4uiv }, - { "glVertexAttribI4uivEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI4uivEXT }, - { "glVertexAttribI4usv", "GL_VERSION_3_0", (void *) wine_glVertexAttribI4usv }, - { "glVertexAttribI4usvEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribI4usvEXT }, - { "glVertexAttribIPointer", "GL_VERSION_3_0", (void *) wine_glVertexAttribIPointer }, - { "glVertexAttribIPointerEXT", "GL_NV_vertex_program4", (void *) wine_glVertexAttribIPointerEXT }, - { "glVertexAttribPointer", "GL_VERSION_2_0", (void *) wine_glVertexAttribPointer }, - { "glVertexAttribPointerARB", "GL_ARB_vertex_program", (void *) wine_glVertexAttribPointerARB }, - { "glVertexAttribPointerNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribPointerNV }, - { "glVertexAttribs1dvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribs1dvNV }, - { "glVertexAttribs1fvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribs1fvNV }, - { "glVertexAttribs1hvNV", "GL_NV_half_float", (void *) wine_glVertexAttribs1hvNV }, - { "glVertexAttribs1svNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribs1svNV }, - { "glVertexAttribs2dvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribs2dvNV }, - { "glVertexAttribs2fvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribs2fvNV }, - { "glVertexAttribs2hvNV", "GL_NV_half_float", (void *) wine_glVertexAttribs2hvNV }, - { "glVertexAttribs2svNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribs2svNV }, - { "glVertexAttribs3dvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribs3dvNV }, - { "glVertexAttribs3fvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribs3fvNV }, - { "glVertexAttribs3hvNV", "GL_NV_half_float", (void *) wine_glVertexAttribs3hvNV }, - { "glVertexAttribs3svNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribs3svNV }, - { "glVertexAttribs4dvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribs4dvNV }, - { "glVertexAttribs4fvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribs4fvNV }, - { "glVertexAttribs4hvNV", "GL_NV_half_float", (void *) wine_glVertexAttribs4hvNV }, - { "glVertexAttribs4svNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribs4svNV }, - { "glVertexAttribs4ubvNV", "GL_NV_vertex_program", (void *) wine_glVertexAttribs4ubvNV }, - { "glVertexBlendARB", "GL_ARB_vertex_blend", (void *) wine_glVertexBlendARB }, - { "glVertexBlendEnvfATI", "GL_ATI_vertex_streams", (void *) wine_glVertexBlendEnvfATI }, - { "glVertexBlendEnviATI", "GL_ATI_vertex_streams", (void *) wine_glVertexBlendEnviATI }, - { "glVertexPointerEXT", "GL_EXT_vertex_array", (void *) wine_glVertexPointerEXT }, - { "glVertexPointerListIBM", "GL_IBM_vertex_array_lists", (void *) wine_glVertexPointerListIBM }, - { "glVertexPointervINTEL", "GL_INTEL_parallel_arrays", (void *) wine_glVertexPointervINTEL }, - { "glVertexStream1dATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream1dATI }, - { "glVertexStream1dvATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream1dvATI }, - { "glVertexStream1fATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream1fATI }, - { "glVertexStream1fvATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream1fvATI }, - { "glVertexStream1iATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream1iATI }, - { "glVertexStream1ivATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream1ivATI }, - { "glVertexStream1sATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream1sATI }, - { "glVertexStream1svATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream1svATI }, - { "glVertexStream2dATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream2dATI }, - { "glVertexStream2dvATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream2dvATI }, - { "glVertexStream2fATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream2fATI }, - { "glVertexStream2fvATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream2fvATI }, - { "glVertexStream2iATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream2iATI }, - { "glVertexStream2ivATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream2ivATI }, - { "glVertexStream2sATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream2sATI }, - { "glVertexStream2svATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream2svATI }, - { "glVertexStream3dATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream3dATI }, - { "glVertexStream3dvATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream3dvATI }, - { "glVertexStream3fATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream3fATI }, - { "glVertexStream3fvATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream3fvATI }, - { "glVertexStream3iATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream3iATI }, - { "glVertexStream3ivATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream3ivATI }, - { "glVertexStream3sATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream3sATI }, - { "glVertexStream3svATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream3svATI }, - { "glVertexStream4dATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream4dATI }, - { "glVertexStream4dvATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream4dvATI }, - { "glVertexStream4fATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream4fATI }, - { "glVertexStream4fvATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream4fvATI }, - { "glVertexStream4iATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream4iATI }, - { "glVertexStream4ivATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream4ivATI }, - { "glVertexStream4sATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream4sATI }, - { "glVertexStream4svATI", "GL_ATI_vertex_streams", (void *) wine_glVertexStream4svATI }, - { "glVertexWeightPointerEXT", "GL_EXT_vertex_weighting", (void *) wine_glVertexWeightPointerEXT }, - { "glVertexWeightfEXT", "GL_EXT_vertex_weighting", (void *) wine_glVertexWeightfEXT }, - { "glVertexWeightfvEXT", "GL_EXT_vertex_weighting", (void *) wine_glVertexWeightfvEXT }, - { "glVertexWeighthNV", "GL_NV_half_float", (void *) wine_glVertexWeighthNV }, - { "glVertexWeighthvNV", "GL_NV_half_float", (void *) wine_glVertexWeighthvNV }, - { "glWeightPointerARB", "GL_ARB_vertex_blend", (void *) wine_glWeightPointerARB }, - { "glWeightbvARB", "GL_ARB_vertex_blend", (void *) wine_glWeightbvARB }, - { "glWeightdvARB", "GL_ARB_vertex_blend", (void *) wine_glWeightdvARB }, - { "glWeightfvARB", "GL_ARB_vertex_blend", (void *) wine_glWeightfvARB }, - { "glWeightivARB", "GL_ARB_vertex_blend", (void *) wine_glWeightivARB }, - { "glWeightsvARB", "GL_ARB_vertex_blend", (void *) wine_glWeightsvARB }, - { "glWeightubvARB", "GL_ARB_vertex_blend", (void *) wine_glWeightubvARB }, - { "glWeightuivARB", "GL_ARB_vertex_blend", (void *) wine_glWeightuivARB }, - { "glWeightusvARB", "GL_ARB_vertex_blend", (void *) wine_glWeightusvARB }, - { "glWindowPos2d", "GL_VERSION_1_4", (void *) wine_glWindowPos2d }, - { "glWindowPos2dARB", "GL_ARB_window_pos", (void *) wine_glWindowPos2dARB }, - { "glWindowPos2dMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos2dMESA }, - { "glWindowPos2dv", "GL_VERSION_1_4", (void *) wine_glWindowPos2dv }, - { "glWindowPos2dvARB", "GL_ARB_window_pos", (void *) wine_glWindowPos2dvARB }, - { "glWindowPos2dvMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos2dvMESA }, - { "glWindowPos2f", "GL_VERSION_1_4", (void *) wine_glWindowPos2f }, - { "glWindowPos2fARB", "GL_ARB_window_pos", (void *) wine_glWindowPos2fARB }, - { "glWindowPos2fMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos2fMESA }, - { "glWindowPos2fv", "GL_VERSION_1_4", (void *) wine_glWindowPos2fv }, - { "glWindowPos2fvARB", "GL_ARB_window_pos", (void *) wine_glWindowPos2fvARB }, - { "glWindowPos2fvMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos2fvMESA }, - { "glWindowPos2i", "GL_VERSION_1_4", (void *) wine_glWindowPos2i }, - { "glWindowPos2iARB", "GL_ARB_window_pos", (void *) wine_glWindowPos2iARB }, - { "glWindowPos2iMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos2iMESA }, - { "glWindowPos2iv", "GL_VERSION_1_4", (void *) wine_glWindowPos2iv }, - { "glWindowPos2ivARB", "GL_ARB_window_pos", (void *) wine_glWindowPos2ivARB }, - { "glWindowPos2ivMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos2ivMESA }, - { "glWindowPos2s", "GL_VERSION_1_4", (void *) wine_glWindowPos2s }, - { "glWindowPos2sARB", "GL_ARB_window_pos", (void *) wine_glWindowPos2sARB }, - { "glWindowPos2sMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos2sMESA }, - { "glWindowPos2sv", "GL_VERSION_1_4", (void *) wine_glWindowPos2sv }, - { "glWindowPos2svARB", "GL_ARB_window_pos", (void *) wine_glWindowPos2svARB }, - { "glWindowPos2svMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos2svMESA }, - { "glWindowPos3d", "GL_VERSION_1_4", (void *) wine_glWindowPos3d }, - { "glWindowPos3dARB", "GL_ARB_window_pos", (void *) wine_glWindowPos3dARB }, - { "glWindowPos3dMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos3dMESA }, - { "glWindowPos3dv", "GL_VERSION_1_4", (void *) wine_glWindowPos3dv }, - { "glWindowPos3dvARB", "GL_ARB_window_pos", (void *) wine_glWindowPos3dvARB }, - { "glWindowPos3dvMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos3dvMESA }, - { "glWindowPos3f", "GL_VERSION_1_4", (void *) wine_glWindowPos3f }, - { "glWindowPos3fARB", "GL_ARB_window_pos", (void *) wine_glWindowPos3fARB }, - { "glWindowPos3fMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos3fMESA }, - { "glWindowPos3fv", "GL_VERSION_1_4", (void *) wine_glWindowPos3fv }, - { "glWindowPos3fvARB", "GL_ARB_window_pos", (void *) wine_glWindowPos3fvARB }, - { "glWindowPos3fvMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos3fvMESA }, - { "glWindowPos3i", "GL_VERSION_1_4", (void *) wine_glWindowPos3i }, - { "glWindowPos3iARB", "GL_ARB_window_pos", (void *) wine_glWindowPos3iARB }, - { "glWindowPos3iMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos3iMESA }, - { "glWindowPos3iv", "GL_VERSION_1_4", (void *) wine_glWindowPos3iv }, - { "glWindowPos3ivARB", "GL_ARB_window_pos", (void *) wine_glWindowPos3ivARB }, - { "glWindowPos3ivMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos3ivMESA }, - { "glWindowPos3s", "GL_VERSION_1_4", (void *) wine_glWindowPos3s }, - { "glWindowPos3sARB", "GL_ARB_window_pos", (void *) wine_glWindowPos3sARB }, - { "glWindowPos3sMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos3sMESA }, - { "glWindowPos3sv", "GL_VERSION_1_4", (void *) wine_glWindowPos3sv }, - { "glWindowPos3svARB", "GL_ARB_window_pos", (void *) wine_glWindowPos3svARB }, - { "glWindowPos3svMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos3svMESA }, - { "glWindowPos4dMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos4dMESA }, - { "glWindowPos4dvMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos4dvMESA }, - { "glWindowPos4fMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos4fMESA }, - { "glWindowPos4fvMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos4fvMESA }, - { "glWindowPos4iMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos4iMESA }, - { "glWindowPos4ivMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos4ivMESA }, - { "glWindowPos4sMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos4sMESA }, - { "glWindowPos4svMESA", "GL_MESA_window_pos", (void *) wine_glWindowPos4svMESA }, - { "glWriteMaskEXT", "GL_EXT_vertex_shader", (void *) wine_glWriteMaskEXT } +const OpenGL_extension extension_registry[NB_EXTENSIONS] = { + { "glActiveStencilFaceEXT", "GL_EXT_stencil_two_side", wine_glActiveStencilFaceEXT }, + { "glActiveTexture", "GL_VERSION_1_3", wine_glActiveTexture }, + { "glActiveTextureARB", "GL_ARB_multitexture", wine_glActiveTextureARB }, + { "glActiveVaryingNV", "GL_NV_transform_feedback", wine_glActiveVaryingNV }, + { "glAlphaFragmentOp1ATI", "GL_ATI_fragment_shader", wine_glAlphaFragmentOp1ATI }, + { "glAlphaFragmentOp2ATI", "GL_ATI_fragment_shader", wine_glAlphaFragmentOp2ATI }, + { "glAlphaFragmentOp3ATI", "GL_ATI_fragment_shader", wine_glAlphaFragmentOp3ATI }, + { "glApplyTextureEXT", "GL_EXT_light_texture", wine_glApplyTextureEXT }, + { "glAreProgramsResidentNV", "GL_NV_vertex_program", wine_glAreProgramsResidentNV }, + { "glAreTexturesResidentEXT", "GL_EXT_texture_object", wine_glAreTexturesResidentEXT }, + { "glArrayElementEXT", "GL_EXT_vertex_array", wine_glArrayElementEXT }, + { "glArrayObjectATI", "GL_ATI_vertex_array_object", wine_glArrayObjectATI }, + { "glAsyncMarkerSGIX", "GL_SGIX_async", wine_glAsyncMarkerSGIX }, + { "glAttachObjectARB", "GL_ARB_shader_objects", wine_glAttachObjectARB }, + { "glAttachShader", "GL_VERSION_2_0", wine_glAttachShader }, + { "glBeginConditionalRender", "GL_VERSION_3_0", wine_glBeginConditionalRender }, + { "glBeginConditionalRenderNV", "GL_NV_conditional_render", wine_glBeginConditionalRenderNV }, + { "glBeginFragmentShaderATI", "GL_ATI_fragment_shader", wine_glBeginFragmentShaderATI }, + { "glBeginOcclusionQueryNV", "GL_NV_occlusion_query", wine_glBeginOcclusionQueryNV }, + { "glBeginQuery", "GL_VERSION_1_5", wine_glBeginQuery }, + { "glBeginQueryARB", "GL_ARB_occlusion_query", wine_glBeginQueryARB }, + { "glBeginTransformFeedback", "GL_VERSION_3_0", wine_glBeginTransformFeedback }, + { "glBeginTransformFeedbackEXT", "GL_EXT_transform_feedback", wine_glBeginTransformFeedbackEXT }, + { "glBeginTransformFeedbackNV", "GL_NV_transform_feedback", wine_glBeginTransformFeedbackNV }, + { "glBeginVertexShaderEXT", "GL_EXT_vertex_shader", wine_glBeginVertexShaderEXT }, + { "glBindAttribLocation", "GL_VERSION_2_0", wine_glBindAttribLocation }, + { "glBindAttribLocationARB", "GL_ARB_vertex_shader", wine_glBindAttribLocationARB }, + { "glBindBuffer", "GL_VERSION_1_5", wine_glBindBuffer }, + { "glBindBufferARB", "GL_ARB_vertex_buffer_object", wine_glBindBufferARB }, + { "glBindBufferBase", "GL_VERSION_3_0", wine_glBindBufferBase }, + { "glBindBufferBaseEXT", "GL_EXT_transform_feedback", wine_glBindBufferBaseEXT }, + { "glBindBufferBaseNV", "GL_NV_transform_feedback", wine_glBindBufferBaseNV }, + { "glBindBufferOffsetEXT", "GL_EXT_transform_feedback", wine_glBindBufferOffsetEXT }, + { "glBindBufferOffsetNV", "GL_NV_transform_feedback", wine_glBindBufferOffsetNV }, + { "glBindBufferRange", "GL_VERSION_3_0", wine_glBindBufferRange }, + { "glBindBufferRangeEXT", "GL_EXT_transform_feedback", wine_glBindBufferRangeEXT }, + { "glBindBufferRangeNV", "GL_NV_transform_feedback", wine_glBindBufferRangeNV }, + { "glBindFragDataLocation", "GL_VERSION_3_0", wine_glBindFragDataLocation }, + { "glBindFragDataLocationEXT", "GL_EXT_gpu_shader4", wine_glBindFragDataLocationEXT }, + { "glBindFragmentShaderATI", "GL_ATI_fragment_shader", wine_glBindFragmentShaderATI }, + { "glBindFramebuffer", "GL_ARB_framebuffer_object", wine_glBindFramebuffer }, + { "glBindFramebufferEXT", "GL_EXT_framebuffer_object", wine_glBindFramebufferEXT }, + { "glBindLightParameterEXT", "GL_EXT_vertex_shader", wine_glBindLightParameterEXT }, + { "glBindMaterialParameterEXT", "GL_EXT_vertex_shader", wine_glBindMaterialParameterEXT }, + { "glBindMultiTextureEXT", "GL_EXT_direct_state_access", wine_glBindMultiTextureEXT }, + { "glBindParameterEXT", "GL_EXT_vertex_shader", wine_glBindParameterEXT }, + { "glBindProgramARB", "GL_ARB_vertex_program", wine_glBindProgramARB }, + { "glBindProgramNV", "GL_NV_vertex_program", wine_glBindProgramNV }, + { "glBindRenderbuffer", "GL_ARB_framebuffer_object", wine_glBindRenderbuffer }, + { "glBindRenderbufferEXT", "GL_EXT_framebuffer_object", wine_glBindRenderbufferEXT }, + { "glBindTexGenParameterEXT", "GL_EXT_vertex_shader", wine_glBindTexGenParameterEXT }, + { "glBindTextureEXT", "GL_EXT_texture_object", wine_glBindTextureEXT }, + { "glBindTextureUnitParameterEXT", "GL_EXT_vertex_shader", wine_glBindTextureUnitParameterEXT }, + { "glBindVertexArray", "GL_ARB_vertex_array_object", wine_glBindVertexArray }, + { "glBindVertexArrayAPPLE", "GL_APPLE_vertex_array_object", wine_glBindVertexArrayAPPLE }, + { "glBindVertexShaderEXT", "GL_EXT_vertex_shader", wine_glBindVertexShaderEXT }, + { "glBinormal3bEXT", "GL_EXT_coordinate_frame", wine_glBinormal3bEXT }, + { "glBinormal3bvEXT", "GL_EXT_coordinate_frame", wine_glBinormal3bvEXT }, + { "glBinormal3dEXT", "GL_EXT_coordinate_frame", wine_glBinormal3dEXT }, + { "glBinormal3dvEXT", "GL_EXT_coordinate_frame", wine_glBinormal3dvEXT }, + { "glBinormal3fEXT", "GL_EXT_coordinate_frame", wine_glBinormal3fEXT }, + { "glBinormal3fvEXT", "GL_EXT_coordinate_frame", wine_glBinormal3fvEXT }, + { "glBinormal3iEXT", "GL_EXT_coordinate_frame", wine_glBinormal3iEXT }, + { "glBinormal3ivEXT", "GL_EXT_coordinate_frame", wine_glBinormal3ivEXT }, + { "glBinormal3sEXT", "GL_EXT_coordinate_frame", wine_glBinormal3sEXT }, + { "glBinormal3svEXT", "GL_EXT_coordinate_frame", wine_glBinormal3svEXT }, + { "glBinormalPointerEXT", "GL_EXT_coordinate_frame", wine_glBinormalPointerEXT }, + { "glBlendColorEXT", "GL_EXT_blend_color", wine_glBlendColorEXT }, + { "glBlendEquationEXT", "GL_EXT_blend_minmax", wine_glBlendEquationEXT }, + { "glBlendEquationSeparate", "GL_VERSION_2_0", wine_glBlendEquationSeparate }, + { "glBlendEquationSeparateEXT", "GL_EXT_blend_equation_separate", wine_glBlendEquationSeparateEXT }, + { "glBlendFuncSeparate", "GL_VERSION_1_4", wine_glBlendFuncSeparate }, + { "glBlendFuncSeparateEXT", "GL_EXT_blend_func_separate", wine_glBlendFuncSeparateEXT }, + { "glBlendFuncSeparateINGR", "GL_INGR_blend_func_separate", wine_glBlendFuncSeparateINGR }, + { "glBlitFramebuffer", "GL_ARB_framebuffer_object", wine_glBlitFramebuffer }, + { "glBlitFramebufferEXT", "GL_EXT_framebuffer_blit", wine_glBlitFramebufferEXT }, + { "glBufferData", "GL_VERSION_1_5", wine_glBufferData }, + { "glBufferDataARB", "GL_ARB_vertex_buffer_object", wine_glBufferDataARB }, + { "glBufferParameteriAPPLE", "GL_APPLE_flush_buffer_range", wine_glBufferParameteriAPPLE }, + { "glBufferRegionEnabled", "GL_KTX_buffer_region", wine_glBufferRegionEnabled }, + { "glBufferSubData", "GL_VERSION_1_5", wine_glBufferSubData }, + { "glBufferSubDataARB", "GL_ARB_vertex_buffer_object", wine_glBufferSubDataARB }, + { "glCheckFramebufferStatus", "GL_ARB_framebuffer_object", wine_glCheckFramebufferStatus }, + { "glCheckFramebufferStatusEXT", "GL_EXT_framebuffer_object", wine_glCheckFramebufferStatusEXT }, + { "glCheckNamedFramebufferStatusEXT", "GL_EXT_direct_state_access", wine_glCheckNamedFramebufferStatusEXT }, + { "glClampColor", "GL_VERSION_3_0", wine_glClampColor }, + { "glClampColorARB", "GL_ARB_color_buffer_float", wine_glClampColorARB }, + { "glClearBufferfi", "GL_VERSION_3_0", wine_glClearBufferfi }, + { "glClearBufferfv", "GL_VERSION_3_0", wine_glClearBufferfv }, + { "glClearBufferiv", "GL_VERSION_3_0", wine_glClearBufferiv }, + { "glClearBufferuiv", "GL_VERSION_3_0", wine_glClearBufferuiv }, + { "glClearColorIiEXT", "GL_EXT_texture_integer", wine_glClearColorIiEXT }, + { "glClearColorIuiEXT", "GL_EXT_texture_integer", wine_glClearColorIuiEXT }, + { "glClearDepthdNV", "GL_NV_depth_buffer_float", wine_glClearDepthdNV }, + { "glClientActiveTexture", "GL_VERSION_1_3", wine_glClientActiveTexture }, + { "glClientActiveTextureARB", "GL_ARB_multitexture", wine_glClientActiveTextureARB }, + { "glClientActiveVertexStreamATI", "GL_ATI_vertex_streams", wine_glClientActiveVertexStreamATI }, + { "glClientAttribDefaultEXT", "GL_EXT_direct_state_access", wine_glClientAttribDefaultEXT }, + { "glColor3fVertex3fSUN", "GL_SUN_vertex", wine_glColor3fVertex3fSUN }, + { "glColor3fVertex3fvSUN", "GL_SUN_vertex", wine_glColor3fVertex3fvSUN }, + { "glColor3hNV", "GL_NV_half_float", wine_glColor3hNV }, + { "glColor3hvNV", "GL_NV_half_float", wine_glColor3hvNV }, + { "glColor4fNormal3fVertex3fSUN", "GL_SUN_vertex", wine_glColor4fNormal3fVertex3fSUN }, + { "glColor4fNormal3fVertex3fvSUN", "GL_SUN_vertex", wine_glColor4fNormal3fVertex3fvSUN }, + { "glColor4hNV", "GL_NV_half_float", wine_glColor4hNV }, + { "glColor4hvNV", "GL_NV_half_float", wine_glColor4hvNV }, + { "glColor4ubVertex2fSUN", "GL_SUN_vertex", wine_glColor4ubVertex2fSUN }, + { "glColor4ubVertex2fvSUN", "GL_SUN_vertex", wine_glColor4ubVertex2fvSUN }, + { "glColor4ubVertex3fSUN", "GL_SUN_vertex", wine_glColor4ubVertex3fSUN }, + { "glColor4ubVertex3fvSUN", "GL_SUN_vertex", wine_glColor4ubVertex3fvSUN }, + { "glColorFragmentOp1ATI", "GL_ATI_fragment_shader", wine_glColorFragmentOp1ATI }, + { "glColorFragmentOp2ATI", "GL_ATI_fragment_shader", wine_glColorFragmentOp2ATI }, + { "glColorFragmentOp3ATI", "GL_ATI_fragment_shader", wine_glColorFragmentOp3ATI }, + { "glColorMaskIndexedEXT", "GL_EXT_draw_buffers2", wine_glColorMaskIndexedEXT }, + { "glColorMaski", "GL_VERSION_3_0", wine_glColorMaski }, + { "glColorPointerEXT", "GL_EXT_vertex_array", wine_glColorPointerEXT }, + { "glColorPointerListIBM", "GL_IBM_vertex_array_lists", wine_glColorPointerListIBM }, + { "glColorPointervINTEL", "GL_INTEL_parallel_arrays", wine_glColorPointervINTEL }, + { "glColorSubTableEXT", "GL_EXT_color_subtable", wine_glColorSubTableEXT }, + { "glColorTableEXT", "GL_EXT_paletted_texture", wine_glColorTableEXT }, + { "glColorTableParameterfvSGI", "GL_SGI_color_table", wine_glColorTableParameterfvSGI }, + { "glColorTableParameterivSGI", "GL_SGI_color_table", wine_glColorTableParameterivSGI }, + { "glColorTableSGI", "GL_SGI_color_table", wine_glColorTableSGI }, + { "glCombinerInputNV", "GL_NV_register_combiners", wine_glCombinerInputNV }, + { "glCombinerOutputNV", "GL_NV_register_combiners", wine_glCombinerOutputNV }, + { "glCombinerParameterfNV", "GL_NV_register_combiners", wine_glCombinerParameterfNV }, + { "glCombinerParameterfvNV", "GL_NV_register_combiners", wine_glCombinerParameterfvNV }, + { "glCombinerParameteriNV", "GL_NV_register_combiners", wine_glCombinerParameteriNV }, + { "glCombinerParameterivNV", "GL_NV_register_combiners", wine_glCombinerParameterivNV }, + { "glCombinerStageParameterfvNV", "GL_NV_register_combiners2", wine_glCombinerStageParameterfvNV }, + { "glCompileShader", "GL_VERSION_2_0", wine_glCompileShader }, + { "glCompileShaderARB", "GL_ARB_shader_objects", wine_glCompileShaderARB }, + { "glCompressedMultiTexImage1DEXT", "GL_EXT_direct_state_access", wine_glCompressedMultiTexImage1DEXT }, + { "glCompressedMultiTexImage2DEXT", "GL_EXT_direct_state_access", wine_glCompressedMultiTexImage2DEXT }, + { "glCompressedMultiTexImage3DEXT", "GL_EXT_direct_state_access", wine_glCompressedMultiTexImage3DEXT }, + { "glCompressedMultiTexSubImage1DEXT", "GL_EXT_direct_state_access", wine_glCompressedMultiTexSubImage1DEXT }, + { "glCompressedMultiTexSubImage2DEXT", "GL_EXT_direct_state_access", wine_glCompressedMultiTexSubImage2DEXT }, + { "glCompressedMultiTexSubImage3DEXT", "GL_EXT_direct_state_access", wine_glCompressedMultiTexSubImage3DEXT }, + { "glCompressedTexImage1D", "GL_VERSION_1_3", wine_glCompressedTexImage1D }, + { "glCompressedTexImage1DARB", "GL_ARB_texture_compression", wine_glCompressedTexImage1DARB }, + { "glCompressedTexImage2D", "GL_VERSION_1_3", wine_glCompressedTexImage2D }, + { "glCompressedTexImage2DARB", "GL_ARB_texture_compression", wine_glCompressedTexImage2DARB }, + { "glCompressedTexImage3D", "GL_VERSION_1_3", wine_glCompressedTexImage3D }, + { "glCompressedTexImage3DARB", "GL_ARB_texture_compression", wine_glCompressedTexImage3DARB }, + { "glCompressedTexSubImage1D", "GL_VERSION_1_3", wine_glCompressedTexSubImage1D }, + { "glCompressedTexSubImage1DARB", "GL_ARB_texture_compression", wine_glCompressedTexSubImage1DARB }, + { "glCompressedTexSubImage2D", "GL_VERSION_1_3", wine_glCompressedTexSubImage2D }, + { "glCompressedTexSubImage2DARB", "GL_ARB_texture_compression", wine_glCompressedTexSubImage2DARB }, + { "glCompressedTexSubImage3D", "GL_VERSION_1_3", wine_glCompressedTexSubImage3D }, + { "glCompressedTexSubImage3DARB", "GL_ARB_texture_compression", wine_glCompressedTexSubImage3DARB }, + { "glCompressedTextureImage1DEXT", "GL_EXT_direct_state_access", wine_glCompressedTextureImage1DEXT }, + { "glCompressedTextureImage2DEXT", "GL_EXT_direct_state_access", wine_glCompressedTextureImage2DEXT }, + { "glCompressedTextureImage3DEXT", "GL_EXT_direct_state_access", wine_glCompressedTextureImage3DEXT }, + { "glCompressedTextureSubImage1DEXT", "GL_EXT_direct_state_access", wine_glCompressedTextureSubImage1DEXT }, + { "glCompressedTextureSubImage2DEXT", "GL_EXT_direct_state_access", wine_glCompressedTextureSubImage2DEXT }, + { "glCompressedTextureSubImage3DEXT", "GL_EXT_direct_state_access", wine_glCompressedTextureSubImage3DEXT }, + { "glConvolutionFilter1DEXT", "GL_EXT_convolution", wine_glConvolutionFilter1DEXT }, + { "glConvolutionFilter2DEXT", "GL_EXT_convolution", wine_glConvolutionFilter2DEXT }, + { "glConvolutionParameterfEXT", "GL_EXT_convolution", wine_glConvolutionParameterfEXT }, + { "glConvolutionParameterfvEXT", "GL_EXT_convolution", wine_glConvolutionParameterfvEXT }, + { "glConvolutionParameteriEXT", "GL_EXT_convolution", wine_glConvolutionParameteriEXT }, + { "glConvolutionParameterivEXT", "GL_EXT_convolution", wine_glConvolutionParameterivEXT }, + { "glCopyColorSubTableEXT", "GL_EXT_color_subtable", wine_glCopyColorSubTableEXT }, + { "glCopyColorTableSGI", "GL_SGI_color_table", wine_glCopyColorTableSGI }, + { "glCopyConvolutionFilter1DEXT", "GL_EXT_convolution", wine_glCopyConvolutionFilter1DEXT }, + { "glCopyConvolutionFilter2DEXT", "GL_EXT_convolution", wine_glCopyConvolutionFilter2DEXT }, + { "glCopyMultiTexImage1DEXT", "GL_EXT_direct_state_access", wine_glCopyMultiTexImage1DEXT }, + { "glCopyMultiTexImage2DEXT", "GL_EXT_direct_state_access", wine_glCopyMultiTexImage2DEXT }, + { "glCopyMultiTexSubImage1DEXT", "GL_EXT_direct_state_access", wine_glCopyMultiTexSubImage1DEXT }, + { "glCopyMultiTexSubImage2DEXT", "GL_EXT_direct_state_access", wine_glCopyMultiTexSubImage2DEXT }, + { "glCopyMultiTexSubImage3DEXT", "GL_EXT_direct_state_access", wine_glCopyMultiTexSubImage3DEXT }, + { "glCopyTexImage1DEXT", "GL_EXT_copy_texture", wine_glCopyTexImage1DEXT }, + { "glCopyTexImage2DEXT", "GL_EXT_copy_texture", wine_glCopyTexImage2DEXT }, + { "glCopyTexSubImage1DEXT", "GL_EXT_copy_texture", wine_glCopyTexSubImage1DEXT }, + { "glCopyTexSubImage2DEXT", "GL_EXT_copy_texture", wine_glCopyTexSubImage2DEXT }, + { "glCopyTexSubImage3DEXT", "GL_EXT_copy_texture", wine_glCopyTexSubImage3DEXT }, + { "glCopyTextureImage1DEXT", "GL_EXT_direct_state_access", wine_glCopyTextureImage1DEXT }, + { "glCopyTextureImage2DEXT", "GL_EXT_direct_state_access", wine_glCopyTextureImage2DEXT }, + { "glCopyTextureSubImage1DEXT", "GL_EXT_direct_state_access", wine_glCopyTextureSubImage1DEXT }, + { "glCopyTextureSubImage2DEXT", "GL_EXT_direct_state_access", wine_glCopyTextureSubImage2DEXT }, + { "glCopyTextureSubImage3DEXT", "GL_EXT_direct_state_access", wine_glCopyTextureSubImage3DEXT }, + { "glCreateProgram", "GL_VERSION_2_0", wine_glCreateProgram }, + { "glCreateProgramObjectARB", "GL_ARB_shader_objects", wine_glCreateProgramObjectARB }, + { "glCreateShader", "GL_VERSION_2_0", wine_glCreateShader }, + { "glCreateShaderObjectARB", "GL_ARB_shader_objects", wine_glCreateShaderObjectARB }, + { "glCullParameterdvEXT", "GL_EXT_cull_vertex", wine_glCullParameterdvEXT }, + { "glCullParameterfvEXT", "GL_EXT_cull_vertex", wine_glCullParameterfvEXT }, + { "glCurrentPaletteMatrixARB", "GL_ARB_matrix_palette", wine_glCurrentPaletteMatrixARB }, + { "glDeformSGIX", "GL_SGIX_polynomial_ffd", wine_glDeformSGIX }, + { "glDeformationMap3dSGIX", "GL_SGIX_polynomial_ffd", wine_glDeformationMap3dSGIX }, + { "glDeformationMap3fSGIX", "GL_SGIX_polynomial_ffd", wine_glDeformationMap3fSGIX }, + { "glDeleteAsyncMarkersSGIX", "GL_SGIX_async", wine_glDeleteAsyncMarkersSGIX }, + { "glDeleteBufferRegion", "GL_KTX_buffer_region", wine_glDeleteBufferRegion }, + { "glDeleteBuffers", "GL_VERSION_1_5", wine_glDeleteBuffers }, + { "glDeleteBuffersARB", "GL_ARB_vertex_buffer_object", wine_glDeleteBuffersARB }, + { "glDeleteFencesAPPLE", "GL_APPLE_fence", wine_glDeleteFencesAPPLE }, + { "glDeleteFencesNV", "GL_NV_fence", wine_glDeleteFencesNV }, + { "glDeleteFragmentShaderATI", "GL_ATI_fragment_shader", wine_glDeleteFragmentShaderATI }, + { "glDeleteFramebuffers", "GL_ARB_framebuffer_object", wine_glDeleteFramebuffers }, + { "glDeleteFramebuffersEXT", "GL_EXT_framebuffer_object", wine_glDeleteFramebuffersEXT }, + { "glDeleteObjectARB", "GL_ARB_shader_objects", wine_glDeleteObjectARB }, + { "glDeleteObjectBufferATI", "GL_ATI_vertex_array_object", wine_glDeleteObjectBufferATI }, + { "glDeleteOcclusionQueriesNV", "GL_NV_occlusion_query", wine_glDeleteOcclusionQueriesNV }, + { "glDeleteProgram", "GL_VERSION_2_0", wine_glDeleteProgram }, + { "glDeleteProgramsARB", "GL_ARB_vertex_program", wine_glDeleteProgramsARB }, + { "glDeleteProgramsNV", "GL_NV_vertex_program", wine_glDeleteProgramsNV }, + { "glDeleteQueries", "GL_VERSION_1_5", wine_glDeleteQueries }, + { "glDeleteQueriesARB", "GL_ARB_occlusion_query", wine_glDeleteQueriesARB }, + { "glDeleteRenderbuffers", "GL_ARB_framebuffer_object", wine_glDeleteRenderbuffers }, + { "glDeleteRenderbuffersEXT", "GL_EXT_framebuffer_object", wine_glDeleteRenderbuffersEXT }, + { "glDeleteShader", "GL_VERSION_2_0", wine_glDeleteShader }, + { "glDeleteTexturesEXT", "GL_EXT_texture_object", wine_glDeleteTexturesEXT }, + { "glDeleteVertexArrays", "GL_ARB_vertex_array_object", wine_glDeleteVertexArrays }, + { "glDeleteVertexArraysAPPLE", "GL_APPLE_vertex_array_object", wine_glDeleteVertexArraysAPPLE }, + { "glDeleteVertexShaderEXT", "GL_EXT_vertex_shader", wine_glDeleteVertexShaderEXT }, + { "glDepthBoundsEXT", "GL_EXT_depth_bounds_test", wine_glDepthBoundsEXT }, + { "glDepthBoundsdNV", "GL_NV_depth_buffer_float", wine_glDepthBoundsdNV }, + { "glDepthRangedNV", "GL_NV_depth_buffer_float", wine_glDepthRangedNV }, + { "glDetachObjectARB", "GL_ARB_shader_objects", wine_glDetachObjectARB }, + { "glDetachShader", "GL_VERSION_2_0", wine_glDetachShader }, + { "glDetailTexFuncSGIS", "GL_SGIS_detail_texture", wine_glDetailTexFuncSGIS }, + { "glDisableClientStateIndexedEXT", "GL_EXT_direct_state_access", wine_glDisableClientStateIndexedEXT }, + { "glDisableIndexedEXT", "GL_EXT_draw_buffers2", wine_glDisableIndexedEXT }, + { "glDisableVariantClientStateEXT", "GL_EXT_vertex_shader", wine_glDisableVariantClientStateEXT }, + { "glDisableVertexAttribArray", "GL_VERSION_2_0", wine_glDisableVertexAttribArray }, + { "glDisableVertexAttribArrayARB", "GL_ARB_vertex_program", wine_glDisableVertexAttribArrayARB }, + { "glDisablei", "GL_VERSION_3_0", wine_glDisablei }, + { "glDrawArraysEXT", "GL_EXT_vertex_array", wine_glDrawArraysEXT }, + { "glDrawArraysInstancedARB", "GL_ARB_draw_instanced", wine_glDrawArraysInstancedARB }, + { "glDrawArraysInstancedEXT", "GL_EXT_draw_instanced", wine_glDrawArraysInstancedEXT }, + { "glDrawBufferRegion", "GL_KTX_buffer_region", wine_glDrawBufferRegion }, + { "glDrawBuffers", "GL_VERSION_2_0", wine_glDrawBuffers }, + { "glDrawBuffersARB", "GL_ARB_draw_buffers", wine_glDrawBuffersARB }, + { "glDrawBuffersATI", "GL_ATI_draw_buffers", wine_glDrawBuffersATI }, + { "glDrawElementArrayAPPLE", "GL_APPLE_element_array", wine_glDrawElementArrayAPPLE }, + { "glDrawElementArrayATI", "GL_ATI_element_array", wine_glDrawElementArrayATI }, + { "glDrawElementsInstancedARB", "GL_ARB_draw_instanced", wine_glDrawElementsInstancedARB }, + { "glDrawElementsInstancedEXT", "GL_EXT_draw_instanced", wine_glDrawElementsInstancedEXT }, + { "glDrawMeshArraysSUN", "GL_SUN_mesh_array", wine_glDrawMeshArraysSUN }, + { "glDrawRangeElementArrayAPPLE", "GL_APPLE_element_array", wine_glDrawRangeElementArrayAPPLE }, + { "glDrawRangeElementArrayATI", "GL_ATI_element_array", wine_glDrawRangeElementArrayATI }, + { "glDrawRangeElementsEXT", "GL_EXT_draw_range_elements", wine_glDrawRangeElementsEXT }, + { "glEdgeFlagPointerEXT", "GL_EXT_vertex_array", wine_glEdgeFlagPointerEXT }, + { "glEdgeFlagPointerListIBM", "GL_IBM_vertex_array_lists", wine_glEdgeFlagPointerListIBM }, + { "glElementPointerAPPLE", "GL_APPLE_element_array", wine_glElementPointerAPPLE }, + { "glElementPointerATI", "GL_ATI_element_array", wine_glElementPointerATI }, + { "glEnableClientStateIndexedEXT", "GL_EXT_direct_state_access", wine_glEnableClientStateIndexedEXT }, + { "glEnableIndexedEXT", "GL_EXT_draw_buffers2", wine_glEnableIndexedEXT }, + { "glEnableVariantClientStateEXT", "GL_EXT_vertex_shader", wine_glEnableVariantClientStateEXT }, + { "glEnableVertexAttribArray", "GL_VERSION_2_0", wine_glEnableVertexAttribArray }, + { "glEnableVertexAttribArrayARB", "GL_ARB_vertex_program", wine_glEnableVertexAttribArrayARB }, + { "glEnablei", "GL_VERSION_3_0", wine_glEnablei }, + { "glEndConditionalRender", "GL_VERSION_3_0", wine_glEndConditionalRender }, + { "glEndConditionalRenderNV", "GL_NV_conditional_render", wine_glEndConditionalRenderNV }, + { "glEndFragmentShaderATI", "GL_ATI_fragment_shader", wine_glEndFragmentShaderATI }, + { "glEndOcclusionQueryNV", "GL_NV_occlusion_query", wine_glEndOcclusionQueryNV }, + { "glEndQuery", "GL_VERSION_1_5", wine_glEndQuery }, + { "glEndQueryARB", "GL_ARB_occlusion_query", wine_glEndQueryARB }, + { "glEndTransformFeedback", "GL_VERSION_3_0", wine_glEndTransformFeedback }, + { "glEndTransformFeedbackEXT", "GL_EXT_transform_feedback", wine_glEndTransformFeedbackEXT }, + { "glEndTransformFeedbackNV", "GL_NV_transform_feedback", wine_glEndTransformFeedbackNV }, + { "glEndVertexShaderEXT", "GL_EXT_vertex_shader", wine_glEndVertexShaderEXT }, + { "glEvalMapsNV", "GL_NV_evaluators", wine_glEvalMapsNV }, + { "glExecuteProgramNV", "GL_NV_vertex_program", wine_glExecuteProgramNV }, + { "glExtractComponentEXT", "GL_EXT_vertex_shader", wine_glExtractComponentEXT }, + { "glFinalCombinerInputNV", "GL_NV_register_combiners", wine_glFinalCombinerInputNV }, + { "glFinishAsyncSGIX", "GL_SGIX_async", wine_glFinishAsyncSGIX }, + { "glFinishFenceAPPLE", "GL_APPLE_fence", wine_glFinishFenceAPPLE }, + { "glFinishFenceNV", "GL_NV_fence", wine_glFinishFenceNV }, + { "glFinishObjectAPPLE", "GL_APPLE_fence", wine_glFinishObjectAPPLE }, + { "glFinishTextureSUNX", "GL_SUNX_constant_data", wine_glFinishTextureSUNX }, + { "glFlushMappedBufferRange", "GL_ARB_map_buffer_range", wine_glFlushMappedBufferRange }, + { "glFlushMappedBufferRangeAPPLE", "GL_APPLE_flush_buffer_range", wine_glFlushMappedBufferRangeAPPLE }, + { "glFlushPixelDataRangeNV", "GL_NV_pixel_data_range", wine_glFlushPixelDataRangeNV }, + { "glFlushRasterSGIX", "GL_SGIX_flush_raster", wine_glFlushRasterSGIX }, + { "glFlushVertexArrayRangeAPPLE", "GL_APPLE_vertex_array_range", wine_glFlushVertexArrayRangeAPPLE }, + { "glFlushVertexArrayRangeNV", "GL_NV_vertex_array_range", wine_glFlushVertexArrayRangeNV }, + { "glFogCoordPointer", "GL_VERSION_1_4", wine_glFogCoordPointer }, + { "glFogCoordPointerEXT", "GL_EXT_fog_coord", wine_glFogCoordPointerEXT }, + { "glFogCoordPointerListIBM", "GL_IBM_vertex_array_lists", wine_glFogCoordPointerListIBM }, + { "glFogCoordd", "GL_VERSION_1_4", wine_glFogCoordd }, + { "glFogCoorddEXT", "GL_EXT_fog_coord", wine_glFogCoorddEXT }, + { "glFogCoorddv", "GL_VERSION_1_4", wine_glFogCoorddv }, + { "glFogCoorddvEXT", "GL_EXT_fog_coord", wine_glFogCoorddvEXT }, + { "glFogCoordf", "GL_VERSION_1_4", wine_glFogCoordf }, + { "glFogCoordfEXT", "GL_EXT_fog_coord", wine_glFogCoordfEXT }, + { "glFogCoordfv", "GL_VERSION_1_4", wine_glFogCoordfv }, + { "glFogCoordfvEXT", "GL_EXT_fog_coord", wine_glFogCoordfvEXT }, + { "glFogCoordhNV", "GL_NV_half_float", wine_glFogCoordhNV }, + { "glFogCoordhvNV", "GL_NV_half_float", wine_glFogCoordhvNV }, + { "glFogFuncSGIS", "GL_SGIS_fog_function", wine_glFogFuncSGIS }, + { "glFragmentColorMaterialSGIX", "GL_SGIX_fragment_lighting", wine_glFragmentColorMaterialSGIX }, + { "glFragmentLightModelfSGIX", "GL_SGIX_fragment_lighting", wine_glFragmentLightModelfSGIX }, + { "glFragmentLightModelfvSGIX", "GL_SGIX_fragment_lighting", wine_glFragmentLightModelfvSGIX }, + { "glFragmentLightModeliSGIX", "GL_SGIX_fragment_lighting", wine_glFragmentLightModeliSGIX }, + { "glFragmentLightModelivSGIX", "GL_SGIX_fragment_lighting", wine_glFragmentLightModelivSGIX }, + { "glFragmentLightfSGIX", "GL_SGIX_fragment_lighting", wine_glFragmentLightfSGIX }, + { "glFragmentLightfvSGIX", "GL_SGIX_fragment_lighting", wine_glFragmentLightfvSGIX }, + { "glFragmentLightiSGIX", "GL_SGIX_fragment_lighting", wine_glFragmentLightiSGIX }, + { "glFragmentLightivSGIX", "GL_SGIX_fragment_lighting", wine_glFragmentLightivSGIX }, + { "glFragmentMaterialfSGIX", "GL_SGIX_fragment_lighting", wine_glFragmentMaterialfSGIX }, + { "glFragmentMaterialfvSGIX", "GL_SGIX_fragment_lighting", wine_glFragmentMaterialfvSGIX }, + { "glFragmentMaterialiSGIX", "GL_SGIX_fragment_lighting", wine_glFragmentMaterialiSGIX }, + { "glFragmentMaterialivSGIX", "GL_SGIX_fragment_lighting", wine_glFragmentMaterialivSGIX }, + { "glFrameTerminatorGREMEDY", "GL_GREMEDY_frame_terminator", wine_glFrameTerminatorGREMEDY }, + { "glFrameZoomSGIX", "GL_SGIX_framezoom", wine_glFrameZoomSGIX }, + { "glFramebufferDrawBufferEXT", "GL_EXT_direct_state_access", wine_glFramebufferDrawBufferEXT }, + { "glFramebufferDrawBuffersEXT", "GL_EXT_direct_state_access", wine_glFramebufferDrawBuffersEXT }, + { "glFramebufferReadBufferEXT", "GL_EXT_direct_state_access", wine_glFramebufferReadBufferEXT }, + { "glFramebufferRenderbuffer", "GL_ARB_framebuffer_object", wine_glFramebufferRenderbuffer }, + { "glFramebufferRenderbufferEXT", "GL_EXT_framebuffer_object", wine_glFramebufferRenderbufferEXT }, + { "glFramebufferTexture1D", "GL_ARB_framebuffer_object", wine_glFramebufferTexture1D }, + { "glFramebufferTexture1DEXT", "GL_EXT_framebuffer_object", wine_glFramebufferTexture1DEXT }, + { "glFramebufferTexture2D", "GL_ARB_framebuffer_object", wine_glFramebufferTexture2D }, + { "glFramebufferTexture2DEXT", "GL_EXT_framebuffer_object", wine_glFramebufferTexture2DEXT }, + { "glFramebufferTexture3D", "GL_ARB_framebuffer_object", wine_glFramebufferTexture3D }, + { "glFramebufferTexture3DEXT", "GL_EXT_framebuffer_object", wine_glFramebufferTexture3DEXT }, + { "glFramebufferTextureARB", "GL_ARB_geometry_shader4", wine_glFramebufferTextureARB }, + { "glFramebufferTextureEXT", "GL_NV_geometry_program4", wine_glFramebufferTextureEXT }, + { "glFramebufferTextureFaceARB", "GL_ARB_geometry_shader4", wine_glFramebufferTextureFaceARB }, + { "glFramebufferTextureFaceEXT", "GL_NV_geometry_program4", wine_glFramebufferTextureFaceEXT }, + { "glFramebufferTextureLayer", "GL_ARB_framebuffer_object", wine_glFramebufferTextureLayer }, + { "glFramebufferTextureLayerARB", "GL_ARB_geometry_shader4", wine_glFramebufferTextureLayerARB }, + { "glFramebufferTextureLayerEXT", "GL_NV_geometry_program4", wine_glFramebufferTextureLayerEXT }, + { "glFreeObjectBufferATI", "GL_ATI_vertex_array_object", wine_glFreeObjectBufferATI }, + { "glGenAsyncMarkersSGIX", "GL_SGIX_async", wine_glGenAsyncMarkersSGIX }, + { "glGenBuffers", "GL_VERSION_1_5", wine_glGenBuffers }, + { "glGenBuffersARB", "GL_ARB_vertex_buffer_object", wine_glGenBuffersARB }, + { "glGenFencesAPPLE", "GL_APPLE_fence", wine_glGenFencesAPPLE }, + { "glGenFencesNV", "GL_NV_fence", wine_glGenFencesNV }, + { "glGenFragmentShadersATI", "GL_ATI_fragment_shader", wine_glGenFragmentShadersATI }, + { "glGenFramebuffers", "GL_ARB_framebuffer_object", wine_glGenFramebuffers }, + { "glGenFramebuffersEXT", "GL_EXT_framebuffer_object", wine_glGenFramebuffersEXT }, + { "glGenOcclusionQueriesNV", "GL_NV_occlusion_query", wine_glGenOcclusionQueriesNV }, + { "glGenProgramsARB", "GL_ARB_vertex_program", wine_glGenProgramsARB }, + { "glGenProgramsNV", "GL_NV_vertex_program", wine_glGenProgramsNV }, + { "glGenQueries", "GL_VERSION_1_5", wine_glGenQueries }, + { "glGenQueriesARB", "GL_ARB_occlusion_query", wine_glGenQueriesARB }, + { "glGenRenderbuffers", "GL_ARB_framebuffer_object", wine_glGenRenderbuffers }, + { "glGenRenderbuffersEXT", "GL_EXT_framebuffer_object", wine_glGenRenderbuffersEXT }, + { "glGenSymbolsEXT", "GL_EXT_vertex_shader", wine_glGenSymbolsEXT }, + { "glGenTexturesEXT", "GL_EXT_texture_object", wine_glGenTexturesEXT }, + { "glGenVertexArrays", "GL_ARB_vertex_array_object", wine_glGenVertexArrays }, + { "glGenVertexArraysAPPLE", "GL_APPLE_vertex_array_object", wine_glGenVertexArraysAPPLE }, + { "glGenVertexShadersEXT", "GL_EXT_vertex_shader", wine_glGenVertexShadersEXT }, + { "glGenerateMipmap", "GL_ARB_framebuffer_object", wine_glGenerateMipmap }, + { "glGenerateMipmapEXT", "GL_EXT_framebuffer_object", wine_glGenerateMipmapEXT }, + { "glGenerateMultiTexMipmapEXT", "GL_EXT_direct_state_access", wine_glGenerateMultiTexMipmapEXT }, + { "glGenerateTextureMipmapEXT", "GL_EXT_direct_state_access", wine_glGenerateTextureMipmapEXT }, + { "glGetActiveAttrib", "GL_VERSION_2_0", wine_glGetActiveAttrib }, + { "glGetActiveAttribARB", "GL_ARB_vertex_shader", wine_glGetActiveAttribARB }, + { "glGetActiveUniform", "GL_VERSION_2_0", wine_glGetActiveUniform }, + { "glGetActiveUniformARB", "GL_ARB_shader_objects", wine_glGetActiveUniformARB }, + { "glGetActiveVaryingNV", "GL_NV_transform_feedback", wine_glGetActiveVaryingNV }, + { "glGetArrayObjectfvATI", "GL_ATI_vertex_array_object", wine_glGetArrayObjectfvATI }, + { "glGetArrayObjectivATI", "GL_ATI_vertex_array_object", wine_glGetArrayObjectivATI }, + { "glGetAttachedObjectsARB", "GL_ARB_shader_objects", wine_glGetAttachedObjectsARB }, + { "glGetAttachedShaders", "GL_VERSION_2_0", wine_glGetAttachedShaders }, + { "glGetAttribLocation", "GL_VERSION_2_0", wine_glGetAttribLocation }, + { "glGetAttribLocationARB", "GL_ARB_vertex_shader", wine_glGetAttribLocationARB }, + { "glGetBooleanIndexedvEXT", "GL_EXT_draw_buffers2", wine_glGetBooleanIndexedvEXT }, + { "glGetBooleani_v", "GL_VERSION_3_0", wine_glGetBooleani_v }, + { "glGetBufferParameteriv", "GL_VERSION_1_5", wine_glGetBufferParameteriv }, + { "glGetBufferParameterivARB", "GL_ARB_vertex_buffer_object", wine_glGetBufferParameterivARB }, + { "glGetBufferPointerv", "GL_VERSION_1_5", wine_glGetBufferPointerv }, + { "glGetBufferPointervARB", "GL_ARB_vertex_buffer_object", wine_glGetBufferPointervARB }, + { "glGetBufferSubData", "GL_VERSION_1_5", wine_glGetBufferSubData }, + { "glGetBufferSubDataARB", "GL_ARB_vertex_buffer_object", wine_glGetBufferSubDataARB }, + { "glGetColorTableEXT", "GL_EXT_paletted_texture", wine_glGetColorTableEXT }, + { "glGetColorTableParameterfvEXT", "GL_EXT_paletted_texture", wine_glGetColorTableParameterfvEXT }, + { "glGetColorTableParameterfvSGI", "GL_SGI_color_table", wine_glGetColorTableParameterfvSGI }, + { "glGetColorTableParameterivEXT", "GL_EXT_paletted_texture", wine_glGetColorTableParameterivEXT }, + { "glGetColorTableParameterivSGI", "GL_SGI_color_table", wine_glGetColorTableParameterivSGI }, + { "glGetColorTableSGI", "GL_SGI_color_table", wine_glGetColorTableSGI }, + { "glGetCombinerInputParameterfvNV", "GL_NV_register_combiners", wine_glGetCombinerInputParameterfvNV }, + { "glGetCombinerInputParameterivNV", "GL_NV_register_combiners", wine_glGetCombinerInputParameterivNV }, + { "glGetCombinerOutputParameterfvNV", "GL_NV_register_combiners", wine_glGetCombinerOutputParameterfvNV }, + { "glGetCombinerOutputParameterivNV", "GL_NV_register_combiners", wine_glGetCombinerOutputParameterivNV }, + { "glGetCombinerStageParameterfvNV", "GL_NV_register_combiners2", wine_glGetCombinerStageParameterfvNV }, + { "glGetCompressedMultiTexImageEXT", "GL_EXT_direct_state_access", wine_glGetCompressedMultiTexImageEXT }, + { "glGetCompressedTexImage", "GL_VERSION_1_3", wine_glGetCompressedTexImage }, + { "glGetCompressedTexImageARB", "GL_ARB_texture_compression", wine_glGetCompressedTexImageARB }, + { "glGetCompressedTextureImageEXT", "GL_EXT_direct_state_access", wine_glGetCompressedTextureImageEXT }, + { "glGetConvolutionFilterEXT", "GL_EXT_convolution", wine_glGetConvolutionFilterEXT }, + { "glGetConvolutionParameterfvEXT", "GL_EXT_convolution", wine_glGetConvolutionParameterfvEXT }, + { "glGetConvolutionParameterivEXT", "GL_EXT_convolution", wine_glGetConvolutionParameterivEXT }, + { "glGetDetailTexFuncSGIS", "GL_SGIS_detail_texture", wine_glGetDetailTexFuncSGIS }, + { "glGetDoubleIndexedvEXT", "GL_EXT_direct_state_access", wine_glGetDoubleIndexedvEXT }, + { "glGetFenceivNV", "GL_NV_fence", wine_glGetFenceivNV }, + { "glGetFinalCombinerInputParameterfvNV", "GL_NV_register_combiners", wine_glGetFinalCombinerInputParameterfvNV }, + { "glGetFinalCombinerInputParameterivNV", "GL_NV_register_combiners", wine_glGetFinalCombinerInputParameterivNV }, + { "glGetFloatIndexedvEXT", "GL_EXT_direct_state_access", wine_glGetFloatIndexedvEXT }, + { "glGetFogFuncSGIS", "GL_SGIS_fog_function", wine_glGetFogFuncSGIS }, + { "glGetFragDataLocation", "GL_VERSION_3_0", wine_glGetFragDataLocation }, + { "glGetFragDataLocationEXT", "GL_EXT_gpu_shader4", wine_glGetFragDataLocationEXT }, + { "glGetFragmentLightfvSGIX", "GL_SGIX_fragment_lighting", wine_glGetFragmentLightfvSGIX }, + { "glGetFragmentLightivSGIX", "GL_SGIX_fragment_lighting", wine_glGetFragmentLightivSGIX }, + { "glGetFragmentMaterialfvSGIX", "GL_SGIX_fragment_lighting", wine_glGetFragmentMaterialfvSGIX }, + { "glGetFragmentMaterialivSGIX", "GL_SGIX_fragment_lighting", wine_glGetFragmentMaterialivSGIX }, + { "glGetFramebufferAttachmentParameteriv", "GL_ARB_framebuffer_object", wine_glGetFramebufferAttachmentParameteriv }, + { "glGetFramebufferAttachmentParameterivEXT", "GL_EXT_framebuffer_object", wine_glGetFramebufferAttachmentParameterivEXT }, + { "glGetFramebufferParameterivEXT", "GL_EXT_direct_state_access", wine_glGetFramebufferParameterivEXT }, + { "glGetHandleARB", "GL_ARB_shader_objects", wine_glGetHandleARB }, + { "glGetHistogramEXT", "GL_EXT_histogram", wine_glGetHistogramEXT }, + { "glGetHistogramParameterfvEXT", "GL_EXT_histogram", wine_glGetHistogramParameterfvEXT }, + { "glGetHistogramParameterivEXT", "GL_EXT_histogram", wine_glGetHistogramParameterivEXT }, + { "glGetImageTransformParameterfvHP", "GL_HP_image_transform", wine_glGetImageTransformParameterfvHP }, + { "glGetImageTransformParameterivHP", "GL_HP_image_transform", wine_glGetImageTransformParameterivHP }, + { "glGetInfoLogARB", "GL_ARB_shader_objects", wine_glGetInfoLogARB }, + { "glGetInstrumentsSGIX", "GL_SGIX_instruments", wine_glGetInstrumentsSGIX }, + { "glGetIntegerIndexedvEXT", "GL_EXT_draw_buffers2", wine_glGetIntegerIndexedvEXT }, + { "glGetIntegeri_v", "GL_VERSION_3_0", wine_glGetIntegeri_v }, + { "glGetInvariantBooleanvEXT", "GL_EXT_vertex_shader", wine_glGetInvariantBooleanvEXT }, + { "glGetInvariantFloatvEXT", "GL_EXT_vertex_shader", wine_glGetInvariantFloatvEXT }, + { "glGetInvariantIntegervEXT", "GL_EXT_vertex_shader", wine_glGetInvariantIntegervEXT }, + { "glGetListParameterfvSGIX", "GL_SGIX_list_priority", wine_glGetListParameterfvSGIX }, + { "glGetListParameterivSGIX", "GL_SGIX_list_priority", wine_glGetListParameterivSGIX }, + { "glGetLocalConstantBooleanvEXT", "GL_EXT_vertex_shader", wine_glGetLocalConstantBooleanvEXT }, + { "glGetLocalConstantFloatvEXT", "GL_EXT_vertex_shader", wine_glGetLocalConstantFloatvEXT }, + { "glGetLocalConstantIntegervEXT", "GL_EXT_vertex_shader", wine_glGetLocalConstantIntegervEXT }, + { "glGetMapAttribParameterfvNV", "GL_NV_evaluators", wine_glGetMapAttribParameterfvNV }, + { "glGetMapAttribParameterivNV", "GL_NV_evaluators", wine_glGetMapAttribParameterivNV }, + { "glGetMapControlPointsNV", "GL_NV_evaluators", wine_glGetMapControlPointsNV }, + { "glGetMapParameterfvNV", "GL_NV_evaluators", wine_glGetMapParameterfvNV }, + { "glGetMapParameterivNV", "GL_NV_evaluators", wine_glGetMapParameterivNV }, + { "glGetMinmaxEXT", "GL_EXT_histogram", wine_glGetMinmaxEXT }, + { "glGetMinmaxParameterfvEXT", "GL_EXT_histogram", wine_glGetMinmaxParameterfvEXT }, + { "glGetMinmaxParameterivEXT", "GL_EXT_histogram", wine_glGetMinmaxParameterivEXT }, + { "glGetMultiTexEnvfvEXT", "GL_EXT_direct_state_access", wine_glGetMultiTexEnvfvEXT }, + { "glGetMultiTexEnvivEXT", "GL_EXT_direct_state_access", wine_glGetMultiTexEnvivEXT }, + { "glGetMultiTexGendvEXT", "GL_EXT_direct_state_access", wine_glGetMultiTexGendvEXT }, + { "glGetMultiTexGenfvEXT", "GL_EXT_direct_state_access", wine_glGetMultiTexGenfvEXT }, + { "glGetMultiTexGenivEXT", "GL_EXT_direct_state_access", wine_glGetMultiTexGenivEXT }, + { "glGetMultiTexImageEXT", "GL_EXT_direct_state_access", wine_glGetMultiTexImageEXT }, + { "glGetMultiTexLevelParameterfvEXT", "GL_EXT_direct_state_access", wine_glGetMultiTexLevelParameterfvEXT }, + { "glGetMultiTexLevelParameterivEXT", "GL_EXT_direct_state_access", wine_glGetMultiTexLevelParameterivEXT }, + { "glGetMultiTexParameterIivEXT", "GL_EXT_direct_state_access", wine_glGetMultiTexParameterIivEXT }, + { "glGetMultiTexParameterIuivEXT", "GL_EXT_direct_state_access", wine_glGetMultiTexParameterIuivEXT }, + { "glGetMultiTexParameterfvEXT", "GL_EXT_direct_state_access", wine_glGetMultiTexParameterfvEXT }, + { "glGetMultiTexParameterivEXT", "GL_EXT_direct_state_access", wine_glGetMultiTexParameterivEXT }, + { "glGetNamedBufferParameterivEXT", "GL_EXT_direct_state_access", wine_glGetNamedBufferParameterivEXT }, + { "glGetNamedBufferPointervEXT", "GL_EXT_direct_state_access", wine_glGetNamedBufferPointervEXT }, + { "glGetNamedBufferSubDataEXT", "GL_EXT_direct_state_access", wine_glGetNamedBufferSubDataEXT }, + { "glGetNamedFramebufferAttachmentParameterivEXT", "GL_EXT_direct_state_access", wine_glGetNamedFramebufferAttachmentParameterivEXT }, + { "glGetNamedProgramLocalParameterIivEXT", "GL_EXT_direct_state_access", wine_glGetNamedProgramLocalParameterIivEXT }, + { "glGetNamedProgramLocalParameterIuivEXT", "GL_EXT_direct_state_access", wine_glGetNamedProgramLocalParameterIuivEXT }, + { "glGetNamedProgramLocalParameterdvEXT", "GL_EXT_direct_state_access", wine_glGetNamedProgramLocalParameterdvEXT }, + { "glGetNamedProgramLocalParameterfvEXT", "GL_EXT_direct_state_access", wine_glGetNamedProgramLocalParameterfvEXT }, + { "glGetNamedProgramStringEXT", "GL_EXT_direct_state_access", wine_glGetNamedProgramStringEXT }, + { "glGetNamedProgramivEXT", "GL_EXT_direct_state_access", wine_glGetNamedProgramivEXT }, + { "glGetNamedRenderbufferParameterivEXT", "GL_EXT_direct_state_access", wine_glGetNamedRenderbufferParameterivEXT }, + { "glGetObjectBufferfvATI", "GL_ATI_vertex_array_object", wine_glGetObjectBufferfvATI }, + { "glGetObjectBufferivATI", "GL_ATI_vertex_array_object", wine_glGetObjectBufferivATI }, + { "glGetObjectParameterfvARB", "GL_ARB_shader_objects", wine_glGetObjectParameterfvARB }, + { "glGetObjectParameterivARB", "GL_ARB_shader_objects", wine_glGetObjectParameterivARB }, + { "glGetOcclusionQueryivNV", "GL_NV_occlusion_query", wine_glGetOcclusionQueryivNV }, + { "glGetOcclusionQueryuivNV", "GL_NV_occlusion_query", wine_glGetOcclusionQueryuivNV }, + { "glGetPixelTexGenParameterfvSGIS", "GL_SGIS_pixel_texture", wine_glGetPixelTexGenParameterfvSGIS }, + { "glGetPixelTexGenParameterivSGIS", "GL_SGIS_pixel_texture", wine_glGetPixelTexGenParameterivSGIS }, + { "glGetPointerIndexedvEXT", "GL_EXT_direct_state_access", wine_glGetPointerIndexedvEXT }, + { "glGetPointervEXT", "GL_EXT_vertex_array", wine_glGetPointervEXT }, + { "glGetProgramEnvParameterIivNV", "GL_NV_gpu_program4", wine_glGetProgramEnvParameterIivNV }, + { "glGetProgramEnvParameterIuivNV", "GL_NV_gpu_program4", wine_glGetProgramEnvParameterIuivNV }, + { "glGetProgramEnvParameterdvARB", "GL_ARB_vertex_program", wine_glGetProgramEnvParameterdvARB }, + { "glGetProgramEnvParameterfvARB", "GL_ARB_vertex_program", wine_glGetProgramEnvParameterfvARB }, + { "glGetProgramInfoLog", "GL_VERSION_2_0", wine_glGetProgramInfoLog }, + { "glGetProgramLocalParameterIivNV", "GL_NV_gpu_program4", wine_glGetProgramLocalParameterIivNV }, + { "glGetProgramLocalParameterIuivNV", "GL_NV_gpu_program4", wine_glGetProgramLocalParameterIuivNV }, + { "glGetProgramLocalParameterdvARB", "GL_ARB_vertex_program", wine_glGetProgramLocalParameterdvARB }, + { "glGetProgramLocalParameterfvARB", "GL_ARB_vertex_program", wine_glGetProgramLocalParameterfvARB }, + { "glGetProgramNamedParameterdvNV", "GL_NV_fragment_program", wine_glGetProgramNamedParameterdvNV }, + { "glGetProgramNamedParameterfvNV", "GL_NV_fragment_program", wine_glGetProgramNamedParameterfvNV }, + { "glGetProgramParameterdvNV", "GL_NV_vertex_program", wine_glGetProgramParameterdvNV }, + { "glGetProgramParameterfvNV", "GL_NV_vertex_program", wine_glGetProgramParameterfvNV }, + { "glGetProgramStringARB", "GL_ARB_vertex_program", wine_glGetProgramStringARB }, + { "glGetProgramStringNV", "GL_NV_vertex_program", wine_glGetProgramStringNV }, + { "glGetProgramiv", "GL_VERSION_2_0", wine_glGetProgramiv }, + { "glGetProgramivARB", "GL_ARB_vertex_program", wine_glGetProgramivARB }, + { "glGetProgramivNV", "GL_NV_vertex_program", wine_glGetProgramivNV }, + { "glGetQueryObjecti64vEXT", "GL_EXT_timer_query", wine_glGetQueryObjecti64vEXT }, + { "glGetQueryObjectiv", "GL_VERSION_1_5", wine_glGetQueryObjectiv }, + { "glGetQueryObjectivARB", "GL_ARB_occlusion_query", wine_glGetQueryObjectivARB }, + { "glGetQueryObjectui64vEXT", "GL_EXT_timer_query", wine_glGetQueryObjectui64vEXT }, + { "glGetQueryObjectuiv", "GL_VERSION_1_5", wine_glGetQueryObjectuiv }, + { "glGetQueryObjectuivARB", "GL_ARB_occlusion_query", wine_glGetQueryObjectuivARB }, + { "glGetQueryiv", "GL_VERSION_1_5", wine_glGetQueryiv }, + { "glGetQueryivARB", "GL_ARB_occlusion_query", wine_glGetQueryivARB }, + { "glGetRenderbufferParameteriv", "GL_ARB_framebuffer_object", wine_glGetRenderbufferParameteriv }, + { "glGetRenderbufferParameterivEXT", "GL_EXT_framebuffer_object", wine_glGetRenderbufferParameterivEXT }, + { "glGetSeparableFilterEXT", "GL_EXT_convolution", wine_glGetSeparableFilterEXT }, + { "glGetShaderInfoLog", "GL_VERSION_2_0", wine_glGetShaderInfoLog }, + { "glGetShaderSource", "GL_VERSION_2_0", wine_glGetShaderSource }, + { "glGetShaderSourceARB", "GL_ARB_shader_objects", wine_glGetShaderSourceARB }, + { "glGetShaderiv", "GL_VERSION_2_0", wine_glGetShaderiv }, + { "glGetSharpenTexFuncSGIS", "GL_SGIS_sharpen_texture", wine_glGetSharpenTexFuncSGIS }, + { "glGetStringi", "GL_VERSION_3_0", wine_glGetStringi }, + { "glGetTexBumpParameterfvATI", "GL_ATI_envmap_bumpmap", wine_glGetTexBumpParameterfvATI }, + { "glGetTexBumpParameterivATI", "GL_ATI_envmap_bumpmap", wine_glGetTexBumpParameterivATI }, + { "glGetTexFilterFuncSGIS", "GL_SGIS_texture_filter4", wine_glGetTexFilterFuncSGIS }, + { "glGetTexParameterIiv", "GL_VERSION_3_0", wine_glGetTexParameterIiv }, + { "glGetTexParameterIivEXT", "GL_EXT_texture_integer", wine_glGetTexParameterIivEXT }, + { "glGetTexParameterIuiv", "GL_VERSION_3_0", wine_glGetTexParameterIuiv }, + { "glGetTexParameterIuivEXT", "GL_EXT_texture_integer", wine_glGetTexParameterIuivEXT }, + { "glGetTextureImageEXT", "GL_EXT_direct_state_access", wine_glGetTextureImageEXT }, + { "glGetTextureLevelParameterfvEXT", "GL_EXT_direct_state_access", wine_glGetTextureLevelParameterfvEXT }, + { "glGetTextureLevelParameterivEXT", "GL_EXT_direct_state_access", wine_glGetTextureLevelParameterivEXT }, + { "glGetTextureParameterIivEXT", "GL_EXT_direct_state_access", wine_glGetTextureParameterIivEXT }, + { "glGetTextureParameterIuivEXT", "GL_EXT_direct_state_access", wine_glGetTextureParameterIuivEXT }, + { "glGetTextureParameterfvEXT", "GL_EXT_direct_state_access", wine_glGetTextureParameterfvEXT }, + { "glGetTextureParameterivEXT", "GL_EXT_direct_state_access", wine_glGetTextureParameterivEXT }, + { "glGetTrackMatrixivNV", "GL_NV_vertex_program", wine_glGetTrackMatrixivNV }, + { "glGetTransformFeedbackVarying", "GL_VERSION_3_0", wine_glGetTransformFeedbackVarying }, + { "glGetTransformFeedbackVaryingEXT", "GL_EXT_transform_feedback", wine_glGetTransformFeedbackVaryingEXT }, + { "glGetTransformFeedbackVaryingNV", "GL_NV_transform_feedback", wine_glGetTransformFeedbackVaryingNV }, + { "glGetUniformBufferSizeEXT", "GL_EXT_bindable_uniform", wine_glGetUniformBufferSizeEXT }, + { "glGetUniformLocation", "GL_VERSION_2_0", wine_glGetUniformLocation }, + { "glGetUniformLocationARB", "GL_ARB_shader_objects", wine_glGetUniformLocationARB }, + { "glGetUniformOffsetEXT", "GL_EXT_bindable_uniform", wine_glGetUniformOffsetEXT }, + { "glGetUniformfv", "GL_VERSION_2_0", wine_glGetUniformfv }, + { "glGetUniformfvARB", "GL_ARB_shader_objects", wine_glGetUniformfvARB }, + { "glGetUniformiv", "GL_VERSION_2_0", wine_glGetUniformiv }, + { "glGetUniformivARB", "GL_ARB_shader_objects", wine_glGetUniformivARB }, + { "glGetUniformuiv", "GL_VERSION_3_0", wine_glGetUniformuiv }, + { "glGetUniformuivEXT", "GL_EXT_gpu_shader4", wine_glGetUniformuivEXT }, + { "glGetVariantArrayObjectfvATI", "GL_ATI_vertex_array_object", wine_glGetVariantArrayObjectfvATI }, + { "glGetVariantArrayObjectivATI", "GL_ATI_vertex_array_object", wine_glGetVariantArrayObjectivATI }, + { "glGetVariantBooleanvEXT", "GL_EXT_vertex_shader", wine_glGetVariantBooleanvEXT }, + { "glGetVariantFloatvEXT", "GL_EXT_vertex_shader", wine_glGetVariantFloatvEXT }, + { "glGetVariantIntegervEXT", "GL_EXT_vertex_shader", wine_glGetVariantIntegervEXT }, + { "glGetVariantPointervEXT", "GL_EXT_vertex_shader", wine_glGetVariantPointervEXT }, + { "glGetVaryingLocationNV", "GL_NV_transform_feedback", wine_glGetVaryingLocationNV }, + { "glGetVertexAttribArrayObjectfvATI", "GL_ATI_vertex_attrib_array_object", wine_glGetVertexAttribArrayObjectfvATI }, + { "glGetVertexAttribArrayObjectivATI", "GL_ATI_vertex_attrib_array_object", wine_glGetVertexAttribArrayObjectivATI }, + { "glGetVertexAttribIiv", "GL_VERSION_3_0", wine_glGetVertexAttribIiv }, + { "glGetVertexAttribIivEXT", "GL_NV_vertex_program4", wine_glGetVertexAttribIivEXT }, + { "glGetVertexAttribIuiv", "GL_VERSION_3_0", wine_glGetVertexAttribIuiv }, + { "glGetVertexAttribIuivEXT", "GL_NV_vertex_program4", wine_glGetVertexAttribIuivEXT }, + { "glGetVertexAttribPointerv", "GL_VERSION_2_0", wine_glGetVertexAttribPointerv }, + { "glGetVertexAttribPointervARB", "GL_ARB_vertex_program", wine_glGetVertexAttribPointervARB }, + { "glGetVertexAttribPointervNV", "GL_NV_vertex_program", wine_glGetVertexAttribPointervNV }, + { "glGetVertexAttribdv", "GL_VERSION_2_0", wine_glGetVertexAttribdv }, + { "glGetVertexAttribdvARB", "GL_ARB_vertex_program", wine_glGetVertexAttribdvARB }, + { "glGetVertexAttribdvNV", "GL_NV_vertex_program", wine_glGetVertexAttribdvNV }, + { "glGetVertexAttribfv", "GL_VERSION_2_0", wine_glGetVertexAttribfv }, + { "glGetVertexAttribfvARB", "GL_ARB_vertex_program", wine_glGetVertexAttribfvARB }, + { "glGetVertexAttribfvNV", "GL_NV_vertex_program", wine_glGetVertexAttribfvNV }, + { "glGetVertexAttribiv", "GL_VERSION_2_0", wine_glGetVertexAttribiv }, + { "glGetVertexAttribivARB", "GL_ARB_vertex_program", wine_glGetVertexAttribivARB }, + { "glGetVertexAttribivNV", "GL_NV_vertex_program", wine_glGetVertexAttribivNV }, + { "glGlobalAlphaFactorbSUN", "GL_SUN_global_alpha", wine_glGlobalAlphaFactorbSUN }, + { "glGlobalAlphaFactordSUN", "GL_SUN_global_alpha", wine_glGlobalAlphaFactordSUN }, + { "glGlobalAlphaFactorfSUN", "GL_SUN_global_alpha", wine_glGlobalAlphaFactorfSUN }, + { "glGlobalAlphaFactoriSUN", "GL_SUN_global_alpha", wine_glGlobalAlphaFactoriSUN }, + { "glGlobalAlphaFactorsSUN", "GL_SUN_global_alpha", wine_glGlobalAlphaFactorsSUN }, + { "glGlobalAlphaFactorubSUN", "GL_SUN_global_alpha", wine_glGlobalAlphaFactorubSUN }, + { "glGlobalAlphaFactoruiSUN", "GL_SUN_global_alpha", wine_glGlobalAlphaFactoruiSUN }, + { "glGlobalAlphaFactorusSUN", "GL_SUN_global_alpha", wine_glGlobalAlphaFactorusSUN }, + { "glHintPGI", "GL_PGI_misc_hints", wine_glHintPGI }, + { "glHistogramEXT", "GL_EXT_histogram", wine_glHistogramEXT }, + { "glIglooInterfaceSGIX", "GL_SGIX_igloo_interface", wine_glIglooInterfaceSGIX }, + { "glImageTransformParameterfHP", "GL_HP_image_transform", wine_glImageTransformParameterfHP }, + { "glImageTransformParameterfvHP", "GL_HP_image_transform", wine_glImageTransformParameterfvHP }, + { "glImageTransformParameteriHP", "GL_HP_image_transform", wine_glImageTransformParameteriHP }, + { "glImageTransformParameterivHP", "GL_HP_image_transform", wine_glImageTransformParameterivHP }, + { "glIndexFuncEXT", "GL_EXT_index_func", wine_glIndexFuncEXT }, + { "glIndexMaterialEXT", "GL_EXT_index_material", wine_glIndexMaterialEXT }, + { "glIndexPointerEXT", "GL_EXT_vertex_array", wine_glIndexPointerEXT }, + { "glIndexPointerListIBM", "GL_IBM_vertex_array_lists", wine_glIndexPointerListIBM }, + { "glInsertComponentEXT", "GL_EXT_vertex_shader", wine_glInsertComponentEXT }, + { "glInstrumentsBufferSGIX", "GL_SGIX_instruments", wine_glInstrumentsBufferSGIX }, + { "glIsAsyncMarkerSGIX", "GL_SGIX_async", wine_glIsAsyncMarkerSGIX }, + { "glIsBuffer", "GL_VERSION_1_5", wine_glIsBuffer }, + { "glIsBufferARB", "GL_ARB_vertex_buffer_object", wine_glIsBufferARB }, + { "glIsEnabledIndexedEXT", "GL_EXT_draw_buffers2", wine_glIsEnabledIndexedEXT }, + { "glIsEnabledi", "GL_VERSION_3_0", wine_glIsEnabledi }, + { "glIsFenceAPPLE", "GL_APPLE_fence", wine_glIsFenceAPPLE }, + { "glIsFenceNV", "GL_NV_fence", wine_glIsFenceNV }, + { "glIsFramebuffer", "GL_ARB_framebuffer_object", wine_glIsFramebuffer }, + { "glIsFramebufferEXT", "GL_EXT_framebuffer_object", wine_glIsFramebufferEXT }, + { "glIsObjectBufferATI", "GL_ATI_vertex_array_object", wine_glIsObjectBufferATI }, + { "glIsOcclusionQueryNV", "GL_NV_occlusion_query", wine_glIsOcclusionQueryNV }, + { "glIsProgram", "GL_VERSION_2_0", wine_glIsProgram }, + { "glIsProgramARB", "GL_ARB_vertex_program", wine_glIsProgramARB }, + { "glIsProgramNV", "GL_NV_vertex_program", wine_glIsProgramNV }, + { "glIsQuery", "GL_VERSION_1_5", wine_glIsQuery }, + { "glIsQueryARB", "GL_ARB_occlusion_query", wine_glIsQueryARB }, + { "glIsRenderbuffer", "GL_ARB_framebuffer_object", wine_glIsRenderbuffer }, + { "glIsRenderbufferEXT", "GL_EXT_framebuffer_object", wine_glIsRenderbufferEXT }, + { "glIsShader", "GL_VERSION_2_0", wine_glIsShader }, + { "glIsTextureEXT", "GL_EXT_texture_object", wine_glIsTextureEXT }, + { "glIsVariantEnabledEXT", "GL_EXT_vertex_shader", wine_glIsVariantEnabledEXT }, + { "glIsVertexArray", "GL_ARB_vertex_array_object", wine_glIsVertexArray }, + { "glIsVertexArrayAPPLE", "GL_APPLE_vertex_array_object", wine_glIsVertexArrayAPPLE }, + { "glLightEnviSGIX", "GL_SGIX_fragment_lighting", wine_glLightEnviSGIX }, + { "glLinkProgram", "GL_VERSION_2_0", wine_glLinkProgram }, + { "glLinkProgramARB", "GL_ARB_shader_objects", wine_glLinkProgramARB }, + { "glListParameterfSGIX", "GL_SGIX_list_priority", wine_glListParameterfSGIX }, + { "glListParameterfvSGIX", "GL_SGIX_list_priority", wine_glListParameterfvSGIX }, + { "glListParameteriSGIX", "GL_SGIX_list_priority", wine_glListParameteriSGIX }, + { "glListParameterivSGIX", "GL_SGIX_list_priority", wine_glListParameterivSGIX }, + { "glLoadIdentityDeformationMapSGIX", "GL_SGIX_polynomial_ffd", wine_glLoadIdentityDeformationMapSGIX }, + { "glLoadProgramNV", "GL_NV_vertex_program", wine_glLoadProgramNV }, + { "glLoadTransposeMatrixd", "GL_VERSION_1_3", wine_glLoadTransposeMatrixd }, + { "glLoadTransposeMatrixdARB", "GL_ARB_transpose_matrix", wine_glLoadTransposeMatrixdARB }, + { "glLoadTransposeMatrixf", "GL_VERSION_1_3", wine_glLoadTransposeMatrixf }, + { "glLoadTransposeMatrixfARB", "GL_ARB_transpose_matrix", wine_glLoadTransposeMatrixfARB }, + { "glLockArraysEXT", "GL_EXT_compiled_vertex_array", wine_glLockArraysEXT }, + { "glMTexCoord2fSGIS", "GL_SGIS_multitexture", wine_glMTexCoord2fSGIS }, + { "glMTexCoord2fvSGIS", "GL_SGIS_multitexture", wine_glMTexCoord2fvSGIS }, + { "glMapBuffer", "GL_VERSION_1_5", wine_glMapBuffer }, + { "glMapBufferARB", "GL_ARB_vertex_buffer_object", wine_glMapBufferARB }, + { "glMapBufferRange", "GL_ARB_map_buffer_range", wine_glMapBufferRange }, + { "glMapControlPointsNV", "GL_NV_evaluators", wine_glMapControlPointsNV }, + { "glMapNamedBufferEXT", "GL_EXT_direct_state_access", wine_glMapNamedBufferEXT }, + { "glMapObjectBufferATI", "GL_ATI_map_object_buffer", wine_glMapObjectBufferATI }, + { "glMapParameterfvNV", "GL_NV_evaluators", wine_glMapParameterfvNV }, + { "glMapParameterivNV", "GL_NV_evaluators", wine_glMapParameterivNV }, + { "glMatrixFrustumEXT", "GL_EXT_direct_state_access", wine_glMatrixFrustumEXT }, + { "glMatrixIndexPointerARB", "GL_ARB_matrix_palette", wine_glMatrixIndexPointerARB }, + { "glMatrixIndexubvARB", "GL_ARB_matrix_palette", wine_glMatrixIndexubvARB }, + { "glMatrixIndexuivARB", "GL_ARB_matrix_palette", wine_glMatrixIndexuivARB }, + { "glMatrixIndexusvARB", "GL_ARB_matrix_palette", wine_glMatrixIndexusvARB }, + { "glMatrixLoadIdentityEXT", "GL_EXT_direct_state_access", wine_glMatrixLoadIdentityEXT }, + { "glMatrixLoadTransposedEXT", "GL_EXT_direct_state_access", wine_glMatrixLoadTransposedEXT }, + { "glMatrixLoadTransposefEXT", "GL_EXT_direct_state_access", wine_glMatrixLoadTransposefEXT }, + { "glMatrixLoaddEXT", "GL_EXT_direct_state_access", wine_glMatrixLoaddEXT }, + { "glMatrixLoadfEXT", "GL_EXT_direct_state_access", wine_glMatrixLoadfEXT }, + { "glMatrixMultTransposedEXT", "GL_EXT_direct_state_access", wine_glMatrixMultTransposedEXT }, + { "glMatrixMultTransposefEXT", "GL_EXT_direct_state_access", wine_glMatrixMultTransposefEXT }, + { "glMatrixMultdEXT", "GL_EXT_direct_state_access", wine_glMatrixMultdEXT }, + { "glMatrixMultfEXT", "GL_EXT_direct_state_access", wine_glMatrixMultfEXT }, + { "glMatrixOrthoEXT", "GL_EXT_direct_state_access", wine_glMatrixOrthoEXT }, + { "glMatrixPopEXT", "GL_EXT_direct_state_access", wine_glMatrixPopEXT }, + { "glMatrixPushEXT", "GL_EXT_direct_state_access", wine_glMatrixPushEXT }, + { "glMatrixRotatedEXT", "GL_EXT_direct_state_access", wine_glMatrixRotatedEXT }, + { "glMatrixRotatefEXT", "GL_EXT_direct_state_access", wine_glMatrixRotatefEXT }, + { "glMatrixScaledEXT", "GL_EXT_direct_state_access", wine_glMatrixScaledEXT }, + { "glMatrixScalefEXT", "GL_EXT_direct_state_access", wine_glMatrixScalefEXT }, + { "glMatrixTranslatedEXT", "GL_EXT_direct_state_access", wine_glMatrixTranslatedEXT }, + { "glMatrixTranslatefEXT", "GL_EXT_direct_state_access", wine_glMatrixTranslatefEXT }, + { "glMinmaxEXT", "GL_EXT_histogram", wine_glMinmaxEXT }, + { "glMultTransposeMatrixd", "GL_VERSION_1_3", wine_glMultTransposeMatrixd }, + { "glMultTransposeMatrixdARB", "GL_ARB_transpose_matrix", wine_glMultTransposeMatrixdARB }, + { "glMultTransposeMatrixf", "GL_VERSION_1_3", wine_glMultTransposeMatrixf }, + { "glMultTransposeMatrixfARB", "GL_ARB_transpose_matrix", wine_glMultTransposeMatrixfARB }, + { "glMultiDrawArrays", "GL_VERSION_1_4", wine_glMultiDrawArrays }, + { "glMultiDrawArraysEXT", "GL_EXT_multi_draw_arrays", wine_glMultiDrawArraysEXT }, + { "glMultiDrawElementArrayAPPLE", "GL_APPLE_element_array", wine_glMultiDrawElementArrayAPPLE }, + { "glMultiDrawElements", "GL_VERSION_1_4", wine_glMultiDrawElements }, + { "glMultiDrawElementsEXT", "GL_EXT_multi_draw_arrays", wine_glMultiDrawElementsEXT }, + { "glMultiDrawRangeElementArrayAPPLE", "GL_APPLE_element_array", wine_glMultiDrawRangeElementArrayAPPLE }, + { "glMultiModeDrawArraysIBM", "GL_IBM_multimode_draw_arrays", wine_glMultiModeDrawArraysIBM }, + { "glMultiModeDrawElementsIBM", "GL_IBM_multimode_draw_arrays", wine_glMultiModeDrawElementsIBM }, + { "glMultiTexBufferEXT", "GL_EXT_direct_state_access", wine_glMultiTexBufferEXT }, + { "glMultiTexCoord1d", "GL_VERSION_1_3", wine_glMultiTexCoord1d }, + { "glMultiTexCoord1dARB", "GL_ARB_multitexture", wine_glMultiTexCoord1dARB }, + { "glMultiTexCoord1dSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord1dSGIS }, + { "glMultiTexCoord1dv", "GL_VERSION_1_3", wine_glMultiTexCoord1dv }, + { "glMultiTexCoord1dvARB", "GL_ARB_multitexture", wine_glMultiTexCoord1dvARB }, + { "glMultiTexCoord1dvSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord1dvSGIS }, + { "glMultiTexCoord1f", "GL_VERSION_1_3", wine_glMultiTexCoord1f }, + { "glMultiTexCoord1fARB", "GL_ARB_multitexture", wine_glMultiTexCoord1fARB }, + { "glMultiTexCoord1fSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord1fSGIS }, + { "glMultiTexCoord1fv", "GL_VERSION_1_3", wine_glMultiTexCoord1fv }, + { "glMultiTexCoord1fvARB", "GL_ARB_multitexture", wine_glMultiTexCoord1fvARB }, + { "glMultiTexCoord1fvSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord1fvSGIS }, + { "glMultiTexCoord1hNV", "GL_NV_half_float", wine_glMultiTexCoord1hNV }, + { "glMultiTexCoord1hvNV", "GL_NV_half_float", wine_glMultiTexCoord1hvNV }, + { "glMultiTexCoord1i", "GL_VERSION_1_3", wine_glMultiTexCoord1i }, + { "glMultiTexCoord1iARB", "GL_ARB_multitexture", wine_glMultiTexCoord1iARB }, + { "glMultiTexCoord1iSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord1iSGIS }, + { "glMultiTexCoord1iv", "GL_VERSION_1_3", wine_glMultiTexCoord1iv }, + { "glMultiTexCoord1ivARB", "GL_ARB_multitexture", wine_glMultiTexCoord1ivARB }, + { "glMultiTexCoord1ivSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord1ivSGIS }, + { "glMultiTexCoord1s", "GL_VERSION_1_3", wine_glMultiTexCoord1s }, + { "glMultiTexCoord1sARB", "GL_ARB_multitexture", wine_glMultiTexCoord1sARB }, + { "glMultiTexCoord1sSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord1sSGIS }, + { "glMultiTexCoord1sv", "GL_VERSION_1_3", wine_glMultiTexCoord1sv }, + { "glMultiTexCoord1svARB", "GL_ARB_multitexture", wine_glMultiTexCoord1svARB }, + { "glMultiTexCoord1svSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord1svSGIS }, + { "glMultiTexCoord2d", "GL_VERSION_1_3", wine_glMultiTexCoord2d }, + { "glMultiTexCoord2dARB", "GL_ARB_multitexture", wine_glMultiTexCoord2dARB }, + { "glMultiTexCoord2dSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord2dSGIS }, + { "glMultiTexCoord2dv", "GL_VERSION_1_3", wine_glMultiTexCoord2dv }, + { "glMultiTexCoord2dvARB", "GL_ARB_multitexture", wine_glMultiTexCoord2dvARB }, + { "glMultiTexCoord2dvSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord2dvSGIS }, + { "glMultiTexCoord2f", "GL_VERSION_1_3", wine_glMultiTexCoord2f }, + { "glMultiTexCoord2fARB", "GL_ARB_multitexture", wine_glMultiTexCoord2fARB }, + { "glMultiTexCoord2fSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord2fSGIS }, + { "glMultiTexCoord2fv", "GL_VERSION_1_3", wine_glMultiTexCoord2fv }, + { "glMultiTexCoord2fvARB", "GL_ARB_multitexture", wine_glMultiTexCoord2fvARB }, + { "glMultiTexCoord2fvSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord2fvSGIS }, + { "glMultiTexCoord2hNV", "GL_NV_half_float", wine_glMultiTexCoord2hNV }, + { "glMultiTexCoord2hvNV", "GL_NV_half_float", wine_glMultiTexCoord2hvNV }, + { "glMultiTexCoord2i", "GL_VERSION_1_3", wine_glMultiTexCoord2i }, + { "glMultiTexCoord2iARB", "GL_ARB_multitexture", wine_glMultiTexCoord2iARB }, + { "glMultiTexCoord2iSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord2iSGIS }, + { "glMultiTexCoord2iv", "GL_VERSION_1_3", wine_glMultiTexCoord2iv }, + { "glMultiTexCoord2ivARB", "GL_ARB_multitexture", wine_glMultiTexCoord2ivARB }, + { "glMultiTexCoord2ivSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord2ivSGIS }, + { "glMultiTexCoord2s", "GL_VERSION_1_3", wine_glMultiTexCoord2s }, + { "glMultiTexCoord2sARB", "GL_ARB_multitexture", wine_glMultiTexCoord2sARB }, + { "glMultiTexCoord2sSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord2sSGIS }, + { "glMultiTexCoord2sv", "GL_VERSION_1_3", wine_glMultiTexCoord2sv }, + { "glMultiTexCoord2svARB", "GL_ARB_multitexture", wine_glMultiTexCoord2svARB }, + { "glMultiTexCoord2svSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord2svSGIS }, + { "glMultiTexCoord3d", "GL_VERSION_1_3", wine_glMultiTexCoord3d }, + { "glMultiTexCoord3dARB", "GL_ARB_multitexture", wine_glMultiTexCoord3dARB }, + { "glMultiTexCoord3dSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord3dSGIS }, + { "glMultiTexCoord3dv", "GL_VERSION_1_3", wine_glMultiTexCoord3dv }, + { "glMultiTexCoord3dvARB", "GL_ARB_multitexture", wine_glMultiTexCoord3dvARB }, + { "glMultiTexCoord3dvSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord3dvSGIS }, + { "glMultiTexCoord3f", "GL_VERSION_1_3", wine_glMultiTexCoord3f }, + { "glMultiTexCoord3fARB", "GL_ARB_multitexture", wine_glMultiTexCoord3fARB }, + { "glMultiTexCoord3fSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord3fSGIS }, + { "glMultiTexCoord3fv", "GL_VERSION_1_3", wine_glMultiTexCoord3fv }, + { "glMultiTexCoord3fvARB", "GL_ARB_multitexture", wine_glMultiTexCoord3fvARB }, + { "glMultiTexCoord3fvSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord3fvSGIS }, + { "glMultiTexCoord3hNV", "GL_NV_half_float", wine_glMultiTexCoord3hNV }, + { "glMultiTexCoord3hvNV", "GL_NV_half_float", wine_glMultiTexCoord3hvNV }, + { "glMultiTexCoord3i", "GL_VERSION_1_3", wine_glMultiTexCoord3i }, + { "glMultiTexCoord3iARB", "GL_ARB_multitexture", wine_glMultiTexCoord3iARB }, + { "glMultiTexCoord3iSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord3iSGIS }, + { "glMultiTexCoord3iv", "GL_VERSION_1_3", wine_glMultiTexCoord3iv }, + { "glMultiTexCoord3ivARB", "GL_ARB_multitexture", wine_glMultiTexCoord3ivARB }, + { "glMultiTexCoord3ivSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord3ivSGIS }, + { "glMultiTexCoord3s", "GL_VERSION_1_3", wine_glMultiTexCoord3s }, + { "glMultiTexCoord3sARB", "GL_ARB_multitexture", wine_glMultiTexCoord3sARB }, + { "glMultiTexCoord3sSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord3sSGIS }, + { "glMultiTexCoord3sv", "GL_VERSION_1_3", wine_glMultiTexCoord3sv }, + { "glMultiTexCoord3svARB", "GL_ARB_multitexture", wine_glMultiTexCoord3svARB }, + { "glMultiTexCoord3svSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord3svSGIS }, + { "glMultiTexCoord4d", "GL_VERSION_1_3", wine_glMultiTexCoord4d }, + { "glMultiTexCoord4dARB", "GL_ARB_multitexture", wine_glMultiTexCoord4dARB }, + { "glMultiTexCoord4dSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord4dSGIS }, + { "glMultiTexCoord4dv", "GL_VERSION_1_3", wine_glMultiTexCoord4dv }, + { "glMultiTexCoord4dvARB", "GL_ARB_multitexture", wine_glMultiTexCoord4dvARB }, + { "glMultiTexCoord4dvSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord4dvSGIS }, + { "glMultiTexCoord4f", "GL_VERSION_1_3", wine_glMultiTexCoord4f }, + { "glMultiTexCoord4fARB", "GL_ARB_multitexture", wine_glMultiTexCoord4fARB }, + { "glMultiTexCoord4fSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord4fSGIS }, + { "glMultiTexCoord4fv", "GL_VERSION_1_3", wine_glMultiTexCoord4fv }, + { "glMultiTexCoord4fvARB", "GL_ARB_multitexture", wine_glMultiTexCoord4fvARB }, + { "glMultiTexCoord4fvSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord4fvSGIS }, + { "glMultiTexCoord4hNV", "GL_NV_half_float", wine_glMultiTexCoord4hNV }, + { "glMultiTexCoord4hvNV", "GL_NV_half_float", wine_glMultiTexCoord4hvNV }, + { "glMultiTexCoord4i", "GL_VERSION_1_3", wine_glMultiTexCoord4i }, + { "glMultiTexCoord4iARB", "GL_ARB_multitexture", wine_glMultiTexCoord4iARB }, + { "glMultiTexCoord4iSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord4iSGIS }, + { "glMultiTexCoord4iv", "GL_VERSION_1_3", wine_glMultiTexCoord4iv }, + { "glMultiTexCoord4ivARB", "GL_ARB_multitexture", wine_glMultiTexCoord4ivARB }, + { "glMultiTexCoord4ivSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord4ivSGIS }, + { "glMultiTexCoord4s", "GL_VERSION_1_3", wine_glMultiTexCoord4s }, + { "glMultiTexCoord4sARB", "GL_ARB_multitexture", wine_glMultiTexCoord4sARB }, + { "glMultiTexCoord4sSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord4sSGIS }, + { "glMultiTexCoord4sv", "GL_VERSION_1_3", wine_glMultiTexCoord4sv }, + { "glMultiTexCoord4svARB", "GL_ARB_multitexture", wine_glMultiTexCoord4svARB }, + { "glMultiTexCoord4svSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoord4svSGIS }, + { "glMultiTexCoordPointerEXT", "GL_EXT_direct_state_access", wine_glMultiTexCoordPointerEXT }, + { "glMultiTexCoordPointerSGIS", "GL_SGIS_multitexture", wine_glMultiTexCoordPointerSGIS }, + { "glMultiTexEnvfEXT", "GL_EXT_direct_state_access", wine_glMultiTexEnvfEXT }, + { "glMultiTexEnvfvEXT", "GL_EXT_direct_state_access", wine_glMultiTexEnvfvEXT }, + { "glMultiTexEnviEXT", "GL_EXT_direct_state_access", wine_glMultiTexEnviEXT }, + { "glMultiTexEnvivEXT", "GL_EXT_direct_state_access", wine_glMultiTexEnvivEXT }, + { "glMultiTexGendEXT", "GL_EXT_direct_state_access", wine_glMultiTexGendEXT }, + { "glMultiTexGendvEXT", "GL_EXT_direct_state_access", wine_glMultiTexGendvEXT }, + { "glMultiTexGenfEXT", "GL_EXT_direct_state_access", wine_glMultiTexGenfEXT }, + { "glMultiTexGenfvEXT", "GL_EXT_direct_state_access", wine_glMultiTexGenfvEXT }, + { "glMultiTexGeniEXT", "GL_EXT_direct_state_access", wine_glMultiTexGeniEXT }, + { "glMultiTexGenivEXT", "GL_EXT_direct_state_access", wine_glMultiTexGenivEXT }, + { "glMultiTexImage1DEXT", "GL_EXT_direct_state_access", wine_glMultiTexImage1DEXT }, + { "glMultiTexImage2DEXT", "GL_EXT_direct_state_access", wine_glMultiTexImage2DEXT }, + { "glMultiTexImage3DEXT", "GL_EXT_direct_state_access", wine_glMultiTexImage3DEXT }, + { "glMultiTexParameterIivEXT", "GL_EXT_direct_state_access", wine_glMultiTexParameterIivEXT }, + { "glMultiTexParameterIuivEXT", "GL_EXT_direct_state_access", wine_glMultiTexParameterIuivEXT }, + { "glMultiTexParameterfEXT", "GL_EXT_direct_state_access", wine_glMultiTexParameterfEXT }, + { "glMultiTexParameterfvEXT", "GL_EXT_direct_state_access", wine_glMultiTexParameterfvEXT }, + { "glMultiTexParameteriEXT", "GL_EXT_direct_state_access", wine_glMultiTexParameteriEXT }, + { "glMultiTexParameterivEXT", "GL_EXT_direct_state_access", wine_glMultiTexParameterivEXT }, + { "glMultiTexRenderbufferEXT", "GL_EXT_direct_state_access", wine_glMultiTexRenderbufferEXT }, + { "glMultiTexSubImage1DEXT", "GL_EXT_direct_state_access", wine_glMultiTexSubImage1DEXT }, + { "glMultiTexSubImage2DEXT", "GL_EXT_direct_state_access", wine_glMultiTexSubImage2DEXT }, + { "glMultiTexSubImage3DEXT", "GL_EXT_direct_state_access", wine_glMultiTexSubImage3DEXT }, + { "glNamedBufferDataEXT", "GL_EXT_direct_state_access", wine_glNamedBufferDataEXT }, + { "glNamedBufferSubDataEXT", "GL_EXT_direct_state_access", wine_glNamedBufferSubDataEXT }, + { "glNamedFramebufferRenderbufferEXT", "GL_EXT_direct_state_access", wine_glNamedFramebufferRenderbufferEXT }, + { "glNamedFramebufferTexture1DEXT", "GL_EXT_direct_state_access", wine_glNamedFramebufferTexture1DEXT }, + { "glNamedFramebufferTexture2DEXT", "GL_EXT_direct_state_access", wine_glNamedFramebufferTexture2DEXT }, + { "glNamedFramebufferTexture3DEXT", "GL_EXT_direct_state_access", wine_glNamedFramebufferTexture3DEXT }, + { "glNamedFramebufferTextureEXT", "GL_EXT_direct_state_access", wine_glNamedFramebufferTextureEXT }, + { "glNamedFramebufferTextureFaceEXT", "GL_EXT_direct_state_access", wine_glNamedFramebufferTextureFaceEXT }, + { "glNamedFramebufferTextureLayerEXT", "GL_EXT_direct_state_access", wine_glNamedFramebufferTextureLayerEXT }, + { "glNamedProgramLocalParameter4dEXT", "GL_EXT_direct_state_access", wine_glNamedProgramLocalParameter4dEXT }, + { "glNamedProgramLocalParameter4dvEXT", "GL_EXT_direct_state_access", wine_glNamedProgramLocalParameter4dvEXT }, + { "glNamedProgramLocalParameter4fEXT", "GL_EXT_direct_state_access", wine_glNamedProgramLocalParameter4fEXT }, + { "glNamedProgramLocalParameter4fvEXT", "GL_EXT_direct_state_access", wine_glNamedProgramLocalParameter4fvEXT }, + { "glNamedProgramLocalParameterI4iEXT", "GL_EXT_direct_state_access", wine_glNamedProgramLocalParameterI4iEXT }, + { "glNamedProgramLocalParameterI4ivEXT", "GL_EXT_direct_state_access", wine_glNamedProgramLocalParameterI4ivEXT }, + { "glNamedProgramLocalParameterI4uiEXT", "GL_EXT_direct_state_access", wine_glNamedProgramLocalParameterI4uiEXT }, + { "glNamedProgramLocalParameterI4uivEXT", "GL_EXT_direct_state_access", wine_glNamedProgramLocalParameterI4uivEXT }, + { "glNamedProgramLocalParameters4fvEXT", "GL_EXT_direct_state_access", wine_glNamedProgramLocalParameters4fvEXT }, + { "glNamedProgramLocalParametersI4ivEXT", "GL_EXT_direct_state_access", wine_glNamedProgramLocalParametersI4ivEXT }, + { "glNamedProgramLocalParametersI4uivEXT", "GL_EXT_direct_state_access", wine_glNamedProgramLocalParametersI4uivEXT }, + { "glNamedProgramStringEXT", "GL_EXT_direct_state_access", wine_glNamedProgramStringEXT }, + { "glNamedRenderbufferStorageEXT", "GL_EXT_direct_state_access", wine_glNamedRenderbufferStorageEXT }, + { "glNamedRenderbufferStorageMultisampleCoverageEXT", "GL_EXT_direct_state_access", wine_glNamedRenderbufferStorageMultisampleCoverageEXT }, + { "glNamedRenderbufferStorageMultisampleEXT", "GL_EXT_direct_state_access", wine_glNamedRenderbufferStorageMultisampleEXT }, + { "glNewBufferRegion", "GL_KTX_buffer_region", wine_glNewBufferRegion }, + { "glNewObjectBufferATI", "GL_ATI_vertex_array_object", wine_glNewObjectBufferATI }, + { "glNormal3fVertex3fSUN", "GL_SUN_vertex", wine_glNormal3fVertex3fSUN }, + { "glNormal3fVertex3fvSUN", "GL_SUN_vertex", wine_glNormal3fVertex3fvSUN }, + { "glNormal3hNV", "GL_NV_half_float", wine_glNormal3hNV }, + { "glNormal3hvNV", "GL_NV_half_float", wine_glNormal3hvNV }, + { "glNormalPointerEXT", "GL_EXT_vertex_array", wine_glNormalPointerEXT }, + { "glNormalPointerListIBM", "GL_IBM_vertex_array_lists", wine_glNormalPointerListIBM }, + { "glNormalPointervINTEL", "GL_INTEL_parallel_arrays", wine_glNormalPointervINTEL }, + { "glNormalStream3bATI", "GL_ATI_vertex_streams", wine_glNormalStream3bATI }, + { "glNormalStream3bvATI", "GL_ATI_vertex_streams", wine_glNormalStream3bvATI }, + { "glNormalStream3dATI", "GL_ATI_vertex_streams", wine_glNormalStream3dATI }, + { "glNormalStream3dvATI", "GL_ATI_vertex_streams", wine_glNormalStream3dvATI }, + { "glNormalStream3fATI", "GL_ATI_vertex_streams", wine_glNormalStream3fATI }, + { "glNormalStream3fvATI", "GL_ATI_vertex_streams", wine_glNormalStream3fvATI }, + { "glNormalStream3iATI", "GL_ATI_vertex_streams", wine_glNormalStream3iATI }, + { "glNormalStream3ivATI", "GL_ATI_vertex_streams", wine_glNormalStream3ivATI }, + { "glNormalStream3sATI", "GL_ATI_vertex_streams", wine_glNormalStream3sATI }, + { "glNormalStream3svATI", "GL_ATI_vertex_streams", wine_glNormalStream3svATI }, + { "glPNTrianglesfATI", "GL_ATI_pn_triangles", wine_glPNTrianglesfATI }, + { "glPNTrianglesiATI", "GL_ATI_pn_triangles", wine_glPNTrianglesiATI }, + { "glPassTexCoordATI", "GL_ATI_fragment_shader", wine_glPassTexCoordATI }, + { "glPixelDataRangeNV", "GL_NV_pixel_data_range", wine_glPixelDataRangeNV }, + { "glPixelTexGenParameterfSGIS", "GL_SGIS_pixel_texture", wine_glPixelTexGenParameterfSGIS }, + { "glPixelTexGenParameterfvSGIS", "GL_SGIS_pixel_texture", wine_glPixelTexGenParameterfvSGIS }, + { "glPixelTexGenParameteriSGIS", "GL_SGIS_pixel_texture", wine_glPixelTexGenParameteriSGIS }, + { "glPixelTexGenParameterivSGIS", "GL_SGIS_pixel_texture", wine_glPixelTexGenParameterivSGIS }, + { "glPixelTexGenSGIX", "GL_SGIX_pixel_texture", wine_glPixelTexGenSGIX }, + { "glPixelTransformParameterfEXT", "GL_EXT_pixel_transform", wine_glPixelTransformParameterfEXT }, + { "glPixelTransformParameterfvEXT", "GL_EXT_pixel_transform", wine_glPixelTransformParameterfvEXT }, + { "glPixelTransformParameteriEXT", "GL_EXT_pixel_transform", wine_glPixelTransformParameteriEXT }, + { "glPixelTransformParameterivEXT", "GL_EXT_pixel_transform", wine_glPixelTransformParameterivEXT }, + { "glPointParameterf", "GL_VERSION_1_4", wine_glPointParameterf }, + { "glPointParameterfARB", "GL_ARB_point_parameters", wine_glPointParameterfARB }, + { "glPointParameterfEXT", "GL_EXT_point_parameters", wine_glPointParameterfEXT }, + { "glPointParameterfSGIS", "GL_SGIS_point_parameters", wine_glPointParameterfSGIS }, + { "glPointParameterfv", "GL_VERSION_1_4", wine_glPointParameterfv }, + { "glPointParameterfvARB", "GL_ARB_point_parameters", wine_glPointParameterfvARB }, + { "glPointParameterfvEXT", "GL_EXT_point_parameters", wine_glPointParameterfvEXT }, + { "glPointParameterfvSGIS", "GL_SGIS_point_parameters", wine_glPointParameterfvSGIS }, + { "glPointParameteri", "GL_VERSION_1_4", wine_glPointParameteri }, + { "glPointParameteriNV", "GL_NV_point_sprite", wine_glPointParameteriNV }, + { "glPointParameteriv", "GL_VERSION_1_4", wine_glPointParameteriv }, + { "glPointParameterivNV", "GL_NV_point_sprite", wine_glPointParameterivNV }, + { "glPollAsyncSGIX", "GL_SGIX_async", wine_glPollAsyncSGIX }, + { "glPollInstrumentsSGIX", "GL_SGIX_instruments", wine_glPollInstrumentsSGIX }, + { "glPolygonOffsetEXT", "GL_EXT_polygon_offset", wine_glPolygonOffsetEXT }, + { "glPrimitiveRestartIndexNV", "GL_NV_primitive_restart", wine_glPrimitiveRestartIndexNV }, + { "glPrimitiveRestartNV", "GL_NV_primitive_restart", wine_glPrimitiveRestartNV }, + { "glPrioritizeTexturesEXT", "GL_EXT_texture_object", wine_glPrioritizeTexturesEXT }, + { "glProgramBufferParametersIivNV", "GL_NV_parameter_buffer_object", wine_glProgramBufferParametersIivNV }, + { "glProgramBufferParametersIuivNV", "GL_NV_parameter_buffer_object", wine_glProgramBufferParametersIuivNV }, + { "glProgramBufferParametersfvNV", "GL_NV_parameter_buffer_object", wine_glProgramBufferParametersfvNV }, + { "glProgramEnvParameter4dARB", "GL_ARB_vertex_program", wine_glProgramEnvParameter4dARB }, + { "glProgramEnvParameter4dvARB", "GL_ARB_vertex_program", wine_glProgramEnvParameter4dvARB }, + { "glProgramEnvParameter4fARB", "GL_ARB_vertex_program", wine_glProgramEnvParameter4fARB }, + { "glProgramEnvParameter4fvARB", "GL_ARB_vertex_program", wine_glProgramEnvParameter4fvARB }, + { "glProgramEnvParameterI4iNV", "GL_NV_gpu_program4", wine_glProgramEnvParameterI4iNV }, + { "glProgramEnvParameterI4ivNV", "GL_NV_gpu_program4", wine_glProgramEnvParameterI4ivNV }, + { "glProgramEnvParameterI4uiNV", "GL_NV_gpu_program4", wine_glProgramEnvParameterI4uiNV }, + { "glProgramEnvParameterI4uivNV", "GL_NV_gpu_program4", wine_glProgramEnvParameterI4uivNV }, + { "glProgramEnvParameters4fvEXT", "GL_EXT_gpu_program_parameters", wine_glProgramEnvParameters4fvEXT }, + { "glProgramEnvParametersI4ivNV", "GL_NV_gpu_program4", wine_glProgramEnvParametersI4ivNV }, + { "glProgramEnvParametersI4uivNV", "GL_NV_gpu_program4", wine_glProgramEnvParametersI4uivNV }, + { "glProgramLocalParameter4dARB", "GL_ARB_vertex_program", wine_glProgramLocalParameter4dARB }, + { "glProgramLocalParameter4dvARB", "GL_ARB_vertex_program", wine_glProgramLocalParameter4dvARB }, + { "glProgramLocalParameter4fARB", "GL_ARB_vertex_program", wine_glProgramLocalParameter4fARB }, + { "glProgramLocalParameter4fvARB", "GL_ARB_vertex_program", wine_glProgramLocalParameter4fvARB }, + { "glProgramLocalParameterI4iNV", "GL_NV_gpu_program4", wine_glProgramLocalParameterI4iNV }, + { "glProgramLocalParameterI4ivNV", "GL_NV_gpu_program4", wine_glProgramLocalParameterI4ivNV }, + { "glProgramLocalParameterI4uiNV", "GL_NV_gpu_program4", wine_glProgramLocalParameterI4uiNV }, + { "glProgramLocalParameterI4uivNV", "GL_NV_gpu_program4", wine_glProgramLocalParameterI4uivNV }, + { "glProgramLocalParameters4fvEXT", "GL_EXT_gpu_program_parameters", wine_glProgramLocalParameters4fvEXT }, + { "glProgramLocalParametersI4ivNV", "GL_NV_gpu_program4", wine_glProgramLocalParametersI4ivNV }, + { "glProgramLocalParametersI4uivNV", "GL_NV_gpu_program4", wine_glProgramLocalParametersI4uivNV }, + { "glProgramNamedParameter4dNV", "GL_NV_fragment_program", wine_glProgramNamedParameter4dNV }, + { "glProgramNamedParameter4dvNV", "GL_NV_fragment_program", wine_glProgramNamedParameter4dvNV }, + { "glProgramNamedParameter4fNV", "GL_NV_fragment_program", wine_glProgramNamedParameter4fNV }, + { "glProgramNamedParameter4fvNV", "GL_NV_fragment_program", wine_glProgramNamedParameter4fvNV }, + { "glProgramParameter4dNV", "GL_NV_vertex_program", wine_glProgramParameter4dNV }, + { "glProgramParameter4dvNV", "GL_NV_vertex_program", wine_glProgramParameter4dvNV }, + { "glProgramParameter4fNV", "GL_NV_vertex_program", wine_glProgramParameter4fNV }, + { "glProgramParameter4fvNV", "GL_NV_vertex_program", wine_glProgramParameter4fvNV }, + { "glProgramParameteriARB", "GL_ARB_geometry_shader4", wine_glProgramParameteriARB }, + { "glProgramParameteriEXT", "GL_EXT_geometry_shader4", wine_glProgramParameteriEXT }, + { "glProgramParameters4dvNV", "GL_NV_vertex_program", wine_glProgramParameters4dvNV }, + { "glProgramParameters4fvNV", "GL_NV_vertex_program", wine_glProgramParameters4fvNV }, + { "glProgramStringARB", "GL_ARB_vertex_program", wine_glProgramStringARB }, + { "glProgramUniform1fEXT", "GL_EXT_direct_state_access", wine_glProgramUniform1fEXT }, + { "glProgramUniform1fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniform1fvEXT }, + { "glProgramUniform1iEXT", "GL_EXT_direct_state_access", wine_glProgramUniform1iEXT }, + { "glProgramUniform1ivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform1ivEXT }, + { "glProgramUniform1uiEXT", "GL_EXT_direct_state_access", wine_glProgramUniform1uiEXT }, + { "glProgramUniform1uivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform1uivEXT }, + { "glProgramUniform2fEXT", "GL_EXT_direct_state_access", wine_glProgramUniform2fEXT }, + { "glProgramUniform2fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniform2fvEXT }, + { "glProgramUniform2iEXT", "GL_EXT_direct_state_access", wine_glProgramUniform2iEXT }, + { "glProgramUniform2ivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform2ivEXT }, + { "glProgramUniform2uiEXT", "GL_EXT_direct_state_access", wine_glProgramUniform2uiEXT }, + { "glProgramUniform2uivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform2uivEXT }, + { "glProgramUniform3fEXT", "GL_EXT_direct_state_access", wine_glProgramUniform3fEXT }, + { "glProgramUniform3fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniform3fvEXT }, + { "glProgramUniform3iEXT", "GL_EXT_direct_state_access", wine_glProgramUniform3iEXT }, + { "glProgramUniform3ivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform3ivEXT }, + { "glProgramUniform3uiEXT", "GL_EXT_direct_state_access", wine_glProgramUniform3uiEXT }, + { "glProgramUniform3uivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform3uivEXT }, + { "glProgramUniform4fEXT", "GL_EXT_direct_state_access", wine_glProgramUniform4fEXT }, + { "glProgramUniform4fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniform4fvEXT }, + { "glProgramUniform4iEXT", "GL_EXT_direct_state_access", wine_glProgramUniform4iEXT }, + { "glProgramUniform4ivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform4ivEXT }, + { "glProgramUniform4uiEXT", "GL_EXT_direct_state_access", wine_glProgramUniform4uiEXT }, + { "glProgramUniform4uivEXT", "GL_EXT_direct_state_access", wine_glProgramUniform4uivEXT }, + { "glProgramUniformMatrix2fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix2fvEXT }, + { "glProgramUniformMatrix2x3fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix2x3fvEXT }, + { "glProgramUniformMatrix2x4fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix2x4fvEXT }, + { "glProgramUniformMatrix3fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix3fvEXT }, + { "glProgramUniformMatrix3x2fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix3x2fvEXT }, + { "glProgramUniformMatrix3x4fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix3x4fvEXT }, + { "glProgramUniformMatrix4fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix4fvEXT }, + { "glProgramUniformMatrix4x2fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix4x2fvEXT }, + { "glProgramUniformMatrix4x3fvEXT", "GL_EXT_direct_state_access", wine_glProgramUniformMatrix4x3fvEXT }, + { "glProgramVertexLimitNV", "GL_NV_geometry_program4", wine_glProgramVertexLimitNV }, + { "glPushClientAttribDefaultEXT", "GL_EXT_direct_state_access", wine_glPushClientAttribDefaultEXT }, + { "glReadBufferRegion", "GL_KTX_buffer_region", wine_glReadBufferRegion }, + { "glReadInstrumentsSGIX", "GL_SGIX_instruments", wine_glReadInstrumentsSGIX }, + { "glReferencePlaneSGIX", "GL_SGIX_reference_plane", wine_glReferencePlaneSGIX }, + { "glRenderbufferStorage", "GL_ARB_framebuffer_object", wine_glRenderbufferStorage }, + { "glRenderbufferStorageEXT", "GL_EXT_framebuffer_object", wine_glRenderbufferStorageEXT }, + { "glRenderbufferStorageMultisample", "GL_ARB_framebuffer_object", wine_glRenderbufferStorageMultisample }, + { "glRenderbufferStorageMultisampleCoverageNV", "GL_NV_framebuffer_multisample_coverage", wine_glRenderbufferStorageMultisampleCoverageNV }, + { "glRenderbufferStorageMultisampleEXT", "GL_EXT_framebuffer_multisample", wine_glRenderbufferStorageMultisampleEXT }, + { "glReplacementCodePointerSUN", "GL_SUN_triangle_list", wine_glReplacementCodePointerSUN }, + { "glReplacementCodeubSUN", "GL_SUN_triangle_list", wine_glReplacementCodeubSUN }, + { "glReplacementCodeubvSUN", "GL_SUN_triangle_list", wine_glReplacementCodeubvSUN }, + { "glReplacementCodeuiColor3fVertex3fSUN", "GL_SUN_vertex", wine_glReplacementCodeuiColor3fVertex3fSUN }, + { "glReplacementCodeuiColor3fVertex3fvSUN", "GL_SUN_vertex", wine_glReplacementCodeuiColor3fVertex3fvSUN }, + { "glReplacementCodeuiColor4fNormal3fVertex3fSUN", "GL_SUN_vertex", wine_glReplacementCodeuiColor4fNormal3fVertex3fSUN }, + { "glReplacementCodeuiColor4fNormal3fVertex3fvSUN", "GL_SUN_vertex", wine_glReplacementCodeuiColor4fNormal3fVertex3fvSUN }, + { "glReplacementCodeuiColor4ubVertex3fSUN", "GL_SUN_vertex", wine_glReplacementCodeuiColor4ubVertex3fSUN }, + { "glReplacementCodeuiColor4ubVertex3fvSUN", "GL_SUN_vertex", wine_glReplacementCodeuiColor4ubVertex3fvSUN }, + { "glReplacementCodeuiNormal3fVertex3fSUN", "GL_SUN_vertex", wine_glReplacementCodeuiNormal3fVertex3fSUN }, + { "glReplacementCodeuiNormal3fVertex3fvSUN", "GL_SUN_vertex", wine_glReplacementCodeuiNormal3fVertex3fvSUN }, + { "glReplacementCodeuiSUN", "GL_SUN_triangle_list", wine_glReplacementCodeuiSUN }, + { "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN", "GL_SUN_vertex", wine_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN }, + { "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN", "GL_SUN_vertex", wine_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN }, + { "glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN", "GL_SUN_vertex", wine_glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN }, + { "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN", "GL_SUN_vertex", wine_glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN }, + { "glReplacementCodeuiTexCoord2fVertex3fSUN", "GL_SUN_vertex", wine_glReplacementCodeuiTexCoord2fVertex3fSUN }, + { "glReplacementCodeuiTexCoord2fVertex3fvSUN", "GL_SUN_vertex", wine_glReplacementCodeuiTexCoord2fVertex3fvSUN }, + { "glReplacementCodeuiVertex3fSUN", "GL_SUN_vertex", wine_glReplacementCodeuiVertex3fSUN }, + { "glReplacementCodeuiVertex3fvSUN", "GL_SUN_vertex", wine_glReplacementCodeuiVertex3fvSUN }, + { "glReplacementCodeuivSUN", "GL_SUN_triangle_list", wine_glReplacementCodeuivSUN }, + { "glReplacementCodeusSUN", "GL_SUN_triangle_list", wine_glReplacementCodeusSUN }, + { "glReplacementCodeusvSUN", "GL_SUN_triangle_list", wine_glReplacementCodeusvSUN }, + { "glRequestResidentProgramsNV", "GL_NV_vertex_program", wine_glRequestResidentProgramsNV }, + { "glResetHistogramEXT", "GL_EXT_histogram", wine_glResetHistogramEXT }, + { "glResetMinmaxEXT", "GL_EXT_histogram", wine_glResetMinmaxEXT }, + { "glResizeBuffersMESA", "GL_MESA_resize_buffers", wine_glResizeBuffersMESA }, + { "glSampleCoverage", "GL_VERSION_1_3", wine_glSampleCoverage }, + { "glSampleCoverageARB", "GL_ARB_multisample", wine_glSampleCoverageARB }, + { "glSampleMapATI", "GL_ATI_fragment_shader", wine_glSampleMapATI }, + { "glSampleMaskEXT", "GL_EXT_multisample", wine_glSampleMaskEXT }, + { "glSampleMaskSGIS", "GL_SGIS_multisample", wine_glSampleMaskSGIS }, + { "glSamplePatternEXT", "GL_EXT_multisample", wine_glSamplePatternEXT }, + { "glSamplePatternSGIS", "GL_SGIS_multisample", wine_glSamplePatternSGIS }, + { "glSecondaryColor3b", "GL_VERSION_1_4", wine_glSecondaryColor3b }, + { "glSecondaryColor3bEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3bEXT }, + { "glSecondaryColor3bv", "GL_VERSION_1_4", wine_glSecondaryColor3bv }, + { "glSecondaryColor3bvEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3bvEXT }, + { "glSecondaryColor3d", "GL_VERSION_1_4", wine_glSecondaryColor3d }, + { "glSecondaryColor3dEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3dEXT }, + { "glSecondaryColor3dv", "GL_VERSION_1_4", wine_glSecondaryColor3dv }, + { "glSecondaryColor3dvEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3dvEXT }, + { "glSecondaryColor3f", "GL_VERSION_1_4", wine_glSecondaryColor3f }, + { "glSecondaryColor3fEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3fEXT }, + { "glSecondaryColor3fv", "GL_VERSION_1_4", wine_glSecondaryColor3fv }, + { "glSecondaryColor3fvEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3fvEXT }, + { "glSecondaryColor3hNV", "GL_NV_half_float", wine_glSecondaryColor3hNV }, + { "glSecondaryColor3hvNV", "GL_NV_half_float", wine_glSecondaryColor3hvNV }, + { "glSecondaryColor3i", "GL_VERSION_1_4", wine_glSecondaryColor3i }, + { "glSecondaryColor3iEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3iEXT }, + { "glSecondaryColor3iv", "GL_VERSION_1_4", wine_glSecondaryColor3iv }, + { "glSecondaryColor3ivEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3ivEXT }, + { "glSecondaryColor3s", "GL_VERSION_1_4", wine_glSecondaryColor3s }, + { "glSecondaryColor3sEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3sEXT }, + { "glSecondaryColor3sv", "GL_VERSION_1_4", wine_glSecondaryColor3sv }, + { "glSecondaryColor3svEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3svEXT }, + { "glSecondaryColor3ub", "GL_VERSION_1_4", wine_glSecondaryColor3ub }, + { "glSecondaryColor3ubEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3ubEXT }, + { "glSecondaryColor3ubv", "GL_VERSION_1_4", wine_glSecondaryColor3ubv }, + { "glSecondaryColor3ubvEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3ubvEXT }, + { "glSecondaryColor3ui", "GL_VERSION_1_4", wine_glSecondaryColor3ui }, + { "glSecondaryColor3uiEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3uiEXT }, + { "glSecondaryColor3uiv", "GL_VERSION_1_4", wine_glSecondaryColor3uiv }, + { "glSecondaryColor3uivEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3uivEXT }, + { "glSecondaryColor3us", "GL_VERSION_1_4", wine_glSecondaryColor3us }, + { "glSecondaryColor3usEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3usEXT }, + { "glSecondaryColor3usv", "GL_VERSION_1_4", wine_glSecondaryColor3usv }, + { "glSecondaryColor3usvEXT", "GL_EXT_secondary_color", wine_glSecondaryColor3usvEXT }, + { "glSecondaryColorPointer", "GL_VERSION_1_4", wine_glSecondaryColorPointer }, + { "glSecondaryColorPointerEXT", "GL_EXT_secondary_color", wine_glSecondaryColorPointerEXT }, + { "glSecondaryColorPointerListIBM", "GL_IBM_vertex_array_lists", wine_glSecondaryColorPointerListIBM }, + { "glSelectTextureCoordSetSGIS", "GL_SGIS_multitexture", wine_glSelectTextureCoordSetSGIS }, + { "glSelectTextureSGIS", "GL_SGIS_multitexture", wine_glSelectTextureSGIS }, + { "glSeparableFilter2DEXT", "GL_EXT_convolution", wine_glSeparableFilter2DEXT }, + { "glSetFenceAPPLE", "GL_APPLE_fence", wine_glSetFenceAPPLE }, + { "glSetFenceNV", "GL_NV_fence", wine_glSetFenceNV }, + { "glSetFragmentShaderConstantATI", "GL_ATI_fragment_shader", wine_glSetFragmentShaderConstantATI }, + { "glSetInvariantEXT", "GL_EXT_vertex_shader", wine_glSetInvariantEXT }, + { "glSetLocalConstantEXT", "GL_EXT_vertex_shader", wine_glSetLocalConstantEXT }, + { "glShaderOp1EXT", "GL_EXT_vertex_shader", wine_glShaderOp1EXT }, + { "glShaderOp2EXT", "GL_EXT_vertex_shader", wine_glShaderOp2EXT }, + { "glShaderOp3EXT", "GL_EXT_vertex_shader", wine_glShaderOp3EXT }, + { "glShaderSource", "GL_VERSION_2_0", wine_glShaderSource }, + { "glShaderSourceARB", "GL_ARB_shader_objects", wine_glShaderSourceARB }, + { "glSharpenTexFuncSGIS", "GL_SGIS_sharpen_texture", wine_glSharpenTexFuncSGIS }, + { "glSpriteParameterfSGIX", "GL_SGIX_sprite", wine_glSpriteParameterfSGIX }, + { "glSpriteParameterfvSGIX", "GL_SGIX_sprite", wine_glSpriteParameterfvSGIX }, + { "glSpriteParameteriSGIX", "GL_SGIX_sprite", wine_glSpriteParameteriSGIX }, + { "glSpriteParameterivSGIX", "GL_SGIX_sprite", wine_glSpriteParameterivSGIX }, + { "glStartInstrumentsSGIX", "GL_SGIX_instruments", wine_glStartInstrumentsSGIX }, + { "glStencilClearTagEXT", "GL_EXT_stencil_clear_tag", wine_glStencilClearTagEXT }, + { "glStencilFuncSeparate", "GL_VERSION_2_0", wine_glStencilFuncSeparate }, + { "glStencilFuncSeparateATI", "GL_ATI_separate_stencil", wine_glStencilFuncSeparateATI }, + { "glStencilMaskSeparate", "GL_VERSION_2_0", wine_glStencilMaskSeparate }, + { "glStencilOpSeparate", "GL_VERSION_2_0", wine_glStencilOpSeparate }, + { "glStencilOpSeparateATI", "GL_ATI_separate_stencil", wine_glStencilOpSeparateATI }, + { "glStopInstrumentsSGIX", "GL_SGIX_instruments", wine_glStopInstrumentsSGIX }, + { "glStringMarkerGREMEDY", "GL_GREMEDY_string_marker", wine_glStringMarkerGREMEDY }, + { "glSwizzleEXT", "GL_EXT_vertex_shader", wine_glSwizzleEXT }, + { "glTagSampleBufferSGIX", "GL_SGIX_tag_sample_buffer", wine_glTagSampleBufferSGIX }, + { "glTangent3bEXT", "GL_EXT_coordinate_frame", wine_glTangent3bEXT }, + { "glTangent3bvEXT", "GL_EXT_coordinate_frame", wine_glTangent3bvEXT }, + { "glTangent3dEXT", "GL_EXT_coordinate_frame", wine_glTangent3dEXT }, + { "glTangent3dvEXT", "GL_EXT_coordinate_frame", wine_glTangent3dvEXT }, + { "glTangent3fEXT", "GL_EXT_coordinate_frame", wine_glTangent3fEXT }, + { "glTangent3fvEXT", "GL_EXT_coordinate_frame", wine_glTangent3fvEXT }, + { "glTangent3iEXT", "GL_EXT_coordinate_frame", wine_glTangent3iEXT }, + { "glTangent3ivEXT", "GL_EXT_coordinate_frame", wine_glTangent3ivEXT }, + { "glTangent3sEXT", "GL_EXT_coordinate_frame", wine_glTangent3sEXT }, + { "glTangent3svEXT", "GL_EXT_coordinate_frame", wine_glTangent3svEXT }, + { "glTangentPointerEXT", "GL_EXT_coordinate_frame", wine_glTangentPointerEXT }, + { "glTbufferMask3DFX", "GL_3DFX_tbuffer", wine_glTbufferMask3DFX }, + { "glTestFenceAPPLE", "GL_APPLE_fence", wine_glTestFenceAPPLE }, + { "glTestFenceNV", "GL_NV_fence", wine_glTestFenceNV }, + { "glTestObjectAPPLE", "GL_APPLE_fence", wine_glTestObjectAPPLE }, + { "glTexBufferARB", "GL_ARB_texture_buffer_object", wine_glTexBufferARB }, + { "glTexBufferEXT", "GL_EXT_texture_buffer_object", wine_glTexBufferEXT }, + { "glTexBumpParameterfvATI", "GL_ATI_envmap_bumpmap", wine_glTexBumpParameterfvATI }, + { "glTexBumpParameterivATI", "GL_ATI_envmap_bumpmap", wine_glTexBumpParameterivATI }, + { "glTexCoord1hNV", "GL_NV_half_float", wine_glTexCoord1hNV }, + { "glTexCoord1hvNV", "GL_NV_half_float", wine_glTexCoord1hvNV }, + { "glTexCoord2fColor3fVertex3fSUN", "GL_SUN_vertex", wine_glTexCoord2fColor3fVertex3fSUN }, + { "glTexCoord2fColor3fVertex3fvSUN", "GL_SUN_vertex", wine_glTexCoord2fColor3fVertex3fvSUN }, + { "glTexCoord2fColor4fNormal3fVertex3fSUN", "GL_SUN_vertex", wine_glTexCoord2fColor4fNormal3fVertex3fSUN }, + { "glTexCoord2fColor4fNormal3fVertex3fvSUN", "GL_SUN_vertex", wine_glTexCoord2fColor4fNormal3fVertex3fvSUN }, + { "glTexCoord2fColor4ubVertex3fSUN", "GL_SUN_vertex", wine_glTexCoord2fColor4ubVertex3fSUN }, + { "glTexCoord2fColor4ubVertex3fvSUN", "GL_SUN_vertex", wine_glTexCoord2fColor4ubVertex3fvSUN }, + { "glTexCoord2fNormal3fVertex3fSUN", "GL_SUN_vertex", wine_glTexCoord2fNormal3fVertex3fSUN }, + { "glTexCoord2fNormal3fVertex3fvSUN", "GL_SUN_vertex", wine_glTexCoord2fNormal3fVertex3fvSUN }, + { "glTexCoord2fVertex3fSUN", "GL_SUN_vertex", wine_glTexCoord2fVertex3fSUN }, + { "glTexCoord2fVertex3fvSUN", "GL_SUN_vertex", wine_glTexCoord2fVertex3fvSUN }, + { "glTexCoord2hNV", "GL_NV_half_float", wine_glTexCoord2hNV }, + { "glTexCoord2hvNV", "GL_NV_half_float", wine_glTexCoord2hvNV }, + { "glTexCoord3hNV", "GL_NV_half_float", wine_glTexCoord3hNV }, + { "glTexCoord3hvNV", "GL_NV_half_float", wine_glTexCoord3hvNV }, + { "glTexCoord4fColor4fNormal3fVertex4fSUN", "GL_SUN_vertex", wine_glTexCoord4fColor4fNormal3fVertex4fSUN }, + { "glTexCoord4fColor4fNormal3fVertex4fvSUN", "GL_SUN_vertex", wine_glTexCoord4fColor4fNormal3fVertex4fvSUN }, + { "glTexCoord4fVertex4fSUN", "GL_SUN_vertex", wine_glTexCoord4fVertex4fSUN }, + { "glTexCoord4fVertex4fvSUN", "GL_SUN_vertex", wine_glTexCoord4fVertex4fvSUN }, + { "glTexCoord4hNV", "GL_NV_half_float", wine_glTexCoord4hNV }, + { "glTexCoord4hvNV", "GL_NV_half_float", wine_glTexCoord4hvNV }, + { "glTexCoordPointerEXT", "GL_EXT_vertex_array", wine_glTexCoordPointerEXT }, + { "glTexCoordPointerListIBM", "GL_IBM_vertex_array_lists", wine_glTexCoordPointerListIBM }, + { "glTexCoordPointervINTEL", "GL_INTEL_parallel_arrays", wine_glTexCoordPointervINTEL }, + { "glTexFilterFuncSGIS", "GL_SGIS_texture_filter4", wine_glTexFilterFuncSGIS }, + { "glTexImage3DEXT", "GL_EXT_texture3D", wine_glTexImage3DEXT }, + { "glTexImage4DSGIS", "GL_SGIS_texture4D", wine_glTexImage4DSGIS }, + { "glTexParameterIiv", "GL_VERSION_3_0", wine_glTexParameterIiv }, + { "glTexParameterIivEXT", "GL_EXT_texture_integer", wine_glTexParameterIivEXT }, + { "glTexParameterIuiv", "GL_VERSION_3_0", wine_glTexParameterIuiv }, + { "glTexParameterIuivEXT", "GL_EXT_texture_integer", wine_glTexParameterIuivEXT }, + { "glTexSubImage1DEXT", "GL_EXT_subtexture", wine_glTexSubImage1DEXT }, + { "glTexSubImage2DEXT", "GL_EXT_subtexture", wine_glTexSubImage2DEXT }, + { "glTexSubImage3DEXT", "GL_EXT_texture3D", wine_glTexSubImage3DEXT }, + { "glTexSubImage4DSGIS", "GL_SGIS_texture4D", wine_glTexSubImage4DSGIS }, + { "glTextureBufferEXT", "GL_EXT_direct_state_access", wine_glTextureBufferEXT }, + { "glTextureColorMaskSGIS", "GL_SGIS_texture_color_mask", wine_glTextureColorMaskSGIS }, + { "glTextureImage1DEXT", "GL_EXT_direct_state_access", wine_glTextureImage1DEXT }, + { "glTextureImage2DEXT", "GL_EXT_direct_state_access", wine_glTextureImage2DEXT }, + { "glTextureImage3DEXT", "GL_EXT_direct_state_access", wine_glTextureImage3DEXT }, + { "glTextureLightEXT", "GL_EXT_light_texture", wine_glTextureLightEXT }, + { "glTextureMaterialEXT", "GL_EXT_light_texture", wine_glTextureMaterialEXT }, + { "glTextureNormalEXT", "GL_EXT_texture_perturb_normal", wine_glTextureNormalEXT }, + { "glTextureParameterIivEXT", "GL_EXT_direct_state_access", wine_glTextureParameterIivEXT }, + { "glTextureParameterIuivEXT", "GL_EXT_direct_state_access", wine_glTextureParameterIuivEXT }, + { "glTextureParameterfEXT", "GL_EXT_direct_state_access", wine_glTextureParameterfEXT }, + { "glTextureParameterfvEXT", "GL_EXT_direct_state_access", wine_glTextureParameterfvEXT }, + { "glTextureParameteriEXT", "GL_EXT_direct_state_access", wine_glTextureParameteriEXT }, + { "glTextureParameterivEXT", "GL_EXT_direct_state_access", wine_glTextureParameterivEXT }, + { "glTextureRenderbufferEXT", "GL_EXT_direct_state_access", wine_glTextureRenderbufferEXT }, + { "glTextureSubImage1DEXT", "GL_EXT_direct_state_access", wine_glTextureSubImage1DEXT }, + { "glTextureSubImage2DEXT", "GL_EXT_direct_state_access", wine_glTextureSubImage2DEXT }, + { "glTextureSubImage3DEXT", "GL_EXT_direct_state_access", wine_glTextureSubImage3DEXT }, + { "glTrackMatrixNV", "GL_NV_vertex_program", wine_glTrackMatrixNV }, + { "glTransformFeedbackAttribsNV", "GL_NV_transform_feedback", wine_glTransformFeedbackAttribsNV }, + { "glTransformFeedbackVaryings", "GL_VERSION_3_0", wine_glTransformFeedbackVaryings }, + { "glTransformFeedbackVaryingsEXT", "GL_EXT_transform_feedback", wine_glTransformFeedbackVaryingsEXT }, + { "glTransformFeedbackVaryingsNV", "GL_NV_transform_feedback", wine_glTransformFeedbackVaryingsNV }, + { "glUniform1f", "GL_VERSION_2_0", wine_glUniform1f }, + { "glUniform1fARB", "GL_ARB_shader_objects", wine_glUniform1fARB }, + { "glUniform1fv", "GL_VERSION_2_0", wine_glUniform1fv }, + { "glUniform1fvARB", "GL_ARB_shader_objects", wine_glUniform1fvARB }, + { "glUniform1i", "GL_VERSION_2_0", wine_glUniform1i }, + { "glUniform1iARB", "GL_ARB_shader_objects", wine_glUniform1iARB }, + { "glUniform1iv", "GL_VERSION_2_0", wine_glUniform1iv }, + { "glUniform1ivARB", "GL_ARB_shader_objects", wine_glUniform1ivARB }, + { "glUniform1ui", "GL_VERSION_3_0", wine_glUniform1ui }, + { "glUniform1uiEXT", "GL_EXT_gpu_shader4", wine_glUniform1uiEXT }, + { "glUniform1uiv", "GL_VERSION_3_0", wine_glUniform1uiv }, + { "glUniform1uivEXT", "GL_EXT_gpu_shader4", wine_glUniform1uivEXT }, + { "glUniform2f", "GL_VERSION_2_0", wine_glUniform2f }, + { "glUniform2fARB", "GL_ARB_shader_objects", wine_glUniform2fARB }, + { "glUniform2fv", "GL_VERSION_2_0", wine_glUniform2fv }, + { "glUniform2fvARB", "GL_ARB_shader_objects", wine_glUniform2fvARB }, + { "glUniform2i", "GL_VERSION_2_0", wine_glUniform2i }, + { "glUniform2iARB", "GL_ARB_shader_objects", wine_glUniform2iARB }, + { "glUniform2iv", "GL_VERSION_2_0", wine_glUniform2iv }, + { "glUniform2ivARB", "GL_ARB_shader_objects", wine_glUniform2ivARB }, + { "glUniform2ui", "GL_VERSION_3_0", wine_glUniform2ui }, + { "glUniform2uiEXT", "GL_EXT_gpu_shader4", wine_glUniform2uiEXT }, + { "glUniform2uiv", "GL_VERSION_3_0", wine_glUniform2uiv }, + { "glUniform2uivEXT", "GL_EXT_gpu_shader4", wine_glUniform2uivEXT }, + { "glUniform3f", "GL_VERSION_2_0", wine_glUniform3f }, + { "glUniform3fARB", "GL_ARB_shader_objects", wine_glUniform3fARB }, + { "glUniform3fv", "GL_VERSION_2_0", wine_glUniform3fv }, + { "glUniform3fvARB", "GL_ARB_shader_objects", wine_glUniform3fvARB }, + { "glUniform3i", "GL_VERSION_2_0", wine_glUniform3i }, + { "glUniform3iARB", "GL_ARB_shader_objects", wine_glUniform3iARB }, + { "glUniform3iv", "GL_VERSION_2_0", wine_glUniform3iv }, + { "glUniform3ivARB", "GL_ARB_shader_objects", wine_glUniform3ivARB }, + { "glUniform3ui", "GL_VERSION_3_0", wine_glUniform3ui }, + { "glUniform3uiEXT", "GL_EXT_gpu_shader4", wine_glUniform3uiEXT }, + { "glUniform3uiv", "GL_VERSION_3_0", wine_glUniform3uiv }, + { "glUniform3uivEXT", "GL_EXT_gpu_shader4", wine_glUniform3uivEXT }, + { "glUniform4f", "GL_VERSION_2_0", wine_glUniform4f }, + { "glUniform4fARB", "GL_ARB_shader_objects", wine_glUniform4fARB }, + { "glUniform4fv", "GL_VERSION_2_0", wine_glUniform4fv }, + { "glUniform4fvARB", "GL_ARB_shader_objects", wine_glUniform4fvARB }, + { "glUniform4i", "GL_VERSION_2_0", wine_glUniform4i }, + { "glUniform4iARB", "GL_ARB_shader_objects", wine_glUniform4iARB }, + { "glUniform4iv", "GL_VERSION_2_0", wine_glUniform4iv }, + { "glUniform4ivARB", "GL_ARB_shader_objects", wine_glUniform4ivARB }, + { "glUniform4ui", "GL_VERSION_3_0", wine_glUniform4ui }, + { "glUniform4uiEXT", "GL_EXT_gpu_shader4", wine_glUniform4uiEXT }, + { "glUniform4uiv", "GL_VERSION_3_0", wine_glUniform4uiv }, + { "glUniform4uivEXT", "GL_EXT_gpu_shader4", wine_glUniform4uivEXT }, + { "glUniformBufferEXT", "GL_EXT_bindable_uniform", wine_glUniformBufferEXT }, + { "glUniformMatrix2fv", "GL_VERSION_2_0", wine_glUniformMatrix2fv }, + { "glUniformMatrix2fvARB", "GL_ARB_shader_objects", wine_glUniformMatrix2fvARB }, + { "glUniformMatrix2x3fv", "GL_VERSION_2_1", wine_glUniformMatrix2x3fv }, + { "glUniformMatrix2x4fv", "GL_VERSION_2_1", wine_glUniformMatrix2x4fv }, + { "glUniformMatrix3fv", "GL_VERSION_2_0", wine_glUniformMatrix3fv }, + { "glUniformMatrix3fvARB", "GL_ARB_shader_objects", wine_glUniformMatrix3fvARB }, + { "glUniformMatrix3x2fv", "GL_VERSION_2_1", wine_glUniformMatrix3x2fv }, + { "glUniformMatrix3x4fv", "GL_VERSION_2_1", wine_glUniformMatrix3x4fv }, + { "glUniformMatrix4fv", "GL_VERSION_2_0", wine_glUniformMatrix4fv }, + { "glUniformMatrix4fvARB", "GL_ARB_shader_objects", wine_glUniformMatrix4fvARB }, + { "glUniformMatrix4x2fv", "GL_VERSION_2_1", wine_glUniformMatrix4x2fv }, + { "glUniformMatrix4x3fv", "GL_VERSION_2_1", wine_glUniformMatrix4x3fv }, + { "glUnlockArraysEXT", "GL_EXT_compiled_vertex_array", wine_glUnlockArraysEXT }, + { "glUnmapBuffer", "GL_VERSION_1_5", wine_glUnmapBuffer }, + { "glUnmapBufferARB", "GL_ARB_vertex_buffer_object", wine_glUnmapBufferARB }, + { "glUnmapNamedBufferEXT", "GL_EXT_direct_state_access", wine_glUnmapNamedBufferEXT }, + { "glUnmapObjectBufferATI", "GL_ATI_map_object_buffer", wine_glUnmapObjectBufferATI }, + { "glUpdateObjectBufferATI", "GL_ATI_vertex_array_object", wine_glUpdateObjectBufferATI }, + { "glUseProgram", "GL_VERSION_2_0", wine_glUseProgram }, + { "glUseProgramObjectARB", "GL_ARB_shader_objects", wine_glUseProgramObjectARB }, + { "glValidateProgram", "GL_VERSION_2_0", wine_glValidateProgram }, + { "glValidateProgramARB", "GL_ARB_shader_objects", wine_glValidateProgramARB }, + { "glVariantArrayObjectATI", "GL_ATI_vertex_array_object", wine_glVariantArrayObjectATI }, + { "glVariantPointerEXT", "GL_EXT_vertex_shader", wine_glVariantPointerEXT }, + { "glVariantbvEXT", "GL_EXT_vertex_shader", wine_glVariantbvEXT }, + { "glVariantdvEXT", "GL_EXT_vertex_shader", wine_glVariantdvEXT }, + { "glVariantfvEXT", "GL_EXT_vertex_shader", wine_glVariantfvEXT }, + { "glVariantivEXT", "GL_EXT_vertex_shader", wine_glVariantivEXT }, + { "glVariantsvEXT", "GL_EXT_vertex_shader", wine_glVariantsvEXT }, + { "glVariantubvEXT", "GL_EXT_vertex_shader", wine_glVariantubvEXT }, + { "glVariantuivEXT", "GL_EXT_vertex_shader", wine_glVariantuivEXT }, + { "glVariantusvEXT", "GL_EXT_vertex_shader", wine_glVariantusvEXT }, + { "glVertex2hNV", "GL_NV_half_float", wine_glVertex2hNV }, + { "glVertex2hvNV", "GL_NV_half_float", wine_glVertex2hvNV }, + { "glVertex3hNV", "GL_NV_half_float", wine_glVertex3hNV }, + { "glVertex3hvNV", "GL_NV_half_float", wine_glVertex3hvNV }, + { "glVertex4hNV", "GL_NV_half_float", wine_glVertex4hNV }, + { "glVertex4hvNV", "GL_NV_half_float", wine_glVertex4hvNV }, + { "glVertexArrayParameteriAPPLE", "GL_APPLE_vertex_array_range", wine_glVertexArrayParameteriAPPLE }, + { "glVertexArrayRangeAPPLE", "GL_APPLE_vertex_array_range", wine_glVertexArrayRangeAPPLE }, + { "glVertexArrayRangeNV", "GL_NV_vertex_array_range", wine_glVertexArrayRangeNV }, + { "glVertexAttrib1d", "GL_VERSION_2_0", wine_glVertexAttrib1d }, + { "glVertexAttrib1dARB", "GL_ARB_vertex_program", wine_glVertexAttrib1dARB }, + { "glVertexAttrib1dNV", "GL_NV_vertex_program", wine_glVertexAttrib1dNV }, + { "glVertexAttrib1dv", "GL_VERSION_2_0", wine_glVertexAttrib1dv }, + { "glVertexAttrib1dvARB", "GL_ARB_vertex_program", wine_glVertexAttrib1dvARB }, + { "glVertexAttrib1dvNV", "GL_NV_vertex_program", wine_glVertexAttrib1dvNV }, + { "glVertexAttrib1f", "GL_VERSION_2_0", wine_glVertexAttrib1f }, + { "glVertexAttrib1fARB", "GL_ARB_vertex_program", wine_glVertexAttrib1fARB }, + { "glVertexAttrib1fNV", "GL_NV_vertex_program", wine_glVertexAttrib1fNV }, + { "glVertexAttrib1fv", "GL_VERSION_2_0", wine_glVertexAttrib1fv }, + { "glVertexAttrib1fvARB", "GL_ARB_vertex_program", wine_glVertexAttrib1fvARB }, + { "glVertexAttrib1fvNV", "GL_NV_vertex_program", wine_glVertexAttrib1fvNV }, + { "glVertexAttrib1hNV", "GL_NV_half_float", wine_glVertexAttrib1hNV }, + { "glVertexAttrib1hvNV", "GL_NV_half_float", wine_glVertexAttrib1hvNV }, + { "glVertexAttrib1s", "GL_VERSION_2_0", wine_glVertexAttrib1s }, + { "glVertexAttrib1sARB", "GL_ARB_vertex_program", wine_glVertexAttrib1sARB }, + { "glVertexAttrib1sNV", "GL_NV_vertex_program", wine_glVertexAttrib1sNV }, + { "glVertexAttrib1sv", "GL_VERSION_2_0", wine_glVertexAttrib1sv }, + { "glVertexAttrib1svARB", "GL_ARB_vertex_program", wine_glVertexAttrib1svARB }, + { "glVertexAttrib1svNV", "GL_NV_vertex_program", wine_glVertexAttrib1svNV }, + { "glVertexAttrib2d", "GL_VERSION_2_0", wine_glVertexAttrib2d }, + { "glVertexAttrib2dARB", "GL_ARB_vertex_program", wine_glVertexAttrib2dARB }, + { "glVertexAttrib2dNV", "GL_NV_vertex_program", wine_glVertexAttrib2dNV }, + { "glVertexAttrib2dv", "GL_VERSION_2_0", wine_glVertexAttrib2dv }, + { "glVertexAttrib2dvARB", "GL_ARB_vertex_program", wine_glVertexAttrib2dvARB }, + { "glVertexAttrib2dvNV", "GL_NV_vertex_program", wine_glVertexAttrib2dvNV }, + { "glVertexAttrib2f", "GL_VERSION_2_0", wine_glVertexAttrib2f }, + { "glVertexAttrib2fARB", "GL_ARB_vertex_program", wine_glVertexAttrib2fARB }, + { "glVertexAttrib2fNV", "GL_NV_vertex_program", wine_glVertexAttrib2fNV }, + { "glVertexAttrib2fv", "GL_VERSION_2_0", wine_glVertexAttrib2fv }, + { "glVertexAttrib2fvARB", "GL_ARB_vertex_program", wine_glVertexAttrib2fvARB }, + { "glVertexAttrib2fvNV", "GL_NV_vertex_program", wine_glVertexAttrib2fvNV }, + { "glVertexAttrib2hNV", "GL_NV_half_float", wine_glVertexAttrib2hNV }, + { "glVertexAttrib2hvNV", "GL_NV_half_float", wine_glVertexAttrib2hvNV }, + { "glVertexAttrib2s", "GL_VERSION_2_0", wine_glVertexAttrib2s }, + { "glVertexAttrib2sARB", "GL_ARB_vertex_program", wine_glVertexAttrib2sARB }, + { "glVertexAttrib2sNV", "GL_NV_vertex_program", wine_glVertexAttrib2sNV }, + { "glVertexAttrib2sv", "GL_VERSION_2_0", wine_glVertexAttrib2sv }, + { "glVertexAttrib2svARB", "GL_ARB_vertex_program", wine_glVertexAttrib2svARB }, + { "glVertexAttrib2svNV", "GL_NV_vertex_program", wine_glVertexAttrib2svNV }, + { "glVertexAttrib3d", "GL_VERSION_2_0", wine_glVertexAttrib3d }, + { "glVertexAttrib3dARB", "GL_ARB_vertex_program", wine_glVertexAttrib3dARB }, + { "glVertexAttrib3dNV", "GL_NV_vertex_program", wine_glVertexAttrib3dNV }, + { "glVertexAttrib3dv", "GL_VERSION_2_0", wine_glVertexAttrib3dv }, + { "glVertexAttrib3dvARB", "GL_ARB_vertex_program", wine_glVertexAttrib3dvARB }, + { "glVertexAttrib3dvNV", "GL_NV_vertex_program", wine_glVertexAttrib3dvNV }, + { "glVertexAttrib3f", "GL_VERSION_2_0", wine_glVertexAttrib3f }, + { "glVertexAttrib3fARB", "GL_ARB_vertex_program", wine_glVertexAttrib3fARB }, + { "glVertexAttrib3fNV", "GL_NV_vertex_program", wine_glVertexAttrib3fNV }, + { "glVertexAttrib3fv", "GL_VERSION_2_0", wine_glVertexAttrib3fv }, + { "glVertexAttrib3fvARB", "GL_ARB_vertex_program", wine_glVertexAttrib3fvARB }, + { "glVertexAttrib3fvNV", "GL_NV_vertex_program", wine_glVertexAttrib3fvNV }, + { "glVertexAttrib3hNV", "GL_NV_half_float", wine_glVertexAttrib3hNV }, + { "glVertexAttrib3hvNV", "GL_NV_half_float", wine_glVertexAttrib3hvNV }, + { "glVertexAttrib3s", "GL_VERSION_2_0", wine_glVertexAttrib3s }, + { "glVertexAttrib3sARB", "GL_ARB_vertex_program", wine_glVertexAttrib3sARB }, + { "glVertexAttrib3sNV", "GL_NV_vertex_program", wine_glVertexAttrib3sNV }, + { "glVertexAttrib3sv", "GL_VERSION_2_0", wine_glVertexAttrib3sv }, + { "glVertexAttrib3svARB", "GL_ARB_vertex_program", wine_glVertexAttrib3svARB }, + { "glVertexAttrib3svNV", "GL_NV_vertex_program", wine_glVertexAttrib3svNV }, + { "glVertexAttrib4Nbv", "GL_VERSION_2_0", wine_glVertexAttrib4Nbv }, + { "glVertexAttrib4NbvARB", "GL_ARB_vertex_program", wine_glVertexAttrib4NbvARB }, + { "glVertexAttrib4Niv", "GL_VERSION_2_0", wine_glVertexAttrib4Niv }, + { "glVertexAttrib4NivARB", "GL_ARB_vertex_program", wine_glVertexAttrib4NivARB }, + { "glVertexAttrib4Nsv", "GL_VERSION_2_0", wine_glVertexAttrib4Nsv }, + { "glVertexAttrib4NsvARB", "GL_ARB_vertex_program", wine_glVertexAttrib4NsvARB }, + { "glVertexAttrib4Nub", "GL_VERSION_2_0", wine_glVertexAttrib4Nub }, + { "glVertexAttrib4NubARB", "GL_ARB_vertex_program", wine_glVertexAttrib4NubARB }, + { "glVertexAttrib4Nubv", "GL_VERSION_2_0", wine_glVertexAttrib4Nubv }, + { "glVertexAttrib4NubvARB", "GL_ARB_vertex_program", wine_glVertexAttrib4NubvARB }, + { "glVertexAttrib4Nuiv", "GL_VERSION_2_0", wine_glVertexAttrib4Nuiv }, + { "glVertexAttrib4NuivARB", "GL_ARB_vertex_program", wine_glVertexAttrib4NuivARB }, + { "glVertexAttrib4Nusv", "GL_VERSION_2_0", wine_glVertexAttrib4Nusv }, + { "glVertexAttrib4NusvARB", "GL_ARB_vertex_program", wine_glVertexAttrib4NusvARB }, + { "glVertexAttrib4bv", "GL_VERSION_2_0", wine_glVertexAttrib4bv }, + { "glVertexAttrib4bvARB", "GL_ARB_vertex_program", wine_glVertexAttrib4bvARB }, + { "glVertexAttrib4d", "GL_VERSION_2_0", wine_glVertexAttrib4d }, + { "glVertexAttrib4dARB", "GL_ARB_vertex_program", wine_glVertexAttrib4dARB }, + { "glVertexAttrib4dNV", "GL_NV_vertex_program", wine_glVertexAttrib4dNV }, + { "glVertexAttrib4dv", "GL_VERSION_2_0", wine_glVertexAttrib4dv }, + { "glVertexAttrib4dvARB", "GL_ARB_vertex_program", wine_glVertexAttrib4dvARB }, + { "glVertexAttrib4dvNV", "GL_NV_vertex_program", wine_glVertexAttrib4dvNV }, + { "glVertexAttrib4f", "GL_VERSION_2_0", wine_glVertexAttrib4f }, + { "glVertexAttrib4fARB", "GL_ARB_vertex_program", wine_glVertexAttrib4fARB }, + { "glVertexAttrib4fNV", "GL_NV_vertex_program", wine_glVertexAttrib4fNV }, + { "glVertexAttrib4fv", "GL_VERSION_2_0", wine_glVertexAttrib4fv }, + { "glVertexAttrib4fvARB", "GL_ARB_vertex_program", wine_glVertexAttrib4fvARB }, + { "glVertexAttrib4fvNV", "GL_NV_vertex_program", wine_glVertexAttrib4fvNV }, + { "glVertexAttrib4hNV", "GL_NV_half_float", wine_glVertexAttrib4hNV }, + { "glVertexAttrib4hvNV", "GL_NV_half_float", wine_glVertexAttrib4hvNV }, + { "glVertexAttrib4iv", "GL_VERSION_2_0", wine_glVertexAttrib4iv }, + { "glVertexAttrib4ivARB", "GL_ARB_vertex_program", wine_glVertexAttrib4ivARB }, + { "glVertexAttrib4s", "GL_VERSION_2_0", wine_glVertexAttrib4s }, + { "glVertexAttrib4sARB", "GL_ARB_vertex_program", wine_glVertexAttrib4sARB }, + { "glVertexAttrib4sNV", "GL_NV_vertex_program", wine_glVertexAttrib4sNV }, + { "glVertexAttrib4sv", "GL_VERSION_2_0", wine_glVertexAttrib4sv }, + { "glVertexAttrib4svARB", "GL_ARB_vertex_program", wine_glVertexAttrib4svARB }, + { "glVertexAttrib4svNV", "GL_NV_vertex_program", wine_glVertexAttrib4svNV }, + { "glVertexAttrib4ubNV", "GL_NV_vertex_program", wine_glVertexAttrib4ubNV }, + { "glVertexAttrib4ubv", "GL_VERSION_2_0", wine_glVertexAttrib4ubv }, + { "glVertexAttrib4ubvARB", "GL_ARB_vertex_program", wine_glVertexAttrib4ubvARB }, + { "glVertexAttrib4ubvNV", "GL_NV_vertex_program", wine_glVertexAttrib4ubvNV }, + { "glVertexAttrib4uiv", "GL_VERSION_2_0", wine_glVertexAttrib4uiv }, + { "glVertexAttrib4uivARB", "GL_ARB_vertex_program", wine_glVertexAttrib4uivARB }, + { "glVertexAttrib4usv", "GL_VERSION_2_0", wine_glVertexAttrib4usv }, + { "glVertexAttrib4usvARB", "GL_ARB_vertex_program", wine_glVertexAttrib4usvARB }, + { "glVertexAttribArrayObjectATI", "GL_ATI_vertex_attrib_array_object", wine_glVertexAttribArrayObjectATI }, + { "glVertexAttribDivisor", "GL_ARB_instanced_arrays", wine_glVertexAttribDivisor }, + { "glVertexAttribI1i", "GL_VERSION_3_0", wine_glVertexAttribI1i }, + { "glVertexAttribI1iEXT", "GL_NV_vertex_program4", wine_glVertexAttribI1iEXT }, + { "glVertexAttribI1iv", "GL_VERSION_3_0", wine_glVertexAttribI1iv }, + { "glVertexAttribI1ivEXT", "GL_NV_vertex_program4", wine_glVertexAttribI1ivEXT }, + { "glVertexAttribI1ui", "GL_VERSION_3_0", wine_glVertexAttribI1ui }, + { "glVertexAttribI1uiEXT", "GL_NV_vertex_program4", wine_glVertexAttribI1uiEXT }, + { "glVertexAttribI1uiv", "GL_VERSION_3_0", wine_glVertexAttribI1uiv }, + { "glVertexAttribI1uivEXT", "GL_NV_vertex_program4", wine_glVertexAttribI1uivEXT }, + { "glVertexAttribI2i", "GL_VERSION_3_0", wine_glVertexAttribI2i }, + { "glVertexAttribI2iEXT", "GL_NV_vertex_program4", wine_glVertexAttribI2iEXT }, + { "glVertexAttribI2iv", "GL_VERSION_3_0", wine_glVertexAttribI2iv }, + { "glVertexAttribI2ivEXT", "GL_NV_vertex_program4", wine_glVertexAttribI2ivEXT }, + { "glVertexAttribI2ui", "GL_VERSION_3_0", wine_glVertexAttribI2ui }, + { "glVertexAttribI2uiEXT", "GL_NV_vertex_program4", wine_glVertexAttribI2uiEXT }, + { "glVertexAttribI2uiv", "GL_VERSION_3_0", wine_glVertexAttribI2uiv }, + { "glVertexAttribI2uivEXT", "GL_NV_vertex_program4", wine_glVertexAttribI2uivEXT }, + { "glVertexAttribI3i", "GL_VERSION_3_0", wine_glVertexAttribI3i }, + { "glVertexAttribI3iEXT", "GL_NV_vertex_program4", wine_glVertexAttribI3iEXT }, + { "glVertexAttribI3iv", "GL_VERSION_3_0", wine_glVertexAttribI3iv }, + { "glVertexAttribI3ivEXT", "GL_NV_vertex_program4", wine_glVertexAttribI3ivEXT }, + { "glVertexAttribI3ui", "GL_VERSION_3_0", wine_glVertexAttribI3ui }, + { "glVertexAttribI3uiEXT", "GL_NV_vertex_program4", wine_glVertexAttribI3uiEXT }, + { "glVertexAttribI3uiv", "GL_VERSION_3_0", wine_glVertexAttribI3uiv }, + { "glVertexAttribI3uivEXT", "GL_NV_vertex_program4", wine_glVertexAttribI3uivEXT }, + { "glVertexAttribI4bv", "GL_VERSION_3_0", wine_glVertexAttribI4bv }, + { "glVertexAttribI4bvEXT", "GL_NV_vertex_program4", wine_glVertexAttribI4bvEXT }, + { "glVertexAttribI4i", "GL_VERSION_3_0", wine_glVertexAttribI4i }, + { "glVertexAttribI4iEXT", "GL_NV_vertex_program4", wine_glVertexAttribI4iEXT }, + { "glVertexAttribI4iv", "GL_VERSION_3_0", wine_glVertexAttribI4iv }, + { "glVertexAttribI4ivEXT", "GL_NV_vertex_program4", wine_glVertexAttribI4ivEXT }, + { "glVertexAttribI4sv", "GL_VERSION_3_0", wine_glVertexAttribI4sv }, + { "glVertexAttribI4svEXT", "GL_NV_vertex_program4", wine_glVertexAttribI4svEXT }, + { "glVertexAttribI4ubv", "GL_VERSION_3_0", wine_glVertexAttribI4ubv }, + { "glVertexAttribI4ubvEXT", "GL_NV_vertex_program4", wine_glVertexAttribI4ubvEXT }, + { "glVertexAttribI4ui", "GL_VERSION_3_0", wine_glVertexAttribI4ui }, + { "glVertexAttribI4uiEXT", "GL_NV_vertex_program4", wine_glVertexAttribI4uiEXT }, + { "glVertexAttribI4uiv", "GL_VERSION_3_0", wine_glVertexAttribI4uiv }, + { "glVertexAttribI4uivEXT", "GL_NV_vertex_program4", wine_glVertexAttribI4uivEXT }, + { "glVertexAttribI4usv", "GL_VERSION_3_0", wine_glVertexAttribI4usv }, + { "glVertexAttribI4usvEXT", "GL_NV_vertex_program4", wine_glVertexAttribI4usvEXT }, + { "glVertexAttribIPointer", "GL_VERSION_3_0", wine_glVertexAttribIPointer }, + { "glVertexAttribIPointerEXT", "GL_NV_vertex_program4", wine_glVertexAttribIPointerEXT }, + { "glVertexAttribPointer", "GL_VERSION_2_0", wine_glVertexAttribPointer }, + { "glVertexAttribPointerARB", "GL_ARB_vertex_program", wine_glVertexAttribPointerARB }, + { "glVertexAttribPointerNV", "GL_NV_vertex_program", wine_glVertexAttribPointerNV }, + { "glVertexAttribs1dvNV", "GL_NV_vertex_program", wine_glVertexAttribs1dvNV }, + { "glVertexAttribs1fvNV", "GL_NV_vertex_program", wine_glVertexAttribs1fvNV }, + { "glVertexAttribs1hvNV", "GL_NV_half_float", wine_glVertexAttribs1hvNV }, + { "glVertexAttribs1svNV", "GL_NV_vertex_program", wine_glVertexAttribs1svNV }, + { "glVertexAttribs2dvNV", "GL_NV_vertex_program", wine_glVertexAttribs2dvNV }, + { "glVertexAttribs2fvNV", "GL_NV_vertex_program", wine_glVertexAttribs2fvNV }, + { "glVertexAttribs2hvNV", "GL_NV_half_float", wine_glVertexAttribs2hvNV }, + { "glVertexAttribs2svNV", "GL_NV_vertex_program", wine_glVertexAttribs2svNV }, + { "glVertexAttribs3dvNV", "GL_NV_vertex_program", wine_glVertexAttribs3dvNV }, + { "glVertexAttribs3fvNV", "GL_NV_vertex_program", wine_glVertexAttribs3fvNV }, + { "glVertexAttribs3hvNV", "GL_NV_half_float", wine_glVertexAttribs3hvNV }, + { "glVertexAttribs3svNV", "GL_NV_vertex_program", wine_glVertexAttribs3svNV }, + { "glVertexAttribs4dvNV", "GL_NV_vertex_program", wine_glVertexAttribs4dvNV }, + { "glVertexAttribs4fvNV", "GL_NV_vertex_program", wine_glVertexAttribs4fvNV }, + { "glVertexAttribs4hvNV", "GL_NV_half_float", wine_glVertexAttribs4hvNV }, + { "glVertexAttribs4svNV", "GL_NV_vertex_program", wine_glVertexAttribs4svNV }, + { "glVertexAttribs4ubvNV", "GL_NV_vertex_program", wine_glVertexAttribs4ubvNV }, + { "glVertexBlendARB", "GL_ARB_vertex_blend", wine_glVertexBlendARB }, + { "glVertexBlendEnvfATI", "GL_ATI_vertex_streams", wine_glVertexBlendEnvfATI }, + { "glVertexBlendEnviATI", "GL_ATI_vertex_streams", wine_glVertexBlendEnviATI }, + { "glVertexPointerEXT", "GL_EXT_vertex_array", wine_glVertexPointerEXT }, + { "glVertexPointerListIBM", "GL_IBM_vertex_array_lists", wine_glVertexPointerListIBM }, + { "glVertexPointervINTEL", "GL_INTEL_parallel_arrays", wine_glVertexPointervINTEL }, + { "glVertexStream1dATI", "GL_ATI_vertex_streams", wine_glVertexStream1dATI }, + { "glVertexStream1dvATI", "GL_ATI_vertex_streams", wine_glVertexStream1dvATI }, + { "glVertexStream1fATI", "GL_ATI_vertex_streams", wine_glVertexStream1fATI }, + { "glVertexStream1fvATI", "GL_ATI_vertex_streams", wine_glVertexStream1fvATI }, + { "glVertexStream1iATI", "GL_ATI_vertex_streams", wine_glVertexStream1iATI }, + { "glVertexStream1ivATI", "GL_ATI_vertex_streams", wine_glVertexStream1ivATI }, + { "glVertexStream1sATI", "GL_ATI_vertex_streams", wine_glVertexStream1sATI }, + { "glVertexStream1svATI", "GL_ATI_vertex_streams", wine_glVertexStream1svATI }, + { "glVertexStream2dATI", "GL_ATI_vertex_streams", wine_glVertexStream2dATI }, + { "glVertexStream2dvATI", "GL_ATI_vertex_streams", wine_glVertexStream2dvATI }, + { "glVertexStream2fATI", "GL_ATI_vertex_streams", wine_glVertexStream2fATI }, + { "glVertexStream2fvATI", "GL_ATI_vertex_streams", wine_glVertexStream2fvATI }, + { "glVertexStream2iATI", "GL_ATI_vertex_streams", wine_glVertexStream2iATI }, + { "glVertexStream2ivATI", "GL_ATI_vertex_streams", wine_glVertexStream2ivATI }, + { "glVertexStream2sATI", "GL_ATI_vertex_streams", wine_glVertexStream2sATI }, + { "glVertexStream2svATI", "GL_ATI_vertex_streams", wine_glVertexStream2svATI }, + { "glVertexStream3dATI", "GL_ATI_vertex_streams", wine_glVertexStream3dATI }, + { "glVertexStream3dvATI", "GL_ATI_vertex_streams", wine_glVertexStream3dvATI }, + { "glVertexStream3fATI", "GL_ATI_vertex_streams", wine_glVertexStream3fATI }, + { "glVertexStream3fvATI", "GL_ATI_vertex_streams", wine_glVertexStream3fvATI }, + { "glVertexStream3iATI", "GL_ATI_vertex_streams", wine_glVertexStream3iATI }, + { "glVertexStream3ivATI", "GL_ATI_vertex_streams", wine_glVertexStream3ivATI }, + { "glVertexStream3sATI", "GL_ATI_vertex_streams", wine_glVertexStream3sATI }, + { "glVertexStream3svATI", "GL_ATI_vertex_streams", wine_glVertexStream3svATI }, + { "glVertexStream4dATI", "GL_ATI_vertex_streams", wine_glVertexStream4dATI }, + { "glVertexStream4dvATI", "GL_ATI_vertex_streams", wine_glVertexStream4dvATI }, + { "glVertexStream4fATI", "GL_ATI_vertex_streams", wine_glVertexStream4fATI }, + { "glVertexStream4fvATI", "GL_ATI_vertex_streams", wine_glVertexStream4fvATI }, + { "glVertexStream4iATI", "GL_ATI_vertex_streams", wine_glVertexStream4iATI }, + { "glVertexStream4ivATI", "GL_ATI_vertex_streams", wine_glVertexStream4ivATI }, + { "glVertexStream4sATI", "GL_ATI_vertex_streams", wine_glVertexStream4sATI }, + { "glVertexStream4svATI", "GL_ATI_vertex_streams", wine_glVertexStream4svATI }, + { "glVertexWeightPointerEXT", "GL_EXT_vertex_weighting", wine_glVertexWeightPointerEXT }, + { "glVertexWeightfEXT", "GL_EXT_vertex_weighting", wine_glVertexWeightfEXT }, + { "glVertexWeightfvEXT", "GL_EXT_vertex_weighting", wine_glVertexWeightfvEXT }, + { "glVertexWeighthNV", "GL_NV_half_float", wine_glVertexWeighthNV }, + { "glVertexWeighthvNV", "GL_NV_half_float", wine_glVertexWeighthvNV }, + { "glWeightPointerARB", "GL_ARB_vertex_blend", wine_glWeightPointerARB }, + { "glWeightbvARB", "GL_ARB_vertex_blend", wine_glWeightbvARB }, + { "glWeightdvARB", "GL_ARB_vertex_blend", wine_glWeightdvARB }, + { "glWeightfvARB", "GL_ARB_vertex_blend", wine_glWeightfvARB }, + { "glWeightivARB", "GL_ARB_vertex_blend", wine_glWeightivARB }, + { "glWeightsvARB", "GL_ARB_vertex_blend", wine_glWeightsvARB }, + { "glWeightubvARB", "GL_ARB_vertex_blend", wine_glWeightubvARB }, + { "glWeightuivARB", "GL_ARB_vertex_blend", wine_glWeightuivARB }, + { "glWeightusvARB", "GL_ARB_vertex_blend", wine_glWeightusvARB }, + { "glWindowPos2d", "GL_VERSION_1_4", wine_glWindowPos2d }, + { "glWindowPos2dARB", "GL_ARB_window_pos", wine_glWindowPos2dARB }, + { "glWindowPos2dMESA", "GL_MESA_window_pos", wine_glWindowPos2dMESA }, + { "glWindowPos2dv", "GL_VERSION_1_4", wine_glWindowPos2dv }, + { "glWindowPos2dvARB", "GL_ARB_window_pos", wine_glWindowPos2dvARB }, + { "glWindowPos2dvMESA", "GL_MESA_window_pos", wine_glWindowPos2dvMESA }, + { "glWindowPos2f", "GL_VERSION_1_4", wine_glWindowPos2f }, + { "glWindowPos2fARB", "GL_ARB_window_pos", wine_glWindowPos2fARB }, + { "glWindowPos2fMESA", "GL_MESA_window_pos", wine_glWindowPos2fMESA }, + { "glWindowPos2fv", "GL_VERSION_1_4", wine_glWindowPos2fv }, + { "glWindowPos2fvARB", "GL_ARB_window_pos", wine_glWindowPos2fvARB }, + { "glWindowPos2fvMESA", "GL_MESA_window_pos", wine_glWindowPos2fvMESA }, + { "glWindowPos2i", "GL_VERSION_1_4", wine_glWindowPos2i }, + { "glWindowPos2iARB", "GL_ARB_window_pos", wine_glWindowPos2iARB }, + { "glWindowPos2iMESA", "GL_MESA_window_pos", wine_glWindowPos2iMESA }, + { "glWindowPos2iv", "GL_VERSION_1_4", wine_glWindowPos2iv }, + { "glWindowPos2ivARB", "GL_ARB_window_pos", wine_glWindowPos2ivARB }, + { "glWindowPos2ivMESA", "GL_MESA_window_pos", wine_glWindowPos2ivMESA }, + { "glWindowPos2s", "GL_VERSION_1_4", wine_glWindowPos2s }, + { "glWindowPos2sARB", "GL_ARB_window_pos", wine_glWindowPos2sARB }, + { "glWindowPos2sMESA", "GL_MESA_window_pos", wine_glWindowPos2sMESA }, + { "glWindowPos2sv", "GL_VERSION_1_4", wine_glWindowPos2sv }, + { "glWindowPos2svARB", "GL_ARB_window_pos", wine_glWindowPos2svARB }, + { "glWindowPos2svMESA", "GL_MESA_window_pos", wine_glWindowPos2svMESA }, + { "glWindowPos3d", "GL_VERSION_1_4", wine_glWindowPos3d }, + { "glWindowPos3dARB", "GL_ARB_window_pos", wine_glWindowPos3dARB }, + { "glWindowPos3dMESA", "GL_MESA_window_pos", wine_glWindowPos3dMESA }, + { "glWindowPos3dv", "GL_VERSION_1_4", wine_glWindowPos3dv }, + { "glWindowPos3dvARB", "GL_ARB_window_pos", wine_glWindowPos3dvARB }, + { "glWindowPos3dvMESA", "GL_MESA_window_pos", wine_glWindowPos3dvMESA }, + { "glWindowPos3f", "GL_VERSION_1_4", wine_glWindowPos3f }, + { "glWindowPos3fARB", "GL_ARB_window_pos", wine_glWindowPos3fARB }, + { "glWindowPos3fMESA", "GL_MESA_window_pos", wine_glWindowPos3fMESA }, + { "glWindowPos3fv", "GL_VERSION_1_4", wine_glWindowPos3fv }, + { "glWindowPos3fvARB", "GL_ARB_window_pos", wine_glWindowPos3fvARB }, + { "glWindowPos3fvMESA", "GL_MESA_window_pos", wine_glWindowPos3fvMESA }, + { "glWindowPos3i", "GL_VERSION_1_4", wine_glWindowPos3i }, + { "glWindowPos3iARB", "GL_ARB_window_pos", wine_glWindowPos3iARB }, + { "glWindowPos3iMESA", "GL_MESA_window_pos", wine_glWindowPos3iMESA }, + { "glWindowPos3iv", "GL_VERSION_1_4", wine_glWindowPos3iv }, + { "glWindowPos3ivARB", "GL_ARB_window_pos", wine_glWindowPos3ivARB }, + { "glWindowPos3ivMESA", "GL_MESA_window_pos", wine_glWindowPos3ivMESA }, + { "glWindowPos3s", "GL_VERSION_1_4", wine_glWindowPos3s }, + { "glWindowPos3sARB", "GL_ARB_window_pos", wine_glWindowPos3sARB }, + { "glWindowPos3sMESA", "GL_MESA_window_pos", wine_glWindowPos3sMESA }, + { "glWindowPos3sv", "GL_VERSION_1_4", wine_glWindowPos3sv }, + { "glWindowPos3svARB", "GL_ARB_window_pos", wine_glWindowPos3svARB }, + { "glWindowPos3svMESA", "GL_MESA_window_pos", wine_glWindowPos3svMESA }, + { "glWindowPos4dMESA", "GL_MESA_window_pos", wine_glWindowPos4dMESA }, + { "glWindowPos4dvMESA", "GL_MESA_window_pos", wine_glWindowPos4dvMESA }, + { "glWindowPos4fMESA", "GL_MESA_window_pos", wine_glWindowPos4fMESA }, + { "glWindowPos4fvMESA", "GL_MESA_window_pos", wine_glWindowPos4fvMESA }, + { "glWindowPos4iMESA", "GL_MESA_window_pos", wine_glWindowPos4iMESA }, + { "glWindowPos4ivMESA", "GL_MESA_window_pos", wine_glWindowPos4ivMESA }, + { "glWindowPos4sMESA", "GL_MESA_window_pos", wine_glWindowPos4sMESA }, + { "glWindowPos4svMESA", "GL_MESA_window_pos", wine_glWindowPos4svMESA }, + { "glWriteMaskEXT", "GL_EXT_vertex_shader", wine_glWriteMaskEXT } }; diff --git a/dlls/psapi/psapi_main.c b/dlls/psapi/psapi_main.c index 9fe8281f9d3..7f90a2193e0 100644 --- a/dlls/psapi/psapi_main.c +++ b/dlls/psapi/psapi_main.c @@ -222,13 +222,13 @@ BOOL WINAPI EnumProcesses(DWORD *lpdwProcessIDs, DWORD cb, DWORD *lpcbUsed) for (*lpcbUsed = 0; cb >= sizeof(DWORD); cb -= sizeof(DWORD)) { - *lpdwProcessIDs++ = spi->dwProcessID; + *lpdwProcessIDs++ = HandleToUlong(spi->UniqueProcessId); *lpcbUsed += sizeof(DWORD); - if (spi->dwOffset == 0) + if (spi->NextEntryOffset == 0) break; - spi = (SYSTEM_PROCESS_INFORMATION *)(((PCHAR)spi) + spi->dwOffset); + spi = (SYSTEM_PROCESS_INFORMATION *)(((PCHAR)spi) + spi->NextEntryOffset); } HeapFree(GetProcessHeap(), 0, pBuf); diff --git a/dlls/qedit/tests/mediadet.c b/dlls/qedit/tests/mediadet.c index 2b43124a7a9..711281d8cc6 100644 --- a/dlls/qedit/tests/mediadet.c +++ b/dlls/qedit/tests/mediadet.c @@ -44,7 +44,7 @@ static BOOL unpack_avi_file(int id, WCHAR name[MAX_PATH]) DWORD size, written; HANDLE fh; - res = FindResourceW(NULL, (LPWSTR) id, (LPWSTR) AVI_RES_TYPE); + res = FindResource(NULL, MAKEINTRESOURCE(id), MAKEINTRESOURCE(AVI_RES_TYPE)); if (!res) return FALSE; diff --git a/dlls/quartz/nullrenderer.c b/dlls/quartz/nullrenderer.c index 2f9ec94b4de..b64e1d15c5f 100644 --- a/dlls/quartz/nullrenderer.c +++ b/dlls/quartz/nullrenderer.c @@ -67,19 +67,6 @@ typedef struct NullRendererImpl MediaSeekingImpl mediaSeeking; } NullRendererImpl; -static const IMemInputPinVtbl MemInputPin_Vtbl = -{ - MemInputPin_QueryInterface, - MemInputPin_AddRef, - MemInputPin_Release, - MemInputPin_GetAllocator, - MemInputPin_NotifyAllocator, - MemInputPin_GetAllocatorRequirements, - MemInputPin_Receive, - MemInputPin_ReceiveMultiple, - MemInputPin_ReceiveCanBlock -}; - static HRESULT NullRenderer_Sample(LPVOID iface, IMediaSample * pSample) { NullRendererImpl *This = (NullRendererImpl *)iface; diff --git a/dlls/quartz/transform.c b/dlls/quartz/transform.c index 57e02b8d49d..77ca4d742f9 100644 --- a/dlls/quartz/transform.c +++ b/dlls/quartz/transform.c @@ -45,7 +45,6 @@ static const WCHAR wcsOutputPinName[] = {'o','u','t','p','u','t',' ','p','i','n' static const IBaseFilterVtbl TransformFilter_Vtbl; static const IPinVtbl TransformFilter_InputPin_Vtbl; -static const IMemInputPinVtbl MemInputPin_Vtbl; static const IPinVtbl TransformFilter_OutputPin_Vtbl; static HRESULT TransformFilter_Input_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt) @@ -650,16 +649,3 @@ static const IPinVtbl TransformFilter_OutputPin_Vtbl = OutputPin_EndFlush, OutputPin_NewSegment }; - -static const IMemInputPinVtbl MemInputPin_Vtbl = -{ - MemInputPin_QueryInterface, - MemInputPin_AddRef, - MemInputPin_Release, - MemInputPin_GetAllocator, - MemInputPin_NotifyAllocator, - MemInputPin_GetAllocatorRequirements, - MemInputPin_Receive, - MemInputPin_ReceiveMultiple, - MemInputPin_ReceiveCanBlock -}; diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 437779c5468..ac948d56dcd 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -256,19 +256,6 @@ static BOOL CreateRenderingSubsystem(VideoRendererImpl* This) return TRUE; } -static const IMemInputPinVtbl MemInputPin_Vtbl = -{ - MemInputPin_QueryInterface, - MemInputPin_AddRef, - MemInputPin_Release, - MemInputPin_GetAllocator, - MemInputPin_NotifyAllocator, - MemInputPin_GetAllocatorRequirements, - MemInputPin_Receive, - MemInputPin_ReceiveMultiple, - MemInputPin_ReceiveCanBlock -}; - static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data, DWORD size) { AM_MEDIA_TYPE amt; @@ -277,7 +264,7 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data, HDC hDC; BITMAPINFOHEADER *bmiHeader; - TRACE("%p %p %d\n", This, data, size); + TRACE("(%p)->(%p, %d)\n", This, data, size); sdesc.dwSize = sizeof(sdesc); hr = IPin_ConnectionMediaType((IPin *)This->pInputPin, &amt); @@ -356,6 +343,8 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample) REFERENCE_TIME tStart, tStop; HRESULT hr; + TRACE("(%p)->(%p)\n", iface, pSample); + EnterCriticalSection(&This->csFilter); if (This->pInputPin->flushing || This->pInputPin->end_of_stream) @@ -370,8 +359,6 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample) return VFW_E_WRONG_STATE; } - TRACE("%p %p\n", iface, pSample); - hr = IMediaSample_GetTime(pSample, &tStart, &tStop); if (FAILED(hr)) ERR("Cannot get sample time (%x)\n", hr); @@ -571,7 +558,7 @@ static const IMediaSeekingVtbl VideoRendererImpl_Seeking_Vtbl = static HRESULT VideoRendererImpl_Change(IBaseFilter *iface) { - TRACE("(%p)\n", iface); + TRACE("(%p)->()\n", iface); return S_OK; } @@ -961,9 +948,7 @@ static HRESULT WINAPI VideoRenderer_FindPin(IBaseFilter * iface, LPCWSTR Id, IPi { VideoRendererImpl *This = (VideoRendererImpl *)iface; - TRACE("(%p/%p)->(%p,%p)\n", This, iface, debugstr_w(Id), ppPin); - - FIXME("VideoRenderer::FindPin(...)\n"); + FIXME("(%p/%p)->(%p,%p): stub !!!\n", This, iface, debugstr_w(Id), ppPin); /* FIXME: critical section */ @@ -1541,6 +1526,8 @@ static HRESULT WINAPI Basicvideo_GetCurrentImage(IBasicVideo *iface, AM_MEDIA_TYPE *amt = &This->pInputPin->pin.mtCurrent; char *ptr; + FIXME("(%p/%p)->(%p, %p): partial stub\n", This, iface, pBufferSize, pDIBImage); + EnterCriticalSection(&This->csFilter); if (!This->sample_held) @@ -1549,8 +1536,6 @@ static HRESULT WINAPI Basicvideo_GetCurrentImage(IBasicVideo *iface, return (This->state == State_Paused ? E_UNEXPECTED : VFW_E_NOT_PAUSED); } - FIXME("(%p/%p)->(%p, %p): partial stub\n", This, iface, pBufferSize, pDIBImage); - if (IsEqualIID(&amt->formattype, &FORMAT_VideoInfo)) { bmiHeader = &((VIDEOINFOHEADER *)amt->pbFormat)->bmiHeader; @@ -1815,7 +1800,7 @@ static HRESULT WINAPI Videowindow_put_AutoShow(IVideoWindow *iface, TRACE("(%p/%p)->(%ld)\n", This, iface, AutoShow); - This->AutoShow = 1; /* FXIME: Should be AutoShow */; + This->AutoShow = 1; /* FIXME: Should be AutoShow */; return S_OK; } diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index c93a1e484f5..abb90786668 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2685,6 +2685,7 @@ void ME_DestroyEditor(ME_TextEditor *editor) DeleteObject(editor->hbrBackground); if(editor->lpOleCallback) IUnknown_Release(editor->lpOleCallback); + SetWindowLongPtrW(editor->hWnd, 0, 0); OleUninitialize(); FREE_OBJ(editor->pBuffer); @@ -3557,7 +3558,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, nCopy = min(nCharsLeft, strText->nLen); if (unicode) - lstrcpynW((LPWSTR) dest, strText->szData, nCopy); + memcpy(dest, strText->szData, nCopy * sizeof(WCHAR)); else nCopy = WideCharToMultiByte(CP_ACP, 0, strText->szData, nCopy, dest, nCharsLeft, NULL, NULL); @@ -3821,7 +3822,6 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, } case WM_DESTROY: ME_DestroyEditor(editor); - SetWindowLongPtrW(editor->hWnd, 0, 0); return 0; case WM_SETCURSOR: { @@ -4289,7 +4289,7 @@ LRESULT WINAPI RichEdit10ANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM void ME_SendOldNotify(ME_TextEditor *editor, int nCode) { HWND hWnd = editor->hWnd; - SendMessageA(GetParent(hWnd), WM_COMMAND, (nCode<<16)|GetWindowLongW(hWnd, GWLP_ID), (LPARAM)hWnd); + SendMessageA(GetParent(hWnd), WM_COMMAND, MAKEWPARAM(GetWindowLongW(hWnd, GWLP_ID), nCode), (LPARAM)hWnd); } void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam) diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c index a8cb169f248..37323776922 100644 --- a/dlls/riched20/tests/txtsrv.c +++ b/dlls/riched20/tests/txtsrv.c @@ -39,6 +39,7 @@ static HMODULE hmoduleRichEdit; /* Use a special table for x86 machines to convert the thiscall * calling convention. This isn't needed on other platforms. */ #ifdef __i386__ +static ITextServicesVtbl itextServicesStdcallVtbl; #define TXTSERV_VTABLE(This) (&itextServicesStdcallVtbl) #else /* __i386__ */ #define TXTSERV_VTABLE(This) (This)->lpVtbl @@ -441,8 +442,6 @@ static HRESULT WINAPI ITextHostImpl_TxGetSelectionBarWidth(ITextHost *iface, return E_NOTIMPL; } -static ITextServicesVtbl itextServicesStdcallVtbl; - static ITextHostVtbl itextHostVtbl = { ITextHostImpl_QueryInterface, ITextHostImpl_AddRef, diff --git a/dlls/rpcrt4/ndr_clientserver.c b/dlls/rpcrt4/ndr_clientserver.c index a051489dab2..502faa10739 100644 --- a/dlls/rpcrt4/ndr_clientserver.c +++ b/dlls/rpcrt4/ndr_clientserver.c @@ -232,7 +232,7 @@ RPC_STATUS RPC_ENTRY NdrMapCommAndFaultStatus( PMIDL_STUB_MESSAGE pStubMsg, ULONG *pFaultStatus, RPC_STATUS Status ) { - TRACE("(%p, %p, %p, %ld)\n", pStubMsg, pCommStatus, pFaultStatus, Status); + TRACE("(%p, %p, %p, %d)\n", pStubMsg, pCommStatus, pFaultStatus, Status); switch (Status) { diff --git a/dlls/rpcrt4/rpc_assoc.c b/dlls/rpcrt4/rpc_assoc.c index e8f367659d7..32e951a929a 100644 --- a/dlls/rpcrt4/rpc_assoc.c +++ b/dlls/rpcrt4/rpc_assoc.c @@ -240,7 +240,7 @@ static RPC_STATUS RpcAssoc_BindConnection(const RpcAssoc *assoc, RpcConnection * status = RPCRT4_ReceiveWithAuth(conn, &response_hdr, &msg, &auth_data, &auth_length); if (status != RPC_S_OK) { - ERR("receive failed with error %ld\n", status); + ERR("receive failed with error %d\n", status); return status; } diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c index 71d3c395ebc..e69f0f61add 100644 --- a/dlls/rpcrt4/rpc_binding.c +++ b/dlls/rpcrt4/rpc_binding.c @@ -1372,7 +1372,7 @@ BOOL RpcQualityOfService_IsEqual(const RpcQualityOfService *qos1, const RpcQuali if (!qos1 || !qos2) return FALSE; - TRACE("qos1 = { %ld %ld %ld %ld }, qos2 = { %ld %ld %ld %ld }\n", + TRACE("qos1 = { %d %d %d %d }, qos2 = { %d %d %d %d }\n", qos1->qos->Capabilities, qos1->qos->IdentityTracking, qos1->qos->ImpersonationType, qos1->qos->AdditionalSecurityInfoType, qos2->qos->Capabilities, qos2->qos->IdentityTracking, @@ -1517,14 +1517,14 @@ RpcBindingSetAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName, { RPC_STATUS status; - TRACE("SecurityQos { Version=%ld, Capabilties=0x%lx, IdentityTracking=%ld, ImpersonationLevel=%ld", + TRACE("SecurityQos { Version=%d, Capabilties=0x%x, IdentityTracking=%d, ImpersonationLevel=%d", SecurityQos->Version, SecurityQos->Capabilities, SecurityQos->IdentityTracking, SecurityQos->ImpersonationType); if (SecurityQos->Version >= 2) { const RPC_SECURITY_QOS_V2_A *SecurityQos2 = (const RPC_SECURITY_QOS_V2_A *)SecurityQos; - TRACE(", AdditionalSecurityInfoType=%ld", SecurityQos2->AdditionalSecurityInfoType); + TRACE(", AdditionalSecurityInfoType=%d", SecurityQos2->AdditionalSecurityInfoType); if (SecurityQos2->AdditionalSecurityInfoType == RPC_C_AUTHN_INFO_TYPE_HTTP) - TRACE(", { %p, 0x%lx, %ld, %ld, %p, %s }", + TRACE(", { %p, 0x%x, %d, %d, %p, %s }", SecurityQos2->u.HttpCredentials->TransportCredentials, SecurityQos2->u.HttpCredentials->Flags, SecurityQos2->u.HttpCredentials->AuthenticationTarget, @@ -1647,14 +1647,14 @@ RpcBindingSetAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName, { RPC_STATUS status; - TRACE("SecurityQos { Version=%ld, Capabilties=0x%lx, IdentityTracking=%ld, ImpersonationLevel=%ld", + TRACE("SecurityQos { Version=%d, Capabilties=0x%x, IdentityTracking=%d, ImpersonationLevel=%d", SecurityQos->Version, SecurityQos->Capabilities, SecurityQos->IdentityTracking, SecurityQos->ImpersonationType); if (SecurityQos->Version >= 2) { const RPC_SECURITY_QOS_V2_W *SecurityQos2 = (const RPC_SECURITY_QOS_V2_W *)SecurityQos; - TRACE(", AdditionalSecurityInfoType=%ld", SecurityQos2->AdditionalSecurityInfoType); + TRACE(", AdditionalSecurityInfoType=%d", SecurityQos2->AdditionalSecurityInfoType); if (SecurityQos2->AdditionalSecurityInfoType == RPC_C_AUTHN_INFO_TYPE_HTTP) - TRACE(", { %p, 0x%lx, %ld, %ld, %p, %s }", + TRACE(", { %p, 0x%x, %d, %d, %p, %s }", SecurityQos2->u.HttpCredentials->TransportCredentials, SecurityQos2->u.HttpCredentials->Flags, SecurityQos2->u.HttpCredentials->AuthenticationTarget, diff --git a/dlls/rpcrt4/rpc_epmap.c b/dlls/rpcrt4/rpc_epmap.c index de200f42a65..36170dcb554 100644 --- a/dlls/rpcrt4/rpc_epmap.c +++ b/dlls/rpcrt4/rpc_epmap.c @@ -444,7 +444,7 @@ RPC_STATUS WINAPI RpcEpResolveBinding( RPC_BINDING_HANDLE Binding, RPC_IF_HANDLE if (!resolved_endpoint) { status = TowerExplode(towers[i], NULL, NULL, NULL, &resolved_endpoint, NULL); - TRACE("status = %ld\n", status); + TRACE("status = %d\n", status); } I_RpcFree(towers[i]); } diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c index e59fc81d809..72f73b95f29 100644 --- a/dlls/rpcrt4/rpc_message.c +++ b/dlls/rpcrt4/rpc_message.c @@ -1279,7 +1279,7 @@ RPC_STATUS WINAPI I_RpcReceive(PRPC_MESSAGE pMsg) conn = pMsg->ReservedForRuntime; status = RPCRT4_Receive(conn, &hdr, pMsg); if (status != RPC_S_OK) { - WARN("receive failed with error %lx\n", status); + WARN("receive failed with error %x\n", status); goto fail; } diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 5fa96321792..b6e058a03bd 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -380,7 +380,7 @@ static DWORD CALLBACK RPCRT4_io_thread(LPVOID the_arg) status = RPCRT4_Receive(conn, &hdr, msg); if (status != RPC_S_OK) { - WARN("receive failed with error %lx\n", status); + WARN("receive failed with error %x\n", status); HeapFree(GetProcessHeap(), 0, msg); break; } @@ -745,7 +745,7 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpExA( RPC_CSTR Protseq, UINT MaxCalls, RPC RpcServerProtseq* ps; RPC_STATUS status; - TRACE("(%s,%u,%s,%p,{%u,%lu,%lu})\n", debugstr_a(szps), MaxCalls, + TRACE("(%s,%u,%s,%p,{%u,%u,%u})\n", debugstr_a(szps), MaxCalls, debugstr_a(szep), SecurityDescriptor, lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags ); @@ -766,7 +766,7 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpExW( RPC_WSTR Protseq, UINT MaxCalls, RPC RPC_STATUS status; LPSTR EndpointA; - TRACE("(%s,%u,%s,%p,{%u,%lu,%lu})\n", debugstr_w( Protseq ), MaxCalls, + TRACE("(%s,%u,%s,%p,{%u,%u,%u})\n", debugstr_w( Protseq ), MaxCalls, debugstr_w( Endpoint ), SecurityDescriptor, lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags ); diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c index 177c82caadb..537a00537bc 100644 --- a/dlls/rpcrt4/rpcrt4_main.c +++ b/dlls/rpcrt4/rpcrt4_main.c @@ -715,7 +715,7 @@ void WINAPI I_RpcFree(void *Object) */ LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status) { - TRACE("(%ld)\n", status); + TRACE("(%d)\n", status); switch (status) { case ERROR_ACCESS_DENIED: return STATUS_ACCESS_DENIED; diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c index 7b84780f8fc..418c6eedf17 100644 --- a/dlls/rpcrt4/tests/ndr_marshall.c +++ b/dlls/rpcrt4/tests/ndr_marshall.c @@ -1945,11 +1945,11 @@ static void test_ndr_buffer(void) StubDesc.RpcInterfaceInformation = (void *)&IFoo___RpcServerInterface; status = RpcServerUseProtseqEp(ncalrpc, 20, endpoint, NULL); - ok(RPC_S_OK == status, "RpcServerUseProtseqEp failed with status %lu\n", status); + ok(RPC_S_OK == status, "RpcServerUseProtseqEp failed with status %u\n", status); status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); - ok(RPC_S_OK == status, "RpcServerRegisterIf failed with status %lu\n", status); + ok(RPC_S_OK == status, "RpcServerRegisterIf failed with status %u\n", status); status = RpcServerListen(1, 20, TRUE); - ok(RPC_S_OK == status, "RpcServerListen failed with status %lu\n", status); + ok(RPC_S_OK == status, "RpcServerListen failed with status %u\n", status); if (status != RPC_S_OK) { /* Failed to create a server, running client tests is useless */ @@ -1957,10 +1957,10 @@ static void test_ndr_buffer(void) } status = RpcStringBindingCompose(NULL, ncalrpc, NULL, endpoint, NULL, &binding); - ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); status = RpcBindingFromStringBinding(binding, &Handle); - ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status); RpcStringFree(&binding); NdrClientInitializeNew(&RpcMessage, &StubMsg, &StubDesc, 5); @@ -2003,7 +2003,7 @@ todo_wine RpcBindingFree(&Handle); status = RpcServerUnregisterIf(NULL, NULL, FALSE); - ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%u)\n", status); } static void test_NdrMapCommAndFaultStatus(void) @@ -2022,7 +2022,7 @@ static void test_NdrMapCommAndFaultStatus(void) ULONG expected_comm_status = 0; ULONG expected_fault_status = 0; status = NdrMapCommAndFaultStatus(&StubMsg, &comm_status, &fault_status, rpc_status); - ok(status == RPC_S_OK, "NdrMapCommAndFaultStatus failed with error %ld\n", status); + ok(status == RPC_S_OK, "NdrMapCommAndFaultStatus failed with error %d\n", status); switch (rpc_status) { case ERROR_INVALID_HANDLE: @@ -2042,9 +2042,9 @@ static void test_NdrMapCommAndFaultStatus(void) default: expected_fault_status = rpc_status; } - ok(comm_status == expected_comm_status, "NdrMapCommAndFaultStatus should have mapped %ld to comm status %d instead of %d\n", + ok(comm_status == expected_comm_status, "NdrMapCommAndFaultStatus should have mapped %d to comm status %d instead of %d\n", rpc_status, expected_comm_status, comm_status); - ok(fault_status == expected_fault_status, "NdrMapCommAndFaultStatus should have mapped %ld to fault status %d instead of %d\n", + ok(fault_status == expected_fault_status, "NdrMapCommAndFaultStatus should have mapped %d to fault status %d instead of %d\n", rpc_status, expected_fault_status, fault_status); } } diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c index 069ead13e7c..9ac6d271cae 100644 --- a/dlls/rpcrt4/tests/rpc.c +++ b/dlls/rpcrt4/tests/rpc.c @@ -224,68 +224,68 @@ static void test_rpc_ncacn_ip_tcp(void) status = RpcMgmtStopServerListening(NULL); todo_wine { ok(status == RPC_S_NOT_LISTENING, - "wrong RpcMgmtStopServerListening error (%lu)\n", status); + "wrong RpcMgmtStopServerListening error (%u)\n", status); } status = RpcMgmtWaitServerListen(); ok(status == RPC_S_NOT_LISTENING, - "wrong RpcMgmtWaitServerListen error status (%lu)\n", status); + "wrong RpcMgmtWaitServerListen error status (%u)\n", status); status = RpcServerListen(1, 20, FALSE); ok(status == RPC_S_NO_PROTSEQS_REGISTERED, - "wrong RpcServerListen error (%lu)\n", status); + "wrong RpcServerListen error (%u)\n", status); status = RpcServerUseProtseqEp(ncacn_ip_tcp, 20, endpoint, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseqEp failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcServerUseProtseqEp failed (%u)\n", status); status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIf failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcServerRegisterIf failed (%u)\n", status); status = RpcServerListen(1, 20, TRUE); todo_wine { - ok(status == RPC_S_OK, "RpcServerListen failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcServerListen failed (%u)\n", status); } status = RpcServerListen(1, 20, TRUE); todo_wine { ok(status == RPC_S_ALREADY_LISTENING, - "wrong RpcServerListen error (%lu)\n", status); + "wrong RpcServerListen error (%u)\n", status); } status = RpcStringBindingCompose(NULL, ncacn_ip_tcp, address, endpoint, NULL, &binding); - ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); status = RpcBindingFromStringBinding(binding, &IFoo_IfHandle); - ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", + ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status); status = RpcBindingSetAuthInfo(IFoo_IfHandle, NULL, RPC_C_AUTHN_LEVEL_NONE, RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME); ok(status == RPC_S_OK || broken(status == RPC_S_UNKNOWN_AUTHN_SERVICE), /* win9x */ - "RpcBindingSetAuthInfo failed (%lu)\n", status); + "RpcBindingSetAuthInfo failed (%u)\n", status); status = RpcMgmtStopServerListening(NULL); - ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%lu)\n", + ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%u)\n", status); status = RpcMgmtStopServerListening(NULL); - ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%lu)\n", + ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%u)\n", status); status = RpcServerUnregisterIf(NULL, NULL, FALSE); - ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%u)\n", status); status = RpcMgmtWaitServerListen(); todo_wine { - ok(status == RPC_S_OK, "RpcMgmtWaitServerListen failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcMgmtWaitServerListen failed (%u)\n", status); } status = RpcStringFree(&binding); - ok(status == RPC_S_OK, "RpcStringFree failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcStringFree failed (%u)\n", status); status = RpcBindingFree(&IFoo_IfHandle); - ok(status == RPC_S_OK, "RpcBindingFree failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcBindingFree failed (%u)\n", status); } /* this is what's generated with MS/RPC - it includes an extra 2 @@ -331,7 +331,7 @@ static void test_towers(void) ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_ip_tcp", "135", "10.0.0.1", &tower); ok(ret == RPC_S_OK || broken(ret == RPC_S_INVALID_RPC_PROTSEQ), /* Vista */ - "TowerConstruct failed with error %ld\n", ret); + "TowerConstruct failed with error %d\n", ret); if (ret == RPC_S_INVALID_RPC_PROTSEQ) { /* Windows Vista fails with this error and crashes if we continue */ @@ -364,7 +364,7 @@ static void test_towers(void) } ret = TowerExplode(tower, &object, &syntax, &protseq, &endpoint, &address); - ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret); + ok(ret == RPC_S_OK, "TowerExplode failed with error %d\n", ret); ok(!memcmp(&object, &mapi_if_id, sizeof(mapi_if_id)), "object id didn't match\n"); ok(!memcmp(&syntax, &ndr_syntax, sizeof(syntax)), "syntax id didn't match\n"); ok(!strcmp(protseq, "ncacn_ip_tcp"), "protseq was \"%s\" instead of \"ncacn_ip_tcp\"\n", protseq); @@ -376,15 +376,15 @@ static void test_towers(void) I_RpcFree(address); ret = TowerExplode(tower, NULL, NULL, NULL, NULL, NULL); - ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret); + ok(ret == RPC_S_OK, "TowerExplode failed with error %d\n", ret); I_RpcFree(tower); /* test the behaviour for ip_tcp with name instead of dotted IP notation */ ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_ip_tcp", "135", "localhost", &tower); - ok(ret == RPC_S_OK, "TowerConstruct failed with error %ld\n", ret); + ok(ret == RPC_S_OK, "TowerConstruct failed with error %d\n", ret); ret = TowerExplode(tower, NULL, NULL, NULL, NULL, &address); - ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret); + ok(ret == RPC_S_OK, "TowerExplode failed with error %d\n", ret); ok(!strcmp(address, "0.0.0.0") || broken(!strcmp(address, "255.255.255.255")), "address was \"%s\" instead of \"0.0.0.0\"\n", address); @@ -394,11 +394,11 @@ static void test_towers(void) /* test the behaviour for np with no address */ ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_np", "\\pipe\\test", NULL, &tower); - ok(ret == RPC_S_OK, "TowerConstruct failed with error %ld\n", ret); + ok(ret == RPC_S_OK, "TowerConstruct failed with error %d\n", ret); ret = TowerExplode(tower, NULL, NULL, NULL, NULL, &address); ok(ret == RPC_S_OK || broken(ret != RPC_S_OK), /* win2k, indeterminate */ - "TowerExplode failed with error %ld\n", ret); + "TowerExplode failed with error %d\n", ret); /* Windows XP SP3 sets address to NULL */ ok(!address || !strcmp(address, ""), "address was \"%s\" instead of \"\" or NULL (XP SP3)\n", address); @@ -556,7 +556,7 @@ static void test_I_RpcMapWin32Status(void) ok(win32status == expected_win32status || broken(missing && win32status == rpc_status), - "I_RpcMapWin32Status(%ld) should have returned 0x%x instead of 0x%x%s\n", + "I_RpcMapWin32Status(%d) should have returned 0x%x instead of 0x%x%s\n", rpc_status, expected_win32status, win32status, broken(missing) ? " (or have returned with the given status)" : ""); } @@ -578,7 +578,7 @@ static void test_RpcStringBindingParseA(void) /* test all parameters */ status = RpcStringBindingParseA(valid_binding, &uuid, &protseq, &network_addr, &endpoint, &options); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status); + ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); ok(!strcmp((char *)uuid, "00000000-0000-0000-c000-000000000046"), "uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s\n", uuid); ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr); @@ -593,7 +593,7 @@ static void test_RpcStringBindingParseA(void) /* test all parameters with different type of string binding */ status = RpcStringBindingParseA(valid_binding2, &uuid, &protseq, &network_addr, &endpoint, &options); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status); + ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); ok(!strcmp((char *)uuid, "00000000-0000-0000-c000-000000000046"), "uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s\n", uuid); ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr); @@ -608,24 +608,24 @@ static void test_RpcStringBindingParseA(void) /* test with as many parameters NULL as possible */ status = RpcStringBindingParseA(valid_binding, NULL, &protseq, NULL, NULL, NULL); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status); + ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); RpcStringFreeA(&protseq); /* test with invalid uuid */ status = RpcStringBindingParseA(invalid_uuid_binding, NULL, &protseq, NULL, NULL, NULL); - ok(status == RPC_S_INVALID_STRING_UUID, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_UUID instead of %ld\n", status); + ok(status == RPC_S_INVALID_STRING_UUID, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_UUID instead of %d\n", status); ok(protseq == NULL, "protseq was %p instead of NULL\n", protseq); /* test with invalid endpoint */ status = RpcStringBindingParseA(invalid_ep_binding, NULL, &protseq, NULL, NULL, NULL); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status); + ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); RpcStringFreeA(&protseq); /* test with invalid binding */ status = RpcStringBindingParseA(invalid_binding, &uuid, &protseq, &network_addr, &endpoint, &options); todo_wine - ok(status == RPC_S_INVALID_STRING_BINDING, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_BINDING instead of %ld\n", status); + ok(status == RPC_S_INVALID_STRING_BINDING, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_BINDING instead of %d\n", status); todo_wine ok(uuid == NULL, "uuid was %p instead of NULL\n", uuid); ok(protseq == NULL, "protseq was %p instead of NULL\n", protseq); @@ -691,49 +691,49 @@ static void test_endpoint_mapper(RPC_CSTR protseq, RPC_CSTR address, status = RpcServerUseProtseqEp(protseq, 20, endpoint, NULL); ok(status == RPC_S_OK || broken(status == RPC_S_PROTSEQ_NOT_SUPPORTED), /* win9x */ - "%s: RpcServerUseProtseqEp failed (%lu)\n", protseq, status); + "%s: RpcServerUseProtseqEp failed (%u)\n", protseq, status); status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "%s: RpcServerRegisterIf failed (%lu)\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcServerRegisterIf failed (%u)\n", protseq, status); status = RpcServerInqBindings(&binding_vector); - ok(status == RPC_S_OK, "%s: RpcServerInqBindings failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcServerInqBindings failed with error %u\n", protseq, status); status = RpcEpRegisterA(IFoo_v0_0_s_ifspec, binding_vector, NULL, annotation); - ok(status == RPC_S_OK, "%s: RpcEpRegisterA failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcEpRegisterA failed with error %u\n", protseq, status); status = RpcStringBindingCompose(NULL, protseq, address, NULL, NULL, &binding); - ok(status == RPC_S_OK, "%s: RpcStringBindingCompose failed (%lu)\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcStringBindingCompose failed (%u)\n", protseq, status); status = RpcBindingFromStringBinding(binding, &handle); - ok(status == RPC_S_OK, "%s: RpcBindingFromStringBinding failed (%lu)\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingFromStringBinding failed (%u)\n", protseq, status); RpcStringFree(&binding); status = RpcBindingReset(handle); - ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %u\n", protseq, status); RpcStringFree(&binding); status = RpcEpResolveBinding(handle, IFoo_v0_0_s_ifspec); ok(status == RPC_S_OK || broken(status == RPC_S_SERVER_UNAVAILABLE), /* win9x */ - "%s: RpcEpResolveBinding failed with error %lu\n", protseq, status); + "%s: RpcEpResolveBinding failed with error %u\n", protseq, status); status = RpcBindingReset(handle); - ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %u\n", protseq, status); status = RpcBindingFree(&handle); - ok(status == RPC_S_OK, "%s: RpcBindingFree failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingFree failed with error %u\n", protseq, status); status = RpcServerUnregisterIf(NULL, NULL, FALSE); - ok(status == RPC_S_OK, "%s: RpcServerUnregisterIf failed (%lu)\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcServerUnregisterIf failed (%u)\n", protseq, status); status = RpcEpUnregister(IFoo_v0_0_s_ifspec, binding_vector, NULL); - ok(status == RPC_S_OK, "%s: RpcEpUnregisterA failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcEpUnregisterA failed with error %u\n", protseq, status); status = RpcBindingVectorFree(&binding_vector); - ok(status == RPC_S_OK, "%s: RpcBindingVectorFree failed with error %lu\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingVectorFree failed with error %u\n", protseq, status); } static void test_RpcStringBindingFromBinding(void) @@ -747,21 +747,21 @@ static void test_RpcStringBindingFromBinding(void) status = RpcStringBindingCompose(NULL, ncacn_np, address, endpoint, NULL, &binding); - ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); status = RpcBindingFromStringBinding(binding, &handle); - ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", status); + ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status); RpcStringFree(&binding); status = RpcBindingToStringBinding(handle, &binding); - ok(status == RPC_S_OK, "RpcStringBindingFromBinding failed with error %lu\n", status); + ok(status == RPC_S_OK, "RpcStringBindingFromBinding failed with error %u\n", status); ok(!strcmp((const char *)binding, "ncacn_np:.[\\\\pipe\\\\wine_rpc_test]"), "binding string didn't match what was expected: \"%s\"\n", binding); RpcStringFree(&binding); status = RpcBindingFree(&handle); - ok(status == RPC_S_OK, "RpcBindingFree failed with error %lu\n", status); + ok(status == RPC_S_OK, "RpcBindingFree failed with error %u\n", status); } static char *printGuid(char *buf, const UUID *guid) diff --git a/dlls/rpcrt4/tests/rpc_async.c b/dlls/rpcrt4/tests/rpc_async.c index 0cc5557ce06..a540b907b1d 100644 --- a/dlls/rpcrt4/tests/rpc_async.c +++ b/dlls/rpcrt4/tests/rpc_async.c @@ -36,14 +36,14 @@ static void test_RpcAsyncInitializeHandle(void) int i; status = pRpcAsyncInitializeHandle((PRPC_ASYNC_STATE)buffer, sizeof(buffer)); - ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with large Size should have returned ERROR_INVALID_PARAMETER instead of %ld\n", status); + ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with large Size should have returned ERROR_INVALID_PARAMETER instead of %d\n", status); status = pRpcAsyncInitializeHandle(&async, sizeof(async) - 1); - ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with small Size should have returned ERROR_INVALID_PARAMETER instead of %ld\n", status); + ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with small Size should have returned ERROR_INVALID_PARAMETER instead of %d\n", status); memset(&async, 0xcc, sizeof(async)); status = pRpcAsyncInitializeHandle(&async, sizeof(async)); - ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %ld\n", status); + ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %d\n", status); ok(async.Size == sizeof(async), "async.Size wrong: %d\n", async.Size); ok(async.Signature == 0x43595341, "async.Signature should be 0x43595341, but is 0x%x instead\n", async.Signature); @@ -64,16 +64,16 @@ static void test_RpcAsyncGetCallStatus(void) RPC_STATUS status; status = pRpcAsyncInitializeHandle(&async, sizeof(async)); - ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %ld\n", status); + ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %d\n", status); status = pRpcAsyncGetCallStatus(&async); todo_wine - ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %ld\n", status); + ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %d\n", status); memset(&async, 0, sizeof(async)); status = pRpcAsyncGetCallStatus(&async); todo_wine - ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %ld\n", status); + ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %d\n", status); } START_TEST( rpc_async ) diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c index ed4fef94b27..df0cdfd3a85 100644 --- a/dlls/rpcrt4/tests/server.c +++ b/dlls/rpcrt4/tests/server.c @@ -1294,12 +1294,12 @@ server(void) DWORD ret; iptcp_status = RpcServerUseProtseqEp(iptcp, 20, port, NULL); - ok(iptcp_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %ld\n", iptcp_status); + ok(iptcp_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %d\n", iptcp_status); np_status = RpcServerUseProtseqEp(np, 0, pipe, NULL); if (np_status == RPC_S_PROTSEQ_NOT_SUPPORTED) skip("Protocol sequence ncacn_np is not supported\n"); else - ok(np_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %ld\n", np_status); + ok(np_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %d\n", np_status); if (pRpcServerRegisterIfEx) { @@ -1310,9 +1310,9 @@ server(void) } else status = RpcServerRegisterIf(s_IServer_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %ld\n", status); + ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %d\n", status); status = RpcServerListen(1, 20, TRUE); - ok(status == RPC_S_OK, "RpcServerListen failed with status %ld\n", status); + ok(status == RPC_S_OK, "RpcServerListen failed with status %d\n", status); stop_event = CreateEvent(NULL, FALSE, FALSE, NULL); ok(stop_event != NULL, "CreateEvent failed with error %d\n", GetLastError()); @@ -1338,7 +1338,7 @@ server(void) { status = RpcMgmtWaitServerListen(); todo_wine { - ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %ld\n", status); + ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %d\n", status); } } } diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index 5ba4dfc1245..ff60f540430 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -48,6 +48,7 @@ MAKE_FUNCPTR(gnutls_alert_get); MAKE_FUNCPTR(gnutls_alert_get_name); MAKE_FUNCPTR(gnutls_certificate_allocate_credentials); MAKE_FUNCPTR(gnutls_certificate_free_credentials); +MAKE_FUNCPTR(gnutls_cipher_get); MAKE_FUNCPTR(gnutls_credentials_set); MAKE_FUNCPTR(gnutls_deinit); MAKE_FUNCPTR(gnutls_global_deinit); @@ -56,8 +57,12 @@ MAKE_FUNCPTR(gnutls_global_set_log_function); MAKE_FUNCPTR(gnutls_global_set_log_level); MAKE_FUNCPTR(gnutls_handshake); MAKE_FUNCPTR(gnutls_init); +MAKE_FUNCPTR(gnutls_mac_get); +MAKE_FUNCPTR(gnutls_mac_get_key_size); MAKE_FUNCPTR(gnutls_perror); MAKE_FUNCPTR(gnutls_set_default_priority); +MAKE_FUNCPTR(gnutls_record_recv); +MAKE_FUNCPTR(gnutls_record_send); MAKE_FUNCPTR(gnutls_transport_set_errno); MAKE_FUNCPTR(gnutls_transport_set_ptr); MAKE_FUNCPTR(gnutls_transport_set_pull_function); @@ -607,15 +612,34 @@ static int schan_init_sec_ctx_get_next_buffer(const struct schan_transport *t, s if (s->current_buffer_idx == -1) { int idx = schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_TOKEN); - if (idx != -1 && !s->desc->pBuffers[idx].pvBuffer - && (t->ctx->req_ctx_attr & ISC_REQ_ALLOCATE_MEMORY)) - s->allow_buffer_resize = TRUE; + if (t->ctx->req_ctx_attr & ISC_REQ_ALLOCATE_MEMORY) + { + if (idx == -1) + { + idx = schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_EMPTY); + if (idx != -1) s->desc->pBuffers[idx].BufferType = SECBUFFER_TOKEN; + } + if (idx != -1 && !s->desc->pBuffers[idx].pvBuffer) s->allow_buffer_resize = TRUE; + } return idx; } return -1; } +static void dump_buffer_desc(SecBufferDesc *desc) +{ + unsigned int i; + + if (!desc) return; + TRACE("Buffer desc %p:\n", desc); + for (i = 0; i < desc->cBuffers; ++i) + { + SecBuffer *b = &desc->pBuffers[i]; + TRACE("\tbuffer %u: cbBuffer %ld, BufferType %#lx pvBuffer %p\n", i, b->cbBuffer, b->BufferType, b->pvBuffer); + } +} + /*********************************************************************** * InitializeSecurityContextW */ @@ -635,6 +659,9 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW( debugstr_w(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput, Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry); + dump_buffer_desc(pInput); + dump_buffer_desc(pOutput); + if (!phContext) { ULONG_PTR handle; @@ -778,6 +805,284 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextA( return ret; } +static unsigned int schannel_get_cipher_block_size(gnutls_cipher_algorithm_t cipher) +{ + const struct + { + gnutls_cipher_algorithm_t cipher; + unsigned int block_size; + } + algorithms[] = + { + {GNUTLS_CIPHER_3DES_CBC, 8}, + {GNUTLS_CIPHER_AES_128_CBC, 16}, + {GNUTLS_CIPHER_AES_256_CBC, 16}, + {GNUTLS_CIPHER_ARCFOUR_128, 1}, + {GNUTLS_CIPHER_ARCFOUR_40, 1}, + {GNUTLS_CIPHER_DES_CBC, 8}, + {GNUTLS_CIPHER_NULL, 1}, + {GNUTLS_CIPHER_RC2_40_CBC, 8}, + }; + unsigned int i; + + for (i = 0; i < sizeof(algorithms) / sizeof(*algorithms); ++i) + { + if (algorithms[i].cipher == cipher) + return algorithms[i].block_size; + } + + FIXME("Unknown cipher %#x, returning 1\n", cipher); + + return 1; +} + +static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesW( + PCtxtHandle context_handle, ULONG attribute, PVOID buffer) +{ + struct schan_context *ctx; + + TRACE("context_handle %p, attribute %#x, buffer %p\n", + context_handle, attribute, buffer); + + if (!context_handle) return SEC_E_INVALID_HANDLE; + ctx = schan_get_object(context_handle->dwLower, SCHAN_HANDLE_CTX); + + switch(attribute) + { + case SECPKG_ATTR_STREAM_SIZES: + { + SecPkgContext_StreamSizes *stream_sizes = (SecPkgContext_StreamSizes *)buffer; + gnutls_mac_algorithm_t mac = pgnutls_mac_get(ctx->session); + size_t mac_size = pgnutls_mac_get_key_size(mac); + gnutls_cipher_algorithm_t cipher = pgnutls_cipher_get(ctx->session); + unsigned int block_size = schannel_get_cipher_block_size(cipher); + + TRACE("Using %zu mac bytes, block size %u\n", mac_size, block_size); + + /* These are defined by the TLS RFC */ + stream_sizes->cbHeader = 5; + stream_sizes->cbTrailer = mac_size + 256; /* Max 255 bytes padding + 1 for padding size */ + stream_sizes->cbMaximumMessage = 1 << 14; + stream_sizes->cbBuffers = 4; + stream_sizes->cbBlockSize = block_size; + return SEC_E_OK; + } + + default: + FIXME("Unhandled attribute %#x\n", attribute); + return SEC_E_UNSUPPORTED_FUNCTION; + } +} + +static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesA( + PCtxtHandle context_handle, ULONG attribute, PVOID buffer) +{ + TRACE("context_handle %p, attribute %#x, buffer %p\n", + context_handle, attribute, buffer); + + switch(attribute) + { + case SECPKG_ATTR_STREAM_SIZES: + return schan_QueryContextAttributesW(context_handle, attribute, buffer); + + default: + FIXME("Unhandled attribute %#x\n", attribute); + return SEC_E_UNSUPPORTED_FUNCTION; + } +} + +static int schan_encrypt_message_get_next_buffer(const struct schan_transport *t, struct schan_buffers *s) +{ + SecBuffer *b; + + if (s->current_buffer_idx == -1) + return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_STREAM_HEADER); + + b = &s->desc->pBuffers[s->current_buffer_idx]; + + if (b->BufferType == SECBUFFER_STREAM_HEADER) + return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_DATA); + + if (b->BufferType == SECBUFFER_DATA) + return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_STREAM_TRAILER); + + return -1; +} + +static int schan_encrypt_message_get_next_buffer_token(const struct schan_transport *t, struct schan_buffers *s) +{ + SecBuffer *b; + + if (s->current_buffer_idx == -1) + return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_TOKEN); + + b = &s->desc->pBuffers[s->current_buffer_idx]; + + if (b->BufferType == SECBUFFER_TOKEN) + { + int idx = schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_TOKEN); + if (idx != s->current_buffer_idx) return -1; + return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_DATA); + } + + if (b->BufferType == SECBUFFER_DATA) + { + int idx = schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_TOKEN); + if (idx != -1) + idx = schan_find_sec_buffer_idx(s->desc, idx + 1, SECBUFFER_TOKEN); + return idx; + } + + return -1; +} + +static SECURITY_STATUS SEC_ENTRY schan_EncryptMessage(PCtxtHandle context_handle, + ULONG quality, PSecBufferDesc message, ULONG message_seq_no) +{ + struct schan_transport transport; + struct schan_context *ctx; + struct schan_buffers *b; + SecBuffer *buffer; + SIZE_T data_size; + char *data; + ssize_t sent = 0; + ssize_t ret; + int idx; + + TRACE("context_handle %p, quality %d, message %p, message_seq_no %d\n", + context_handle, quality, message, message_seq_no); + + if (!context_handle) return SEC_E_INVALID_HANDLE; + ctx = schan_get_object(context_handle->dwLower, SCHAN_HANDLE_CTX); + + dump_buffer_desc(message); + + idx = schan_find_sec_buffer_idx(message, 0, SECBUFFER_DATA); + if (idx == -1) + { + WARN("No data buffer passed\n"); + return SEC_E_INTERNAL_ERROR; + } + buffer = &message->pBuffers[idx]; + + data_size = buffer->cbBuffer; + data = HeapAlloc(GetProcessHeap(), 0, data_size); + memcpy(data, buffer->pvBuffer, data_size); + + transport.ctx = ctx; + init_schan_buffers(&transport.in, NULL, NULL); + if (schan_find_sec_buffer_idx(message, 0, SECBUFFER_STREAM_HEADER) != -1) + init_schan_buffers(&transport.out, message, schan_encrypt_message_get_next_buffer); + else + init_schan_buffers(&transport.out, message, schan_encrypt_message_get_next_buffer_token); + pgnutls_transport_set_ptr(ctx->session, &transport); + + while (sent < data_size) + { + ret = pgnutls_record_send(ctx->session, data + sent, data_size - sent); + if (ret < 0) + { + if (ret != GNUTLS_E_AGAIN) + { + pgnutls_perror(ret); + HeapFree(GetProcessHeap(), 0, data); + ERR("Returning SEC_E_INTERNAL_ERROR\n"); + return SEC_E_INTERNAL_ERROR; + } + else break; + } + sent += ret; + } + + TRACE("Sent %zd bytes\n", sent); + + b = &transport.out; + b->desc->pBuffers[b->current_buffer_idx].cbBuffer = b->offset; + HeapFree(GetProcessHeap(), 0, data); + + return SEC_E_OK; +} + +static int schan_decrypt_message_get_next_buffer(const struct schan_transport *t, struct schan_buffers *s) +{ + if (s->current_buffer_idx == -1) + return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_DATA); + + return -1; +} + +static SECURITY_STATUS SEC_ENTRY schan_DecryptMessage(PCtxtHandle context_handle, + PSecBufferDesc message, ULONG message_seq_no, PULONG quality) +{ + struct schan_transport transport; + struct schan_context *ctx; + SecBuffer *buffer; + SIZE_T data_size; + char *data; + ssize_t received = 0; + ssize_t ret; + int idx; + + TRACE("context_handle %p, message %p, message_seq_no %d, quality %p\n", + context_handle, message, message_seq_no, quality); + + if (!context_handle) return SEC_E_INVALID_HANDLE; + ctx = schan_get_object(context_handle->dwLower, SCHAN_HANDLE_CTX); + + dump_buffer_desc(message); + + idx = schan_find_sec_buffer_idx(message, 0, SECBUFFER_DATA); + if (idx == -1) + { + WARN("No data buffer passed\n"); + return SEC_E_INTERNAL_ERROR; + } + buffer = &message->pBuffers[idx]; + + data_size = buffer->cbBuffer; + data = HeapAlloc(GetProcessHeap(), 0, data_size); + + transport.ctx = ctx; + init_schan_buffers(&transport.in, message, schan_decrypt_message_get_next_buffer); + init_schan_buffers(&transport.out, NULL, NULL); + pgnutls_transport_set_ptr(ctx->session, (gnutls_transport_ptr_t)&transport); + + while (received < data_size) + { + ret = pgnutls_record_recv(ctx->session, data + received, data_size - received); + if (ret < 0) + { + if (ret == GNUTLS_E_AGAIN) + { + if (!received) + { + pgnutls_perror(ret); + HeapFree(GetProcessHeap(), 0, data); + TRACE("Returning SEC_E_INCOMPLETE_MESSAGE\n"); + return SEC_E_INCOMPLETE_MESSAGE; + } + break; + } + else + { + pgnutls_perror(ret); + HeapFree(GetProcessHeap(), 0, data); + ERR("Returning SEC_E_INTERNAL_ERROR\n"); + return SEC_E_INTERNAL_ERROR; + } + } + received += ret; + } + + TRACE("Received %zd bytes\n", received); + + memcpy(buffer->pvBuffer, data, received); + buffer->cbBuffer = received; + HeapFree(GetProcessHeap(), 0, data); + + return SEC_E_OK; +} + static SECURITY_STATUS SEC_ENTRY schan_DeleteSecurityContext(PCtxtHandle context_handle) { struct schan_context *ctx; @@ -812,7 +1117,7 @@ static const SecurityFunctionTableA schanTableA = { NULL, /* CompleteAuthToken */ schan_DeleteSecurityContext, NULL, /* ApplyControlToken */ - NULL, /* QueryContextAttributesA */ + schan_QueryContextAttributesA, NULL, /* ImpersonateSecurityContext */ NULL, /* RevertSecurityContext */ NULL, /* MakeSignature */ @@ -826,8 +1131,8 @@ static const SecurityFunctionTableA schanTableA = { NULL, /* AddCredentialsA */ NULL, /* Reserved8 */ NULL, /* QuerySecurityContextToken */ - NULL, /* EncryptMessage */ - NULL, /* DecryptMessage */ + schan_EncryptMessage, + schan_DecryptMessage, NULL, /* SetContextAttributesA */ }; @@ -843,7 +1148,7 @@ static const SecurityFunctionTableW schanTableW = { NULL, /* CompleteAuthToken */ schan_DeleteSecurityContext, NULL, /* ApplyControlToken */ - NULL, /* QueryContextAttributesW */ + schan_QueryContextAttributesW, NULL, /* ImpersonateSecurityContext */ NULL, /* RevertSecurityContext */ NULL, /* MakeSignature */ @@ -857,8 +1162,8 @@ static const SecurityFunctionTableW schanTableW = { NULL, /* AddCredentialsW */ NULL, /* Reserved8 */ NULL, /* QuerySecurityContextToken */ - NULL, /* EncryptMessage */ - NULL, /* DecryptMessage */ + schan_EncryptMessage, + schan_DecryptMessage, NULL, /* SetContextAttributesW */ }; @@ -911,6 +1216,7 @@ void SECUR32_initSchannelSP(void) LOAD_FUNCPTR(gnutls_alert_get_name) LOAD_FUNCPTR(gnutls_certificate_allocate_credentials) LOAD_FUNCPTR(gnutls_certificate_free_credentials) + LOAD_FUNCPTR(gnutls_cipher_get) LOAD_FUNCPTR(gnutls_credentials_set) LOAD_FUNCPTR(gnutls_deinit) LOAD_FUNCPTR(gnutls_global_deinit) @@ -919,8 +1225,12 @@ void SECUR32_initSchannelSP(void) LOAD_FUNCPTR(gnutls_global_set_log_level) LOAD_FUNCPTR(gnutls_handshake) LOAD_FUNCPTR(gnutls_init) + LOAD_FUNCPTR(gnutls_mac_get) + LOAD_FUNCPTR(gnutls_mac_get_key_size) LOAD_FUNCPTR(gnutls_perror) LOAD_FUNCPTR(gnutls_set_default_priority) + LOAD_FUNCPTR(gnutls_record_recv); + LOAD_FUNCPTR(gnutls_record_send); LOAD_FUNCPTR(gnutls_transport_set_errno) LOAD_FUNCPTR(gnutls_transport_set_ptr) LOAD_FUNCPTR(gnutls_transport_set_pull_function) diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c index 44a03497aaf..6c0f68ab88c 100644 --- a/dlls/setupapi/misc.c +++ b/dlls/setupapi/misc.c @@ -1122,6 +1122,15 @@ DWORD WINAPI InstallCatalog( LPCSTR catalog, LPCSTR basename, LPSTR fullname ) return 0; } +/*********************************************************************** + * pSetupInstallCatalog (SETUPAPI.@) + */ +DWORD WINAPI pSetupInstallCatalog( LPCWSTR catalog, LPCWSTR basename, LPWSTR fullname ) +{ + FIXME("%s, %s, %p\n", debugstr_w(catalog), debugstr_w(basename), fullname); + return 0; +} + static UINT detect_compression_type( LPCWSTR file ) { DWORD size; diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec index 75cb7c8679d..2996803415d 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec @@ -18,10 +18,10 @@ @ stub CM_Add_Range @ stub CM_Add_Res_Des @ stub CM_Add_Res_Des_Ex -@ stub CM_Connect_MachineA +@ stdcall CM_Connect_MachineA(str ptr) @ stdcall CM_Connect_MachineW(wstr ptr) -@ stub CM_Create_DevNodeA -@ stub CM_Create_DevNodeW +@ stdcall CM_Create_DevNodeA(ptr str long long) +@ stdcall CM_Create_DevNodeW(ptr wstr long long) @ stub CM_Create_DevNode_ExA @ stub CM_Create_DevNode_ExW @ stub CM_Create_Range_List @@ -128,8 +128,8 @@ @ stub CM_Intersect_Range_List @ stub CM_Invert_Range_List @ stub CM_Is_Dock_Station_Present -@ stub CM_Locate_DevNodeA -@ stub CM_Locate_DevNodeW +@ stdcall CM_Locate_DevNodeA(ptr str long) +@ stdcall CM_Locate_DevNodeW(ptr wstr long) @ stub CM_Locate_DevNode_ExA @ stub CM_Locate_DevNode_ExW @ stub CM_Merge_Range_List @@ -297,7 +297,7 @@ @ stub SetupDiDeleteDeviceInterfaceData @ stdcall SetupDiDeleteDeviceInterfaceRegKey(ptr ptr long) @ stub SetupDiDeleteDeviceRegKey -@ stub SetupDiDestroyClassImageList +@ stdcall SetupDiDestroyClassImageList(ptr) @ stdcall SetupDiDestroyDeviceInfoList(long) @ stub SetupDiDestroyDriverInfoList @ stub SetupDiDrawMiniIcon @@ -554,6 +554,7 @@ @ stub pSetupGetVersionDatum @ stub pSetupGuidFromString @ stub pSetupIsGuidNull +@ stdcall pSetupInstallCatalog(wstr wstr ptr) @ stdcall pSetupIsUserAdmin() IsUserAdmin @ stub pSetupMakeSurePathExists @ stdcall pSetupSetGlobalFlags(long) @@ -571,4 +572,5 @@ @ stdcall pSetupStringTableLookUpString(ptr wstr long) StringTableLookUpString @ stdcall pSetupStringTableLookUpStringEx(ptr wstr long ptr ptr) StringTableLookUpStringEx @ stdcall pSetupStringTableSetExtraData(ptr long ptr long) StringTableSetExtraData +@ stub pSetupVerifyCatalogFile @ stub pSetupVerifyQueuedCatalogs diff --git a/dlls/setupapi/setupcab.c b/dlls/setupapi/setupcab.c index f01c3d5b6cd..a2a7a5f71f2 100644 --- a/dlls/setupapi/setupcab.c +++ b/dlls/setupapi/setupcab.c @@ -121,17 +121,17 @@ static void UnloadCABINETDll(void) /* FDICreate callbacks */ -static void *sc_cb_alloc(ULONG cb) +static void * CDECL sc_cb_alloc(ULONG cb) { return HeapAlloc(GetProcessHeap(), 0, cb); } -static void sc_cb_free(void *pv) +static void CDECL sc_cb_free(void *pv) { HeapFree(GetProcessHeap(), 0, pv); } -static INT_PTR sc_cb_open(char *pszFile, int oflag, int pmode) +static INT_PTR CDECL sc_cb_open(char *pszFile, int oflag, int pmode) { DWORD creation = 0, sharing = 0; int ioflag = 0; @@ -202,7 +202,7 @@ static INT_PTR sc_cb_open(char *pszFile, int oflag, int pmode) return ret; } -static UINT sc_cb_read(INT_PTR hf, void *pv, UINT cb) +static UINT CDECL sc_cb_read(INT_PTR hf, void *pv, UINT cb) { DWORD num_read; BOOL rslt; @@ -222,7 +222,7 @@ static UINT sc_cb_read(INT_PTR hf, void *pv, UINT cb) return num_read; } -static UINT sc_cb_write(INT_PTR hf, void *pv, UINT cb) +static UINT CDECL sc_cb_write(INT_PTR hf, void *pv, UINT cb) { DWORD num_written; /* BOOL rv; */ @@ -240,7 +240,7 @@ static UINT sc_cb_write(INT_PTR hf, void *pv, UINT cb) } } -static int sc_cb_close(INT_PTR hf) +static int CDECL sc_cb_close(INT_PTR hf) { /* TRACE("(hf == %d)\n", hf); */ @@ -250,7 +250,7 @@ static int sc_cb_close(INT_PTR hf) return -1; } -static long sc_cb_lseek(INT_PTR hf, long dist, int seektype) +static long CDECL sc_cb_lseek(INT_PTR hf, long dist, int seektype) { DWORD ret; @@ -272,7 +272,7 @@ static long sc_cb_lseek(INT_PTR hf, long dist, int seektype) /* FDICopy callbacks */ -static INT_PTR sc_FNNOTIFY_A(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) +static INT_PTR CDECL sc_FNNOTIFY_A(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) { FILE_IN_CABINET_INFO_A fici; PSC_HSC_A phsc; @@ -391,7 +391,7 @@ static INT_PTR sc_FNNOTIFY_A(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) } } -static INT_PTR sc_FNNOTIFY_W(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) +static INT_PTR CDECL sc_FNNOTIFY_W(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) { FILE_IN_CABINET_INFO_W fici; PSC_HSC_W phsc; diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c index 33240ce1f12..89b02eb5821 100644 --- a/dlls/setupapi/stubs.c +++ b/dlls/setupapi/stubs.c @@ -52,6 +52,15 @@ DWORD WINAPI suErrorToIds16( WORD w1, WORD w2 ) } /*********************************************************************** + * CM_Connect_MachineA (SETUPAPI.@) + */ +CONFIGRET WINAPI CM_Connect_MachineA(PCSTR name, PHMACHINE machine) +{ + FIXME("(%s %p) stub\n", name, machine); + return CR_ACCESS_DENIED; +} + +/*********************************************************************** * CM_Connect_MachineW (SETUPAPI.@) */ CONFIGRET WINAPI CM_Connect_MachineW(PCWSTR name, PHMACHINE machine) @@ -61,6 +70,24 @@ CONFIGRET WINAPI CM_Connect_MachineW(PCWSTR name, PHMACHINE machine) } /*********************************************************************** + * CM_Create_DevNodeA (SETUPAPI.@) + */ +CONFIGRET WINAPI CM_Create_DevNodeA(PDEVINST pdnDevInst, DEVINSTID_A pDeviceID, DEVINST dnParent, ULONG ulFlags) +{ + FIXME("(%p %s 0x%08x 0x%08x) stub\n", pdnDevInst, pDeviceID, dnParent, ulFlags); + return CR_SUCCESS; +} + +/*********************************************************************** + * CM_Create_DevNodeW (SETUPAPI.@) + */ +CONFIGRET WINAPI CM_Create_DevNodeW(PDEVINST pdnDevInst, DEVINSTID_W pDeviceID, DEVINST dnParent, ULONG ulFlags) +{ + FIXME("(%p %s 0x%08x 0x%08x) stub\n", pdnDevInst, debugstr_w(pDeviceID), dnParent, ulFlags); + return CR_SUCCESS; +} + +/*********************************************************************** * CM_Disconnect_Machine (SETUPAPI.@) */ CONFIGRET WINAPI CM_Disconnect_Machine(HMACHINE handle) @@ -202,6 +229,15 @@ BOOL WINAPI SetupDiGetINFClassW(PCWSTR inf, LPGUID class_guid, PWSTR class_name, } /*********************************************************************** + * SetupDiDestroyClassImageList (SETUPAPI.@) + */ +BOOL WINAPI SetupDiDestroyClassImageList(PSP_CLASSIMAGELIST_DATA ClassListImageData) +{ + FIXME("(%p) stub\n", ClassListImageData); + return TRUE; +} + +/*********************************************************************** * SetupPromptForDiskA (SETUPAPI.@) */ UINT WINAPI SetupPromptForDiskA(HWND hwndParent, PCSTR DialogTitle, PCSTR DiskName, @@ -228,3 +264,23 @@ UINT WINAPI SetupPromptForDiskW(HWND hwndParent, PCWSTR DialogTitle, PCWSTR Disk PathRequiredSize); return 0; } + +/*********************************************************************** + * CM_Locate_DevNodeA (SETUPAPI.@) + */ +CONFIGRET WINAPI CM_Locate_DevNodeA(PDEVINST pdnDevInst, DEVINSTID_A pDeviceID, ULONG ulFlags) +{ + FIXME("%p %s 0x%08x: stub\n", pdnDevInst, debugstr_a(pDeviceID), ulFlags); + + return CR_FAILURE; +} + +/*********************************************************************** + * CM_Locate_DevNodeW (SETUPAPI.@) + */ +CONFIGRET WINAPI CM_Locate_DevNodeW(PDEVINST pdnDevInst, DEVINSTID_W pDeviceID, ULONG ulFlags) +{ + FIXME("%p %s 0x%08x: stub\n", pdnDevInst, debugstr_w(pDeviceID), ulFlags); + + return CR_FAILURE; +} diff --git a/dlls/shdocvw/shdocvw.spec b/dlls/shdocvw/shdocvw.spec index 1cf297d7640..f47ecb45ffc 100644 --- a/dlls/shdocvw/shdocvw.spec +++ b/dlls/shdocvw/shdocvw.spec @@ -49,8 +49,8 @@ 164 stub -noname ResetProfileSharing 165 stub -noname URLSubstitution 167 stub -noname IsIEDefaultBrowser -169 stub -noname ParseURLFromOutsideSourceA -170 stub -noname ParseURLFromOutsideSourceW +169 stdcall -noname ParseURLFromOutsideSourceA(str ptr ptr ptr) +170 stdcall -noname ParseURLFromOutsideSourceW(wstr ptr ptr ptr) 171 stub -noname _DeletePidlDPA 172 stub -noname IURLQualify 173 stub -noname SHIsRestricted diff --git a/dlls/shdocvw/shdocvw_main.c b/dlls/shdocvw/shdocvw_main.c index c9deff19cda..8640600f730 100644 --- a/dlls/shdocvw/shdocvw_main.c +++ b/dlls/shdocvw/shdocvw_main.c @@ -295,3 +295,104 @@ HRESULT WINAPI URLSubRegQueryA(LPCSTR regpath, LPCSTR name, DWORD type, return E_FAIL; } + +/****************************************************************** + * ParseURLFromOutsideSourceW (SHDOCVW.170) + */ +DWORD WINAPI ParseURLFromOutsideSourceW(LPCWSTR url, LPWSTR out, LPDWORD plen, LPDWORD unknown) +{ + WCHAR buffer_in[INTERNET_MAX_URL_LENGTH]; + WCHAR buffer_out[INTERNET_MAX_URL_LENGTH]; + LPCWSTR ptr = url; + HRESULT hr; + DWORD needed; + DWORD len; + DWORD res = 0; + + + TRACE("(%s, %p, %p, %p) len: %d, unknown: 0x%x\n", debugstr_w(url), out, plen, unknown, + plen ? *plen : 0, unknown ? *unknown : 0); + + if (!PathIsURLW(ptr)) { + len = sizeof(buffer_in) / sizeof(buffer_in[0]); + buffer_in[0] = 0; + hr = UrlApplySchemeW(ptr, buffer_in, &len, URL_APPLY_GUESSSCHEME); + TRACE("got 0x%x with %s\n", hr, debugstr_w(buffer_in)); + if (hr != S_OK) { + /* when we can't guess the scheme, use the default scheme */ + len = sizeof(buffer_in) / sizeof(buffer_in[0]); + hr = UrlApplySchemeW(ptr, buffer_in, &len, URL_APPLY_DEFAULT); + } + + if (hr == S_OK) { + /* we parsed the url to buffer_in */ + ptr = buffer_in; + } + else + { + FIXME("call search hook for %s\n", debugstr_w(ptr)); + } + } + + len = sizeof(buffer_out) / sizeof(buffer_out[0]); + buffer_out[0] = '\0'; + hr = UrlCanonicalizeW(ptr, buffer_out, &len, URL_ESCAPE_SPACES_ONLY); + needed = lstrlenW(buffer_out)+1; + TRACE("got 0x%x with %s (need %d)\n", hr, debugstr_w(buffer_out), needed); + + if (*plen >= needed) { + if (out != NULL) { + lstrcpyW(out, buffer_out); + res++; + } + needed--; + } + + *plen = needed; + + TRACE("=> %d\n", res); + return res; +} + +/****************************************************************** + * ParseURLFromOutsideSourceA (SHDOCVW.169) + * + * See ParseURLFromOutsideSourceW + */ +DWORD WINAPI ParseURLFromOutsideSourceA(LPCSTR url, LPSTR out, LPDWORD plen, LPDWORD unknown) +{ + WCHAR buffer[INTERNET_MAX_URL_LENGTH]; + LPWSTR urlW = NULL; + DWORD needed; + DWORD res; + DWORD len; + + TRACE("(%s, %p, %p, %p) len: %d, unknown: 0x%x\n", debugstr_a(url), out, plen, unknown, + plen ? *plen : 0, unknown ? *unknown : 0); + + if (url) { + len = MultiByteToWideChar(CP_ACP, 0, url, -1, NULL, 0); + urlW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, url, -1, urlW, len); + } + + len = sizeof(buffer) / sizeof(buffer[0]); + res = ParseURLFromOutsideSourceW(urlW, buffer, &len, unknown); + HeapFree(GetProcessHeap(), 0, urlW); + + needed = WideCharToMultiByte(CP_ACP, 0, buffer, -1, NULL, 0, NULL, NULL); + + res = 0; + if (*plen >= needed) { + if (out != NULL) { + WideCharToMultiByte(CP_ACP, 0, buffer, -1, out, *plen, NULL, NULL); + res = needed; + } + needed--; + } + + *plen = needed; + + TRACE("=> %d\n", res); + return res; +} diff --git a/dlls/shdocvw/tests/shdocvw.c b/dlls/shdocvw/tests/shdocvw.c index f3a75d45906..8e7b1f3d213 100644 --- a/dlls/shdocvw/tests/shdocvw.c +++ b/dlls/shdocvw/tests/shdocvw.c @@ -25,6 +25,7 @@ #include "winbase.h" #include "winreg.h" #include "wininet.h" +#include "winnls.h" #include "wine/test.h" @@ -32,6 +33,8 @@ static HMODULE hshdocvw; static HRESULT (WINAPI *pURLSubRegQueryA)(LPCSTR, LPCSTR, DWORD, LPVOID, DWORD, DWORD); +static DWORD (WINAPI *pParseURLFromOutsideSourceA)(LPCSTR, LPSTR, LPDWORD, LPDWORD); +static DWORD (WINAPI *pParseURLFromOutsideSourceW)(LPCWSTR, LPWSTR, LPDWORD, LPDWORD); static CHAR appdata[] = "AppData"; static CHAR common_appdata[] = "Common AppData"; @@ -43,10 +46,36 @@ static CHAR start_page[] = "Start Page"; /* ################ */ +static const struct { + const char *url; + const char *newurl; + DWORD len; +} ParseURL_table[] = { + {"http://www.winehq.org", "http://www.winehq.org/", 22}, + {"www.winehq.org", "http://www.winehq.org/", 22}, + {"winehq.org", "http://winehq.org/", 18}, + {"ftp.winehq.org", "ftp://ftp.winehq.org/", 21}, + {"http://winehq.org", "http://winehq.org/", 18}, + {"https://winehq.org", "https://winehq.org/", 19}, + {"https://www.winehq.org", "https://www.winehq.org/", 23}, + {"ftp://winehq.org", "ftp://winehq.org/", 17}, + {"ftp://ftp.winehq.org", "ftp://ftp.winehq.org/", 21}, + {"about:blank", "about:blank", 11}, + {"about:home", "about:home", 10}, + {"about:mozilla", "about:mozilla", 13}, + /* a space at the start is not allowed */ + {" http://www.winehq.org", "http://%20http://www.winehq.org", 31} + +}; + +/* ################ */ + static void init_functions(void) { hshdocvw = LoadLibraryA("shdocvw.dll"); pURLSubRegQueryA = (void *) GetProcAddress(hshdocvw, (LPSTR) 151); + pParseURLFromOutsideSourceA = (void *) GetProcAddress(hshdocvw, (LPSTR) 169); + pParseURLFromOutsideSourceW = (void *) GetProcAddress(hshdocvw, (LPSTR) 170); } /* ################ */ @@ -112,12 +141,16 @@ static void test_URLSubRegQueryA(void) ok((hr == S_OK) && !used, "got 0x%x and %d (expected S_OK and 0)\n", hr, used); - /* size of buffer is 0, but the function still succeed */ + /* size of buffer is 0, but the function still succeed. + buffer[0] is cleared in IE 5.01 and IE 5.5 (Buffer Overflow) */ memset(buffer, '#', sizeof(buffer)-1); buffer[sizeof(buffer)-1] = '\0'; hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, 0, -1); used = lstrlenA(buffer); - ok((hr == S_OK) && (used == INTERNET_MAX_URL_LENGTH - 1), "got 0x%x and %d\n", hr, used); + ok( (hr == S_OK) && + ((used == INTERNET_MAX_URL_LENGTH - 1) || broken(used == 0)) , + "got 0x%x and %d (expected S_OK and INTERNET_MAX_URL_LENGTH - 1)\n", + hr, used); /* still succeed without a buffer for the result */ hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, NULL, 0, -1); @@ -160,8 +193,168 @@ static void test_URLSubRegQueryA(void) /* ################ */ +static void test_ParseURLFromOutsideSourceA(void) +{ + CHAR buffer[INTERNET_MAX_URL_LENGTH]; + DWORD dummy; + DWORD maxlen; + DWORD len; + DWORD res; + int i; + + if (!pParseURLFromOutsideSourceA) { + skip("ParseURLFromOutsideSourceA not found\n"); + return; + } + + for(i = 0; i < sizeof(ParseURL_table)/sizeof(ParseURL_table[0]); i++) { + memset(buffer, '#', sizeof(buffer)-1); + buffer[sizeof(buffer)-1] = '\0'; + len = sizeof(buffer); + dummy = 0; + /* on success, len+1 is returned. No idea, if someone depend on this */ + res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy); + /* len does not include the terminating 0, when buffer is large enough */ + ok( res != 0 && len == ParseURL_table[i].len && + !lstrcmpA(buffer, ParseURL_table[i].newurl), + "#%d: got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", + i, res, len, buffer, ParseURL_table[i].len, ParseURL_table[i].newurl); + + + /* use the size test only for the first examples */ + if (i > 4) continue; + + maxlen = len; + + memset(buffer, '#', sizeof(buffer)-1); + buffer[sizeof(buffer)-1] = '\0'; + len = maxlen + 1; + dummy = 0; + res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy); + ok( res != 0 && len == ParseURL_table[i].len && + !lstrcmpA(buffer, ParseURL_table[i].newurl), + "#%d (+1): got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", + i, res, len, buffer, ParseURL_table[i].len, ParseURL_table[i].newurl); + + memset(buffer, '#', sizeof(buffer)-1); + buffer[sizeof(buffer)-1] = '\0'; + len = maxlen; + dummy = 0; + res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy); + /* len includes the terminating 0, when the buffer is too small */ + ok( res == 0 && len == ParseURL_table[i].len + 1, + "#%d (==): got %d and %d (expected '0' and %d)\n", + i, res, len, ParseURL_table[i].len + 1); + + memset(buffer, '#', sizeof(buffer)-1); + buffer[sizeof(buffer)-1] = '\0'; + len = maxlen-1; + dummy = 0; + res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy); + /* len includes the terminating 0 on XP SP1 and before, when the buffer is too small */ + ok( res == 0 && (len == ParseURL_table[i].len || len == ParseURL_table[i].len + 1), + "#%d (-1): got %d and %d (expected '0' and %d or %d)\n", + i, res, len, ParseURL_table[i].len, ParseURL_table[i].len + 1); + + memset(buffer, '#', sizeof(buffer)-1); + buffer[sizeof(buffer)-1] = '\0'; + len = maxlen+1; + dummy = 0; + res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, NULL, &len, &dummy); + /* len does not include the terminating 0, when buffer is NULL */ + ok( res == 0 && len == ParseURL_table[i].len, + "#%d (buffer): got %d and %d (expected '0' and %d)\n", + i, res, len, ParseURL_table[i].len); + + if (0) { + /* that test crash on native shdocvw */ + res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, NULL, &dummy); + } + + memset(buffer, '#', sizeof(buffer)-1); + buffer[sizeof(buffer)-1] = '\0'; + len = maxlen+1; + dummy = 0; + res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, NULL); + ok( res != 0 && len == ParseURL_table[i].len && + !lstrcmpA(buffer, ParseURL_table[i].newurl), + "#%d (unknown): got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", + i, res, len, buffer, ParseURL_table[i].len, ParseURL_table[i].newurl); + } +} + +/* ################ */ + +static void test_ParseURLFromOutsideSourceW(void) +{ + WCHAR urlW[INTERNET_MAX_URL_LENGTH]; + WCHAR bufferW[INTERNET_MAX_URL_LENGTH]; + CHAR bufferA[INTERNET_MAX_URL_LENGTH]; + DWORD maxlen; + DWORD dummy; + DWORD len; + DWORD res; + + if (!pParseURLFromOutsideSourceW) { + skip("ParseURLFromOutsideSourceW not found\n"); + return; + } + MultiByteToWideChar(CP_ACP, 0, ParseURL_table[0].url, -1, urlW, INTERNET_MAX_URL_LENGTH); + + memset(bufferA, '#', sizeof(bufferA)-1); + bufferA[sizeof(bufferA) - 1] = '\0'; + MultiByteToWideChar(CP_ACP, 0, bufferA, -1, bufferW, INTERNET_MAX_URL_LENGTH); + + /* len is in characters */ + len = sizeof(bufferW)/sizeof(bufferW[0]); + dummy = 0; + res = pParseURLFromOutsideSourceW(urlW, bufferW, &len, &dummy); + WideCharToMultiByte(CP_ACP, 0, bufferW, -1, bufferA, sizeof(bufferA), NULL, NULL); + ok( res != 0 && len == ParseURL_table[0].len && + !lstrcmpA(bufferA, ParseURL_table[0].newurl), + "got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", + res, len, bufferA, ParseURL_table[0].len, ParseURL_table[0].newurl); + + + maxlen = len; + + memset(bufferA, '#', sizeof(bufferA)-1); + bufferA[sizeof(bufferA) - 1] = '\0'; + MultiByteToWideChar(CP_ACP, 0, bufferA, -1, bufferW, INTERNET_MAX_URL_LENGTH); + len = maxlen+1; + dummy = 0; + res = pParseURLFromOutsideSourceW(urlW, bufferW, &len, &dummy); + WideCharToMultiByte(CP_ACP, 0, bufferW, -1, bufferA, sizeof(bufferA), NULL, NULL); + /* len does not include the terminating 0, when buffer is large enough */ + ok( res != 0 && len == ParseURL_table[0].len && + !lstrcmpA(bufferA, ParseURL_table[0].newurl), + "+1: got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", + res, len, bufferA, ParseURL_table[0].len, ParseURL_table[0].newurl); + + len = maxlen; + dummy = 0; + res = pParseURLFromOutsideSourceW(urlW, bufferW, &len, &dummy); + /* len includes the terminating 0, when the buffer is too small */ + ok( res == 0 && len == ParseURL_table[0].len + 1, + "==: got %d and %d (expected '0' and %d)\n", + res, len, ParseURL_table[0].len + 1); + + len = maxlen - 1; + dummy = 0; + res = pParseURLFromOutsideSourceW(urlW, bufferW, &len, &dummy); + /* len includes the terminating 0 on XP SP1 and before, when the buffer is too small */ + ok( res == 0 && (len == ParseURL_table[0].len || len == ParseURL_table[0].len + 1), + "-1: got %d and %d (expected '0' and %d or %d)\n", + res, len, ParseURL_table[0].len, ParseURL_table[0].len + 1); + +} + +/* ################ */ + START_TEST(shdocvw) { init_functions(); test_URLSubRegQueryA(); + test_ParseURLFromOutsideSourceA(); + test_ParseURLFromOutsideSourceW(); } diff --git a/dlls/shell32/idb_tb_large.bmp b/dlls/shell32/idb_tb_large.bmp new file mode 100644 index 0000000000000000000000000000000000000000..f7412427cdc4db404d037757a06bc9961b0bc2d0 GIT binary patch literal 108342 zcwX(DO|Im&5rAnRyDYQGGRvI62gpA6$T4`E9KxRI8BdG=26CGqStPO2)Km2m zsnz|8#s})BSbr>0-E=?9pZ@&)U%xA@eShVTSN`&wQhtB!zbk*3ub1on-~G1CK>PCL z%akNZk|arzBuSDaNs=VVW2mLvuw;`YNs=V-gWs_cI9;Vw)7}Wru0KhVBuSEUP_Cb4 zw#Kr#m0iomo>XF=o^L_Z*@LAw*$=HQt$Oxg+20e(H!qf*E#Pcfepy&H&rU7dtPj0< zto&M7`n_0os4a-s6L&=RD6k(=tkH7|ng>rlxc!GVCfYbVO*dfq-ovx&PsWJUc|w)t%8fv)=+mab<5zZ>?fE2#P2#`#8l@4@o>W~bJ7f_hiucZfsMwN?H(pS?)_ z97$blx4sVe(W_@9b{IRNV}y$8#)>&2`>H@~(D=2Qk@g>OKD~|Fz`FO?<9M`wx)yGU z<=fe@;)|f!sm1@?M`V-NCsGd)+2m+0(@$S7)0fYm9J0^F<#L%mfBH0i`tkK*J2Rz> z?UURcJJ*a+yIwncLD$CUxd*%!ds~m4h^=1zXD0etOw(iCA8DNao6mUfB#I;6I~z>S zv>dL+3vu)|tk3eHw|R1;=1!=qTK3=f1l^;yM)Zv4Zwoyb90P@ug$DO&oq=Bw*`vTQ zNxnqSEqhWfIkf!;oKJ6C$9u1P%RQ7c=%43hiG9nSn`^Fqdg0?OoA*|nu3qpLsKx)> zM`TaTuM3vkhosG`1SjjQhluP^;Fu&|qUTS|+g`@6pDvgGn6l5tHMXyp&(oLBpKaM> znE9EQ-kWrc*9A@9`+RYBn~l0$myU1pPCI*1iT&ughgHs*bq@or#}2k-+33}OX1G|b zF`N#M%t+&GfX>-(ynhnK@c&M~QIAyLYP=GMr&)HTIm9+V#?pu7t@#!6Ciqi}{n>34 z&^c;jM30u=2w0zG)1vv$H7+iY^~4>KeN`egV(mXj^Q1M&?pAvyS}c~#2$KG?^p?Mo=RP8vJSX{nNs{NpTI(Z>>ca2#)%$2!1FYk_ zu}*(1yBJPJvO~vuvHa!ijGWV4aMZ%D@mlM#6S38kt7m}Ai8Y3f^~jAh&cZvR1=C#^{~9<_gB<-^L0rGK86CH5_Q zZmvD^Z=vna;On^dB0ark#p&vexFhozkxh1C_uu~1^1SbtDA<>IEh5nCp7SJm1Y6hO zsJ>F(-(RbD^Ypy?Gq}-nu2n&o1@)8O)6ThEaDG9<>lX(eBiShM|E{rOrM6!cu+&(*8F zlqixNA``~YueEl+)hU#+mgXl zSd)-HTwX0bstutQJh?g>?eD=aKmH)zuT1V}ZAQ;ExVrPy;u-d5xco>t^Xm7+pykEV zKl`-k;ob%8bw|&|>6w2EZ7spqaqUHVdd-T{)o&1Ya!USt_dMs%MkUW3 zw^l~aljKOan%#m?z4-kFD@uFbDB5*AmihqtY2)m|F}1nF^@ZlvlCkvRF(Zw$1vE@&%YHv#fqJdAGyD! zKP_Jv>7J#BjvHy5z1a`APy2Rnnd2^yy}KKhMjehkFOG*Bw1K-*Dd6ml5O~^4Fu_y0zkT^@d+~j-~qRkxiZx z`piquG?lgLAtHMe*bi7UF!Z|Td<(vP`)T^+?>|rf_~qy6Z{NO7-@e*ol8*&fuUppO zsQy_Vtt0ffJ$n>Qp4x8b6QhT-i}g##H+dn(y4b^Z@fZxW8pxLh#1++teZl@|zDHx3 z<>0ds*B6}Kb%Xp{ae$mxo*O@Me`}v;j_EaPJg0A@aW+Ax_PKI|RW6oVfjyQGWNb7y zFs4OD$KpK;PB&)*{KCf^)V`+M12?u7Uwv9WU_3te=%upSzrE9I!?Fv<^qK|MhjVV_ zzTJZca+3atY_jGI`!lU?P3o&Mf1~>|trc|c)nCY1uHJx^oYkZH#kS^{mUZ0Phgt2( z)G|Z&XXG`5zs|)^{lxdoI2}FJP0#ThSL6>RDw~`G?U~}{tIaD#(jBRXh-{K1GTvu- zgi#x%yuY(o@1y1Uw~p_|61$+EHqEZ*ScW;;v0c;utwt=zQxtxlWQbS&)8 z(9iu*8(Onsmg>Y?GgggS<0-9q$AQcesY`Z!txoiNl(a|F3$^XZ=~lEkX-%7-9@(S7 zerUOkobSOI_GendvUJa}DmfV4pTX-g7enaxGt4}%?mK!MC$0nNt^Jt0{h8%IZk?uU zh<9&B0{dyjDfO$oGP%IO9JgMozaH7-^@-F&MD{4KAKbb_uY1muWN)}y-MR)xZItr< z{#w18rsv+D0sR%(r}=?aow>4z<{ppZeDwNG5q*QtNzvXJ549i7t0iyU*W|U_SkT;C z@|vEJ#@Pm)`1y$To|vG1r2Q2OYrH2nO{Uc&tO78$I_uP9qcu*>qg&(VYmuK*?H=f8 zP4hz<=aE?=b;;geuj)A-A8j~?*go|I=Z~VrWD(I5k$q))=0e(^>A|a?+G_n<&DC4q z))u(lWJ*wf8)G$)Dd^m*zmT!FzPztL?0u^zK45)X9xbG`8t;W!bLD0B*NRi=VLbRN z#ctJJuWWK2qU(*9h@OaSk|a9#own8cZA<;L{Pf8(rOT(I`BPuAM`BVn6c7v7VCHmYs0JSO}3hL zw46zD*bgqZT;p>6k-+hDd8XGr=axM{yGGgSJ9)2us2?o*R)6)j=2RsI(ft{mlUeU_ zy$CfM`uz;_i*55A!1P?5-0W?Dl*9G!Xv%PJ#cB1H&&kK2mVCc(;P|EIJbIoaM=YLRQp zn^(}m>B0Bteb9xxH{-?QEav#GbA#K;H)h_n@4Nav|6D`!=9X*HoF)6f)v#9gfVF=z zilrZXgFS-Q+WA}k)mtq|&s5L;%uVNV4SFt5)}AN#4jAf%HORZBMA_~4GaJC^vur1? zh4vgY%#0SvNwb|#%r^icMD|@i?T5xe&W3VjOr1t@p z@%Z0t;NQb|i2i=YV(Ywbtq-7i(C%Bh=s0ha=0wxGdX9p=ScJWx$qj8@e>fX3 zR_gIst;W1_RTVw>9=(tCEuO2fa^ox{zvb&y(WTvcp9d~)7&=cHweU40&6yW%UPfe( z0{g+`m|pjsTlQ%Do}5I#lha&}>ThFP!?Lhfu;=e*@VX5>7f09cX9jv4C$0nBZ^ixZ zX4dB;lyd)m)MDkv5Voko+{{+^63TZwRA;fUlpsqrE$@E;^uoqKa6cn>Z|fhX!|n~(w+eqhq^zr z16aRgm%AQC+KV}Ak4B3F?$Mr7i~qTg$R_6j&l_%|a~P?Ih-{K1G3dK*lr8klIwtbY zBFDWpZtulf?)GPBvus%RAI0eB7s!#;u#8tPwL$-83D51_ImmT>AAdG(IY3xr@Hk5j zWW8;4zI)K(hnncE2W$MJa|3!beYNO&Cy`nJT^yQ^b$KpHM(*`@&Qk>X-6`^2iq4^i zcdjd`Ax};{V7;J=^D`=Y6gUrCF=A616R97tLEDIa(ASQozR489hNYj{!Jo0fcP&qz z-=tBUcfDiosNTr=nJI-|Uo?5|bzF-ucap7$Y;qp(yusW_&uWB7Jw#-W0_R~XESpKP z7h66*Tj-jf=_&VTdXfC{`U^SI+AWVxosyk9rfCf$W9fZ%Mq~Dl@ys){E#|uiDF^el z(ft`Ezh}sermx+rMgHvIt$|TyKdy5C=eWVOBlc$Ae5rTm-tVYy^8Pu8ro~l>K5f1t zfL@Qji0nrK@}cDLDVVB*|+~N>Q=KYkKF;2DPw%-vrDujGaAv+8W6huaA%;t?d!>+4Fh? zTgGpV_slaiOII(Jf6!C8`P$(AOzR;w?!LF}l^gIws)<_U&qRCqqxl%Uw+FB%L$Sua zkLUBPA?bqo!C3Y^MD#^u9|4z3>%0eUF07nH>IQ7krrEIc&-xa$V<|6|e(E>fKe2M; z(NE`hi@BuwEt!vqx5lHg$$5ybXI>)uBC?NwTXU@QBuO4adj`GDdS0#jk3#ax>n~l? zBrH8ioFj8=&F@jZaJuO=?tDu)`w^@dKLTgVOLT80Nk*t8wg+U@rlfBx{T@5oIIsR> zdmg>ECP|Vc$(FSDnzvc+KzBtFjcy*_yj^7~_wBuSDaNs^o!`aRIX(q-98k|arz NBuSDaNs{Da@qaJ)6{P?G literal 0 HcwPel00001 diff --git a/dlls/shell32/idb_tb_small.bmp b/dlls/shell32/idb_tb_small.bmp new file mode 100644 index 0000000000000000000000000000000000000000..c44a2de71535c6dc99f6125e6f0553de5bcb1410 GIT binary patch literal 48182 zcwX(D36vJawZ}gdQ5IQM5EwxL6*nRxCK^`~5rUqaXwG{tiA!QkJo=1?3bM&IY_c=# zn;?RU?6Qc%%rG0-%}z@qBrz@-D*+TWA*CQa=cMcP>?e6^YbMqC+Dc+ z3yY)F$jg(Z)2GYgj10-n%uG3cp3l|1>%Gk^`EG&%eCH9e1AOoO$N3M z+;|eb(;`va<%yVlCz=0Lo==qT(&XQkb67n7_8OE%doR(uN(1|Te>$yf*mSySP9%Tv z^i1?Uxv^_mue~OVRM&-J;g~V9c-%On7fsx`t7ZE1rLtyCUc&keOxtk||6_!ap*Z!O zNWLo&j+0S;92*?ZcNfEvoSb66ClzMSoGEqBIY%y0)JyiaZe3~DuAPygQpb1p+0v+f zec7;KL&7ws0=WB2-Mh<@2@_;gt5%Y4R^+mY4hgINu{Z%s7PA2Y+0=SsrPfVY!cyYt@rv)z2|AY z@a|*~mOie{n>$yUo_C&H+_#I&oOsr+KPi)y^XADgmDRzT7vL{ox zQT|V#3Bm{3R!5wBuF*L>KY#v8i9~u!$BvUsT#54MPhVMwclA$cP}c1uRivW7Eb{V- zmm4yR><0BKiR8Ni@o_Tgk7I)zgA7yP`JOJ`u^MB z&lPo5-h*suZhW7Igtxzu7A=fEOO(b`uz2iP1IEjPwH?rJ!QEf(*;58-KL)4AE*}=2 zaJ1z_2hYSClXDM!F!8d>WXk227X#P0S6*ZKR6rfVX(N${!93*;@t&venLK%N2`){& z@6>uv=4j#6`}pzWqwlU=TO!q~$H%Fs%6!#dxxW67v~VvnY?wqIeKeLA7rb-(_U$rj z#tex(^pHdzd{D+|nq%Sh8F>Ch7hO~WmuY=nuJ!hlpZvt=){PrC$`emKVZt+j7s z-!$i8c=z3R4S%QadGW;;OYoSmbQGzqWIzABWNF=5-X)Gb$j;6KppQcoi@#s1AO<1C+4VJJR^1L3^doUufx;h z9phAn3pa1lzW+51+r{wbNTjDc_SkG=%TJU)fZe=2!mnLhXzV!j1rbf>g&rav;{Mk# zjcof^9kn4)x9F5a7^kuTtPJLA`=ZUQT)EO<%9JSviT+Q}u~QT6SCUGvf@jAvAL7=# z%J&4#3rD)v_jE5GfOD>K1j+X?o`Rmsk{sSLz%gVL?Y|*q0tXI#p=Q}n37hG^bF>uZ3SYAhJMJ(X-jxC3GW?!r{_>YV{th=Muag)r{PB+l zoZIl+4?FI^|9->a;qS!7xqrN4^AAtOPV(M+@0oFtl^f2v$1@p@{MmAK+bi$YN z%tMgY1`Qg-wZGeO;?ku{rE}-bhQlYLqiDa_kg+AhRq0P{`?LM;zrXuVx@+8-g@q;h z-!BgwkY_dhOSSE%+W)%g3rlNR^}pn^hr{3bzeZ&y*UY8o%8fUU)$;4+@!#%JsZw9b zoIXBj{yuHmQkgn+smj(snKf&+pBirwrT1r(S%A4j(qZkF;nZ{j_b2f%AxCe|LDCwO3<@0PvJ?%BkpkEV!P? zZteQd45(Er)|U)cZV|-at=`8z3$KJ@|2abHMBaJl9b;2;!8Hz-zr)?1=+;fns8S_n zD?UT<-(Ea#yzxdXJm>!K$skL0#iCK83=a#dQ?A3YcrKoAk3S4)s-ybJa?(kYCY5*x z_Nn>v=bQWJ7k@mZG`YtS9mjG|7M(hElASx($@}j=FAqN)wY$^4C=XjsHviv#`>pKQu|xj(&wrMv zckTu8celOrAI{D@;P5d&BMmpHV@DaT`B>?^*I$=~T9(WU$NGOgU!(apc69xZeHSji zR?}nS;5Sp{X6n?bQcK$m?crJ-Z!a1-()4Nm=Uv$LvrqYEkgvdI#k{?H<@vYXl7g*U zmAB23%9Sh2f&~kV%q64OXusop^%LuVo%!#eaxwGYdT&ya{z5@8dNeyb+Bf*_@&3_Q zUv1{UZ@lqFIsg3g4Q{>lRs+T~jCsi`;GAnb>*rpUzcWr7qB4#SWZq+m$|-5supwW^ zfNONTJw(fUy_Q`;()RZPue}u%LDbySv@c&Oun^98Dlc$P5MjszGZG7et0Y?&-yzC13FziQR0 z#q4gCM@bI)n}dR5cf)=7V+cOLZr)qwVI{bvT%t5>3( zC6e!x1o%fBR(zktvn6o6^+!CErT(bEiGv&;uS&(w#PAsnL)bS$`dtgxUVi=I!*Wo6 zTYdGF;oMJZ9DixuTFzGPh#mf?QqunJ_xr6`wW^$@`pDYfpTv(`m&#+x z3xe$LW*qFz6LO5!u|v?2&~ELmUp4%_W=&bQd$&PPO#>X>?>|Ex&UW6*VcUAL{GB|& z-7g$CQ0`X_2^#D9Q)ixOo}~`pbOqYpHfbCtAAbKE&p$tGo&o;8RQc8DYpw~@BRsoS z;~v($d3654Y1`bR9}TjL+55oC8op6)`1l=M^^{XiF*Z~(9{_S|>u@WuH1pZ^@l-_L-p1w4p3oMiP{Q2%S&kCkog)P>pyy7{u@X6|j<7F)xa3fwke>^s?6#oket{jcjk zv+>|T8KL^Jm!2Wcx;D{d`Z){B2P`M>_t!35`}+aKLmFm~*N1$kock&L9jf@7Labd~ez3p$ z{eE{TS3acIUHkikItCb`;YUQ`+uz~DZ@&Ak!6@ZN9B>0{r+3|Tm-(Np-P-bFK9S=n}>xaCbPozpnAM=v%3hc`xyIiIlX9 z5yl-aTDfuU?(xQhrRDF0i}imhFEKkjzB2KAY4Ektu^{VKjsLpk@BR8k{ounebf`r7 z_Dzbv!)do|+b(u(OkrWZj2d;ny#M|z!xah~IkfqQyEFcIU-NOHjzO*5aL&DW{M`l5 zGhaGE$Dz#AB5OmNHZ?X`#&P~SzVmS$}CHeJlMa%8HkbkcBrG+jY#v(I_+R6*JZ{`#!^3!vF!;1L*18Dun;~8FN%T9E4ZI1NYTLGL zY#unC-PiQLo`2K9jT=o~Z2O7Xe=obt$Toej8=kQ&bLW6__nu#d6C$Ui{T-Cm{5N@Z z*RS%64s*xr<;CAAn<@If@mkJcW~){PV^w$6aQdGh{+{mXPyaE#MGND*zgYVSJLU}H z@9bv)XU{xx#Q2(^VNX%{FO;YasI6WP;>CnHOJylr`LE^glwr@FJB4^oeYa)HM$^`rS7kf^IFH`jV!(TNezK0Oto7Mlg(?H(fN zVq|xMw=Sx1-MW~Javo2-qd~VH5sSzG*qtjbgf#U_V=>n?}l&admhmD0?vc-PaevPzu#NAviJ`;^nAVV z_k($L(j>#pz>8hFg!;+k78V*`e!pD{pCINOg2Lo@<2S}JeIii~?+@=j=W_VhwC=FG zCmIKq34a&)!48k?>iDM^v^*oMb+hYPYuA?gS{C?~oBwe4PMsv;_%W3L>&UR*C&}OU z?_Z$(_q3R-3?15AcJ10w?)=>XdwQlfUj(;%TCWZC@o;|eeZhVX&v5GqZiDS~;gTgX zb;bU*%U77xq#f%L+0*!Lt7>1F(v&pBt1S&v9Rz@7*{``OQoj)}K^ z70?IaLxcZ2vc=pN?$5!h`wEqzZ@&9hzWVkXIq>0IQE1s!DJ6d& zjXh!KPJ{lQzKqM?6}9xd<+ayJ6>aOMw`n84(Xo6OA0|xgnl+8@BlADhD|2FuCus|P zRL}a+uTMX@^64w(svcKKjp{XYe7;$(yDme1^{YuTW5!fjzrIj9beL$a`PT*@i`d)& zYuHoa?>QbUe@73r((#dzZ--yvL-TVTOWQWUIsB3%NWP0wTnF=G1Z7a6KN6#Yzn4FZ zK2sTkGnEy8CobX)8Z!p@zq7`a-$$D@Grw@|F#mV@c66paHt*gopR8YB?D@}qzcKr} zwkJP-$Lkna{*G-w%x@(T@>E{C^y+26d02T{{?0r0?B8$Jz1si08{Wn7{onsCpDPFX zSo4_f`0%&7gtKcO0U9fp?BBAb;qchu@uhiE(N+7J{DAeL@OONC@NdR{zs&i2 zR+fzY`Ogi9?;gV6?X&PO*$|<zxwJcsi|DY z?{9A9|DAX6oU11*SMG@EcH*}DJt`M#wf{=j{$rW(!>(0pfbqfR9`m}S87^h_>v6#~ z?wzakcg;1|82dYA$QX%oEYfmu_lE#QUK;?e|Cc-WWc9|5Idi06)vB__scZ6zfA}u# z>mJv%VFPye2~B4In?xwf`ET;cJlc|p6Aho{7qG|s5A{`&zbCtYWKehu;(1$j@E{R8P!)>@mq(x6b&;;OFkn8Ssnm4`cOs{xj?L?k#>#&$-52JRF{Q;D3Jq84Gk0 zWp%vx`>onnTfQE|-|GeJTk7(6eB9&BZHDbX6SjVJ;>0P2!()fvwrz*}^{;<5eeW9I z_{z=yz4zWLzy0lR%{eml?6c3x9e3Pe{xcpOKW$nuKdzwmYUexP?u_g3oiX-Ul}CKw zdq<*n_b%YBiM2}cErEyAM)jwm2^xr&AgkoiH#8d z8Elc*ZZb2oWyOlD5B99?JP5-#8}> z^sBU=Y>m$^qvrcYdT%*vu0zJ~M}xBLf2m9Al<_s`WxWn{4~MtU_{%-j?>EKc?{BTn zHQas5l;!fm3p?ehr}|0m3#svUjs+_JV^kMqXt>)Y1^zDH{F`$4I?APfiQkOpI}^s= zPxa)9`5)vM`NCh3J+*?+pkV_^tDhzf&utj%e~=kuJ1uR9!RE~yV|I3I>>%hre(=v} zTVA4V+SOBjy#>$)SAF)GM6^!Ns9f3j=+nO#dDXhH`=$liZQ{vy1)`|X9~C%JfDBom zlu{^x@HXYBqn{v$(q$SxfR zEqmdGV&!T1j$mz-r|H}jCl@t#=@`&6wWQa5l;g`l2&ufpw{o2bfOS;Bs z{713HdEcYLFFxM-)&5ng$jd!?#QFoyxn}+1L4L^IqO4uSwv5a$XTz8ea9*QEjac}g z@=nCxxkvdkpNUVDmFKCNzpUxgWBaTv|NeV9SNlcg)Il>3=D%{A+i$;J);a#6q^CUi zyL;Ss-+i(DBk}VN+Fz4)MBX^qzYcy%*{WBiKw zfHyt4^!tHuo=X4g=cyJhzjf`{Wr?zy|F-+j0LJdj#ZmXn&BdMx;omN7c?9JsR6K`?XFld+$BTJbYM|>9v9J{AZ40|HyMy zCtz=|{xNWB+M%_P#smFNc6M}K$K#LB)-muPgHD}htGsTC`Mvx7;NAb!C2jU{)el#A z_A1blxof@NKy{tbW17bn+NU*BJ;QhyAG?_U3;bPWccHURAgDfrZO%^Uvj z^g%N;|06XI{EpRpvlqk)^5JXaG5)Unv9|Kux!T{(Qe7}h+vS{*BV{r3DU~Xj`(gY& z2zkmA7mXer<>Fe-*{b*b{;)2%4!>jn9n0T2=UP}88xF1shxN-1KwrS?S$A04^{dQ* zz`I}2vCpHAJ{p^Q>8s8|?0I_g`u~E>|p64D$B-2;%PzwM|uO-C9o3exr$pQ#>@$IGcOlb}I2bByC4a z7cP`GZQ2-L6hNGOYuSzq6V;vFSHF7o^jN#&oNLMKjgNk0{YS^U?>6gh^F1^?a6meD z?{3EW%3BIM%|!-Pwbi z`5!p7+kf+07T<5OU|cf8^BD%5bIt#p%isM+gQiW*Z|fUwkgeLj{rfIjP!^Y8a*0&> z)1TyjI(9UEjuGvD%{PfOJnJmadHivy^5BEg{+3%#sCh5{I5A9a;Bm}jRIOSyR+sKG ziTFEx>cN8t&3-0+`!(@cz3BfQx*bEf>G<`pe_d=`n=*grdqeHoCC%R%FL2zTau7Ct z@qfRIIi}XiNrq{f*b~O?t(~c5*I&o8LHs>vojK>MRUOi>p&7dZ!ut0m!8X%TWe?8% z%{Qd>9of70#aJB7TkuR+xg@HGjEu!HVZst^zxh(T_5hWUmFAl~{y6x?4ePql8}9mD zP~TgJ_lH0HA;z^V=o>%q<}aA%Vh^U}0po2yT>CHmZ_xU)zbgmYsQqtwtUsd<&Cqcj zK6k^YSH@@}VPgY^ANeeb8d@yla=Wr)VruX1I>-ijukrL8>A?O$K3KC2IOm$t3!0blT5jKb{IS`0C~W;|kbGCHUyY(de^lT^ z1l)ywH+{Z%I1d89<&TjQGXeJ=>#mxOkT9gs4?*1vDxe&x__#e9Ofm#8hr z1AgzVT8+~7J6KLXy|3^MQ0(vi=j?n6en$Q^tbnyK%uk%{`QO=a%w5xevPT3y-)4PD z68g*9e@CibnXO~w-2CF-Ai}OZN_7ou)0oR}?$I(3s7`V1?99m_OY!8^ zj_>XM?bfF4w=WzExU%KGpL6E6$j8c+D-Ag3n&IzSw#YnV9p=~aop|j2kzw+Etn+xH zqC$UE;ABOPV|R0rOn(n=!&Vn|*nT?4*flm7ZUuK|zpwI~|Fhq_4*PF`{%qH-o#F8A zcc@5rGV3<|u=z~29FG^6m%#TK;6sxruQq>v`>g*vUM?ux4jnoeKAR{#eh`NJN~k-= zUwrom+ZDbjtl_a~X{7q?;g12d`$_DZJ2BRw3k*6Ec|wP-j(mc z#>cPa9f{(L2g1|7C>NVw&bNo`otg@w^&b8HXVa!brDMlQ#&0<6*&u!5FNb1j%5%P7 zmV#d3Icxt7^bPjnO?KX{v~b%!d52TleA??t>4CiX-*Jn|N;o%lzbA5=Gf)~1DRnEiq!6-}k{Vx3f zElm6Mjk!-Y`$k#W6T-^SZ;wg^gn`4e_Z$43IZM08xsB8Ge{tR&2KOC_o-IwhbLlvk% I1^)B!|4nUfQ2+n{ literal 0 HcwPel00001 diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c index a9455692b36..78934451d61 100644 --- a/dlls/shell32/shellord.c +++ b/dlls/shell32/shellord.c @@ -356,10 +356,10 @@ int WINAPIV ShellMessageBoxW( WCHAR szText[100],szTitle[100]; LPCWSTR pszText = szText, pszTitle = szTitle; LPWSTR pszTemp; - va_list args; + __ms_va_list args; int ret; - va_start(args, uType); + __ms_va_start(args, uType); /* wvsprintfA(buf,fmt, args); */ TRACE("(%p,%p,%p,%p,%08x)\n", @@ -378,7 +378,7 @@ int WINAPIV ShellMessageBoxW( FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args); - va_end(args); + __ms_va_end(args); ret = MessageBoxW(hWnd,pszTemp,pszTitle,uType); LocalFree((HLOCAL)pszTemp); @@ -414,10 +414,10 @@ int WINAPIV ShellMessageBoxA( char szText[100],szTitle[100]; LPCSTR pszText = szText, pszTitle = szTitle; LPSTR pszTemp; - va_list args; + __ms_va_list args; int ret; - va_start(args, uType); + __ms_va_start(args, uType); /* wvsprintfA(buf,fmt, args); */ TRACE("(%p,%p,%p,%p,%08x)\n", @@ -436,7 +436,7 @@ int WINAPIV ShellMessageBoxA( FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, pszText, 0, 0, (LPSTR)&pszTemp, 0, &args); - va_end(args); + __ms_va_end(args); ret = MessageBoxA(hWnd,pszTemp,pszTitle,uType); LocalFree((HLOCAL)pszTemp); diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 9176420da55..ec7ba543430 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -291,7 +291,7 @@ static BOOL SHELL_ConfirmDialogW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir, FI args[0] = (DWORD_PTR)szDir; FormatMessageW(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY, - szText, 0, 0, szBuffer, sizeof(szBuffer), (va_list*)args); + szText, 0, 0, szBuffer, sizeof(szBuffer), (__ms_va_list*)args); hIcon = LoadIconW(ids.hIconInstance, (LPWSTR)MAKEINTRESOURCE(ids.icon_resource_id)); ret = SHELL_ConfirmMsgBox(hWnd, szBuffer, szCaption, hIcon, op && op->bManyItems); diff --git a/dlls/shell32/shres.rc b/dlls/shell32/shres.rc index 8222f95e47c..65c15a06ed8 100644 --- a/dlls/shell32/shres.rc +++ b/dlls/shell32/shres.rc @@ -99,6 +99,18 @@ IDI_SHELL_MY_DOCUMENTS ICON mydocs.ico /* @makedep: mydocs.ico */ IDI_SHELL_MY_NETWORK_PLACES ICON mydocs.ico +/* @makedep: idb_tb_large.bmp */ +IDB_TB_LARGE_LIGHT BITMAP idb_tb_large.bmp + +/* @makedep: idb_tb_large.bmp */ +IDB_TB_LARGE_DARK BITMAP idb_tb_large.bmp + +/* @makedep: idb_tb_small.bmp */ +IDB_TB_SMALL_LIGHT BITMAP idb_tb_small.bmp + +/* @makedep: idb_tb_small.bmp */ +IDB_TB_SMALL_DARK BITMAP idb_tb_small.bmp + /* @makedep: searching.avi */ IDR_AVI_SEARCHING AVI searching.avi diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h index c6df4622e98..6353623012a 100644 --- a/dlls/shell32/shresdef.h +++ b/dlls/shell32/shresdef.h @@ -193,4 +193,13 @@ FIXME: Need to add them, but for now just let them use the same: searching.avi #define IDC_RUNDLG_EDITPATH 12298 #define IDC_RUNDLG_LABEL 12305 +/* bitmaps */ +/* explorer toolbar icons + * FIXME: images are hacky and should be re-drawn; also dark and light bitmaps are same for now + */ +#define IDB_TB_LARGE_LIGHT 214 +#define IDB_TB_LARGE_DARK 215 +#define IDB_TB_SMALL_LIGHT 216 +#define IDB_TB_SMALL_DARK 217 + #endif diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index 4ea855ac576..a51dba03d35 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -90,7 +90,7 @@ static void strcat_param(char* str, const char* param) static char shell_call[2048]=""; static int shell_execute(LPCSTR operation, LPCSTR file, LPCSTR parameters, LPCSTR directory) { - int rc; + INT_PTR rc; strcpy(shell_call, "ShellExecute("); strcat_param(shell_call, operation); @@ -111,8 +111,7 @@ static int shell_execute(LPCSTR operation, LPCSTR file, LPCSTR parameters, LPCST * association it displays the 'Open With' dialog and I could not find * a flag to prevent this. */ - rc=(int)ShellExecute(NULL, operation, file, parameters, directory, - SW_SHOWNORMAL); + rc=(INT_PTR)ShellExecute(NULL, operation, file, parameters, directory, SW_SHOWNORMAL); if (rc > 32) { @@ -135,7 +134,7 @@ static int shell_execute_ex(DWORD mask, LPCSTR operation, LPCSTR file, { SHELLEXECUTEINFO sei; BOOL success; - int rc; + INT_PTR rc; strcpy(shell_call, "ShellExecuteEx("); strcat_param(shell_call, operation); @@ -168,9 +167,9 @@ static int shell_execute_ex(DWORD mask, LPCSTR operation, LPCSTR file, DeleteFile(child_file); SetLastError(0xcafebabe); success=ShellExecuteEx(&sei); - rc=(int)sei.hInstApp; + rc=(INT_PTR)sei.hInstApp; ok((success && rc > 32) || (!success && rc <= 32), - "%s rc=%d and hInstApp=%d is not allowed\n", shell_call, success, rc); + "%s rc=%d and hInstApp=%ld is not allowed\n", shell_call, success, rc); if (rc > 32) { @@ -835,7 +834,7 @@ static void test_find_executable(void) char filename[MAX_PATH]; char command[MAX_PATH]; const filename_tests_t* test; - int rc; + INT_PTR rc; if (!create_test_association(".sfe")) { @@ -849,26 +848,26 @@ static void test_find_executable(void) strcpy(command, "your word"); if (0) /* Can crash on Vista! */ { - rc=(int)FindExecutableA(NULL, NULL, command); - ok(rc == SE_ERR_FNF || rc > 32 /* nt4 */, "FindExecutable(NULL) returned %d\n", rc); + rc=(INT_PTR)FindExecutableA(NULL, NULL, command); + ok(rc == SE_ERR_FNF || rc > 32 /* nt4 */, "FindExecutable(NULL) returned %ld\n", rc); ok(strcmp(command, "your word") != 0, "FindExecutable(NULL) returned command=[%s]\n", command); } strcpy(command, "your word"); - rc=(int)FindExecutableA(tmpdir, NULL, command); - ok(rc == SE_ERR_NOASSOC /* >= win2000 */ || rc > 32 /* win98, nt4 */, "FindExecutable(NULL) returned %d\n", rc); + rc=(INT_PTR)FindExecutableA(tmpdir, NULL, command); + ok(rc == SE_ERR_NOASSOC /* >= win2000 */ || rc > 32 /* win98, nt4 */, "FindExecutable(NULL) returned %ld\n", rc); ok(strcmp(command, "your word") != 0, "FindExecutable(NULL) returned command=[%s]\n", command); sprintf(filename, "%s\\test file.sfe", tmpdir); - rc=(int)FindExecutableA(filename, NULL, command); - ok(rc > 32, "FindExecutable(%s) returned %d\n", filename, rc); + rc=(INT_PTR)FindExecutableA(filename, NULL, command); + ok(rc > 32, "FindExecutable(%s) returned %ld\n", filename, rc); /* Depending on the platform, command could be '%1' or 'test file.sfe' */ - rc=(int)FindExecutableA("test file.sfe", tmpdir, command); - ok(rc > 32, "FindExecutable(%s) returned %d\n", filename, rc); + rc=(INT_PTR)FindExecutableA("test file.sfe", tmpdir, command); + ok(rc > 32, "FindExecutable(%s) returned %ld\n", filename, rc); - rc=(int)FindExecutableA("test file.sfe", NULL, command); - ok(rc == SE_ERR_FNF, "FindExecutable(%s) returned %d\n", filename, rc); + rc=(INT_PTR)FindExecutableA("test file.sfe", NULL, command); + ok(rc == SE_ERR_FNF, "FindExecutable(%s) returned %ld\n", filename, rc); delete_test_association(".sfe"); @@ -880,11 +879,11 @@ static void test_find_executable(void) create_test_verb(".shl", "Open", 0, "Open"); sprintf(filename, "%s\\test file.shl", tmpdir); - rc=(int)FindExecutableA(filename, NULL, command); - ok(rc == SE_ERR_FNF /* NT4 */ || rc > 32, "FindExecutable(%s) returned %d\n", filename, rc); + rc=(INT_PTR)FindExecutableA(filename, NULL, command); + ok(rc == SE_ERR_FNF /* NT4 */ || rc > 32, "FindExecutable(%s) returned %ld\n", filename, rc); sprintf(filename, "%s\\test file.shlfoo", tmpdir); - rc=(int)FindExecutableA(filename, NULL, command); + rc=(INT_PTR)FindExecutableA(filename, NULL, command); delete_test_association(".shl"); @@ -919,16 +918,16 @@ static void test_find_executable(void) } /* Win98 does not '\0'-terminate command! */ memset(command, '\0', sizeof(command)); - rc=(int)FindExecutableA(filename, NULL, command); + rc=(INT_PTR)FindExecutableA(filename, NULL, command); if (rc > 32) rc=33; if ((test->todo & 0x10)==0) { - ok(rc==test->rc, "FindExecutable(%s) failed: rc=%d\n", filename, rc); + ok(rc==test->rc, "FindExecutable(%s) failed: rc=%ld\n", filename, rc); } else todo_wine { - ok(rc==test->rc, "FindExecutable(%s) failed: rc=%d\n", filename, rc); + ok(rc==test->rc, "FindExecutable(%s) failed: rc=%ld\n", filename, rc); } if (rc > 32) { diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index e81defb31e8..262e7a60a94 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -90,6 +90,17 @@ static BOOL file_exists(const CHAR *name) return GetFileAttributesA(name) != INVALID_FILE_ATTRIBUTES; } +static BOOL dir_exists(const CHAR *name) +{ + DWORD attr; + BOOL dir; + + attr = GetFileAttributesA(name); + dir = ((attr & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY); + + return ((attr != INVALID_FILE_ATTRIBUTES) && dir); +} + static BOOL file_existsW(LPCWSTR name) { return GetFileAttributesW(name) != INVALID_FILE_ATTRIBUTES; @@ -717,7 +728,7 @@ static void test_copy(void) { /* Vista and W2K8 (broken or new behavior ?) */ ok(file_exists("test6.txt\\test1.txt"), "The file is not copied - many files " - "are specified as a target"); + "are specified as a target\n"); DeleteFileA("test6.txt\\test1.txt"); DeleteFileA("test6.txt\\test2.txt"); RemoveDirectoryA("test6.txt\\test4.txt"); @@ -750,9 +761,9 @@ static void test_copy(void) { /* Vista and W2K8 (broken or new behavior ?) */ ok(file_exists("test6.txt\\test1.txt"), "The file is not copied - many files " - "are specified as a target"); + "are specified as a target\n"); ok(file_exists("test7.txt\\test2.txt"), "The file is not copied - many files " - "are specified as a target"); + "are specified as a target\n"); DeleteFileA("test6.txt\\test1.txt"); DeleteFileA("test7.txt\\test2.txt"); RemoveDirectoryA("test6.txt"); @@ -1209,7 +1220,11 @@ static void test_copy(void) retval == ERROR_ACCESS_DENIED, /* win2k */ "Expected 1148, 1026 or ERROR_ACCESS_DENIED, got %d\n", retval); ok(DeleteFileA("one.txt"), "Expected file to exist\n"); - ok(!DeleteFileA("two.txt"), "Expected file to not exist\n"); + if (file_exists("two.txt")) + /* Vista and W2K8 (broken or new behavior ?) */ + ok(RemoveDirectory("two.txt"), "Expected two.txt to exist\n"); + else + ok(!DeleteFileA("two.txt"), "Expected file to not exist\n"); createTestFile("one.txt"); @@ -1253,7 +1268,11 @@ static void test_copy(void) retval == ERROR_ACCESS_DENIED, /* win2k */ "Expected 1148, 1026 or ERROR_ACCESS_DENIED, got %d\n", retval); ok(DeleteFileA("one.txt"), "Expected file to exist\n"); - ok(!DeleteFileA("two.txt"), "Expected file to not exist\n"); + if (file_exists("two.txt")) + /* Vista and W2K8 (broken or new behavior ?) */ + ok(RemoveDirectory("two.txt"), "Expected two.txt to exist\n"); + else + ok(!DeleteFileA("two.txt"), "Expected file to not exist\n"); createTestFile("one.txt"); @@ -1284,13 +1303,23 @@ static void test_copy(void) shfo.pTo = to; shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; retval = SHFileOperation(&shfo); - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!DeleteFileA("threedir\\one.txt"), "Expected file to not exist\n"); - ok(!DeleteFileA("threedir\\two.txt"), "Expected file to not exist\n"); + if (retval == ERROR_SUCCESS) + { + /* Vista and W2K8 (broken or new behavior ?) */ + ok(DeleteFileA("threedir\\one.txt"), "Expected file to exist\n"); + ok(DeleteFileA("threedir\\two.txt"), "Expected file to exist\n"); + ok(RemoveDirectoryA("threedir"), "Expected dir to exist\n"); + } + else + { + expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); + ok(!DeleteFileA("threedir\\one.txt"), "Expected file to not exist\n"); + ok(!DeleteFileA("threedir\\two.txt"), "Expected file to not exist\n"); + ok(!DeleteFileA("threedir"), "Expected file to not exist\n"); + ok(!RemoveDirectoryA("threedir"), "Expected dir to not exist\n"); + } ok(DeleteFileA("one.txt"), "Expected file to exist\n"); ok(DeleteFileA("two.txt"), "Expected file to exist\n"); - ok(!DeleteFileA("threedir"), "Expected file to not exist\n"); - ok(!RemoveDirectoryA("threedir"), "Expected dir to not exist\n"); createTestFile("one.txt"); createTestFile("two.txt"); @@ -1365,13 +1394,23 @@ static void test_copy(void) FOF_SILENT | FOF_NOERRORUI; retval = SHFileOperation(&shfo); ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("threedir\\one.txt"), "Expected file to exist\n"); - ok(DeleteFileA("threedir\\two.txt"), "Expected file to exist\n"); ok(DeleteFileA("one.txt"), "Expected file to exist\n"); ok(DeleteFileA("two.txt"), "Expected file to exist\n"); + ok(DeleteFileA("threedir\\one.txt"), "Expected file to exist\n"); + if (file_exists("fourdir")) + { + /* Vista and W2K8 (broken or new behavior ?) */ + ok(!DeleteFileA("threedir\\two.txt"), "Expected file to not exist\n"); + ok(DeleteFileA("fourdir\\two.txt"), "Expected file to exist\n"); + RemoveDirectoryA("fourdir"); + } + else + { + ok(DeleteFileA("threedir\\two.txt"), "Expected file to exist\n"); + ok(!DeleteFileA("fourdir"), "Expected file to not exist\n"); + ok(!RemoveDirectoryA("fourdir"), "Expected dir to not exist\n"); + } ok(RemoveDirectoryA("threedir"), "Expected dir to exist\n"); - ok(!DeleteFileA("fourdir"), "Expected file to not exist\n"); - ok(!RemoveDirectoryA("fourdir"), "Expected dir to not exist\n"); createTestFile("one.txt"); createTestFile("two.txt"); @@ -1409,13 +1448,23 @@ static void test_copy(void) FOF_SILENT | FOF_NOERRORUI; retval = SHFileOperation(&shfo); ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("threedir\\one.txt"), "Expected file to exist\n"); - ok(DeleteFileA("threedir\\two.txt"), "Expected file to exist\n"); ok(DeleteFileA("one.txt"), "Expected file to exist\n"); ok(DeleteFileA("two.txt"), "Expected file to exist\n"); + ok(DeleteFileA("threedir\\one.txt"), "Expected file to exist\n"); + if (file_exists("fourdir")) + { + /* Vista and W2K8 (broken or new behavior ?) */ + ok(!DeleteFileA("threedir\\two.txt"), "Expected file to not exist\n"); + ok(DeleteFileA("fourdir\\two.txt"), "Expected file to exist\n"); + RemoveDirectoryA("fourdir"); + } + else + { + ok(DeleteFileA("threedir\\two.txt"), "Expected file to exist\n"); + ok(!DeleteFileA("fourdir"), "Expected file to not exist\n"); + ok(!RemoveDirectoryA("fourdir"), "Expected dit to not exist\n"); + } ok(RemoveDirectoryA("threedir"), "Expected dir to exist\n"); - ok(!DeleteFileA("fourdir"), "Expected file to not exist\n"); - ok(!RemoveDirectoryA("fourdir"), "Expected dit to not exist\n"); ok(!DeleteFileA("five"), "Expected file to not exist\n"); ok(!RemoveDirectoryA("five"), "Expected dit to not exist\n"); @@ -1491,95 +1540,175 @@ static void test_move(void) /* number of sources do not correspond to number of targets */ set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0"); set_curr_dir_path(to, "test6.txt\0test7.txt\0"); - ok(SHFileOperationA(&shfo2), "Can't move many files\n"); - ok(!file_exists("test6.txt"), "The file is not moved - many files are " - "specified as a target\n"); + retval = SHFileOperationA(&shfo2); + if (dir_exists("test6.txt")) + { + /* Vista and W2K8 (broken or new behavior ?) */ + ok(retval == ERROR_NO_VOLUME_LABEL, "Expected ERROR_NO_VOLUME_LABEL, got %d\n", retval); + ok(DeleteFileA("test6.txt\\test1.txt"), "The file is not moved\n"); + RemoveDirectoryA("test6.txt"); + ok(DeleteFileA("test7.txt\\test2.txt"), "The file is not moved\n"); + RemoveDirectoryA("test7.txt"); + } + else + { + ok(retval == ERROR_CANCELLED, "Expected ERROR_CANCELLED, got %d\n", retval); + ok(!file_exists("test6.txt"), "The file is not moved - many files are " + "specified as a target\n"); + } init_shfo_tests(); set_curr_dir_path(from, "test3.txt\0"); set_curr_dir_path(to, "test4.txt\\test1.txt\0"); - ok(!SHFileOperationA(&shfo), "File is moved moving to other directory\n"); - ok(file_exists("test4.txt\\test1.txt"), "The file is moved\n"); + ok(!SHFileOperationA(&shfo), "Can't move file to other directory\n"); + ok(file_exists("test4.txt\\test1.txt"), "The file is not moved\n"); set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0"); set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0"); - ok(SHFileOperationA(&shfo), "Cannot move many files\n"); - ok(file_exists("test1.txt"), "The file is not moved. Many files are specified\n"); - ok(file_exists("test4.txt"), "The directory is not moved. Many files are specified\n"); + retval = SHFileOperationA(&shfo); + if (dir_exists("test6.txt")) + { + /* Vista and W2K8 (broken or new behavior ?) */ + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(DeleteFileA("test6.txt\\test1.txt"), "The file is not moved. Many files are specified\n"); + ok(DeleteFileA("test6.txt\\test2.txt"), "The file is not moved. Many files are specified\n"); + ok(DeleteFileA("test6.txt\\test4.txt\\test1.txt"), "The file is not moved. Many files are specified\n"); + ok(RemoveDirectoryA("test6.txt\\test4.txt"), "The directory is not moved. Many files are specified\n"); + RemoveDirectoryA("test6.txt"); + init_shfo_tests(); + } + else + { + ok(retval == ERROR_CANCELLED, "Expected ERROR_CANCELLED, got %d\n", retval); + ok(file_exists("test1.txt"), "The file is moved. Many files are specified\n"); + ok(dir_exists("test4.txt"), "The directory is moved. Many files are specified\n"); + } set_curr_dir_path(from, "test1.txt\0"); set_curr_dir_path(to, "test6.txt\0"); - ok(!SHFileOperationA(&shfo), "Move file\n"); - ok(!file_exists("test1.txt"), "The file is moved\n"); - ok(file_exists("test6.txt"), "The file is moved\n"); + ok(!SHFileOperationA(&shfo), "Move file failed\n"); + ok(!file_exists("test1.txt"), "The file is not moved\n"); + ok(file_exists("test6.txt"), "The file is not moved\n"); set_curr_dir_path(from, "test6.txt\0"); set_curr_dir_path(to, "test1.txt\0"); - ok(!SHFileOperationA(&shfo), "Move file back\n"); + ok(!SHFileOperationA(&shfo), "Move file back failed\n"); set_curr_dir_path(from, "test4.txt\0"); set_curr_dir_path(to, "test6.txt\0"); - ok(!SHFileOperationA(&shfo), "Move dir\n"); - ok(!file_exists("test4.txt"), "The dir is moved\n"); - ok(file_exists("test6.txt"), "The dir is moved\n"); + ok(!SHFileOperationA(&shfo), "Move dir failed\n"); + ok(!dir_exists("test4.txt"), "The dir is not moved\n"); + ok(dir_exists("test6.txt"), "The dir is moved\n"); set_curr_dir_path(from, "test6.txt\0"); set_curr_dir_path(to, "test4.txt\0"); - ok(!SHFileOperationA(&shfo), "Move dir back\n"); + ok(!SHFileOperationA(&shfo), "Move dir back failed\n"); /* move one file to two others */ init_shfo_tests(); shfo.pFrom = "test1.txt\0"; shfo.pTo = "a.txt\0b.txt\0"; retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(!file_exists("test1.txt"), "Expected test1.txt to not exist\n"); - ok(DeleteFile("a.txt"), "Expected a.txt to exist\n"); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(!file_exists("test1.txt"), "Expected test1.txt to not exist\n"); + ok(DeleteFile("a.txt"), "Expected a.txt to exist\n"); ok(!file_exists("b.txt"), "Expected b.txt to not exist\n"); /* move two files to one other */ shfo.pFrom = "test2.txt\0test3.txt\0"; shfo.pTo = "test1.txt\0"; retval = SHFileOperationA(&shfo); - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!file_exists("test1.txt"), "Expected test1.txt to not exist\n"); - ok(file_exists("test2.txt"), "Expected test2.txt to exist\n"); - ok(file_exists("test3.txt"), "Expected test3.txt to exist\n"); + if (dir_exists("test1.txt")) + { + /* Vista and W2K8 (broken or new behavior ?) */ + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(DeleteFileA("test1.txt\\test2.txt"), "Expected test1.txt\\test2.txt to exist\n"); + ok(DeleteFileA("test1.txt\\test3.txt"), "Expected test1.txt\\test3.txt to exist\n"); + RemoveDirectoryA("test1.txt"); + createTestFile("test2.txt"); + createTestFile("test3.txt"); + } + else + { + expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); + ok(!file_exists("test1.txt"), "Expected test1.txt to not exist\n"); + ok(file_exists("test2.txt"), "Expected test2.txt to exist\n"); + ok(file_exists("test3.txt"), "Expected test3.txt to exist\n"); + } /* move a directory into itself */ shfo.pFrom = "test4.txt\0"; shfo.pTo = "test4.txt\\b.txt\0"; retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS || + retval == ERROR_INVALID_VERIFY_SWITCH, /* Vista */ + "Expected ERROR_SUCCESS, got %d\n", retval); ok(!RemoveDirectory("test4.txt\\b.txt"), "Expected test4.txt\\b.txt to not exist\n"); - ok(file_exists("test4.txt"), "Expected test4.txt to exist\n"); + ok(dir_exists("test4.txt"), "Expected test4.txt to exist\n"); /* move many files without FOF_MULTIDESTFILES */ shfo.pFrom = "test2.txt\0test3.txt\0"; shfo.pTo = "d.txt\0e.txt\0"; retval = SHFileOperationA(&shfo); - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!DeleteFile("d.txt"), "Expected d.txt to not exist\n"); - ok(!DeleteFile("e.txt"), "Expected e.txt to not exist\n"); + if (dir_exists("d.txt")) + { + /* Vista and W2K8 (broken or new behavior ?) */ + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(DeleteFileA("d.txt\\test2.txt"), "Expected d.txt\\test2.txt to exist\n"); + ok(DeleteFileA("d.txt\\test3.txt"), "Expected d.txt\\test3.txt to exist\n"); + RemoveDirectoryA("d.txt"); + createTestFile("test2.txt"); + createTestFile("test3.txt"); + } + else + { + expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); + ok(!DeleteFile("d.txt"), "Expected d.txt to not exist\n"); + ok(!DeleteFile("e.txt"), "Expected e.txt to not exist\n"); + } /* number of sources != number of targets */ shfo.pTo = "d.txt\0"; shfo.fFlags |= FOF_MULTIDESTFILES; retval = SHFileOperationA(&shfo); - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!DeleteFile("d.txt"), "Expected d.txt to not exist\n"); + if (dir_exists("d.txt")) + { + /* Vista and W2K8 (broken or new behavior ?) */ + ok(retval == ERROR_NO_MORE_SEARCH_HANDLES, + "Expected ERROR_NO_MORE_SEARCH_HANDLES, got %d\n", retval); + ok(DeleteFileA("d.txt\\test2.txt"), "Expected d.txt\\test2.txt to exist\n"); + ok(!file_exists("d.txt\\test3.txt"), "Expected d.txt\\test3.txt to not exist\n"); + RemoveDirectoryA("d.txt"); + createTestFile("test2.txt"); + } + else + { + expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); + ok(!DeleteFile("d.txt"), "Expected d.txt to not exist\n"); + } /* FO_MOVE does not create dest directories */ shfo.pFrom = "test2.txt\0"; shfo.pTo = "dir1\\dir2\\test2.txt\0"; retval = SHFileOperationA(&shfo); - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!file_exists("dir1"), "Expected dir1 to not exist\n"); + if (dir_exists("dir1")) + { + /* Vista and W2K8 (broken or new behavior ?) */ + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(DeleteFileA("dir1\\dir2\\test2.txt"), "Expected dir1\\dir2\\test2.txt to exist\n"); + RemoveDirectoryA("dir1\\dir2"); + RemoveDirectoryA("dir1"); + createTestFile("test2.txt"); + } + else + { + expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); + } /* try to overwrite an existing file */ shfo.pTo = "test3.txt\0"; retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(!file_exists("test2.txt"), "Expected test2.txt to not exist\n"); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(!file_exists("test2.txt"), "Expected test2.txt to not exist\n"); ok(file_exists("test3.txt"), "Expected test3.txt to exist\n"); } diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 68e934f216c..932f54f93d6 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -2816,7 +2816,7 @@ HRESULT WINAPI SHInvokeDefaultCommand(HWND hWnd, IShellFolder* lpFolder, LPCITEM * * _SHPackDispParamsV */ -HRESULT WINAPI SHPackDispParamsV(DISPPARAMS *params, VARIANTARG *args, UINT cnt, va_list valist) +HRESULT WINAPI SHPackDispParamsV(DISPPARAMS *params, VARIANTARG *args, UINT cnt, __ms_va_list valist) { VARIANTARG *iter; @@ -2870,14 +2870,12 @@ HRESULT WINAPI SHPackDispParamsV(DISPPARAMS *params, VARIANTARG *args, UINT cnt, */ HRESULT WINAPIV SHPackDispParams(DISPPARAMS *params, VARIANTARG *args, UINT cnt, ...) { - va_list valist; + __ms_va_list valist; HRESULT hres; - va_start(valist, cnt); - + __ms_va_start(valist, cnt); hres = SHPackDispParamsV(params, args, cnt, valist); - - va_end(valist); + __ms_va_end(valist); return hres; } @@ -3003,7 +3001,7 @@ HRESULT WINAPIV IUnknown_CPContainerInvokeParam( IConnectionPoint *iCP; IConnectionPointContainer *iCPC; DISPPARAMS dispParams = {buffer, NULL, cParams, 0}; - va_list valist; + __ms_va_list valist; if (!container) return E_NOINTERFACE; @@ -3017,9 +3015,9 @@ HRESULT WINAPIV IUnknown_CPContainerInvokeParam( if(FAILED(result)) return result; - va_start(valist, cParams); + __ms_va_start(valist, cParams); SHPackDispParamsV(&dispParams, buffer, cParams, valist); - va_end(valist); + __ms_va_end(valist); result = SHLWAPI_InvokeByIID(iCP, riid, dispId, &dispParams); IConnectionPoint_Release(iCP); @@ -4311,10 +4309,10 @@ INT WINAPIV ShellMessageBoxWrapW(HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText, WCHAR szText[100], szTitle[100]; LPCWSTR pszText = szText, pszTitle = szTitle; LPWSTR pszTemp; - va_list args; + __ms_va_list args; int ret; - va_start(args, uType); + __ms_va_start(args, uType); TRACE("(%p,%p,%p,%p,%08x)\n", hInstance, hWnd, lpText, lpCaption, uType); @@ -4331,7 +4329,7 @@ INT WINAPIV ShellMessageBoxWrapW(HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText, FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args); - va_end(args); + __ms_va_end(args); ret = MessageBoxW(hWnd, pszTemp, pszTitle, uType); LocalFree(pszTemp); diff --git a/dlls/shlwapi/wsprintf.c b/dlls/shlwapi/wsprintf.c index d10881f02df..26bca5d68d6 100644 --- a/dlls/shlwapi/wsprintf.c +++ b/dlls/shlwapi/wsprintf.c @@ -284,7 +284,7 @@ static UINT WPRINTF_GetLen( WPRINTF_FORMAT *format, WPRINTF_DATA *arg, * Success: The number of characters written. * Failure: -1. */ -INT WINAPI wvnsprintfA( LPSTR buffer, INT maxlen, LPCSTR spec, va_list args ) +INT WINAPI wvnsprintfA( LPSTR buffer, INT maxlen, LPCSTR spec, __ms_va_list args ) { WPRINTF_FORMAT format; LPSTR p = buffer; @@ -389,7 +389,7 @@ INT WINAPI wvnsprintfA( LPSTR buffer, INT maxlen, LPCSTR spec, va_list args ) * * See wvnsprintfA. */ -INT WINAPI wvnsprintfW( LPWSTR buffer, INT maxlen, LPCWSTR spec, va_list args ) +INT WINAPI wvnsprintfW( LPWSTR buffer, INT maxlen, LPCWSTR spec, __ms_va_list args ) { WPRINTF_FORMAT format; LPWSTR p = buffer; @@ -504,12 +504,12 @@ INT WINAPI wvnsprintfW( LPWSTR buffer, INT maxlen, LPCWSTR spec, va_list args ) */ int WINAPIV wnsprintfA(LPSTR lpOut, int cchLimitIn, LPCSTR lpFmt, ...) { - va_list valist; + __ms_va_list valist; INT res; - va_start( valist, lpFmt ); + __ms_va_start( valist, lpFmt ); res = wvnsprintfA( lpOut, cchLimitIn, lpFmt, valist ); - va_end( valist ); + __ms_va_end( valist ); return res; } @@ -521,11 +521,11 @@ int WINAPIV wnsprintfA(LPSTR lpOut, int cchLimitIn, LPCSTR lpFmt, ...) */ int WINAPIV wnsprintfW(LPWSTR lpOut, int cchLimitIn, LPCWSTR lpFmt, ...) { - va_list valist; + __ms_va_list valist; INT res; - va_start( valist, lpFmt ); + __ms_va_start( valist, lpFmt ); res = wvnsprintfW( lpOut, cchLimitIn, lpFmt, valist ); - va_end( valist ); + __ms_va_end( valist ); return res; } diff --git a/dlls/urlmon/tests/misc.c b/dlls/urlmon/tests/misc.c index 6d3305e5752..1de010d4ec8 100644 --- a/dlls/urlmon/tests/misc.c +++ b/dlls/urlmon/tests/misc.c @@ -1305,18 +1305,20 @@ static void test_ReleaseBindInfo(void) static void test_CopyStgMedium(void) { STGMEDIUM src, dst; + HGLOBAL empty; HRESULT hres; static WCHAR fileW[] = {'f','i','l','e',0}; memset(&src, 0xf0, sizeof(src)); memset(&dst, 0xe0, sizeof(dst)); + memset(&empty, 0xf0, sizeof(empty)); src.tymed = TYMED_NULL; src.pUnkForRelease = NULL; hres = CopyStgMedium(&src, &dst); ok(hres == S_OK, "CopyStgMedium failed: %08x\n", hres); ok(dst.tymed == TYMED_NULL, "tymed=%d\n", dst.tymed); - ok(dst.u.hGlobal == (void*)0xf0f0f0f0, "u=%p\n", dst.u.hGlobal); + ok(dst.u.hGlobal == empty, "u=%p\n", dst.u.hGlobal); ok(!dst.pUnkForRelease, "pUnkForRelease=%p, expected NULL\n", dst.pUnkForRelease); memset(&dst, 0xe0, sizeof(dst)); diff --git a/dlls/user32/class.c b/dlls/user32/class.c index 418c86e6526..e94cd2bba0d 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -135,7 +135,7 @@ static BOOL set_server_info( HWND hwnd, INT offset, LONG_PTR newval, UINT size ) { case GCW_ATOM: req->flags = SET_CLASS_ATOM; - req->atom = newval; + req->atom = LOWORD(newval); case GCL_STYLE: req->flags = SET_CLASS_STYLE; req->style = newval; @@ -146,7 +146,7 @@ static BOOL set_server_info( HWND hwnd, INT offset, LONG_PTR newval, UINT size ) break; case GCLP_HMODULE: req->flags = SET_CLASS_INSTANCE; - req->instance = (void *)newval; + req->instance = wine_server_client_ptr( (void *)newval ); break; default: assert( offset >= 0 ); @@ -275,7 +275,7 @@ void CLASS_FreeModuleClasses( HMODULE16 hModule ) SERVER_START_REQ( destroy_class ) { req->atom = class->atomName; - req->instance = class->hInstance; + req->instance = wine_server_client_ptr( class->hInstance ); ret = !wine_server_call_err( req ); } SERVER_END_REQ; @@ -354,10 +354,10 @@ static CLASS *CLASS_RegisterClass( LPCWSTR name, HINSTANCE hInstance, BOOL local { req->local = local; req->style = style; - req->instance = hInstance; + req->instance = wine_server_client_ptr( hInstance ); req->extra = classExtra; req->win_extra = winExtra; - req->client_ptr = classPtr; + req->client_ptr = wine_server_client_ptr( classPtr ); req->atom = classPtr->atomName; if (!req->atom && name) wine_server_add_data( req, name, strlenW(name) * sizeof(WCHAR) ); ret = !wine_server_call_err( req ); @@ -625,10 +625,10 @@ BOOL WINAPI UnregisterClassW( LPCWSTR className, HINSTANCE hInstance ) SERVER_START_REQ( destroy_class ) { - req->instance = hInstance; + req->instance = wine_server_client_ptr( hInstance ); if (!(req->atom = get_int_atom_value(className)) && className) wine_server_add_data( req, className, strlenW(className) * sizeof(WCHAR) ); - if (!wine_server_call_err( req )) classPtr = reply->client_ptr; + if (!wine_server_call_err( req )) classPtr = wine_server_get_ptr( reply->client_ptr ); } SERVER_END_REQ; @@ -718,7 +718,7 @@ static ULONG_PTR CLASS_GetClassLong( HWND hwnd, INT offset, UINT size, retvalue = reply->old_extra; break; case GCLP_HMODULE: - retvalue = (ULONG_PTR)reply->old_instance; + retvalue = (ULONG_PTR)wine_server_get_ptr( reply->old_instance ); break; case GCW_ATOM: retvalue = reply->old_atom; diff --git a/dlls/user32/hook.c b/dlls/user32/hook.c index c70af45f922..bd1994c350d 100644 --- a/dlls/user32/hook.c +++ b/dlls/user32/hook.c @@ -184,10 +184,10 @@ static HHOOK set_windows_hook( INT id, HOOKPROC proc, HINSTANCE inst, DWORD tid, req->unicode = unicode; if (inst) /* make proc relative to the module base */ { - req->proc = (void *)((char *)proc - (char *)inst); + req->proc = wine_server_client_ptr( (void *)((char *)proc - (char *)inst) ); wine_server_add_data( req, module, strlenW(module) * sizeof(WCHAR) ); } - else req->proc = proc; + else req->proc = wine_server_client_ptr( proc ); if (!wine_server_call_err( req )) { @@ -420,7 +420,7 @@ LRESULT HOOK_CallHooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL uni info.handle = wine_server_ptr_handle( reply->handle ); info.pid = reply->pid; info.tid = reply->tid; - info.proc = reply->proc; + info.proc = wine_server_get_ptr( reply->proc ); info.next_unicode = reply->unicode; thread_info->active_hooks = reply->active_hooks; } @@ -500,7 +500,7 @@ BOOL WINAPI UnhookWindowsHook( INT id, HOOKPROC proc ) { req->handle = 0; req->id = id; - req->proc = proc; + req->proc = wine_server_client_ptr( proc ); ret = !wine_server_call_err( req ); if (ret) get_user_thread_info()->active_hooks = reply->active_hooks; } @@ -554,7 +554,7 @@ LRESULT WINAPI CallNextHookEx( HHOOK hhook, INT code, WPARAM wparam, LPARAM lpar info.id = reply->id; info.pid = reply->pid; info.tid = reply->tid; - info.proc = reply->proc; + info.proc = wine_server_get_ptr( reply->proc ); info.next_unicode = reply->unicode; } } @@ -584,7 +584,7 @@ LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) info.id = reply->id; info.pid = reply->pid; info.tid = reply->tid; - info.proc = reply->proc; + info.proc = wine_server_get_ptr( reply->proc ); info.next_unicode = reply->unicode; } } @@ -676,10 +676,10 @@ HWINEVENTHOOK WINAPI SetWinEventHook(DWORD event_min, DWORD event_max, req->unicode = 1; if (inst) /* make proc relative to the module base */ { - req->proc = (void *)((char *)proc - (char *)inst); + req->proc = wine_server_client_ptr( (void *)((char *)proc - (char *)inst) ); wine_server_add_data( req, module, strlenW(module) * sizeof(WCHAR) ); } - else req->proc = proc; + else req->proc = wine_server_client_ptr( proc ); if (!wine_server_call_err( req )) { @@ -746,7 +746,7 @@ static inline BOOL find_first_hook(DWORD id, DWORD event, HWND hwnd, LONG object { info->module[wine_server_reply_size(req) / sizeof(WCHAR)] = 0; info->handle = wine_server_ptr_handle( reply->handle ); - info->proc = reply->proc; + info->proc = wine_server_get_ptr( reply->proc ); info->tid = reply->tid; thread_info->active_hooks = reply->active_hooks; } @@ -774,7 +774,7 @@ static inline BOOL find_next_hook(DWORD event, HWND hwnd, LONG object_id, { info->module[wine_server_reply_size(req) / sizeof(WCHAR)] = 0; info->handle = wine_server_ptr_handle( reply->handle ); - info->proc = reply->proc; + info->proc = wine_server_get_ptr( reply->proc ); info->tid = reply->tid; } } diff --git a/dlls/user32/message.c b/dlls/user32/message.c index d9734629132..5719664b522 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -2025,7 +2025,6 @@ static inline void call_sendmsg_callback( SENDASYNCPROC callback, HWND hwnd, UIN static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags, UINT changed_mask ) { LRESULT result; - ULONG_PTR extra_info = 0; struct user_thread_info *thread_info = get_user_thread_info(); struct received_message_info info, *old_info; unsigned int hw_id = 0; /* id of previous hardware message */ @@ -2059,10 +2058,9 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags info.msg.wParam = reply->wparam; info.msg.lParam = reply->lparam; info.msg.time = reply->time; - info.msg.pt.x = reply->x; - info.msg.pt.y = reply->y; - hw_id = reply->hw_id; - extra_info = reply->info; + info.msg.pt.x = 0; + info.msg.pt.y = 0; + hw_id = 0; thread_info->active_hooks = reply->active_hooks; } else buffer_size = reply->total; @@ -2098,7 +2096,7 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags if (size >= sizeof(struct callback_msg_data)) { const struct callback_msg_data *data = buffer; - call_sendmsg_callback( data->callback, info.msg.hwnd, + call_sendmsg_callback( wine_server_get_ptr(data->callback), info.msg.hwnd, info.msg.message, data->data, data->result ); } continue; @@ -2108,7 +2106,7 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags WINEVENTPROC hook_proc; const struct winevent_msg_data *data = buffer; - hook_proc = data->hook_proc; + hook_proc = wine_server_get_ptr( data->hook_proc ); size -= sizeof(*data); if (size) { @@ -2151,14 +2149,27 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags } break; case MSG_HARDWARE: - if (!process_hardware_message( &info.msg, hw_id, extra_info, - hwnd, first, last, flags & PM_REMOVE )) + if (size >= sizeof(struct hardware_msg_data)) { - TRACE("dropping msg %x\n", info.msg.message ); - continue; /* ignore it */ + const struct hardware_msg_data *data = buffer; + info.msg.pt.x = data->x; + info.msg.pt.y = data->y; + hw_id = data->hw_id; + if (!process_hardware_message( &info.msg, hw_id, data->info, + hwnd, first, last, flags & PM_REMOVE )) + { + TRACE("dropping msg %x\n", info.msg.message ); + continue; /* ignore it */ + } + *msg = info.msg; + thread_info->GetMessagePosVal = MAKELONG( info.msg.pt.x, info.msg.pt.y ); + thread_info->GetMessageTimeVal = info.msg.time; + thread_info->GetMessageExtraInfoVal = data->info; + if (buffer != local_buffer) HeapFree( GetProcessHeap(), 0, buffer ); + HOOK_CallHooks( WH_GETMESSAGE, HC_ACTION, flags & PM_REMOVE, (LPARAM)msg, TRUE ); + return TRUE; } - thread_info->GetMessagePosVal = MAKELONG( info.msg.pt.x, info.msg.pt.y ); - /* fall through */ + continue; case MSG_POSTED: if (info.msg.message & 0x80000000) /* internal message */ { @@ -2184,7 +2195,7 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags msg->pt.x = (short)LOWORD( thread_info->GetMessagePosVal ); msg->pt.y = (short)HIWORD( thread_info->GetMessagePosVal ); thread_info->GetMessageTimeVal = info.msg.time; - thread_info->GetMessageExtraInfoVal = extra_info; + thread_info->GetMessageExtraInfoVal = 0; if (buffer != local_buffer) HeapFree( GetProcessHeap(), 0, buffer ); HOOK_CallHooks( WH_GETMESSAGE, HC_ACTION, flags & PM_REMOVE, (LPARAM)msg, TRUE ); return TRUE; @@ -2322,7 +2333,7 @@ static BOOL put_message_in_queue( const struct send_message_info *info, size_t * } else if (info->type == MSG_CALLBACK) { - msg_data.callback.callback = info->callback; + msg_data.callback.callback = wine_server_client_ptr( info->callback ); msg_data.callback.data = info->data; msg_data.callback.result = 0; data.data[0] = &msg_data; @@ -3573,7 +3584,7 @@ UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc ) req->msg = WM_TIMER; req->id = id; req->rate = max( timeout, SYS_TIMER_RATE ); - req->lparam = (unsigned long)winproc; + req->lparam = (ULONG_PTR)winproc; if (!wine_server_call_err( req )) { ret = reply->id; @@ -3604,7 +3615,7 @@ UINT_PTR WINAPI SetSystemTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC req->msg = WM_SYSTIMER; req->id = id; req->rate = max( timeout, SYS_TIMER_RATE ); - req->lparam = (unsigned long)winproc; + req->lparam = (ULONG_PTR)winproc; if (!wine_server_call_err( req )) { ret = reply->id; diff --git a/dlls/user32/spy.c b/dlls/user32/spy.c index 59fa410c808..beb21fcf74d 100644 --- a/dlls/user32/spy.c +++ b/dlls/user32/spy.c @@ -1511,9 +1511,10 @@ static const USER_MSG toolbar_array[] = { USM(TB_GETSTRINGW ,0), USM(TB_GETSTRINGA ,0), USM(TB_UNKWN45D ,8), - USM(TB_UNKWN45E ,0), - USM(TB_UNKWN460 ,0), - USM(TB_UNKWN463 ,8), + USM(TB_SETHOTITEM2 ,0), + USM(TB_SETLISTGAP ,0), + USM(TB_GETIMAGELISTCOUNT ,0), + USM(TB_GETIDEALSIZE ,8), USM(TB_UNKWN464 ,0), {0,0,0} }; diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 9d72688b768..92dc912eab5 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -86,6 +86,9 @@ enum spi_index SPI_SETFOREGROUNDLOCKTIMEOUT_IDX, SPI_CARETWIDTH_IDX, SPI_SETMOUSESPEED_IDX, + SPI_SETFONTSMOOTHINGTYPE_IDX, + SPI_SETFONTSMOOTHINGCONTRAST_IDX, + SPI_SETFONTSMOOTHINGORIENTATION_IDX, SPI_INDEX_COUNT }; @@ -224,6 +227,12 @@ static const WCHAR SPI_CARETWIDTH_REGKEY[]= {'C','o','n','t',' static const WCHAR SPI_CARETWIDTH_VALNAME[]= {'C','a','r','e','t','W','i','d','t','h',0}; static const WCHAR SPI_SETMOUSESPEED_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','M','o','u','s','e',0}; static const WCHAR SPI_SETMOUSESPEED_VALNAME[]= {'M','o','u','s','e','S','e','n','s','i','t','i','v','i','t','y',0}; +static const WCHAR SPI_SETFONTSMOOTHINGTYPE_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p',0}; +static const WCHAR SPI_SETFONTSMOOTHINGTYPE_VALNAME[]= {'F','o','n','t','S','m','o','o','t','h','i','n','g','T','y','p','e',0}; +static const WCHAR SPI_SETFONTSMOOTHINGCONTRAST_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p',0}; +static const WCHAR SPI_SETFONTSMOOTHINGCONTRAST_VALNAME[]= {'F','o','n','t','S','m','o','o','t','h','i','n','g','G','a','m','m','a',0}; +static const WCHAR SPI_SETFONTSMOOTHINGORIENTATION_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p',0}; +static const WCHAR SPI_SETFONTSMOOTHINGORIENTATION_VALNAME[]= {'F','o','n','t','S','m','o','o','t','h','i','n','g','O','r','i','e','n','t','a','t','i','o','n',0}; /* FIXME - real values */ static const WCHAR SPI_SETSCREENSAVERRUNNING_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p',0}; @@ -316,6 +325,9 @@ static BOOL swap_buttons = FALSE; static UINT foreground_lock_timeout = 0; static UINT caret_width = 1; static UINT mouse_sensitivity = 10; +static UINT font_smoothing_type = 0; +static UINT font_smoothing_contrast = 0; +static UINT font_smoothing_orientation = 0; static BYTE user_prefs[4]; static MINIMIZEDMETRICS minimized_metrics = @@ -1986,7 +1998,10 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam, SPI_SETFONTSMOOTHING_REGKEY, SPI_SETFONTSMOOTHING_VALNAME, &font_smoothing, &tmpval ); - *(UINT *) pvParam = ( tmpval != 0); + if (!pvParam) ret = FALSE; + + if (ret) + *(UINT *) pvParam = ( tmpval != 0); break; } case SPI_SETFONTSMOOTHING: @@ -2170,11 +2185,10 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam, break; case SPI_SETMOUSESPEED: /* 113 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */ - if (!pvParam) return FALSE; ret = set_uint_param( SPI_SETMOUSESPEED_IDX, SPI_SETMOUSESPEED_REGKEY, SPI_SETMOUSESPEED_VALNAME, - &mouse_sensitivity, *(UINT *) pvParam, fWinIni ); + &mouse_sensitivity, PtrToInt(pvParam), fWinIni ); break; @@ -2358,16 +2372,98 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam, WINE_SPI_FIXME(SPI_GETMOUSECLICKLOCKTIME); /* 0x2008 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */ WINE_SPI_FIXME(SPI_SETMOUSECLICKLOCKTIME); /* 0x2009 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */ - WINE_SPI_FIXME(SPI_GETFONTSMOOTHINGTYPE); /* 0x200A _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */ - WINE_SPI_FIXME(SPI_SETFONTSMOOTHINGTYPE); /* 0x200B _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */ - WINE_SPI_FIXME(SPI_GETFONTSMOOTHINGCONTRAST);/* 0x200C _WIN32_WINNT >= 0x510 */ - WINE_SPI_FIXME(SPI_SETFONTSMOOTHINGCONTRAST);/* 0x200D _WIN32_WINNT >= 0x510 */ + case SPI_GETFONTSMOOTHINGTYPE: /* 0x200A _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */ + spi_idx = SPI_SETFONTSMOOTHINGTYPE_IDX; + if (!spi_loaded[spi_idx]) + { + ret = SYSPARAMS_Load( SPI_SETFONTSMOOTHINGTYPE_REGKEY, + SPI_SETFONTSMOOTHINGTYPE_VALNAME, + (LPWSTR)&font_smoothing_type, + sizeof(font_smoothing_type) ); + if ( ret) spi_loaded[spi_idx] = TRUE; + } + if (!pvParam) ret = FALSE; + + if (ret) + *(UINT *)pvParam = font_smoothing_type; + break; + + case SPI_SETFONTSMOOTHINGTYPE: /* 0x200B _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */ + spi_idx = SPI_SETFONTSMOOTHINGTYPE_IDX; + if (SYSPARAMS_SaveRaw( SPI_SETFONTSMOOTHINGTYPE_REGKEY, + SPI_SETFONTSMOOTHINGTYPE_VALNAME, + (LPBYTE)&pvParam, sizeof(UINT), REG_DWORD, fWinIni )) + { + font_smoothing_type = (UINT)pvParam; + spi_loaded[spi_idx] = TRUE; + } + else + ret = FALSE; + break; + + case SPI_GETFONTSMOOTHINGCONTRAST: /* 0x200C _WIN32_WINNT >= 0x510 */ + spi_idx = SPI_SETFONTSMOOTHINGCONTRAST_IDX; + if (!spi_loaded[spi_idx]) + { + ret = SYSPARAMS_Load( SPI_SETFONTSMOOTHINGCONTRAST_REGKEY, + SPI_SETFONTSMOOTHINGCONTRAST_VALNAME, + (LPWSTR)&font_smoothing_contrast, + sizeof(font_smoothing_contrast) ); + if (ret) + spi_loaded[spi_idx] = TRUE; + } + if (!pvParam) ret = FALSE; + + if (ret) + *(UINT *)pvParam = font_smoothing_contrast; + break; + + case SPI_SETFONTSMOOTHINGCONTRAST: /* 0x200D _WIN32_WINNT >= 0x510 */ + spi_idx = SPI_SETFONTSMOOTHINGCONTRAST_IDX; + if (SYSPARAMS_SaveRaw( SPI_SETFONTSMOOTHINGCONTRAST_REGKEY, + SPI_SETFONTSMOOTHINGCONTRAST_VALNAME, + (LPBYTE)&pvParam, sizeof(UINT), REG_DWORD, fWinIni )) + { + font_smoothing_contrast = (UINT)pvParam; + spi_loaded[spi_idx] = TRUE; + } + else + ret = FALSE; + break; + WINE_SPI_FIXME(SPI_GETFOCUSBORDERWIDTH); /* 0x200E _WIN32_WINNT >= 0x510 */ WINE_SPI_FIXME(SPI_SETFOCUSBORDERWIDTH); /* 0x200F _WIN32_WINNT >= 0x510 */ WINE_SPI_FIXME(SPI_GETFOCUSBORDERHEIGHT); /* 0x2010 _WIN32_WINNT >= 0x510 */ WINE_SPI_FIXME(SPI_SETFOCUSBORDERHEIGHT); /* 0x2011 _WIN32_WINNT >= 0x510 */ - WINE_SPI_FIXME(SPI_GETFONTSMOOTHINGORIENTATION); /* 0x2012 */ - WINE_SPI_FIXME(SPI_SETFONTSMOOTHINGORIENTATION); /* 0x2013 */ + case SPI_GETFONTSMOOTHINGORIENTATION: /* 0x2012 */ + spi_idx = SPI_SETFONTSMOOTHINGORIENTATION_IDX; + if (!spi_loaded[spi_idx]) + { + ret = SYSPARAMS_Load( SPI_SETFONTSMOOTHINGORIENTATION_REGKEY, + SPI_SETFONTSMOOTHINGORIENTATION_VALNAME, + (LPWSTR)&font_smoothing_orientation, + sizeof(font_smoothing_orientation) ); + if (ret) + spi_loaded[spi_idx] = TRUE; + } + if (!pvParam) ret = FALSE; + + if (ret) + *(UINT *)pvParam = font_smoothing_orientation; + break; + + case SPI_SETFONTSMOOTHINGORIENTATION: /* 0x2013 */ + spi_idx = SPI_SETFONTSMOOTHINGORIENTATION_IDX; + if (SYSPARAMS_SaveRaw( SPI_SETFONTSMOOTHINGORIENTATION_REGKEY, + SPI_SETFONTSMOOTHINGORIENTATION_VALNAME, + (LPBYTE)&pvParam, sizeof(UINT), REG_DWORD, fWinIni )) + { + font_smoothing_orientation = (UINT)pvParam; + spi_loaded[spi_idx] = TRUE; + } + else + ret = FALSE; + break; default: FIXME( "Unknown action: %u\n", uiAction ); diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c index 51660072a59..cc5586429d9 100644 --- a/dlls/user32/tests/combo.c +++ b/dlls/user32/tests/combo.c @@ -303,10 +303,8 @@ static void test_WM_LBUTTONDOWN(void) hEdit = cbInfo.hwndItem; hList = cbInfo.hwndList; - trace("hMainWnd=%x, hCombo=%x, hList=%x, hEdit=%x\n", - (UINT)hMainWnd, (UINT)hCombo, (UINT)hList, (UINT)hEdit); - ok(GetFocus() == hMainWnd, "Focus not on Main Window, instead on %x\n", - (UINT)GetFocus()); + trace("hMainWnd=%p, hCombo=%p, hList=%p, hEdit=%p\n", hMainWnd, hCombo, hList, hEdit); + ok(GetFocus() == hMainWnd, "Focus not on Main Window, instead on %p\n", GetFocus()); /* Click on the button to drop down the list */ x = cbInfo.rcButton.left + (cbInfo.rcButton.right-cbInfo.rcButton.left)/2; @@ -318,14 +316,12 @@ static void test_WM_LBUTTONDOWN(void) "The dropdown list should have appeared after clicking the button.\n"); ok(GetFocus() == hEdit, - "Focus not on ComboBox's Edit Control, instead on %x\n", - (UINT)GetFocus()); + "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); result = SendMessage(hCombo, WM_LBUTTONUP, 0, MAKELPARAM(x, y)); ok(result, "WM_LBUTTONUP was not processed. LastError=%d\n", GetLastError()); ok(GetFocus() == hEdit, - "Focus not on ComboBox's Edit Control, instead on %x\n", - (UINT)GetFocus()); + "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); /* Click on the 5th item in the list */ item_height = SendMessage(hCombo, CB_GETITEMHEIGHT, 0, 0); @@ -336,15 +332,13 @@ static void test_WM_LBUTTONDOWN(void) ok(!result, "WM_LBUTTONDOWN was not processed. LastError=%d\n", GetLastError()); ok(GetFocus() == hEdit, - "Focus not on ComboBox's Edit Control, instead on %x\n", - (UINT)GetFocus()); + "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); result = SendMessage(hList, WM_MOUSEMOVE, 0, MAKELPARAM(x, y)); ok(!result, "WM_MOUSEMOVE was not processed. LastError=%d\n", GetLastError()); ok(GetFocus() == hEdit, - "Focus not on ComboBox's Edit Control, instead on %x\n", - (UINT)GetFocus()); + "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); ok(SendMessage(hCombo, CB_GETDROPPEDSTATE, 0, 0), "The dropdown list should still be visible.\n"); @@ -352,8 +346,7 @@ static void test_WM_LBUTTONDOWN(void) ok(!result, "WM_LBUTTONUP was not processed. LastError=%d\n", GetLastError()); ok(GetFocus() == hEdit, - "Focus not on ComboBox's Edit Control, instead on %x\n", - (UINT)GetFocus()); + "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); ok(!SendMessage(hCombo, CB_GETDROPPEDSTATE, 0, 0), "The dropdown list should have been rolled up.\n"); idx = SendMessage(hCombo, CB_GETCURSEL, 0, 0); diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index 5d1cf2bde1e..fc1ceaa7f8e 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -175,7 +175,7 @@ static void do_parent(void) startup.dwFlags = STARTF_USESHOWWINDOW; startup.wShowWindow = SW_SHOWNORMAL; - sprintf(path_name, "%s cursoricon %x", test_argv[0], (unsigned int) parent); + sprintf(path_name, "%s cursoricon %lx", test_argv[0], (INT_PTR)parent); ok(CreateProcessA(NULL, path_name, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess failed.\n"); child_process = info.hProcess; diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c index dafb68c00ff..f11e0fecb45 100644 --- a/dlls/user32/tests/dde.c +++ b/dlls/user32/tests/dde.c @@ -160,7 +160,7 @@ static LRESULT WINAPI dde_server_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA lstrcpyA((LPSTR)data->Value, str); GlobalUnlock(hglobal); - lparam = PackDDElParam(WM_DDE_ACK, (UINT)hglobal, HIWORD(lparam)); + lparam = PackDDElParam(WM_DDE_ACK, (UINT_PTR)hglobal, HIWORD(lparam)); PostMessageA(client, WM_DDE_DATA, (WPARAM)hwnd, lparam); break; diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index c8723576335..6c89f6278f0 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -50,7 +50,7 @@ static HWND create_listbox (DWORD add_style, HWND parent) { HWND handle; - int ctl_id=0; + INT_PTR ctl_id=0; if (parent) ctl_id=1; handle=CreateWindow ("LISTBOX", "TestList", diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c index adc9410d22c..c0a5f025ae0 100644 --- a/dlls/user32/tests/menu.c +++ b/dlls/user32/tests/menu.c @@ -285,7 +285,7 @@ static void test_menu_ownerdraw(void) NULL, NULL, NULL, NULL); ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); if( !hwnd) return; - SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG)menu_ownerdraw_wnd_proc); + SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc); hmenu = CreatePopupMenu(); ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); if( !hmenu) { DestroyWindow(hwnd);return;} @@ -538,7 +538,7 @@ static void test_menu_bmp_and_string(void) ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); if( !hwnd) return; - SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG)menu_ownerdraw_wnd_proc); + SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc); if( winetest_debug) trace(" check %d,%d arrow %d avechar %d\n", @@ -552,7 +552,7 @@ static void test_menu_bmp_and_string(void) for( szidx=0; szidx < sizeof( bmsizes) / sizeof( SIZE); szidx++) { HBITMAP hbm = CreateBitmap( bmsizes[szidx].cx, bmsizes[szidx].cy,1,1,bmfill); HBITMAP bitmaps[] = { HBMMENU_CALLBACK, hbm, NULL }; - ok( (int)hbm, "CreateBitmap failed err %d\n", GetLastError()); + ok( hbm != 0, "CreateBitmap failed err %d\n", GetLastError()); for( txtidx = 0; txtidx < sizeof(MOD_txtsizes)/sizeof(MOD_txtsizes[0]); txtidx++) { for( hassub = 0; hassub < 2 ; hassub++) { /* add submenu item */ for( mnuopt = 0; mnuopt < 3 ; mnuopt++){ /* test MNS_NOCHECK/MNS_CHECKORBMP */ @@ -1607,7 +1607,7 @@ static void test_menu_search_bycommand( void ) rc = GetMenuItemInfo(hmenu, (UINT_PTR)hmenuSub2, FALSE, &info); ok (rc, "Getting the menus info failed\n"); - ok (info.wID == (UINT)hmenuSub2, "IDs differ for popup menu\n"); + ok (info.wID == (UINT_PTR)hmenuSub2, "IDs differ for popup menu\n"); ok (!strcmp(info.dwTypeData, "Submenu2"), "Returned item has wrong label (%s)\n", info.dwTypeData); DestroyMenu( hmenu ); @@ -1872,7 +1872,7 @@ static void test_menu_flags( void ) hMenu = CreateMenu(); hPopupMenu = CreatePopupMenu(); - AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT)hPopupMenu, "Popup"); + AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT_PTR)hPopupMenu, "Popup"); AppendMenu(hPopupMenu, MF_STRING | MF_HILITE | MF_DEFAULT, 101, "Item 1"); InsertMenu(hPopupMenu, 1, MF_BYPOSITION | MF_STRING | MF_HILITE | MF_DEFAULT, 102, "Item 2"); @@ -1920,7 +1920,7 @@ static void test_menu_hilitemenuitem( void ) hMenu = CreateMenu(); hPopupMenu = CreatePopupMenu(); - AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT)hPopupMenu, "Popup"); + AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT_PTR)hPopupMenu, "Popup"); AppendMenu(hPopupMenu, MF_STRING, 101, "Item 1"); AppendMenu(hPopupMenu, MF_STRING, 102, "Item 2"); @@ -2053,7 +2053,7 @@ static void check_menu_items(HMENU hmenu, UINT checked_cmd, UINT checked_type, #endif if (mii.hSubMenu) { - ok((HMENU)mii.wID == mii.hSubMenu, "id %u: wID should be equal to hSubMenu\n", checked_cmd); + ok(mii.wID == (UINT_PTR)mii.hSubMenu, "id %u: wID should be equal to hSubMenu\n", checked_cmd); check_menu_items(mii.hSubMenu, checked_cmd, checked_type, checked_state); } else diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 0d9d4264243..4bb495c6d15 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -1072,10 +1072,11 @@ static void test_shell_window(void) static char mdi_lParam_test_message[] = "just a test string"; -static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) +static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) { MDICREATESTRUCTA mdi_cs; HWND mdi_child; + INT_PTR id; static const WCHAR classW[] = {'M','D','I','_','c','h','i','l','d','_','C','l','a','s','s','_','1',0}; static const WCHAR titleW[] = {'M','D','I',' ','c','h','i','l','d',0}; BOOL isWin9x = FALSE; @@ -1091,14 +1092,16 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) mdi_cs.lParam = (LPARAM)mdi_lParam_test_message; mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs); ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == first_id, "wrong child id %ld\n", id); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); mdi_cs.style = 0x7fffffff; /* without WS_POPUP */ mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs); ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == first_id, "wrong child id %ld\n", id); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); @@ -1111,7 +1114,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) else { ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == first_id, "wrong child id %ld\n", id); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); } @@ -1132,7 +1136,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) } else { - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == first_id, "wrong child id %ld\n", id); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); } @@ -1144,7 +1149,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) mdi_client, GetModuleHandle(0), (LPARAM)mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == first_id, "wrong child id %ld\n", id); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); @@ -1155,7 +1161,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) mdi_client, GetModuleHandle(0), (LPARAM)mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == first_id, "wrong child id %ld\n", id); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); @@ -1172,7 +1179,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) else { ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == first_id, "wrong child id %ld\n", id); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); } @@ -1194,7 +1202,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) } else { - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == first_id, "wrong child id %ld\n", id); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); } @@ -1206,7 +1215,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) mdi_client, 0, GetModuleHandle(0), (LPVOID)mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == first_id, "wrong child id %ld\n", id); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); @@ -1217,7 +1227,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) mdi_client, 0, GetModuleHandle(0), (LPVOID)mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == first_id, "wrong child id %ld\n", id); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); @@ -1234,7 +1245,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) else { ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == first_id, "wrong child id %ld\n", id); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); } @@ -1256,7 +1268,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) } else { - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == first_id, "wrong child id %ld\n", id); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); } @@ -1280,7 +1293,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) mdi_client, 0, GetModuleHandle(0), (LPVOID)mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == 0, "wrong child id %ld\n", id); DestroyWindow(mdi_child); mdi_child = CreateWindowExA(0, "MDI_child_Class_2", "MDI child", @@ -1290,7 +1304,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) mdi_client, 0, GetModuleHandle(0), (LPVOID)mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == 0, "wrong child id %ld\n", id); DestroyWindow(mdi_child); /* maximized child */ @@ -1301,7 +1316,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) mdi_client, 0, GetModuleHandle(0), (LPVOID)mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == 0, "wrong child id %ld\n", id); DestroyWindow(mdi_child); trace("Creating maximized child with a caption\n"); @@ -1312,7 +1328,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) mdi_client, 0, GetModuleHandle(0), (LPVOID)mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == 0, "wrong child id %ld\n", id); DestroyWindow(mdi_child); trace("Creating maximized child with a caption and a thick frame\n"); @@ -1323,7 +1340,8 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id) mdi_client, 0, GetModuleHandle(0), (LPVOID)mdi_lParam_test_message); ok(mdi_child != 0, "MDI child creation failed\n"); - ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %d\n", GetWindowLongPtrA(mdi_child, GWLP_ID)); + id = GetWindowLongPtrA(mdi_child, GWLP_ID); + ok(id == 0, "wrong child id %ld\n", id); DestroyWindow(mdi_child); } @@ -4025,10 +4043,10 @@ static void test_CreateWindow(void) ok(GetMenu(window) == (HMENU)menu, "GetMenu error %d\n", GetLastError()) #define expect_style(window, style)\ - ok(GetWindowLong(window, GWL_STYLE) == (style), "expected style %x != %x\n", (LONG)(style), GetWindowLong(window, GWL_STYLE)) + ok((ULONG)GetWindowLong(window, GWL_STYLE) == (style), "expected style %x != %x\n", (LONG)(style), GetWindowLong(window, GWL_STYLE)) #define expect_ex_style(window, ex_style)\ - ok(GetWindowLong(window, GWL_EXSTYLE) == (ex_style), "expected ex_style %x != %x\n", (LONG)(ex_style), GetWindowLong(window, GWL_EXSTYLE)) + ok((ULONG)GetWindowLong(window, GWL_EXSTYLE) == (ex_style), "expected ex_style %x != %x\n", (LONG)(ex_style), GetWindowLong(window, GWL_EXSTYLE)) #define expect_gle_broken_9x(gle)\ ok(GetLastError() == gle ||\ diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 34491fe319a..08649e898a2 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -112,16 +112,16 @@ static WND *create_window_handle( HWND parent, HWND owner, LPCWSTR name, { req->parent = wine_server_user_handle( parent ); req->owner = wine_server_user_handle( owner ); - req->instance = instance; + req->instance = wine_server_client_ptr( instance ); if (!(req->atom = get_int_atom_value( name )) && name) wine_server_add_data( req, name, strlenW(name)*sizeof(WCHAR) ); if (!wine_server_call_err( req )) { - handle = wine_server_ptr_handle( reply->handle ); + handle = wine_server_ptr_handle( reply->handle ); full_parent = wine_server_ptr_handle( reply->parent ); full_owner = wine_server_ptr_handle( reply->owner ); extra_bytes = reply->extra; - class = reply->class_ptr; + class = wine_server_get_ptr( reply->class_ptr ); } } SERVER_END_REQ; @@ -1119,7 +1119,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, LPCWSTR className, UINT flags req->flags = SET_WIN_STYLE | SET_WIN_EXSTYLE | SET_WIN_INSTANCE | SET_WIN_UNICODE; req->style = wndPtr->dwStyle; req->ex_style = wndPtr->dwExStyle; - req->instance = (void *)wndPtr->hInstance; + req->instance = wine_server_client_ptr( wndPtr->hInstance ); req->is_unicode = (wndPtr->flags & WIN_ISUNICODE) != 0; req->extra_offset = -1; wine_server_call( req ); @@ -1885,7 +1885,7 @@ static LONG_PTR WIN_GetWindowLong( HWND hwnd, INT offset, UINT size, BOOL unicod case GWL_STYLE: retvalue = reply->old_style; break; case GWL_EXSTYLE: retvalue = reply->old_ex_style; break; case GWLP_ID: retvalue = reply->old_id; break; - case GWLP_HINSTANCE: retvalue = (ULONG_PTR)reply->old_instance; break; + case GWLP_HINSTANCE: retvalue = (ULONG_PTR)wine_server_get_ptr( reply->old_instance ); break; case GWLP_USERDATA: retvalue = reply->old_user_data; break; default: if (offset >= 0) retvalue = get_win_data( &reply->old_extra_value, size ); @@ -2091,7 +2091,7 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B break; case GWLP_HINSTANCE: req->flags = SET_WIN_INSTANCE; - req->instance = (void *)newval; + req->instance = wine_server_client_ptr( (void *)newval ); break; case GWLP_WNDPROC: req->flags = SET_WIN_UNICODE; @@ -2125,7 +2125,7 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B break; case GWLP_HINSTANCE: wndPtr->hInstance = (HINSTANCE)newval; - retval = (ULONG_PTR)reply->old_instance; + retval = (ULONG_PTR)wine_server_get_ptr( reply->old_instance ); break; case GWLP_WNDPROC: break; diff --git a/dlls/user32/winstation.c b/dlls/user32/winstation.c index 9b8937605f2..c6c52b76e6a 100644 --- a/dlls/user32/winstation.c +++ b/dlls/user32/winstation.c @@ -628,7 +628,14 @@ BOOL WINAPI GetUserObjectSecurity( HANDLE handle, PSECURITY_INFORMATION info, PSECURITY_DESCRIPTOR sid, DWORD len, LPDWORD needed ) { FIXME( "(%p %p %p len=%d %p),stub!\n", handle, info, sid, len, needed ); - return TRUE; + if (needed) + *needed = sizeof(SECURITY_DESCRIPTOR); + if (len < sizeof(SECURITY_DESCRIPTOR)) + { + SetLastError( ERROR_INSUFFICIENT_BUFFER ); + return FALSE; + } + return InitializeSecurityDescriptor(sid, SECURITY_DESCRIPTOR_REVISION); } /*********************************************************************** diff --git a/dlls/user32/wsprintf.c b/dlls/user32/wsprintf.c index 7f98bee01a6..6cb4912f901 100644 --- a/dlls/user32/wsprintf.c +++ b/dlls/user32/wsprintf.c @@ -385,7 +385,7 @@ static INT16 wvsnprintf16( LPSTR buffer, UINT16 maxlen, LPCSTR spec, VA_LIST16 a /*********************************************************************** * wvsnprintfA (internal) */ -static INT wvsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec, va_list args ) +static INT wvsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec, __ms_va_list args ) { WPRINTF_FORMAT format; LPSTR p = buffer; @@ -488,7 +488,7 @@ static INT wvsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec, va_list args ) /*********************************************************************** * wvsnprintfW (internal) */ -static INT wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec, va_list args ) +static INT wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec, __ms_va_list args ) { WPRINTF_FORMAT format; LPWSTR p = buffer; @@ -603,7 +603,7 @@ INT16 WINAPI wvsprintf16( LPSTR buffer, LPCSTR spec, VA_LIST16 args ) /*********************************************************************** * wvsprintfA (USER32.@) */ -INT WINAPI wvsprintfA( LPSTR buffer, LPCSTR spec, va_list args ) +INT WINAPI wvsprintfA( LPSTR buffer, LPCSTR spec, __ms_va_list args ) { INT res = wvsnprintfA( buffer, 1024, spec, args ); return ( res == -1 ) ? 1024 : res; @@ -613,7 +613,7 @@ INT WINAPI wvsprintfA( LPSTR buffer, LPCSTR spec, va_list args ) /*********************************************************************** * wvsprintfW (USER32.@) */ -INT WINAPI wvsprintfW( LPWSTR buffer, LPCWSTR spec, va_list args ) +INT WINAPI wvsprintfW( LPWSTR buffer, LPCWSTR spec, __ms_va_list args ) { INT res = wvsnprintfW( buffer, 1024, spec, args ); return ( res == -1 ) ? 1024 : res; @@ -637,12 +637,12 @@ INT16 WINAPIV wsprintf16( LPSTR buffer, LPCSTR spec, VA_LIST16 valist ) */ INT WINAPIV wsprintfA( LPSTR buffer, LPCSTR spec, ... ) { - va_list valist; + __ms_va_list valist; INT res; - va_start( valist, spec ); + __ms_va_start( valist, spec ); res = wvsnprintfA( buffer, 1024, spec, valist ); - va_end( valist ); + __ms_va_end( valist ); return ( res == -1 ) ? 1024 : res; } @@ -652,11 +652,11 @@ INT WINAPIV wsprintfA( LPSTR buffer, LPCSTR spec, ... ) */ INT WINAPIV wsprintfW( LPWSTR buffer, LPCWSTR spec, ... ) { - va_list valist; + __ms_va_list valist; INT res; - va_start( valist, spec ); + __ms_va_start( valist, spec ); res = wvsnprintfW( buffer, 1024, spec, valist ); - va_end( valist ); + __ms_va_end( valist ); return ( res == -1 ) ? 1024 : res; } diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c index c1bcb1067a7..24a9b654547 100644 --- a/dlls/winealsa.drv/midi.c +++ b/dlls/winealsa.drv/midi.c @@ -388,7 +388,7 @@ static DWORD WINAPI midRecThread(LPVOID arg) len -= copylen; pos += copylen; /* We check if we reach the end of buffer or the end of sysex before notifying - * to handle the case where ALSA splitted the sysex into several events */ + * to handle the case where ALSA split the sysex into several events */ if ((lpMidiHdr->dwBytesRecorded == lpMidiHdr->dwBufferLength) || (*(BYTE*)(lpMidiHdr->lpData + lpMidiHdr->dwBytesRecorded - 1) == 0xF7)) { lpMidiHdr->dwFlags &= ~MHDR_INQUEUE; diff --git a/dlls/winecoreaudio.drv/audio.c b/dlls/winecoreaudio.drv/audio.c index 549b69e62db..1d5df028192 100644 --- a/dlls/winecoreaudio.drv/audio.c +++ b/dlls/winecoreaudio.drv/audio.c @@ -452,7 +452,7 @@ BOOL CoreAudio_GetDevCaps (void) memcpy(CoreAudio_DefaultDevice.ds_desc.szDesc, name, sizeof(name)); strcpy(CoreAudio_DefaultDevice.ds_desc.szDrvname, "winecoreaudio.drv"); - MultiByteToWideChar(CP_ACP, 0, name, sizeof(name), + MultiByteToWideChar(CP_UNIXCP, 0, name, sizeof(name), CoreAudio_DefaultDevice.out_caps.szPname, sizeof(CoreAudio_DefaultDevice.out_caps.szPname) / sizeof(WCHAR)); memcpy(CoreAudio_DefaultDevice.dev_name, name, 32); @@ -506,7 +506,6 @@ LONG CoreAudio_WaveInit(void) { OSStatus status; UInt32 propertySize; - CHAR szPname[MAXPNAMELEN]; int i; CFStringRef messageThreadPortName; CFMessagePortRef port_ReceiveInMessageThread; @@ -538,10 +537,13 @@ LONG CoreAudio_WaveInit(void) return DRV_FAILURE; CoreAudio_DefaultDevice.interface_name=HeapAlloc(GetProcessHeap(),0,strlen(CoreAudio_DefaultDevice.dev_name)+1); - sprintf(CoreAudio_DefaultDevice.interface_name, "%s", CoreAudio_DefaultDevice.dev_name); + strcpy(CoreAudio_DefaultDevice.interface_name, CoreAudio_DefaultDevice.dev_name); for (i = 0; i < MAX_WAVEOUTDRV; ++i) { + static const WCHAR wszWaveOutFormat[] = + {'C','o','r','e','A','u','d','i','o',' ','W','a','v','e','I','n',' ','%','d',0}; + WOutDev[i].state = WINE_WS_CLOSED; WOutDev[i].cadev = &CoreAudio_DefaultDevice; WOutDev[i].woID = i; @@ -550,8 +552,7 @@ LONG CoreAudio_WaveInit(void) WOutDev[i].caps.wMid = 0xcafe; /* Manufac ID */ WOutDev[i].caps.wPid = 0x0001; /* Product ID */ - snprintf(szPname, sizeof(szPname), "CoreAudio WaveOut %d", i); - MultiByteToWideChar(CP_ACP, 0, szPname, -1, WOutDev[i].caps.szPname, sizeof(WOutDev[i].caps.szPname)/sizeof(WCHAR)); + snprintfW(WOutDev[i].caps.szPname, sizeof(WOutDev[i].caps.szPname)/sizeof(WCHAR), wszWaveOutFormat, i); snprintf(WOutDev[i].interface_name, sizeof(WOutDev[i].interface_name), "winecoreaudio: %d", i); WOutDev[i].caps.vDriverVersion = 0x0001; @@ -590,6 +591,9 @@ LONG CoreAudio_WaveInit(void) for (i = 0; i < MAX_WAVEINDRV; ++i) { + static const WCHAR wszWaveInFormat[] = + {'C','o','r','e','A','u','d','i','o',' ','W','a','v','e','I','n',' ','%','d',0}; + memset(&WInDev[i], 0, sizeof(WInDev[i])); WInDev[i].wiID = i; @@ -602,8 +606,7 @@ LONG CoreAudio_WaveInit(void) WInDev[i].caps.wPid = 0x0001; /* Product ID */ WInDev[i].caps.vDriverVersion = 0x0001; - snprintf(szPname, sizeof(szPname), "CoreAudio WaveIn %d", i); - MultiByteToWideChar(CP_ACP, 0, szPname, -1, WInDev[i].caps.szPname, sizeof(WInDev[i].caps.szPname)/sizeof(WCHAR)); + snprintfW(WInDev[i].caps.szPname, sizeof(WInDev[i].caps.szPname)/sizeof(WCHAR), wszWaveInFormat, i); snprintf(WInDev[i].interface_name, sizeof(WInDev[i].interface_name), "winecoreaudio in: %d", i); if (inputSampleRate == 96000) @@ -1416,7 +1419,7 @@ static DWORD wodDevInterfaceSize(UINT wDevID, LPDWORD dwParam1) { TRACE("(%u, %p)\n", wDevID, dwParam1); - *dwParam1 = MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].cadev->interface_name, -1, + *dwParam1 = MultiByteToWideChar(CP_UNIXCP, 0, WOutDev[wDevID].cadev->interface_name, -1, NULL, 0 ) * sizeof(WCHAR); return MMSYSERR_NOERROR; } @@ -1427,10 +1430,10 @@ static DWORD wodDevInterfaceSize(UINT wDevID, LPDWORD dwParam1) static DWORD wodDevInterface(UINT wDevID, PWCHAR dwParam1, DWORD dwParam2) { TRACE("\n"); - if (dwParam2 >= MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].cadev->interface_name, -1, + if (dwParam2 >= MultiByteToWideChar(CP_UNIXCP, 0, WOutDev[wDevID].cadev->interface_name, -1, NULL, 0 ) * sizeof(WCHAR)) { - MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].cadev->interface_name, -1, + MultiByteToWideChar(CP_UNIXCP, 0, WOutDev[wDevID].cadev->interface_name, -1, dwParam1, dwParam2 / sizeof(WCHAR)); return MMSYSERR_NOERROR; } @@ -2238,7 +2241,7 @@ static DWORD widDevInterfaceSize(UINT wDevID, LPDWORD dwParam1) { TRACE("(%u, %p)\n", wDevID, dwParam1); - *dwParam1 = MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].interface_name, -1, + *dwParam1 = MultiByteToWideChar(CP_UNIXCP, 0, WInDev[wDevID].interface_name, -1, NULL, 0 ) * sizeof(WCHAR); return MMSYSERR_NOERROR; } @@ -2249,10 +2252,10 @@ static DWORD widDevInterfaceSize(UINT wDevID, LPDWORD dwParam1) */ static DWORD widDevInterface(UINT wDevID, PWCHAR dwParam1, DWORD dwParam2) { - if (dwParam2 >= MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].interface_name, -1, + if (dwParam2 >= MultiByteToWideChar(CP_UNIXCP, 0, WInDev[wDevID].interface_name, -1, NULL, 0 ) * sizeof(WCHAR)) { - MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].interface_name, -1, + MultiByteToWideChar(CP_UNIXCP, 0, WInDev[wDevID].interface_name, -1, dwParam1, dwParam2 / sizeof(WCHAR)); return MMSYSERR_NOERROR; } diff --git a/dlls/winecoreaudio.drv/audiounit.c b/dlls/winecoreaudio.drv/audiounit.c index 76544540182..08e26072093 100644 --- a/dlls/winecoreaudio.drv/audiounit.c +++ b/dlls/winecoreaudio.drv/audiounit.c @@ -25,6 +25,7 @@ #include #include +#undef DPRINTF #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(wave); diff --git a/dlls/winecoreaudio.drv/coremidi.c b/dlls/winecoreaudio.drv/coremidi.c index c52093ef56c..ea7d2fd8743 100644 --- a/dlls/winecoreaudio.drv/coremidi.c +++ b/dlls/winecoreaudio.drv/coremidi.c @@ -28,9 +28,6 @@ #include "coremidi.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(midi); MIDIClientRef CoreMIDI_CreateClient(CFStringRef name) { diff --git a/dlls/winecrt0/stub.c b/dlls/winecrt0/stub.c index c6ddb918c3e..5f52d46659c 100644 --- a/dlls/winecrt0/stub.c +++ b/dlls/winecrt0/stub.c @@ -32,5 +32,5 @@ void DECLSPEC_HIDDEN __wine_spec_unimplemented_stub( const char *module, const c args[0] = (ULONG_PTR)module; args[1] = (ULONG_PTR)function; - RaiseException( EXCEPTION_WINE_STUB, EXCEPTION_NONCONTINUABLE, 2, args ); + for (;;) RaiseException( EXCEPTION_WINE_STUB, EXCEPTION_NONCONTINUABLE, 2, args ); } diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index ca6ca583da2..3a5493dec28 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -314,7 +314,7 @@ static void shader_generate_arb_declarations(IWineD3DBaseShader *iface, const sh FIXME("No free constant to load the luminance parameters\n"); } } else { - FIXME("No free constant found to load environemnt bump mapping matrix into the shader. texbem instruction will not apply bump mapping\n"); + FIXME("No free constant found to load environment bump mapping matrix into the shader. texbem instruction will not apply bump mapping\n"); } ps->numbumpenvmatconsts = cur + 1; @@ -902,9 +902,40 @@ static void shader_hw_map2gl(const SHADER_OPCODE_ARG *arg) SHADER_BUFFER* buffer = arg->buffer; DWORD dst = arg->dst; const DWORD *src = arg->src; + const char *instruction; char arguments[256]; unsigned int i; + switch (curOpcode->opcode) + { + case WINED3DSIO_ABS: instruction = "ABS"; break; + case WINED3DSIO_ADD: instruction = "ADD"; break; + case WINED3DSIO_CRS: instruction = "XPD"; break; + case WINED3DSIO_DP3: instruction = "DP3"; break; + case WINED3DSIO_DP4: instruction = "DP4"; break; + case WINED3DSIO_DST: instruction = "DST"; break; + case WINED3DSIO_EXP: instruction = "EX2"; break; + case WINED3DSIO_EXPP: instruction = "EXP"; break; + case WINED3DSIO_FRC: instruction = "FRC"; break; + case WINED3DSIO_LIT: instruction = "LIT"; break; + case WINED3DSIO_LOG: instruction = "LG2"; break; + case WINED3DSIO_LOGP: instruction = "LOG"; break; + case WINED3DSIO_LRP: instruction = "LRP"; break; + case WINED3DSIO_MAD: instruction = "MAD"; break; + case WINED3DSIO_MAX: instruction = "MAX"; break; + case WINED3DSIO_MIN: instruction = "MIN"; break; + case WINED3DSIO_MOV: instruction = "MOV"; break; + case WINED3DSIO_MUL: instruction = "MUL"; break; + case WINED3DSIO_NOP: instruction = "NOP"; break; + case WINED3DSIO_POW: instruction = "POW"; break; + case WINED3DSIO_SGE: instruction = "SGE"; break; + case WINED3DSIO_SLT: instruction = "SLT"; break; + case WINED3DSIO_SUB: instruction = "SUB"; break; + default: instruction = ""; + FIXME("Unhandled opcode %s\n", curOpcode->name); + break; + } + if (shader_is_pshader_version(arg->reg_maps->shader_version)) { /* Output token related */ @@ -958,7 +989,7 @@ static void shader_hw_map2gl(const SHADER_OPCODE_ARG *arg) strcat(arguments, ", "); strcat(arguments, operands[i]); } - shader_addline(buffer, "%s%s %s;\n", curOpcode->glname, modifier, arguments); + shader_addline(buffer, "%s%s %s;\n", instruction, modifier, arguments); /* A shift requires another line. */ if (shift) pshader_gen_output_modifier_line(buffer, saturate, output_wmask, shift, output_rname); @@ -975,7 +1006,7 @@ static void shader_hw_map2gl(const SHADER_OPCODE_ARG *arg) vshader_program_add_param(arg, src[i-1], TRUE, arguments); } } - shader_addline(buffer, "%s%s;\n", curOpcode->glname, arguments); + shader_addline(buffer, "%s%s;\n", instruction, arguments); } } @@ -1560,10 +1591,20 @@ static void vshader_hw_rsq_rcp(const SHADER_OPCODE_ARG *arg) DWORD dst = arg->dst; DWORD src = arg->src[0]; DWORD swizzle = (src & WINED3DSP_SWIZZLE_MASK) >> WINED3DSP_SWIZZLE_SHIFT; + const char *instruction; char tmpLine[256]; - strcpy(tmpLine, curOpcode->glname); /* Opcode */ + switch(curOpcode->opcode) + { + case WINED3DSIO_RSQ: instruction = "RSQ"; break; + case WINED3DSIO_RCP: instruction = "RCP"; break; + default: instruction = ""; + FIXME("Unhandled opcode %s\n", curOpcode->name); + break; + } + + strcpy(tmpLine, instruction); vshader_program_add_param(arg, dst, FALSE, tmpLine); /* Destination */ strcat(tmpLine, ","); vshader_program_add_param(arg, src, TRUE, tmpLine); @@ -2339,7 +2380,7 @@ static void state_texfactor_arbfp(DWORD state, IWineD3DStateBlockImpl *statebloc * application provided constants */ if(device->shader_backend == &arb_program_shader_backend) { - if(use_ps(device)) return; + if (use_ps(stateblock)) return; device = stateblock->wineD3DDevice; device->activeContext->pshader_const_dirty[ARB_FFP_CONST_TFACTOR] = 1; @@ -2360,7 +2401,7 @@ static void state_arb_specularenable(DWORD state, IWineD3DStateBlockImpl *stateb * application provided constants */ if(device->shader_backend == &arb_program_shader_backend) { - if(use_ps(device)) return; + if (use_ps(stateblock)) return; device = stateblock->wineD3DDevice; device->activeContext->pshader_const_dirty[ARB_FFP_CONST_SPECULAR_ENABLE] = 1; @@ -2384,7 +2425,8 @@ static void set_bumpmat_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, W IWineD3DDeviceImpl *device = stateblock->wineD3DDevice; float mat[2][2]; - if(use_ps(device)) { + if (use_ps(stateblock)) + { if(stage != 0 && ((IWineD3DPixelShaderImpl *) stateblock->pixelShader)->baseShader.reg_maps.bumpmat[stage]) { /* The pixel shader has to know the bump env matrix. Do a constants update if it isn't scheduled @@ -2418,7 +2460,8 @@ static void tex_bumpenvlum_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock IWineD3DDeviceImpl *device = stateblock->wineD3DDevice; float param[4]; - if(use_ps(device)) { + if (use_ps(stateblock)) + { if(stage != 0 && ((IWineD3DPixelShaderImpl *) stateblock->pixelShader)->baseShader.reg_maps.luminanceparams[stage]) { /* The pixel shader has to know the luminance offset. Do a constants update if it @@ -2921,8 +2964,8 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, IWi static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { IWineD3DDeviceImpl *device = stateblock->wineD3DDevice; struct shader_arb_priv *priv = (struct shader_arb_priv *) device->fragment_priv; - BOOL use_pshader = use_ps(device); - BOOL use_vshader = use_vs(device); + BOOL use_pshader = use_ps(stateblock); + BOOL use_vshader = use_vs(stateblock); struct ffp_frag_settings settings; const struct arbfp_ffp_desc *desc; unsigned int i; diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index b4c53343e9b..aaecafff993 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -883,7 +883,7 @@ static void textransform(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3 static void atifs_apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { IWineD3DDeviceImpl *device = stateblock->wineD3DDevice; - BOOL use_vshader = use_vs(device); + BOOL use_vshader = use_vs(stateblock); /* The ATIFS code does not support pixel shaders currently, but we have to provide a state handler * to call shader_select to select a vertex shader if one is applied because the vertex shader state diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c index 90b122128aa..7841ca33586 100644 --- a/dlls/wined3d/cubetexture.c +++ b/dlls/wined3d/cubetexture.c @@ -298,7 +298,7 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_GetLevelDesc(IWineD3DCubeTexture * TRACE("(%p) level (%d)\n", This, Level); return IWineD3DSurface_GetDesc(This->surfaces[0][Level], pDesc); } - FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); + WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); return WINED3DERR_INVALIDCALL; } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 36fbcba5405..b5f2b3ecb9e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -470,8 +470,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface, object->num_contained_ps_consts_i = MAX_CONST_I; for (i = 0; i < NUM_SAVEDPIXELSTATES_R; i++) { - object->changed.renderState[SavedPixelStates_R[i]] = TRUE; - object->contained_render_states[i] = SavedPixelStates_R[i]; + DWORD rs = SavedPixelStates_R[i]; + object->changed.renderState[rs >> 5] |= 1 << (rs & 0x1f); + object->contained_render_states[i] = rs; } object->num_contained_render_states = NUM_SAVEDPIXELSTATES_R; for (j = 0; j < MAX_TEXTURES; j++) { @@ -484,9 +485,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface, } for (j = 0 ; j < MAX_COMBINED_SAMPLERS; j++) { for (i =0; i < NUM_SAVEDPIXELSTATES_S;i++) { - object->changed.samplerState[j][SavedPixelStates_S[i]] = TRUE; + DWORD state = SavedPixelStates_S[i]; + object->changed.samplerState[j] |= 1 << state; object->contained_sampler_states[object->num_contained_sampler_states].stage = j; - object->contained_sampler_states[object->num_contained_sampler_states].state = SavedPixelStates_S[i]; + object->contained_sampler_states[object->num_contained_sampler_states].state = state; object->num_contained_sampler_states++; } } @@ -527,8 +529,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface, } object->num_contained_vs_consts_i = MAX_CONST_I; for (i = 0; i < NUM_SAVEDVERTEXSTATES_R; i++) { - object->changed.renderState[SavedVertexStates_R[i]] = TRUE; - object->contained_render_states[i] = SavedVertexStates_R[i]; + DWORD rs = SavedVertexStates_R[i]; + object->changed.renderState[rs >> 5] |= 1 << (rs & 0x1f); + object->contained_render_states[i] = rs; } object->num_contained_render_states = NUM_SAVEDVERTEXSTATES_R; for (j = 0; j < MAX_TEXTURES; j++) { @@ -541,9 +544,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface, } for (j = 0 ; j < MAX_COMBINED_SAMPLERS; j++){ for (i =0; i < NUM_SAVEDVERTEXSTATES_S;i++) { - object->changed.samplerState[j][SavedVertexStates_S[i]] = TRUE; + DWORD state = SavedVertexStates_S[i]; + object->changed.samplerState[j] |= 1 << state; object->contained_sampler_states[object->num_contained_sampler_states].stage = j; - object->contained_sampler_states[object->num_contained_sampler_states].state = SavedVertexStates_S[i]; + object->contained_sampler_states[object->num_contained_sampler_states].state = state; object->num_contained_sampler_states++; } } @@ -1764,6 +1768,10 @@ static unsigned int ConvertFvfToDeclaration(IWineD3DDeviceImpl *This, /* For the elements[idx].Type = WINED3DDECLTYPE_FLOAT4; elements[idx].Usage = WINED3DDECLUSAGE_POSITIONT; } + else if ((fvf & WINED3DFVF_XYZW) == WINED3DFVF_XYZW) { + elements[idx].Type = WINED3DDECLTYPE_FLOAT4; + elements[idx].Usage = WINED3DDECLUSAGE_POSITION; + } else { elements[idx].Type = WINED3DDECLTYPE_FLOAT3; elements[idx].Usage = WINED3DDECLUSAGE_POSITION; @@ -2543,7 +2551,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSource(IWineD3DDevice *iface, oldSrc = This->updateStateBlock->streamSource[StreamNumber]; TRACE("(%p) : StreamNo: %u, OldStream (%p), NewStream (%p), OffsetInBytes %u, NewStride %u\n", This, StreamNumber, oldSrc, pStreamData, OffsetInBytes, Stride); - This->updateStateBlock->changed.streamSource[StreamNumber] = TRUE; + This->updateStateBlock->changed.streamSource |= 1 << StreamNumber; if(oldSrc == pStreamData && This->updateStateBlock->streamStride[StreamNumber] == Stride && @@ -2631,7 +2639,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSourceFreq(IWineD3DDevice *ifa TRACE("(%p) StreamNumber(%d), Divider(%d)\n", This, StreamNumber, Divider); This->updateStateBlock->streamFlags[StreamNumber] = Divider & (WINED3DSTREAMSOURCE_INSTANCEDATA | WINED3DSTREAMSOURCE_INDEXEDDATA ); - This->updateStateBlock->changed.streamFreq[StreamNumber] = TRUE; + This->updateStateBlock->changed.streamFreq |= 1 << StreamNumber; This->updateStateBlock->streamFreq[StreamNumber] = Divider & 0x7FFFFF; if(This->updateStateBlock->streamFreq[StreamNumber] != oldFreq || @@ -2665,7 +2673,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTransform(IWineD3DDevice *iface, W /* Handle recording of state blocks */ if (This->isRecordingState) { TRACE("Recording... not performing anything\n"); - This->updateStateBlock->changed.transform[d3dts] = TRUE; + This->updateStateBlock->changed.transform[d3dts >> 5] |= 1 << (d3dts & 0x1f); This->updateStateBlock->transforms[d3dts] = *lpmatrix; return WINED3D_OK; } @@ -2722,7 +2730,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_MultiplyTransform(IWineD3DDevice *iface IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p) : For state %s\n", This, debug_d3dtstype(State)); - if (State < HIGHEST_TRANSFORMSTATE) + if (State <= HIGHEST_TRANSFORMSTATE) { mat = &This->updateStateBlock->transforms[State]; } else { @@ -2984,7 +2992,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, D * * TODO: Test how this affects rendering */ - FIXME("Too many concurrently active lights\n"); + WARN("Too many concurrently active lights\n"); return WINED3D_OK; } @@ -3034,7 +3042,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetClipPlane(IWineD3DDevice *iface, DWO return WINED3DERR_INVALIDCALL; } - This->updateStateBlock->changed.clipplane[Index] = TRUE; + This->updateStateBlock->changed.clipplane |= 1 << Index; if(This->updateStateBlock->clipplane[Index][0] == pPlane[0] && This->updateStateBlock->clipplane[Index][1] == pPlane[1] && @@ -3258,7 +3266,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W TRACE("(%p)->state = %s(%d), value = %d\n", This, debug_d3drenderstate(State), State, Value); - This->updateStateBlock->changed.renderState[State] = TRUE; + This->updateStateBlock->changed.renderState[State >> 5] |= 1 << (State & 0x1f); This->updateStateBlock->renderState[State] = Value; /* Handle recording of state blocks */ @@ -3321,7 +3329,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetSamplerState(IWineD3DDevice *iface, oldValue = This->stateBlock->samplerState[Sampler][Type]; This->updateStateBlock->samplerState[Sampler][Type] = Value; - This->updateStateBlock->changed.samplerState[Sampler][Type] = Value; + This->updateStateBlock->changed.samplerState[Sampler] |= 1 << Type; /* Handle recording of state blocks */ if (This->isRecordingState) { @@ -3634,6 +3642,7 @@ static void device_map_stage(IWineD3DDeviceImpl *This, int stage, int unit) { static void device_update_fixed_function_usage_map(IWineD3DDeviceImpl *This) { int i; + This->fixed_function_usage_map = 0; for (i = 0; i < MAX_TEXTURES; ++i) { WINED3DTEXTUREOP color_op = This->stateBlock->textureState[i][WINED3DTSS_COLOROP]; WINED3DTEXTUREOP alpha_op = This->stateBlock->textureState[i][WINED3DTSS_ALPHAOP]; @@ -3646,10 +3655,6 @@ static void device_update_fixed_function_usage_map(IWineD3DDeviceImpl *This) { if (color_op == WINED3DTOP_DISABLE) { /* Not used, and disable higher stages */ - while (i < MAX_TEXTURES) { - This->fixed_function_usage_map[i] = FALSE; - ++i; - } break; } @@ -3659,26 +3664,27 @@ static void device_update_fixed_function_usage_map(IWineD3DDeviceImpl *This) { || ((alpha_arg1 == WINED3DTA_TEXTURE) && alpha_op != WINED3DTOP_SELECTARG2) || ((alpha_arg2 == WINED3DTA_TEXTURE) && alpha_op != WINED3DTOP_SELECTARG1) || ((alpha_arg3 == WINED3DTA_TEXTURE) && (alpha_op == WINED3DTOP_MULTIPLYADD || alpha_op == WINED3DTOP_LERP))) { - This->fixed_function_usage_map[i] = TRUE; - } else { - This->fixed_function_usage_map[i] = FALSE; + This->fixed_function_usage_map |= (1 << i); } if ((color_op == WINED3DTOP_BUMPENVMAP || color_op == WINED3DTOP_BUMPENVMAPLUMINANCE) && i < MAX_TEXTURES - 1) { - This->fixed_function_usage_map[i+1] = TRUE; + This->fixed_function_usage_map |= (1 << (i + 1)); } } } static void device_map_fixed_function_samplers(IWineD3DDeviceImpl *This) { int i, tex; + WORD ffu_map; device_update_fixed_function_usage_map(This); + ffu_map = This->fixed_function_usage_map; if (This->max_ffp_textures == This->max_ffp_texture_stages || - This->stateBlock->lowest_disabled_stage <= This->max_ffp_textures) { - for (i = 0; i < This->stateBlock->lowest_disabled_stage; ++i) { - if (!This->fixed_function_usage_map[i]) continue; + This->stateBlock->lowest_disabled_stage <= This->max_ffp_textures) { + for (i = 0; ffu_map; ffu_map >>= 1, ++i) + { + if (!(ffu_map & 1)) continue; if (This->texUnitMap[i] != i) { device_map_stage(This, i, i); @@ -3691,8 +3697,9 @@ static void device_map_fixed_function_samplers(IWineD3DDeviceImpl *This) { /* Now work out the mapping */ tex = 0; - for (i = 0; i < This->stateBlock->lowest_disabled_stage; ++i) { - if (!This->fixed_function_usage_map[i]) continue; + for (i = 0; ffu_map; ffu_map >>= 1, ++i) + { + if (!(ffu_map & 1)) continue; if (This->texUnitMap[i] != tex) { device_map_stage(This, i, tex); @@ -3735,7 +3742,7 @@ static BOOL device_unit_free_for_vs(IWineD3DDeviceImpl *This, const DWORD *pshad if (!pshader_sampler_tokens) { /* No pixel shader, check fixed function */ - return current_mapping >= MAX_TEXTURES || !This->fixed_function_usage_map[current_mapping]; + return current_mapping >= MAX_TEXTURES || !(This->fixed_function_usage_map & (1 << current_mapping)); } /* Pixel shader, check the shader's sampler map */ @@ -3785,8 +3792,8 @@ static void device_map_vsamplers(IWineD3DDeviceImpl *This, BOOL ps) { } void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) { - BOOL vs = use_vs(This); - BOOL ps = use_ps(This); + BOOL vs = use_vs(This->stateBlock); + BOOL ps = use_ps(This->stateBlock); /* * Rules are: * -> Pixel shaders need a 1:1 map. In theory the shader input could be mapped too, but @@ -4538,7 +4545,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD TRACE("GL_LIMITS %d\n",GL_LIMITS(sampler_stages)); TRACE("(%p) : oldtexture(%p)\n", This,oldTexture); - This->updateStateBlock->changed.textures[Stage] = TRUE; + This->updateStateBlock->changed.textures |= 1 << Stage; TRACE("(%p) : setting new texture to %p\n", This, pTexture); This->updateStateBlock->textures[Stage] = pTexture; @@ -4738,21 +4745,30 @@ static HRESULT WINAPI IWineD3DDeviceImpl_EndStateBlock(IWineD3DDevice *iface, IW IWineD3DStateBlockImpl *object = This->updateStateBlock; if (!This->isRecordingState) { - FIXME("(%p) not recording! returning error\n", This); + WARN("(%p) not recording! returning error\n", This); *ppStateBlock = NULL; return WINED3DERR_INVALIDCALL; } - for(i = 1; i <= WINEHIGHEST_RENDER_STATE; i++) { - if(object->changed.renderState[i]) { - object->contained_render_states[object->num_contained_render_states] = i; - object->num_contained_render_states++; + for (i = 0; i <= WINEHIGHEST_RENDER_STATE >> 5; ++i) + { + DWORD map = object->changed.renderState[i]; + for (j = 0; map; map >>= 1, ++j) + { + if (!(map & 1)) continue; + + object->contained_render_states[object->num_contained_render_states++] = (i << 5) | j; } } - for(i = 1; i <= HIGHEST_TRANSFORMSTATE; i++) { - if(object->changed.transform[i]) { - object->contained_transform_states[object->num_contained_transform_states] = i; - object->num_contained_transform_states++; + + for (i = 0; i <= HIGHEST_TRANSFORMSTATE >> 5; ++i) + { + DWORD map = object->changed.transform[i]; + for (j = 0; map; map >>= 1, ++j) + { + if (!(map & 1)) continue; + + object->contained_transform_states[object->num_contained_transform_states++] = (i << 5) | j; } } for(i = 0; i < GL_LIMITS(vshader_constantsF); i++) { @@ -4807,12 +4823,15 @@ static HRESULT WINAPI IWineD3DDeviceImpl_EndStateBlock(IWineD3DDevice *iface, IW } } for(i = 0; i < MAX_COMBINED_SAMPLERS; i++){ - for (j = 1; j < WINED3D_HIGHEST_SAMPLER_STATE; j++) { - if(object->changed.samplerState[i][j]) { - object->contained_sampler_states[object->num_contained_sampler_states].stage = i; - object->contained_sampler_states[object->num_contained_sampler_states].state = j; - object->num_contained_sampler_states++; - } + DWORD map = object->changed.samplerState[i]; + + for (j = 0; map; map >>= 1, ++j) + { + if (!(map & 1)) continue; + + object->contained_sampler_states[object->num_contained_sampler_states].stage = i; + object->contained_sampler_states[object->num_contained_sampler_states].state = j; + ++object->num_contained_sampler_states; } } @@ -5137,7 +5156,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitive(IWineD3DDevice * * without an index buffer set. (The first time at least...) * D3D8 simply dies, but I doubt it can do much harm to return * D3DERR_INVALIDCALL there as well. */ - ERR("(%p) : Called without a valid index buffer set, returning WINED3DERR_INVALIDCALL\n", This); + WARN("(%p) : Called without a valid index buffer set, returning WINED3DERR_INVALIDCALL\n", This); return WINED3DERR_INVALIDCALL; } @@ -7552,7 +7571,6 @@ const DWORD SavedPixelStates_R[NUM_SAVEDPIXELSTATES_R] = { }; const DWORD SavedPixelStates_T[NUM_SAVEDPIXELSTATES_T] = { - WINED3DTSS_ADDRESSW , WINED3DTSS_ALPHAARG0 , WINED3DTSS_ALPHAARG1 , WINED3DTSS_ALPHAARG2 , diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 7c80750d578..e505ec0f1c7 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1303,7 +1303,8 @@ static BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) { } break; case VENDOR_INTEL: - if (strstr(gl_info->gl_renderer, "GMA 950")) { + if (strstr(gl_info->gl_renderer, "GMA 950") || + strstr(gl_info->gl_renderer, "945GM")) { /* MacOS calls the card GMA 950, but everywhere else the PCI ID is named 945GM */ gl_info->gl_card = CARD_INTEL_I945GM; vidmem = 64; diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 89ab706e1f3..fd06d777cee 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -296,7 +296,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, const WineDirect3DVertexStrid IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; const UINT *streamOffset = This->stateBlock->streamOffset; long SkipnStrides = startVertex + This->stateBlock->loadBaseVertexIndex; - BOOL pixelShader = use_ps(This); + BOOL pixelShader = use_ps(This->stateBlock); BOOL specular_fog = FALSE; UINT texture_stages = GL_LIMITS(texture_stages); const BYTE *texCoords[WINED3DDP_MAXTEXCOORD]; @@ -863,7 +863,8 @@ void drawPrimitive(IWineD3DDevice *iface, if (numberOfVertices == 0 ) numberOfVertices = calculatedNumberOfindices; - if(!use_vs(This)) { + if (!use_vs(This->stateBlock)) + { if(!This->strided_streams.u.s.position_transformed && This->activeContext->num_untracked_materials && This->stateBlock->renderState[WINED3DRS_LIGHTING]) { static BOOL warned; @@ -898,7 +899,8 @@ void drawPrimitive(IWineD3DDevice *iface, if (This->useDrawStridedSlow || emulation) { /* Immediate mode drawing */ - if(use_vs(This)) { + if (use_vs(This->stateBlock)) + { static BOOL warned; if (!warned) { FIXME("Using immediate mode with vertex shaders for half float emulation\n"); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 2aceb9068b9..eb169e0ef9c 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -130,12 +130,15 @@ static void print_glsl_info_log(const WineD3D_GL_Info *gl_info, GLhandleARB obj) "Fragment shader(s) linked, vertex shader(s) linked.", /* fglrx, no \n */ "Vertex shader(s) linked, no fragment shader(s) defined. \n ", /* fglrx, with \n */ "Vertex shader(s) linked, no fragment shader(s) defined.", /* fglrx, no \n */ - "Fragment shader was successfully compiled to run on hardware.\nWARNING: 0:1: extension 'GL_ARB_draw_buffers' is not supported", + "Fragment shader was successfully compiled to run on hardware.\n" + "WARNING: 0:2: extension 'GL_ARB_draw_buffers' is not supported", "Fragment shader(s) linked, no vertex shader(s) defined.", /* fglrx, no \n */ "Fragment shader(s) linked, no vertex shader(s) defined. \n ", /* fglrx, with \n */ "WARNING: 0:2: extension 'GL_ARB_draw_buffers' is not supported\n" /* MacOS ati */ }; + if (!TRACE_ON(d3d_shader) && !FIXME_ON(d3d_shader)) return; + GL_EXTCALL(glGetObjectParameterivARB(obj, GL_OBJECT_INFO_LOG_LENGTH_ARB, &infologLength)); @@ -797,7 +800,8 @@ static void shader_generate_glsl_declarations(IWineD3DBaseShader *iface, const s */ if (pshader && shader_version >= WINED3DPS_VERSION(3, 0)) { - if(use_vs(device)) { + if (use_vs(device->stateBlock)) + { shader_addline(buffer, "varying vec4 IN[%u];\n", GL_LIMITS(glsl_varyings) / 4); } else { /* TODO: Write a replacement shader for the fixed function vertex pipeline, so this isn't needed. diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c index a7f96c730f9..a4677dcbcb9 100644 --- a/dlls/wined3d/nvidia_texture_shader.c +++ b/dlls/wined3d/nvidia_texture_shader.c @@ -453,12 +453,12 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, WINED3DTEX static void nvrc_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE; DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[stage]; - BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map[stage]; + BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map & (1 << stage); TRACE("Setting color op for stage %d\n", stage); /* Using a pixel shader? Don't care for anything here, the shader applying does it */ - if (use_ps(stateblock->wineD3DDevice)) return; + if (use_ps(stateblock)) return; if (stage != mapped_stage) WARN("Using non 1:1 mapping: %d -> %d!\n", stage, mapped_stage); diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c index 15392d8a95d..1a337ca990e 100644 --- a/dlls/wined3d/pixelshader.c +++ b/dlls/wined3d/pixelshader.c @@ -124,96 +124,96 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_GetFunction(IWineD3DPixelShader* CONST SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[] = { /* Arithmetic */ - {WINED3DSIO_NOP, "nop", "NOP", 0, 0, WINED3DSIH_NOP, 0, 0 }, - {WINED3DSIO_MOV, "mov", "MOV", 1, 2, WINED3DSIH_MOV, 0, 0 }, - {WINED3DSIO_ADD, "add", "ADD", 1, 3, WINED3DSIH_ADD, 0, 0 }, - {WINED3DSIO_SUB, "sub", "SUB", 1, 3, WINED3DSIH_SUB, 0, 0 }, - {WINED3DSIO_MAD, "mad", "MAD", 1, 4, WINED3DSIH_MAD, 0, 0 }, - {WINED3DSIO_MUL, "mul", "MUL", 1, 3, WINED3DSIH_MUL, 0, 0 }, - {WINED3DSIO_RCP, "rcp", "RCP", 1, 2, WINED3DSIH_RCP, 0, 0 }, - {WINED3DSIO_RSQ, "rsq", "RSQ", 1, 2, WINED3DSIH_RSQ, 0, 0 }, - {WINED3DSIO_DP3, "dp3", "DP3", 1, 3, WINED3DSIH_DP3, 0, 0 }, - {WINED3DSIO_DP4, "dp4", "DP4", 1, 3, WINED3DSIH_DP4, 0, 0 }, - {WINED3DSIO_MIN, "min", "MIN", 1, 3, WINED3DSIH_MIN, 0, 0 }, - {WINED3DSIO_MAX, "max", "MAX", 1, 3, WINED3DSIH_MAX, 0, 0 }, - {WINED3DSIO_SLT, "slt", "SLT", 1, 3, WINED3DSIH_SLT, 0, 0 }, - {WINED3DSIO_SGE, "sge", "SGE", 1, 3, WINED3DSIH_SGE, 0, 0 }, - {WINED3DSIO_ABS, "abs", "ABS", 1, 2, WINED3DSIH_ABS, 0, 0 }, - {WINED3DSIO_EXP, "exp", "EX2", 1, 2, WINED3DSIH_EXP, 0, 0 }, - {WINED3DSIO_LOG, "log", "LG2", 1, 2, WINED3DSIH_LOG, 0, 0 }, - {WINED3DSIO_EXPP, "expp", "EXP", 1, 2, WINED3DSIH_EXPP, 0, 0 }, - {WINED3DSIO_LOGP, "logp", "LOG", 1, 2, WINED3DSIH_LOGP, 0, 0 }, - {WINED3DSIO_DST, "dst", "DST", 1, 3, WINED3DSIH_DST, 0, 0 }, - {WINED3DSIO_LRP, "lrp", "LRP", 1, 4, WINED3DSIH_LRP, 0, 0 }, - {WINED3DSIO_FRC, "frc", "FRC", 1, 2, WINED3DSIH_FRC, 0, 0 }, - {WINED3DSIO_CND, "cnd", NULL, 1, 4, WINED3DSIH_CND, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,4)}, - {WINED3DSIO_CMP, "cmp", NULL, 1, 4, WINED3DSIH_CMP, WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(3,0)}, - {WINED3DSIO_POW, "pow", "POW", 1, 3, WINED3DSIH_POW, 0, 0 }, - {WINED3DSIO_CRS, "crs", "XPD", 1, 3, WINED3DSIH_CRS, 0, 0 }, - {WINED3DSIO_NRM, "nrm", NULL, 1, 2, WINED3DSIH_NRM, 0, 0 }, - {WINED3DSIO_SINCOS, "sincos", NULL, 1, 4, WINED3DSIH_SINCOS, WINED3DPS_VERSION(2,0), WINED3DPS_VERSION(2,1)}, - {WINED3DSIO_SINCOS, "sincos", "SCS", 1, 2, WINED3DSIH_SINCOS, WINED3DPS_VERSION(3,0), -1 }, - {WINED3DSIO_DP2ADD, "dp2add", NULL, 1, 4, WINED3DSIH_DP2ADD, WINED3DPS_VERSION(2,0), -1 }, + {WINED3DSIO_NOP, "nop", 0, 0, WINED3DSIH_NOP, 0, 0 }, + {WINED3DSIO_MOV, "mov", 1, 2, WINED3DSIH_MOV, 0, 0 }, + {WINED3DSIO_ADD, "add", 1, 3, WINED3DSIH_ADD, 0, 0 }, + {WINED3DSIO_SUB, "sub", 1, 3, WINED3DSIH_SUB, 0, 0 }, + {WINED3DSIO_MAD, "mad", 1, 4, WINED3DSIH_MAD, 0, 0 }, + {WINED3DSIO_MUL, "mul", 1, 3, WINED3DSIH_MUL, 0, 0 }, + {WINED3DSIO_RCP, "rcp", 1, 2, WINED3DSIH_RCP, 0, 0 }, + {WINED3DSIO_RSQ, "rsq", 1, 2, WINED3DSIH_RSQ, 0, 0 }, + {WINED3DSIO_DP3, "dp3", 1, 3, WINED3DSIH_DP3, 0, 0 }, + {WINED3DSIO_DP4, "dp4", 1, 3, WINED3DSIH_DP4, 0, 0 }, + {WINED3DSIO_MIN, "min", 1, 3, WINED3DSIH_MIN, 0, 0 }, + {WINED3DSIO_MAX, "max", 1, 3, WINED3DSIH_MAX, 0, 0 }, + {WINED3DSIO_SLT, "slt", 1, 3, WINED3DSIH_SLT, 0, 0 }, + {WINED3DSIO_SGE, "sge", 1, 3, WINED3DSIH_SGE, 0, 0 }, + {WINED3DSIO_ABS, "abs", 1, 2, WINED3DSIH_ABS, 0, 0 }, + {WINED3DSIO_EXP, "exp", 1, 2, WINED3DSIH_EXP, 0, 0 }, + {WINED3DSIO_LOG, "log", 1, 2, WINED3DSIH_LOG, 0, 0 }, + {WINED3DSIO_EXPP, "expp", 1, 2, WINED3DSIH_EXPP, 0, 0 }, + {WINED3DSIO_LOGP, "logp", 1, 2, WINED3DSIH_LOGP, 0, 0 }, + {WINED3DSIO_DST, "dst", 1, 3, WINED3DSIH_DST, 0, 0 }, + {WINED3DSIO_LRP, "lrp", 1, 4, WINED3DSIH_LRP, 0, 0 }, + {WINED3DSIO_FRC, "frc", 1, 2, WINED3DSIH_FRC, 0, 0 }, + {WINED3DSIO_CND, "cnd", 1, 4, WINED3DSIH_CND, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,4)}, + {WINED3DSIO_CMP, "cmp", 1, 4, WINED3DSIH_CMP, WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(3,0)}, + {WINED3DSIO_POW, "pow", 1, 3, WINED3DSIH_POW, 0, 0 }, + {WINED3DSIO_CRS, "crs", 1, 3, WINED3DSIH_CRS, 0, 0 }, + {WINED3DSIO_NRM, "nrm", 1, 2, WINED3DSIH_NRM, 0, 0 }, + {WINED3DSIO_SINCOS, "sincos", 1, 4, WINED3DSIH_SINCOS, WINED3DPS_VERSION(2,0), WINED3DPS_VERSION(2,1)}, + {WINED3DSIO_SINCOS, "sincos", 1, 2, WINED3DSIH_SINCOS, WINED3DPS_VERSION(3,0), -1 }, + {WINED3DSIO_DP2ADD, "dp2add", 1, 4, WINED3DSIH_DP2ADD, WINED3DPS_VERSION(2,0), -1 }, /* Matrix */ - {WINED3DSIO_M4x4, "m4x4", "undefined", 1, 3, WINED3DSIH_M4x4, 0, 0 }, - {WINED3DSIO_M4x3, "m4x3", "undefined", 1, 3, WINED3DSIH_M4x3, 0, 0 }, - {WINED3DSIO_M3x4, "m3x4", "undefined", 1, 3, WINED3DSIH_M3x4, 0, 0 }, - {WINED3DSIO_M3x3, "m3x3", "undefined", 1, 3, WINED3DSIH_M3x3, 0, 0 }, - {WINED3DSIO_M3x2, "m3x2", "undefined", 1, 3, WINED3DSIH_M3x2, 0, 0 }, + {WINED3DSIO_M4x4, "m4x4", 1, 3, WINED3DSIH_M4x4, 0, 0 }, + {WINED3DSIO_M4x3, "m4x3", 1, 3, WINED3DSIH_M4x3, 0, 0 }, + {WINED3DSIO_M3x4, "m3x4", 1, 3, WINED3DSIH_M3x4, 0, 0 }, + {WINED3DSIO_M3x3, "m3x3", 1, 3, WINED3DSIH_M3x3, 0, 0 }, + {WINED3DSIO_M3x2, "m3x2", 1, 3, WINED3DSIH_M3x2, 0, 0 }, /* Register declarations */ - {WINED3DSIO_DCL, "dcl", NULL, 0, 2, WINED3DSIH_DCL, 0, 0 }, + {WINED3DSIO_DCL, "dcl", 0, 2, WINED3DSIH_DCL, 0, 0 }, /* Flow control - requires GLSL or software shaders */ - {WINED3DSIO_REP , "rep", NULL, 0, 1, WINED3DSIH_REP, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_ENDREP, "endrep", NULL, 0, 0, WINED3DSIH_ENDREP, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_IF, "if", NULL, 0, 1, WINED3DSIH_IF, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_IFC, "ifc", NULL, 0, 2, WINED3DSIH_IFC, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_ELSE, "else", NULL, 0, 0, WINED3DSIH_ELSE, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_ENDIF, "endif", NULL, 0, 0, WINED3DSIH_ENDIF, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_BREAK, "break", NULL, 0, 0, WINED3DSIH_BREAK, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_BREAKC, "breakc", NULL, 0, 2, WINED3DSIH_BREAKC, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_BREAKP, "breakp", GLNAME_REQUIRE_GLSL, 0, 1, WINED3DSIH_BREAKP, 0, 0 }, - {WINED3DSIO_CALL, "call", NULL, 0, 1, WINED3DSIH_CALL, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_CALLNZ, "callnz", NULL, 0, 2, WINED3DSIH_CALLNZ, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_LOOP, "loop", NULL, 0, 2, WINED3DSIH_LOOP, WINED3DPS_VERSION(3,0), -1 }, - {WINED3DSIO_RET, "ret", NULL, 0, 0, WINED3DSIH_RET, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_ENDLOOP, "endloop", NULL, 0, 0, WINED3DSIH_ENDLOOP, WINED3DPS_VERSION(3,0), -1 }, - {WINED3DSIO_LABEL, "label", NULL, 0, 1, WINED3DSIH_LABEL, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_REP , "rep", 0, 1, WINED3DSIH_REP, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_ENDREP, "endrep", 0, 0, WINED3DSIH_ENDREP, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_IF, "if", 0, 1, WINED3DSIH_IF, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_IFC, "ifc", 0, 2, WINED3DSIH_IFC, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_ELSE, "else", 0, 0, WINED3DSIH_ELSE, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_ENDIF, "endif", 0, 0, WINED3DSIH_ENDIF, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_BREAK, "break", 0, 0, WINED3DSIH_BREAK, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_BREAKC, "breakc", 0, 2, WINED3DSIH_BREAKC, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_BREAKP, "breakp", 0, 1, WINED3DSIH_BREAKP, 0, 0 }, + {WINED3DSIO_CALL, "call", 0, 1, WINED3DSIH_CALL, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_CALLNZ, "callnz", 0, 2, WINED3DSIH_CALLNZ, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_LOOP, "loop", 0, 2, WINED3DSIH_LOOP, WINED3DPS_VERSION(3,0), -1 }, + {WINED3DSIO_RET, "ret", 0, 0, WINED3DSIH_RET, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_ENDLOOP, "endloop", 0, 0, WINED3DSIH_ENDLOOP, WINED3DPS_VERSION(3,0), -1 }, + {WINED3DSIO_LABEL, "label", 0, 1, WINED3DSIH_LABEL, WINED3DPS_VERSION(2,1), -1 }, /* Constant definitions */ - {WINED3DSIO_DEF, "def", "undefined", 1, 5, WINED3DSIH_DEF, 0, 0 }, - {WINED3DSIO_DEFB, "defb", GLNAME_REQUIRE_GLSL, 1, 2, WINED3DSIH_DEFB, 0, 0 }, - {WINED3DSIO_DEFI, "defi", GLNAME_REQUIRE_GLSL, 1, 5, WINED3DSIH_DEFI, 0, 0 }, + {WINED3DSIO_DEF, "def", 1, 5, WINED3DSIH_DEF, 0, 0 }, + {WINED3DSIO_DEFB, "defb", 1, 2, WINED3DSIH_DEFB, 0, 0 }, + {WINED3DSIO_DEFI, "defi", 1, 5, WINED3DSIH_DEFI, 0, 0 }, /* Texture */ - {WINED3DSIO_TEXCOORD, "texcoord", "undefined", 1, 1, WINED3DSIH_TEXCOORD, 0, WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXCOORD, "texcrd", "undefined", 1, 2, WINED3DSIH_TEXCOORD, WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)}, - {WINED3DSIO_TEXKILL, "texkill", "KIL", 1, 1, WINED3DSIH_TEXKILL, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(3,0)}, - {WINED3DSIO_TEX, "tex", "undefined", 1, 1, WINED3DSIH_TEX, 0, WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEX, "texld", "undefined", 1, 2, WINED3DSIH_TEX, WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)}, - {WINED3DSIO_TEX, "texld", "undefined", 1, 3, WINED3DSIH_TEX, WINED3DPS_VERSION(2,0), -1 }, - {WINED3DSIO_TEXBEM, "texbem", "undefined", 1, 2, WINED3DSIH_TEXBEM, 0, WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXBEML, "texbeml", GLNAME_REQUIRE_GLSL, 1, 2, WINED3DSIH_TEXBEML, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXREG2AR, "texreg2ar", "undefined", 1, 2, WINED3DSIH_TEXREG2AR, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXREG2GB, "texreg2gb", "undefined", 1, 2, WINED3DSIH_TEXREG2GB, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXREG2RGB, "texreg2rgb", "undefined", 1, 2, WINED3DSIH_TEXREG2RGB, WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXM3x2PAD, "texm3x2pad", "undefined", 1, 2, WINED3DSIH_TEXM3x2PAD, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXM3x2TEX, "texm3x2tex", "undefined", 1, 2, WINED3DSIH_TEXM3x2TEX, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXM3x3PAD, "texm3x3pad", "undefined", 1, 2, WINED3DSIH_TEXM3x3PAD, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXM3x3DIFF, "texm3x3diff", GLNAME_REQUIRE_GLSL, 1, 2, WINED3DSIH_TEXM3x3DIFF, WINED3DPS_VERSION(0,0), WINED3DPS_VERSION(0,0)}, - {WINED3DSIO_TEXM3x3SPEC, "texm3x3spec", "undefined", 1, 3, WINED3DSIH_TEXM3x3SPEC, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXM3x3VSPEC, "texm3x3vspec", "undefined", 1, 2, WINED3DSIH_TEXM3x3VSPEC, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXM3x3TEX, "texm3x3tex", "undefined", 1, 2, WINED3DSIH_TEXM3x3TEX, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXDP3TEX, "texdp3tex", NULL, 1, 2, WINED3DSIH_TEXDP3TEX, WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXM3x2DEPTH, "texm3x2depth", GLNAME_REQUIRE_GLSL, 1, 2, WINED3DSIH_TEXM3x2DEPTH, WINED3DPS_VERSION(1,3), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXDP3, "texdp3", NULL, 1, 2, WINED3DSIH_TEXDP3, WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXM3x3, "texm3x3", NULL, 1, 2, WINED3DSIH_TEXM3x3, WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(1,3)}, - {WINED3DSIO_TEXDEPTH, "texdepth", NULL, 1, 1, WINED3DSIH_TEXDEPTH, WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)}, - {WINED3DSIO_BEM, "bem", "undefined", 1, 3, WINED3DSIH_BEM, WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)}, - {WINED3DSIO_DSX, "dsx", NULL, 1, 2, WINED3DSIH_DSX, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_DSY, "dsy", NULL, 1, 2, WINED3DSIH_DSY, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_TEXLDD, "texldd", GLNAME_REQUIRE_GLSL, 1, 5, WINED3DSIH_TEXLDD, WINED3DPS_VERSION(2,1), -1 }, - {WINED3DSIO_SETP, "setp", GLNAME_REQUIRE_GLSL, 1, 3, WINED3DSIH_SETP, 0, 0 }, - {WINED3DSIO_TEXLDL, "texldl", NULL, 1, 3, WINED3DSIH_TEXLDL, WINED3DPS_VERSION(3,0), -1 }, - {WINED3DSIO_PHASE, "phase", GLNAME_REQUIRE_GLSL, 0, 0, WINED3DSIH_PHASE, 0, 0 }, - {0, NULL, NULL, 0, 0, 0, 0, 0 } + {WINED3DSIO_TEXCOORD, "texcoord", 1, 1, WINED3DSIH_TEXCOORD, 0, WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXCOORD, "texcrd", 1, 2, WINED3DSIH_TEXCOORD, WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)}, + {WINED3DSIO_TEXKILL, "texkill", 1, 1, WINED3DSIH_TEXKILL, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(3,0)}, + {WINED3DSIO_TEX, "tex", 1, 1, WINED3DSIH_TEX, 0, WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEX, "texld", 1, 2, WINED3DSIH_TEX, WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)}, + {WINED3DSIO_TEX, "texld", 1, 3, WINED3DSIH_TEX, WINED3DPS_VERSION(2,0), -1 }, + {WINED3DSIO_TEXBEM, "texbem", 1, 2, WINED3DSIH_TEXBEM, 0, WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXBEML, "texbeml", 1, 2, WINED3DSIH_TEXBEML, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXREG2AR, "texreg2ar", 1, 2, WINED3DSIH_TEXREG2AR, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXREG2GB, "texreg2gb", 1, 2, WINED3DSIH_TEXREG2GB, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXREG2RGB, "texreg2rgb", 1, 2, WINED3DSIH_TEXREG2RGB, WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXM3x2PAD, "texm3x2pad", 1, 2, WINED3DSIH_TEXM3x2PAD, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXM3x2TEX, "texm3x2tex", 1, 2, WINED3DSIH_TEXM3x2TEX, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXM3x3PAD, "texm3x3pad", 1, 2, WINED3DSIH_TEXM3x3PAD, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXM3x3DIFF, "texm3x3diff", 1, 2, WINED3DSIH_TEXM3x3DIFF, WINED3DPS_VERSION(0,0), WINED3DPS_VERSION(0,0)}, + {WINED3DSIO_TEXM3x3SPEC, "texm3x3spec", 1, 3, WINED3DSIH_TEXM3x3SPEC, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXM3x3VSPEC, "texm3x3vspec", 1, 2, WINED3DSIH_TEXM3x3VSPEC, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXM3x3TEX, "texm3x3tex", 1, 2, WINED3DSIH_TEXM3x3TEX, WINED3DPS_VERSION(1,0), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXDP3TEX, "texdp3tex", 1, 2, WINED3DSIH_TEXDP3TEX, WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXM3x2DEPTH, "texm3x2depth", 1, 2, WINED3DSIH_TEXM3x2DEPTH, WINED3DPS_VERSION(1,3), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXDP3, "texdp3", 1, 2, WINED3DSIH_TEXDP3, WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXM3x3, "texm3x3", 1, 2, WINED3DSIH_TEXM3x3, WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(1,3)}, + {WINED3DSIO_TEXDEPTH, "texdepth", 1, 1, WINED3DSIH_TEXDEPTH, WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)}, + {WINED3DSIO_BEM, "bem", 1, 3, WINED3DSIH_BEM, WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)}, + {WINED3DSIO_DSX, "dsx", 1, 2, WINED3DSIH_DSX, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_DSY, "dsy", 1, 2, WINED3DSIH_DSY, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_TEXLDD, "texldd", 1, 5, WINED3DSIH_TEXLDD, WINED3DPS_VERSION(2,1), -1 }, + {WINED3DSIO_SETP, "setp", 1, 3, WINED3DSIH_SETP, 0, 0 }, + {WINED3DSIO_TEXLDL, "texldl", 1, 3, WINED3DSIH_TEXLDL, WINED3DPS_VERSION(3,0), -1 }, + {WINED3DSIO_PHASE, "phase", 0, 0, WINED3DSIH_PHASE, 0, 0 }, + {0, NULL, 0, 0, 0, 0, 0 } }; static void pshader_set_limits( @@ -479,7 +479,9 @@ void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImp { if(((IWineD3DDeviceImpl *) shader->baseShader.device)->strided_streams.u.s.position_transformed) { args->vp_mode = pretransformed; - } else if(use_vs((IWineD3DDeviceImpl *) shader->baseShader.device)) { + } + else if (use_vs(stateblock)) + { args->vp_mode = vertexshader; } else { args->vp_mode = fixedfunction; @@ -490,8 +492,9 @@ void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImp if(stateblock->renderState[WINED3DRS_FOGENABLE]) { switch(stateblock->renderState[WINED3DRS_FOGTABLEMODE]) { case WINED3DFOG_NONE: - if(((IWineD3DDeviceImpl *) shader->baseShader.device)->strided_streams.u.s.position_transformed || - use_vs((IWineD3DDeviceImpl *) shader->baseShader.device)) { + if (((IWineD3DDeviceImpl *)shader->baseShader.device)->strided_streams.u.s.position_transformed + || use_vs(stateblock)) + { args->fog = FOG_LINEAR; break; } diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index e4c819d2590..928a4bbbaaa 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -532,7 +532,8 @@ static void state_clipping(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine DWORD enable = 0xFFFFFFFF; DWORD disable = 0x00000000; - if (use_vs(stateblock->wineD3DDevice)) { + if (use_vs(stateblock)) + { /* The spec says that opengl clipping planes are disabled when using shaders. Direct3D planes aren't, * so that is an issue. The MacOS ATI driver keeps clipping planes activated with shaders in some * conditions I got sick of tracking down. The shader state handler disables all clip planes because @@ -898,8 +899,7 @@ static void state_stencilwrite(DWORD state, IWineD3DStateBlockImpl *stateblock, static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { BOOL fogenable = stateblock->renderState[WINED3DRS_FOGENABLE]; IWineD3DPixelShaderImpl *ps_impl = (IWineD3DPixelShaderImpl *)stateblock->pixelShader; - BOOL is_ps3 = use_ps(stateblock->wineD3DDevice) - && ps_impl->baseShader.reg_maps.shader_version >= WINED3DPS_VERSION(3,0); + BOOL is_ps3 = use_ps(stateblock) && ps_impl->baseShader.reg_maps.shader_version >= WINED3DPS_VERSION(3,0); float fogstart, fogend; union { @@ -956,14 +956,14 @@ static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo */ if( is_ps3 ) { - if( !use_vs(stateblock->wineD3DDevice) - && stateblock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE ) { + if (!use_vs(stateblock) && stateblock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE) + { FIXME("Implement vertex fog for pixel shader >= 3.0 and fixed function pipeline\n"); } } - if (use_vs(stateblock->wineD3DDevice) - && ((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->baseShader.reg_maps.fog) { + if (use_vs(stateblock) && ((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->baseShader.reg_maps.fog) + { if( stateblock->renderState[WINED3DRS_FOGTABLEMODE] != WINED3DFOG_NONE ) { if(!is_ps3) FIXME("Implement table fog for foggy vertex shader\n"); /* Disable fog */ @@ -983,7 +983,8 @@ static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo } context->last_was_foggy_shader = TRUE; } - else if( use_ps(stateblock->wineD3DDevice) ) { + else if (use_ps(stateblock)) + { /* NOTE: For pixel shader, GL_FOG_START and GL_FOG_END don't hold fog start s and end e but * -1/(e-s) and e/(e-s) respectively to simplify fog computation in the shader. */ @@ -2882,12 +2883,12 @@ static void set_tex_op(IWineD3DDevice *iface, BOOL isAlpha, int Stage, WINED3DTE static void tex_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE; DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[stage]; - BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map[stage]; + BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map & (1 << stage); TRACE("Setting color op for stage %d\n", stage); /* Using a pixel shader? Don't care for anything here, the shader applying does it */ - if (use_ps(stateblock->wineD3DDevice)) return; + if (use_ps(stateblock)) return; if (stage != mapped_stage) WARN("Using non 1:1 mapping: %d -> %d!\n", stage, mapped_stage); @@ -2938,7 +2939,7 @@ static void tex_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE; DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[stage]; - BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map[stage]; + BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map & (1 << stage); DWORD op, arg1, arg2, arg0; TRACE("Setting alpha op for stage %d\n", stage); @@ -3041,8 +3042,8 @@ static void transform_texture(DWORD state, IWineD3DStateBlockImpl *stateblock, W int coordIdx; /* Ignore this when a vertex shader is used, or if the streams aren't sorted out yet */ - if(use_vs(stateblock->wineD3DDevice) || - isStateDirty(context, STATE_VDECL)) { + if (use_vs(stateblock) || isStateDirty(context, STATE_VDECL)) + { TRACE("Using a vertex shader, or stream sources not sorted out yet, skipping\n"); return; } @@ -3067,7 +3068,8 @@ static void transform_texture(DWORD state, IWineD3DStateBlockImpl *stateblock, W stateblock->wineD3DDevice->frag_pipe->ffp_proj_control); /* The sampler applying function calls us if this changes */ - if(context->lastWasPow2Texture[texUnit] && stateblock->textures[texUnit]) { + if ((context->lastWasPow2Texture & (1 << texUnit)) && stateblock->textures[texUnit]) + { if(generated) { FIXME("Non-power2 texture being used with generated texture coords\n"); } @@ -3309,7 +3311,7 @@ static void shaderconstant(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine return; } - device->shader_backend->shader_load_constants((IWineD3DDevice *) device, use_ps(device), use_vs(device)); + device->shader_backend->shader_load_constants((IWineD3DDevice *)device, use_ps(stateblock), use_vs(stateblock)); } static void tex_bumpenvlscale(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { @@ -3357,8 +3359,10 @@ static void sampler_texmatrix(DWORD state, IWineD3DStateBlockImpl *stateblock, W } } - if(texIsPow2 || context->lastWasPow2Texture[sampler]) { - context->lastWasPow2Texture[sampler] = texIsPow2; + if (texIsPow2 || (context->lastWasPow2Texture & (1 << sampler))) + { + if (texIsPow2) context->lastWasPow2Texture |= 1 << sampler; + else context->lastWasPow2Texture &= ~(1 << sampler); transform_texture(STATE_TEXTURESTAGE(stateblock->wineD3DDevice->texUnitMap[sampler], WINED3DTSS_TEXTURETRANSFORMFLAGS), stateblock, context); } } @@ -3401,7 +3405,8 @@ static void sampler(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCont checkGLcall("glTexEnvi(GL_TEXTURE_LOD_BIAS_EXT, ...)"); } - if(!use_ps(stateblock->wineD3DDevice) && sampler < stateblock->lowest_disabled_stage) { + if (!use_ps(stateblock) && sampler < stateblock->lowest_disabled_stage) + { if(stateblock->renderState[WINED3DRS_COLORKEYENABLE] && sampler == 0) { /* If color keying is enabled update the alpha test, it depends on the existence * of a color key in stage 0 @@ -3425,9 +3430,8 @@ static void sampler(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCont } static void apply_pshader_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { - IWineD3DDeviceImpl *device = stateblock->wineD3DDevice; - - if (use_ps(device)) { + if (use_ps(stateblock)) + { if(!context->last_was_pshader) { state_fog(state, stateblock, context); } @@ -3442,8 +3446,8 @@ static void apply_pshader_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, W void apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { IWineD3DDeviceImpl *device = stateblock->wineD3DDevice; - BOOL use_pshader = use_ps(device); - BOOL use_vshader = use_vs(device); + BOOL use_pshader = use_ps(stateblock); + BOOL use_vshader = use_vs(stateblock); int i; if (use_pshader) { @@ -4383,8 +4387,8 @@ static void streamsrc(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { BOOL updateFog = FALSE; - BOOL useVertexShaderFunction = use_vs(stateblock->wineD3DDevice); - BOOL usePixelShaderFunction = use_ps(stateblock->wineD3DDevice); + BOOL useVertexShaderFunction = use_vs(stateblock); + BOOL usePixelShaderFunction = use_ps(stateblock); BOOL transformed; /* Some stuff is in the device until we have per context tracking */ IWineD3DDeviceImpl *device = stateblock->wineD3DDevice; diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index e1d4627e2d9..81614b4e522 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -86,14 +86,14 @@ static void stateblock_savedstates_copy(IWineD3DStateBlock* iface, SAVEDSTATES * dest->scissorRect = dest->scissorRect; /* Fixed size arrays */ - memcpy(dest->streamSource, source->streamSource, bsize * MAX_STREAMS); - memcpy(dest->streamFreq, source->streamFreq, bsize * MAX_STREAMS); - memcpy(dest->textures, source->textures, bsize * MAX_COMBINED_SAMPLERS); - memcpy(dest->transform, source->transform, bsize * (HIGHEST_TRANSFORMSTATE + 1)); - memcpy(dest->renderState, source->renderState, bsize * (WINEHIGHEST_RENDER_STATE + 1)); + dest->streamSource = source->streamSource; + dest->streamFreq = source->streamFreq; + dest->textures = source->textures; + memcpy(dest->transform, source->transform, sizeof(source->transform)); + memcpy(dest->renderState, source->renderState, sizeof(source->renderState)); memcpy(dest->textureState, source->textureState, bsize * MAX_TEXTURES * (WINED3D_HIGHEST_TEXTURE_STATE + 1)); - memcpy(dest->samplerState, source->samplerState, bsize * MAX_COMBINED_SAMPLERS * (WINED3D_HIGHEST_SAMPLER_STATE + 1)); - memcpy(dest->clipplane, source->clipplane, bsize * MAX_CLIPPLANES); + memcpy(dest->samplerState, source->samplerState, sizeof(source->samplerState)); + dest->clipplane = source->clipplane; dest->pixelShaderConstantsB = source->pixelShaderConstantsB; dest->pixelShaderConstantsI = source->pixelShaderConstantsI; dest->vertexShaderConstantsB = source->vertexShaderConstantsB; @@ -104,6 +104,13 @@ static void stateblock_savedstates_copy(IWineD3DStateBlock* iface, SAVEDSTATES * memcpy(dest->vertexShaderConstantsF, source->vertexShaderConstantsF, bsize * GL_LIMITS(vshader_constantsF)); } +static inline void stateblock_set_bits(DWORD *map, UINT map_size) +{ + DWORD mask = (1 << (map_size & 0x1f)) - 1; + memset(map, 0xff, (map_size >> 5) * sizeof(*map)); + if (mask) map[map_size >> 5] = mask; +} + /** Set all members of a stateblock savedstate to the given value */ void stateblock_savedstates_set( IWineD3DStateBlock* iface, @@ -123,18 +130,36 @@ void stateblock_savedstates_set( states->scissorRect = value; /* Fixed size arrays */ - memset(states->streamSource, value, bsize * MAX_STREAMS); - memset(states->streamFreq, value, bsize * MAX_STREAMS); - memset(states->textures, value, bsize * MAX_COMBINED_SAMPLERS); - memset(states->transform, value, bsize * (HIGHEST_TRANSFORMSTATE + 1)); - memset(states->renderState, value, bsize * (WINEHIGHEST_RENDER_STATE + 1)); + if (value) + { + int i; + states->streamSource = 0xffff; + states->streamFreq = 0xffff; + states->textures = 0xfffff; + stateblock_set_bits(states->transform, HIGHEST_TRANSFORMSTATE + 1); + stateblock_set_bits(states->renderState, WINEHIGHEST_RENDER_STATE + 1); + for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) states->samplerState[i] = 0x3fff; + states->clipplane = 0xffffffff; + states->pixelShaderConstantsB = 0xffff; + states->pixelShaderConstantsI = 0xffff; + states->vertexShaderConstantsB = 0xffff; + states->vertexShaderConstantsI = 0xffff; + } + else + { + states->streamSource = 0; + states->streamFreq = 0; + states->textures = 0; + memset(states->transform, 0, sizeof(states->transform)); + memset(states->renderState, 0, sizeof(states->renderState)); + memset(states->samplerState, 0, sizeof(states->samplerState)); + states->clipplane = 0; + states->pixelShaderConstantsB = 0; + states->pixelShaderConstantsI = 0; + states->vertexShaderConstantsB = 0; + states->vertexShaderConstantsI = 0; + } memset(states->textureState, value, bsize * MAX_TEXTURES * (WINED3D_HIGHEST_TEXTURE_STATE + 1)); - memset(states->samplerState, value, bsize * MAX_COMBINED_SAMPLERS * (WINED3D_HIGHEST_SAMPLER_STATE + 1)); - memset(states->clipplane, value, bsize * MAX_CLIPPLANES); - states->pixelShaderConstantsB = value ? 0xffff : 0; - states->pixelShaderConstantsI = value ? 0xffff : 0; - states->vertexShaderConstantsB = value ? 0xffff : 0; - states->vertexShaderConstantsI = value ? 0xffff : 0; /* Dynamically sized arrays */ memset(states->pixelShaderConstantsF, value, bsize * GL_LIMITS(pshader_constantsF)); @@ -372,6 +397,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface; IWineD3DStateBlockImpl *targetStateBlock = This->wineD3DDevice->stateBlock; unsigned int i, j; + DWORD map; TRACE("(%p) : Updating state block %p ------------------v\n", targetStateBlock, This); @@ -390,11 +416,11 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) /* Vertex Shader Float Constants */ for (j = 0; j < This->num_contained_vs_consts_f; ++j) { i = This->contained_vs_consts_f[j]; - TRACE("Setting %p from %p %d to { %f, %f, %f, %f }\n", This, targetStateBlock, i, - targetStateBlock->vertexShaderConstantF[i * 4], - targetStateBlock->vertexShaderConstantF[i * 4 + 1], - targetStateBlock->vertexShaderConstantF[i * 4 + 2], - targetStateBlock->vertexShaderConstantF[i * 4 + 3]); + TRACE("Setting %p from %p %u to {%f, %f, %f, %f}\n", This, targetStateBlock, i, + targetStateBlock->vertexShaderConstantF[i * 4], + targetStateBlock->vertexShaderConstantF[i * 4 + 1], + targetStateBlock->vertexShaderConstantF[i * 4 + 2], + targetStateBlock->vertexShaderConstantF[i * 4 + 3]); This->vertexShaderConstantF[i * 4] = targetStateBlock->vertexShaderConstantF[i * 4]; This->vertexShaderConstantF[i * 4 + 1] = targetStateBlock->vertexShaderConstantF[i * 4 + 1]; @@ -405,11 +431,11 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) /* Vertex Shader Integer Constants */ for (j = 0; j < This->num_contained_vs_consts_i; ++j) { i = This->contained_vs_consts_i[j]; - TRACE("Setting %p from %p %d to { %d, %d, %d, %d }\n", This, targetStateBlock, i, - targetStateBlock->vertexShaderConstantI[i * 4], - targetStateBlock->vertexShaderConstantI[i * 4 + 1], - targetStateBlock->vertexShaderConstantI[i * 4 + 2], - targetStateBlock->vertexShaderConstantI[i * 4 + 3]); + TRACE("Setting %p from %p %u to {%d, %d, %d, %d}\n", This, targetStateBlock, i, + targetStateBlock->vertexShaderConstantI[i * 4], + targetStateBlock->vertexShaderConstantI[i * 4 + 1], + targetStateBlock->vertexShaderConstantI[i * 4 + 2], + targetStateBlock->vertexShaderConstantI[i * 4 + 3]); This->vertexShaderConstantI[i * 4] = targetStateBlock->vertexShaderConstantI[i * 4]; This->vertexShaderConstantI[i * 4 + 1] = targetStateBlock->vertexShaderConstantI[i * 4 + 1]; @@ -420,8 +446,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) /* Vertex Shader Boolean Constants */ for (j = 0; j < This->num_contained_vs_consts_b; ++j) { i = This->contained_vs_consts_b[j]; - TRACE("Setting %p from %p %d to %s\n", This, targetStateBlock, i, - targetStateBlock->vertexShaderConstantB[i]? "TRUE":"FALSE"); + TRACE("Setting %p from %p %u to %s\n", This, targetStateBlock, i, + targetStateBlock->vertexShaderConstantB[i] ? "TRUE" : "FALSE"); This->vertexShaderConstantB[i] = targetStateBlock->vertexShaderConstantB[i]; } @@ -429,11 +455,11 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) /* Pixel Shader Float Constants */ for (j = 0; j < This->num_contained_ps_consts_f; ++j) { i = This->contained_ps_consts_f[j]; - TRACE("Setting %p from %p %d to { %f, %f, %f, %f }\n", This, targetStateBlock, i, - targetStateBlock->pixelShaderConstantF[i * 4], - targetStateBlock->pixelShaderConstantF[i * 4 + 1], - targetStateBlock->pixelShaderConstantF[i * 4 + 2], - targetStateBlock->pixelShaderConstantF[i * 4 + 3]); + TRACE("Setting %p from %p %u to {%f, %f, %f, %f}\n", This, targetStateBlock, i, + targetStateBlock->pixelShaderConstantF[i * 4], + targetStateBlock->pixelShaderConstantF[i * 4 + 1], + targetStateBlock->pixelShaderConstantF[i * 4 + 2], + targetStateBlock->pixelShaderConstantF[i * 4 + 3]); This->pixelShaderConstantF[i * 4] = targetStateBlock->pixelShaderConstantF[i * 4]; This->pixelShaderConstantF[i * 4 + 1] = targetStateBlock->pixelShaderConstantF[i * 4 + 1]; @@ -444,11 +470,11 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) /* Pixel Shader Integer Constants */ for (j = 0; j < This->num_contained_ps_consts_i; ++j) { i = This->contained_ps_consts_i[j]; - TRACE("Setting %p from %p %d to { %d, %d, %d, %d }\n", This, targetStateBlock, i, - targetStateBlock->pixelShaderConstantI[i * 4], - targetStateBlock->pixelShaderConstantI[i * 4 + 1], - targetStateBlock->pixelShaderConstantI[i * 4 + 2], - targetStateBlock->pixelShaderConstantI[i * 4 + 3]); + TRACE("Setting %p from %p %u to {%d, %d, %d, %d}\n", This, targetStateBlock, i, + targetStateBlock->pixelShaderConstantI[i * 4], + targetStateBlock->pixelShaderConstantI[i * 4 + 1], + targetStateBlock->pixelShaderConstantI[i * 4 + 2], + targetStateBlock->pixelShaderConstantI[i * 4 + 3]); This->pixelShaderConstantI[i * 4] = targetStateBlock->pixelShaderConstantI[i * 4]; This->pixelShaderConstantI[i * 4 + 1] = targetStateBlock->pixelShaderConstantI[i * 4 + 1]; @@ -459,23 +485,23 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) /* Pixel Shader Boolean Constants */ for (j = 0; j < This->num_contained_ps_consts_b; ++j) { i = This->contained_ps_consts_b[j]; - TRACE("Setting %p from %p %d to %s\n", This, targetStateBlock, i, - targetStateBlock->pixelShaderConstantB[i]? "TRUE":"FALSE"); + TRACE("Setting %p from %p %u to %s\n", This, targetStateBlock, i, + targetStateBlock->pixelShaderConstantB[i] ? "TRUE" : "FALSE"); This->pixelShaderConstantB[i] = targetStateBlock->pixelShaderConstantB[i]; } /* Others + Render & Texture */ for (i = 0; i < This->num_contained_transform_states; i++) { - TRACE("Updating transform %d\n", i); + TRACE("Updating transform %u\n", i); This->transforms[This->contained_transform_states[i]] = targetStateBlock->transforms[This->contained_transform_states[i]]; } if (This->changed.indices && ((This->pIndexData != targetStateBlock->pIndexData) || (This->baseVertexIndex != targetStateBlock->baseVertexIndex))) { - TRACE("Updating pindexData to %p, baseVertexIndex to %d\n", - targetStateBlock->pIndexData, targetStateBlock->baseVertexIndex); + TRACE("Updating pIndexData to %p, baseVertexIndex to %d\n", + targetStateBlock->pIndexData, targetStateBlock->baseVertexIndex); if(targetStateBlock->pIndexData) IWineD3DIndexBuffer_AddRef(targetStateBlock->pIndexData); if(This->pIndexData) IWineD3DIndexBuffer_Release(This->pIndexData); This->pIndexData = targetStateBlock->pIndexData; @@ -510,41 +536,54 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) targetStateBlock->scissorRect = This->scissorRect; } - for (i = 0; i < MAX_STREAMS; i++) { - if (This->changed.streamSource[i] && - ((This->streamStride[i] != targetStateBlock->streamStride[i]) || - (This->streamSource[i] != targetStateBlock->streamSource[i]))) { - TRACE("Updating stream source %d to %p, stride to %d\n", i, targetStateBlock->streamSource[i], - targetStateBlock->streamStride[i]); + map = This->changed.streamSource; + for (i = 0; map; map >>= 1, ++i) + { + if (!(map & 1)) continue; + + if (This->streamStride[i] != targetStateBlock->streamStride[i] + || This->streamSource[i] != targetStateBlock->streamSource[i]) + { + TRACE("Updating stream source %u to %p, stride to %u\n", + i, targetStateBlock->streamSource[i], targetStateBlock->streamStride[i]); This->streamStride[i] = targetStateBlock->streamStride[i]; if(targetStateBlock->streamSource[i]) IWineD3DVertexBuffer_AddRef(targetStateBlock->streamSource[i]); if(This->streamSource[i]) IWineD3DVertexBuffer_Release(This->streamSource[i]); This->streamSource[i] = targetStateBlock->streamSource[i]; } + } + + map = This->changed.streamFreq; + for (i = 0; map; map >>= 1, ++i) + { + if (!(map & 1)) continue; - if (This->changed.streamFreq[i] && - (This->streamFreq[i] != targetStateBlock->streamFreq[i] - || This->streamFlags[i] != targetStateBlock->streamFlags[i])){ - TRACE("Updating stream frequency %d to %d flags to %d\n", i , targetStateBlock->streamFreq[i] , - targetStateBlock->streamFlags[i]); - This->streamFreq[i] = targetStateBlock->streamFreq[i]; - This->streamFlags[i] = targetStateBlock->streamFlags[i]; + if (This->streamFreq[i] != targetStateBlock->streamFreq[i] + || This->streamFlags[i] != targetStateBlock->streamFlags[i]) + { + TRACE("Updating stream frequency %u to %u flags to %#x\n", + i, targetStateBlock->streamFreq[i], targetStateBlock->streamFlags[i]); + This->streamFreq[i] = targetStateBlock->streamFreq[i]; + This->streamFlags[i] = targetStateBlock->streamFlags[i]; } } - for (i = 0; i < GL_LIMITS(clipplanes); i++) { - if (This->changed.clipplane[i] - && memcmp(targetStateBlock->clipplane[i], This->clipplane[i], sizeof(*This->clipplane))) + map = This->changed.clipplane; + for (i = 0; map; map >>= 1, ++i) + { + if (!(map & 1)) continue; + + if (memcmp(targetStateBlock->clipplane[i], This->clipplane[i], sizeof(*This->clipplane))) { - TRACE("Updating clipplane %d\n", i); + TRACE("Updating clipplane %u\n", i); memcpy(This->clipplane[i], targetStateBlock->clipplane[i], sizeof(*This->clipplane)); } } /* Render */ for (i = 0; i < This->num_contained_render_states; i++) { - TRACE("Updating renderState %d to %d\n", - This->contained_render_states[i], targetStateBlock->renderState[This->contained_render_states[i]]); + TRACE("Updating renderState %u to %u\n", This->contained_render_states[i], + targetStateBlock->renderState[This->contained_render_states[i]]); This->renderState[This->contained_render_states[i]] = targetStateBlock->renderState[This->contained_render_states[i]]; } @@ -553,26 +592,27 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) DWORD stage = This->contained_tss_states[j].stage; DWORD state = This->contained_tss_states[j].state; - TRACE("Updating texturestagestate %d,%d to %d (was %d)\n", stage,state, - targetStateBlock->textureState[stage][state], This->textureState[stage][state]); - This->textureState[stage][state] = targetStateBlock->textureState[stage][state]; + TRACE("Updating texturestage state %u, %u to %u (was %u)\n", stage, state, + targetStateBlock->textureState[stage][state], This->textureState[stage][state]); + This->textureState[stage][state] = targetStateBlock->textureState[stage][state]; } /* Samplers */ /* TODO: move over to using memcpy */ - for (j = 0; j < MAX_COMBINED_SAMPLERS; j++) { - if (This->changed.textures[j]) { - TRACE("Updating texture %d to %p (was %p)\n", j, targetStateBlock->textures[j], This->textures[j]); - This->textures[j] = targetStateBlock->textures[j]; - } + map = This->changed.textures; + for (i = 0; map; map >>= 1, ++i) + { + if (!(map & 1)) continue; + + TRACE("Updating texture %u to %p (was %p)\n", i, targetStateBlock->textures[i], This->textures[i]); + This->textures[i] = targetStateBlock->textures[i]; } for (j = 0; j < This->num_contained_sampler_states; j++) { DWORD stage = This->contained_sampler_states[j].stage; DWORD state = This->contained_sampler_states[j].state; - TRACE("Updating sampler state %d,%d to %d (was %d)\n", - stage, state, targetStateBlock->samplerState[stage][state], - This->samplerState[stage][state]); + TRACE("Updating sampler state %u, %u to %u (was %u)\n", stage, state, + targetStateBlock->samplerState[stage][state], This->samplerState[stage][state]); This->samplerState[stage][state] = targetStateBlock->samplerState[stage][state]; } if(This->changed.pixelShader && This->pixelShader != targetStateBlock->pixelShader) { @@ -715,6 +755,7 @@ should really perform a delta so that only the changes get updated*/ UINT i; UINT j; + DWORD map; TRACE("(%p) : Applying state block %p ------------------v\n", This, pDevice); @@ -776,7 +817,7 @@ should really perform a delta so that only the changes get updated*/ DWORD stage = This->contained_sampler_states[i].stage; DWORD state = This->contained_sampler_states[i].state; ((IWineD3DDeviceImpl *)pDevice)->stateBlock->samplerState[stage][state] = This->samplerState[stage][state]; - ((IWineD3DDeviceImpl *)pDevice)->stateBlock->changed.samplerState[stage][state] = TRUE; + ((IWineD3DDeviceImpl *)pDevice)->stateBlock->changed.samplerState[stage] |= 1 << state; IWineD3DDeviceImpl_MarkStateDirty((IWineD3DDeviceImpl *)pDevice, STATE_SAMPLER(stage)); } @@ -807,35 +848,41 @@ should really perform a delta so that only the changes get updated*/ } /* TODO: Proper implementation using SetStreamSource offset (set to 0 for the moment)\n") */ - for (i=0; ichanged.streamSource[i]) - IWineD3DDevice_SetStreamSource(pDevice, i, This->streamSource[i], 0, This->streamStride[i]); - - if (This->changed.streamFreq[i]) - IWineD3DDevice_SetStreamSourceFreq(pDevice, i, This->streamFreq[i] | This->streamFlags[i]); + map = This->changed.streamSource; + for (i = 0; map; map >>= 1, ++i) + { + if (map & 1) IWineD3DDevice_SetStreamSource(pDevice, i, This->streamSource[i], 0, This->streamStride[i]); } - for (j = 0 ; j < MAX_COMBINED_SAMPLERS; j++){ - if (This->changed.textures[j]) { - if (j < MAX_FRAGMENT_SAMPLERS) { - IWineD3DDevice_SetTexture(pDevice, j, This->textures[j]); - } else { - IWineD3DDevice_SetTexture(pDevice, WINED3DVERTEXTEXTURESAMPLER0 + j - MAX_FRAGMENT_SAMPLERS, This->textures[j]); - } - } + + map = This->changed.streamFreq; + for (i = 0; map; map >>= 1, ++i) + { + if (map & 1) IWineD3DDevice_SetStreamSourceFreq(pDevice, i, This->streamFreq[i] | This->streamFlags[i]); } - for (i = 0; i < GL_LIMITS(clipplanes); i++) { - if (This->changed.clipplane[i]) { - float clip[4]; - - clip[0] = This->clipplane[i][0]; - clip[1] = This->clipplane[i][1]; - clip[2] = This->clipplane[i][2]; - clip[3] = This->clipplane[i][3]; - IWineD3DDevice_SetClipPlane(pDevice, i, clip); - } + map = This->changed.textures; + for (i = 0; map; map >>= 1, ++i) + { + if (!(map & 1)) continue; + + if (i < MAX_FRAGMENT_SAMPLERS) IWineD3DDevice_SetTexture(pDevice, i, This->textures[i]); + else IWineD3DDevice_SetTexture(pDevice, WINED3DVERTEXTEXTURESAMPLER0 + i - MAX_FRAGMENT_SAMPLERS, + This->textures[i]); } + map = This->changed.clipplane; + for (i = 0; map; map >>= 1, ++i) + { + float clip[4]; + + if (!(map & 1)) continue; + + clip[0] = This->clipplane[i][0]; + clip[1] = This->clipplane[i][1]; + clip[2] = This->clipplane[i][2]; + clip[3] = This->clipplane[i][3]; + IWineD3DDevice_SetClipPlane(pDevice, i, clip); + } } else if(This->blockType == WINED3DSBT_VERTEXSTATE) { IWineD3DDevice_SetVertexShader(pDevice, This->vertexShader); for (i = 0; i < GL_LIMITS(vshader_constantsF); i++) { @@ -1107,7 +1154,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat IWineD3DDevice_SetRenderState(device, WINED3DRS_SOFTWAREVERTEXPROCESSING, FALSE); tmpfloat.f = 1.0f; IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSIZE, tmpfloat.d); - tmpfloat.f = 1.0f; + tmpfloat.f = ((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion < 9 ? 0.0f : 1.0f; IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSIZE_MIN, tmpfloat.d); IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSPRITEENABLE, FALSE); IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSCALEENABLE, FALSE); @@ -1123,7 +1170,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat tmpfloat.f = 1.0f; IWineD3DDevice_SetRenderState(device, WINED3DRS_PATCHSEGMENTS, tmpfloat.d); IWineD3DDevice_SetRenderState(device, WINED3DRS_DEBUGMONITORTOKEN, 0xbaadcafe); - tmpfloat.f = 64.0f; + tmpfloat.f = GL_LIMITS(pointsize); IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSIZE_MAX, tmpfloat.d); IWineD3DDevice_SetRenderState(device, WINED3DRS_INDEXEDVERTEXBLENDENABLE, FALSE); IWineD3DDevice_SetRenderState(device, WINED3DRS_COLORWRITEENABLE, 0x0000000F); @@ -1193,7 +1240,6 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat This->textureState[i][WINED3DTSS_BUMPENVLSCALE ] = 0; This->textureState[i][WINED3DTSS_BUMPENVLOFFSET ] = 0; This->textureState[i][WINED3DTSS_TEXTURETRANSFORMFLAGS ] = WINED3DTTFF_DISABLE; - This->textureState[i][WINED3DTSS_ADDRESSW ] = WINED3DTADDRESS_WRAP; This->textureState[i][WINED3DTSS_COLORARG0 ] = WINED3DTA_CURRENT; This->textureState[i][WINED3DTSS_ALPHAARG0 ] = WINED3DTA_CURRENT; This->textureState[i][WINED3DTSS_RESULTARG ] = WINED3DTA_CURRENT; @@ -1220,7 +1266,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat for(i = 0; i < GL_LIMITS(textures); i++) { /* Note: This avoids calling SetTexture, so pretend it has been called */ - This->changed.textures[i] = TRUE; + This->changed.textures |= 1 << i; This->textures[i] = NULL; } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 0eedf231460..28377406803 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -691,6 +691,9 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, CONST RECT *rect, v BOOL bpp; RECT local_rect; BOOL srcIsUpsideDown; + GLint rowLen = 0; + GLint skipPix = 0; + GLint skipRow = 0; if(wined3d_settings.rendertargetlock_mode == RTL_DISABLE) { static BOOL warned = FALSE; @@ -786,14 +789,42 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, CONST RECT *rect, v if(This->Flags & SFLAG_PBO) { GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, This->pbo)); checkGLcall("glBindBufferARB"); + if(mem != NULL) { + ERR("mem not null for pbo -- unexpected\n"); + mem = NULL; + } } - glReadPixels(local_rect.left, local_rect.top, + /* Save old pixel store pack state */ + glGetIntegerv(GL_PACK_ROW_LENGTH, &rowLen); + checkGLcall("glIntegerv"); + glGetIntegerv(GL_PACK_SKIP_PIXELS, &skipPix); + checkGLcall("glIntegerv"); + glGetIntegerv(GL_PACK_SKIP_ROWS, &skipRow); + checkGLcall("glIntegerv"); + + /* Setup pixel store pack state -- to glReadPixels into the correct place */ + glPixelStorei(GL_PACK_ROW_LENGTH, This->currentDesc.Width); + checkGLcall("glPixelStorei"); + glPixelStorei(GL_PACK_SKIP_PIXELS, local_rect.left); + checkGLcall("glPixelStorei"); + glPixelStorei(GL_PACK_SKIP_ROWS, local_rect.top); + checkGLcall("glPixelStorei"); + + glReadPixels(local_rect.left, (!srcIsUpsideDown) ? (This->currentDesc.Height - local_rect.bottom) : local_rect.top , local_rect.right - local_rect.left, local_rect.bottom - local_rect.top, fmt, type, mem); checkGLcall("glReadPixels"); + /* Reset previous pixel store pack state */ + glPixelStorei(GL_PACK_ROW_LENGTH, rowLen); + checkGLcall("glPixelStorei"); + glPixelStorei(GL_PACK_SKIP_PIXELS, skipPix); + checkGLcall("glPixelStorei"); + glPixelStorei(GL_PACK_SKIP_ROWS, skipRow); + checkGLcall("glPixelStorei"); + if(This->Flags & SFLAG_PBO) { GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0)); checkGLcall("glBindBufferARB"); @@ -828,7 +859,7 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, CONST RECT *rect, v } top = mem + pitch * local_rect.top; - bottom = mem + pitch * ( local_rect.bottom - local_rect.top - 1); + bottom = mem + pitch * (local_rect.bottom - 1); for(i = 0; i < (local_rect.bottom - local_rect.top) / 2; i++) { memcpy(row, top + off, len); memcpy(top + off, bottom + off, len); @@ -1496,11 +1527,11 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_ReleaseDC(IWineD3DSurface *iface, HDC TRACE("(%p)->(%p)\n",This,hDC); if (!(This->Flags & SFLAG_DCINUSE)) - return WINED3DERR_INVALIDCALL; + return WINEDDERR_NODC; if (This->hDC !=hDC) { WARN("Application tries to release an invalid DC(%p), surface dc is %p\n", hDC, This->hDC); - return WINED3DERR_INVALIDCALL; + return WINEDDERR_NODC; } if((This->Flags & SFLAG_PBO) && This->resource.allocatedMemory) { @@ -3834,7 +3865,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) { 3: WARN and return WINED3DERR_NOTAVAILABLE; 4: Create the surface, but allow it to be used only for DirectDraw Blts. Some apps(e.g. Swat 3) create textures with a Height of 16 and a Width > 3000 and blt 16x16 letter areas from them to the render target. */ - WARN("(%p) Creating an oversized surface\n", This); + WARN("(%p) Creating an oversized surface: %ux%u (texture is %ux%u)\n", + This, This->pow2Width, This->pow2Height, This->currentDesc.Width, This->currentDesc.Height); This->Flags |= SFLAG_OVERSIZE; /* This will be initialized on the first blt */ diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c index d06245866d0..07a13b5c678 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -442,11 +442,11 @@ static HRESULT WINAPI IWineGDISurfaceImpl_ReleaseDC(IWineD3DSurface *iface, HDC TRACE("(%p)->(%p)\n",This,hDC); if (!(This->Flags & SFLAG_DCINUSE)) - return WINED3DERR_INVALIDCALL; + return WINEDDERR_NODC; if (This->hDC !=hDC) { WARN("Application tries to release an invalid DC(%p), surface dc is %p\n", hDC, This->hDC); - return WINED3DERR_INVALIDCALL; + return WINEDDERR_NODC; } /* we locked first, so unlock now */ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 71fb455a35c..ac3063aab37 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -303,7 +303,7 @@ static HRESULT WINAPI IWineD3DTextureImpl_GetLevelDesc(IWineD3DTexture *iface, U TRACE("(%p) Level (%d)\n", This, Level); return IWineD3DSurface_GetDesc(This->surfaces[Level], pDesc); } - FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); + WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); return WINED3DERR_INVALIDCALL; } diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 95ee0ec1392..4bfa453d14f 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -754,7 +754,7 @@ const char* debug_d3ddeclusage(BYTE usage) { const char* debug_d3dresourcetype(WINED3DRESOURCETYPE res) { switch (res) { -#define RES_TO_STR(res) case res: return #res; +#define RES_TO_STR(res) case res: return #res RES_TO_STR(WINED3DRTYPE_SURFACE); RES_TO_STR(WINED3DRTYPE_VOLUME); RES_TO_STR(WINED3DRTYPE_TEXTURE); @@ -771,7 +771,7 @@ const char* debug_d3dresourcetype(WINED3DRESOURCETYPE res) { const char* debug_d3dprimitivetype(WINED3DPRIMITIVETYPE PrimitiveType) { switch (PrimitiveType) { -#define PRIM_TO_STR(prim) case prim: return #prim; +#define PRIM_TO_STR(prim) case prim: return #prim PRIM_TO_STR(WINED3DPT_POINTLIST); PRIM_TO_STR(WINED3DPT_LINELIST); PRIM_TO_STR(WINED3DPT_LINESTRIP); @@ -1020,7 +1020,6 @@ const char* debug_d3dtexturestate(DWORD state) { D3DSTATE_TO_STR(WINED3DTSS_BUMPENVLSCALE ); D3DSTATE_TO_STR(WINED3DTSS_BUMPENVLOFFSET ); D3DSTATE_TO_STR(WINED3DTSS_TEXTURETRANSFORMFLAGS ); - D3DSTATE_TO_STR(WINED3DTSS_ADDRESSW ); D3DSTATE_TO_STR(WINED3DTSS_COLORARG0 ); D3DSTATE_TO_STR(WINED3DTSS_ALPHAARG0 ); D3DSTATE_TO_STR(WINED3DTSS_RESULTARG ); @@ -1098,7 +1097,7 @@ const char* debug_d3dtstype(WINED3DTRANSFORMSTATETYPE tstype) { const char* debug_d3dpool(WINED3DPOOL Pool) { switch (Pool) { -#define POOL_TO_STR(p) case p: return #p; +#define POOL_TO_STR(p) case p: return #p POOL_TO_STR(WINED3DPOOL_DEFAULT); POOL_TO_STR(WINED3DPOOL_MANAGED); POOL_TO_STR(WINED3DPOOL_SYSTEMMEM); @@ -1512,6 +1511,7 @@ DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) { case WINED3DFVF_XYZB3: size += 6 * sizeof(float); break; case WINED3DFVF_XYZB4: size += 7 * sizeof(float); break; case WINED3DFVF_XYZB5: size += 8 * sizeof(float); break; + case WINED3DFVF_XYZW: size += 4 * sizeof(float); break; default: ERR("Unexpected position mask\n"); } for (i = 0; i < numTextures; i++) { diff --git a/dlls/wined3d/vertexbuffer.c b/dlls/wined3d/vertexbuffer.c index 014ced6ef2e..b0a6296b731 100644 --- a/dlls/wined3d/vertexbuffer.c +++ b/dlls/wined3d/vertexbuffer.c @@ -327,7 +327,8 @@ static inline BOOL IWineD3DVertexBufferImpl_FindDecl(IWineD3DVertexBufferImpl *T * done, or if the DIFFUSE is replaced with a D3DCOLOR BLENDWEIGHT we can happily dismiss the change. Some conversion types * depend on the semantic as well, for example a FLOAT4 texcoord needs no conversion while a FLOAT4 positiont needs one */ - if(use_vs(device)) { + if (use_vs(device->stateBlock)) + { TRACE("vshader\n"); /* If the current vertex declaration is marked for no half float conversion don't bother to * analyse the strided streams in depth, just set them up for no conversion. Return decl changed diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c index 063f5767d5c..9091c8a9968 100644 --- a/dlls/wined3d/vertexshader.c +++ b/dlls/wined3d/vertexshader.c @@ -43,71 +43,71 @@ CONST SHADER_OPCODE IWineD3DVertexShaderImpl_shader_ins[] = { /* This table is not order or position dependent. */ /* Arithmetic */ - {WINED3DSIO_NOP, "nop", "NOP", 0, 0, WINED3DSIH_NOP, 0, 0 }, - {WINED3DSIO_MOV, "mov", "MOV", 1, 2, WINED3DSIH_MOV, 0, 0 }, - {WINED3DSIO_MOVA, "mova", NULL, 1, 2, WINED3DSIH_MOVA, WINED3DVS_VERSION(2,0), -1 }, - {WINED3DSIO_ADD, "add", "ADD", 1, 3, WINED3DSIH_ADD, 0, 0 }, - {WINED3DSIO_SUB, "sub", "SUB", 1, 3, WINED3DSIH_SUB, 0, 0 }, - {WINED3DSIO_MAD, "mad", "MAD", 1, 4, WINED3DSIH_MAD, 0, 0 }, - {WINED3DSIO_MUL, "mul", "MUL", 1, 3, WINED3DSIH_MUL, 0, 0 }, - {WINED3DSIO_RCP, "rcp", "RCP", 1, 2, WINED3DSIH_RCP, 0, 0 }, - {WINED3DSIO_RSQ, "rsq", "RSQ", 1, 2, WINED3DSIH_RSQ, 0, 0 }, - {WINED3DSIO_DP3, "dp3", "DP3", 1, 3, WINED3DSIH_DP3, 0, 0 }, - {WINED3DSIO_DP4, "dp4", "DP4", 1, 3, WINED3DSIH_DP4, 0, 0 }, - {WINED3DSIO_MIN, "min", "MIN", 1, 3, WINED3DSIH_MIN, 0, 0 }, - {WINED3DSIO_MAX, "max", "MAX", 1, 3, WINED3DSIH_MAX, 0, 0 }, - {WINED3DSIO_SLT, "slt", "SLT", 1, 3, WINED3DSIH_SLT, 0, 0 }, - {WINED3DSIO_SGE, "sge", "SGE", 1, 3, WINED3DSIH_SGE, 0, 0 }, - {WINED3DSIO_ABS, "abs", "ABS", 1, 2, WINED3DSIH_ABS, 0, 0 }, - {WINED3DSIO_EXP, "exp", "EX2", 1, 2, WINED3DSIH_EXP, 0, 0 }, - {WINED3DSIO_LOG, "log", "LG2", 1, 2, WINED3DSIH_LOG, 0, 0 }, - {WINED3DSIO_EXPP, "expp", "EXP", 1, 2, WINED3DSIH_EXPP, 0, 0 }, - {WINED3DSIO_LOGP, "logp", "LOG", 1, 2, WINED3DSIH_LOGP, 0, 0 }, - {WINED3DSIO_LIT, "lit", "LIT", 1, 2, WINED3DSIH_LIT, 0, 0 }, - {WINED3DSIO_DST, "dst", "DST", 1, 3, WINED3DSIH_DST, 0, 0 }, - {WINED3DSIO_LRP, "lrp", "LRP", 1, 4, WINED3DSIH_LRP, 0, 0 }, - {WINED3DSIO_FRC, "frc", "FRC", 1, 2, WINED3DSIH_FRC, 0, 0 }, - {WINED3DSIO_POW, "pow", "POW", 1, 3, WINED3DSIH_POW, 0, 0 }, - {WINED3DSIO_CRS, "crs", "XPD", 1, 3, WINED3DSIH_CRS, 0, 0 }, - /* TODO: sng can possibly be performed a s + {WINED3DSIO_NOP, "nop", 0, 0, WINED3DSIH_NOP, 0, 0 }, + {WINED3DSIO_MOV, "mov", 1, 2, WINED3DSIH_MOV, 0, 0 }, + {WINED3DSIO_MOVA, "mova", 1, 2, WINED3DSIH_MOVA, WINED3DVS_VERSION(2,0), -1 }, + {WINED3DSIO_ADD, "add", 1, 3, WINED3DSIH_ADD, 0, 0 }, + {WINED3DSIO_SUB, "sub", 1, 3, WINED3DSIH_SUB, 0, 0 }, + {WINED3DSIO_MAD, "mad", 1, 4, WINED3DSIH_MAD, 0, 0 }, + {WINED3DSIO_MUL, "mul", 1, 3, WINED3DSIH_MUL, 0, 0 }, + {WINED3DSIO_RCP, "rcp", 1, 2, WINED3DSIH_RCP, 0, 0 }, + {WINED3DSIO_RSQ, "rsq", 1, 2, WINED3DSIH_RSQ, 0, 0 }, + {WINED3DSIO_DP3, "dp3", 1, 3, WINED3DSIH_DP3, 0, 0 }, + {WINED3DSIO_DP4, "dp4", 1, 3, WINED3DSIH_DP4, 0, 0 }, + {WINED3DSIO_MIN, "min", 1, 3, WINED3DSIH_MIN, 0, 0 }, + {WINED3DSIO_MAX, "max", 1, 3, WINED3DSIH_MAX, 0, 0 }, + {WINED3DSIO_SLT, "slt", 1, 3, WINED3DSIH_SLT, 0, 0 }, + {WINED3DSIO_SGE, "sge", 1, 3, WINED3DSIH_SGE, 0, 0 }, + {WINED3DSIO_ABS, "abs", 1, 2, WINED3DSIH_ABS, 0, 0 }, + {WINED3DSIO_EXP, "exp", 1, 2, WINED3DSIH_EXP, 0, 0 }, + {WINED3DSIO_LOG, "log", 1, 2, WINED3DSIH_LOG, 0, 0 }, + {WINED3DSIO_EXPP, "expp", 1, 2, WINED3DSIH_EXPP, 0, 0 }, + {WINED3DSIO_LOGP, "logp", 1, 2, WINED3DSIH_LOGP, 0, 0 }, + {WINED3DSIO_LIT, "lit", 1, 2, WINED3DSIH_LIT, 0, 0 }, + {WINED3DSIO_DST, "dst", 1, 3, WINED3DSIH_DST, 0, 0 }, + {WINED3DSIO_LRP, "lrp", 1, 4, WINED3DSIH_LRP, 0, 0 }, + {WINED3DSIO_FRC, "frc", 1, 2, WINED3DSIH_FRC, 0, 0 }, + {WINED3DSIO_POW, "pow", 1, 3, WINED3DSIH_POW, 0, 0 }, + {WINED3DSIO_CRS, "crs", 1, 3, WINED3DSIH_CRS, 0, 0 }, + /* TODO: sng can possibly be performed as RCP tmp, vec MUL out, tmp, vec*/ - {WINED3DSIO_SGN, "sgn", NULL, 1, 2, WINED3DSIH_SGN, 0, 0 }, - {WINED3DSIO_NRM, "nrm", NULL, 1, 2, WINED3DSIH_NRM, 0, 0 }, - {WINED3DSIO_SINCOS, "sincos", NULL, 1, 4, WINED3DSIH_SINCOS, WINED3DVS_VERSION(2,0), WINED3DVS_VERSION(2,1)}, - {WINED3DSIO_SINCOS, "sincos", "SCS", 1, 2, WINED3DSIH_SINCOS, WINED3DVS_VERSION(3,0), -1 }, + {WINED3DSIO_SGN, "sgn", 1, 2, WINED3DSIH_SGN, 0, 0 }, + {WINED3DSIO_NRM, "nrm", 1, 2, WINED3DSIH_NRM, 0, 0 }, + {WINED3DSIO_SINCOS, "sincos", 1, 4, WINED3DSIH_SINCOS, WINED3DVS_VERSION(2,0), WINED3DVS_VERSION(2,1)}, + {WINED3DSIO_SINCOS, "sincos", 1, 2, WINED3DSIH_SINCOS, WINED3DVS_VERSION(3,0), -1 }, /* Matrix */ - {WINED3DSIO_M4x4, "m4x4", "undefined", 1, 3, WINED3DSIH_M4x4, 0, 0 }, - {WINED3DSIO_M4x3, "m4x3", "undefined", 1, 3, WINED3DSIH_M4x3, 0, 0 }, - {WINED3DSIO_M3x4, "m3x4", "undefined", 1, 3, WINED3DSIH_M3x4, 0, 0 }, - {WINED3DSIO_M3x3, "m3x3", "undefined", 1, 3, WINED3DSIH_M3x3, 0, 0 }, - {WINED3DSIO_M3x2, "m3x2", "undefined", 1, 3, WINED3DSIH_M3x2, 0, 0 }, + {WINED3DSIO_M4x4, "m4x4", 1, 3, WINED3DSIH_M4x4, 0, 0 }, + {WINED3DSIO_M4x3, "m4x3", 1, 3, WINED3DSIH_M4x3, 0, 0 }, + {WINED3DSIO_M3x4, "m3x4", 1, 3, WINED3DSIH_M3x4, 0, 0 }, + {WINED3DSIO_M3x3, "m3x3", 1, 3, WINED3DSIH_M3x3, 0, 0 }, + {WINED3DSIO_M3x2, "m3x2", 1, 3, WINED3DSIH_M3x2, 0, 0 }, /* Declare registers */ - {WINED3DSIO_DCL, "dcl", NULL, 0, 2, WINED3DSIH_DCL, 0, 0 }, + {WINED3DSIO_DCL, "dcl", 0, 2, WINED3DSIH_DCL, 0, 0 }, /* Constant definitions */ - {WINED3DSIO_DEF, "def", NULL, 1, 5, WINED3DSIH_DEF, 0, 0 }, - {WINED3DSIO_DEFB, "defb", GLNAME_REQUIRE_GLSL, 1, 2, WINED3DSIH_DEFB, 0, 0 }, - {WINED3DSIO_DEFI, "defi", GLNAME_REQUIRE_GLSL, 1, 5, WINED3DSIH_DEFI, 0, 0 }, + {WINED3DSIO_DEF, "def", 1, 5, WINED3DSIH_DEF, 0, 0 }, + {WINED3DSIO_DEFB, "defb", 1, 2, WINED3DSIH_DEFB, 0, 0 }, + {WINED3DSIO_DEFI, "defi", 1, 5, WINED3DSIH_DEFI, 0, 0 }, /* Flow control - requires GLSL or software shaders */ - {WINED3DSIO_REP , "rep", NULL, 0, 1, WINED3DSIH_REP, WINED3DVS_VERSION(2,0), -1 }, - {WINED3DSIO_ENDREP, "endrep", NULL, 0, 0, WINED3DSIH_ENDREP, WINED3DVS_VERSION(2,0), -1 }, - {WINED3DSIO_IF, "if", NULL, 0, 1, WINED3DSIH_IF, WINED3DVS_VERSION(2,0), -1 }, - {WINED3DSIO_IFC, "ifc", NULL, 0, 2, WINED3DSIH_IFC, WINED3DVS_VERSION(2,1), -1 }, - {WINED3DSIO_ELSE, "else", NULL, 0, 0, WINED3DSIH_ELSE, WINED3DVS_VERSION(2,0), -1 }, - {WINED3DSIO_ENDIF, "endif", NULL, 0, 0, WINED3DSIH_ENDIF, WINED3DVS_VERSION(2,0), -1 }, - {WINED3DSIO_BREAK, "break", NULL, 0, 0, WINED3DSIH_BREAK, WINED3DVS_VERSION(2,1), -1 }, - {WINED3DSIO_BREAKC, "breakc", NULL, 0, 2, WINED3DSIH_BREAKC, WINED3DVS_VERSION(2,1), -1 }, - {WINED3DSIO_BREAKP, "breakp", GLNAME_REQUIRE_GLSL, 0, 1, WINED3DSIH_BREAKP, 0, 0 }, - {WINED3DSIO_CALL, "call", NULL, 0, 1, WINED3DSIH_CALL, WINED3DVS_VERSION(2,0), -1 }, - {WINED3DSIO_CALLNZ, "callnz", NULL, 0, 2, WINED3DSIH_CALLNZ, WINED3DVS_VERSION(2,0), -1 }, - {WINED3DSIO_LOOP, "loop", NULL, 0, 2, WINED3DSIH_LOOP, WINED3DVS_VERSION(2,0), -1 }, - {WINED3DSIO_RET, "ret", NULL, 0, 0, WINED3DSIH_RET, WINED3DVS_VERSION(2,0), -1 }, - {WINED3DSIO_ENDLOOP, "endloop", NULL, 0, 0, WINED3DSIH_ENDLOOP, WINED3DVS_VERSION(2,0), -1 }, - {WINED3DSIO_LABEL, "label", NULL, 0, 1, WINED3DSIH_LABEL, WINED3DVS_VERSION(2,0), -1 }, - - {WINED3DSIO_SETP, "setp", GLNAME_REQUIRE_GLSL, 1, 3, WINED3DSIH_SETP, 0, 0 }, - {WINED3DSIO_TEXLDL, "texldl", NULL, 1, 3, WINED3DSIH_TEXLDL, WINED3DVS_VERSION(3,0), -1 }, - {0, NULL, NULL, 0, 0, 0, 0, 0 } + {WINED3DSIO_REP , "rep", 0, 1, WINED3DSIH_REP, WINED3DVS_VERSION(2,0), -1 }, + {WINED3DSIO_ENDREP, "endrep", 0, 0, WINED3DSIH_ENDREP, WINED3DVS_VERSION(2,0), -1 }, + {WINED3DSIO_IF, "if", 0, 1, WINED3DSIH_IF, WINED3DVS_VERSION(2,0), -1 }, + {WINED3DSIO_IFC, "ifc", 0, 2, WINED3DSIH_IFC, WINED3DVS_VERSION(2,1), -1 }, + {WINED3DSIO_ELSE, "else", 0, 0, WINED3DSIH_ELSE, WINED3DVS_VERSION(2,0), -1 }, + {WINED3DSIO_ENDIF, "endif", 0, 0, WINED3DSIH_ENDIF, WINED3DVS_VERSION(2,0), -1 }, + {WINED3DSIO_BREAK, "break", 0, 0, WINED3DSIH_BREAK, WINED3DVS_VERSION(2,1), -1 }, + {WINED3DSIO_BREAKC, "breakc", 0, 2, WINED3DSIH_BREAKC, WINED3DVS_VERSION(2,1), -1 }, + {WINED3DSIO_BREAKP, "breakp", 0, 1, WINED3DSIH_BREAKP, 0, 0 }, + {WINED3DSIO_CALL, "call", 0, 1, WINED3DSIH_CALL, WINED3DVS_VERSION(2,0), -1 }, + {WINED3DSIO_CALLNZ, "callnz", 0, 2, WINED3DSIH_CALLNZ, WINED3DVS_VERSION(2,0), -1 }, + {WINED3DSIO_LOOP, "loop", 0, 2, WINED3DSIH_LOOP, WINED3DVS_VERSION(2,0), -1 }, + {WINED3DSIO_RET, "ret", 0, 0, WINED3DSIH_RET, WINED3DVS_VERSION(2,0), -1 }, + {WINED3DSIO_ENDLOOP, "endloop", 0, 0, WINED3DSIH_ENDLOOP, WINED3DVS_VERSION(2,0), -1 }, + {WINED3DSIO_LABEL, "label", 0, 1, WINED3DSIH_LABEL, WINED3DVS_VERSION(2,0), -1 }, + + {WINED3DSIO_SETP, "setp", 1, 3, WINED3DSIH_SETP, 0, 0 }, + {WINED3DSIO_TEXLDL, "texldl", 1, 3, WINED3DSIH_TEXLDL, WINED3DVS_VERSION(3,0), -1 }, + {0, NULL, 0, 0, 0, 0, 0 } }; static void vshader_set_limits( diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index 9da4c95f20d..6fd2ff061e8 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -244,7 +244,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetLevelDesc(IWineD3DVolumeTextu TRACE("(%p) Level (%d)\n", This, Level); return IWineD3DVolume_GetDesc(This->volumes[Level], pDesc); } else { - FIXME("(%p) Level (%d)\n", This, Level); + WARN("(%p) Level (%d)\n", This, Level); } return WINED3D_OK; } @@ -255,7 +255,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetVolumeLevel(IWineD3DVolumeTex IWineD3DVolume_AddRef(*ppVolumeLevel); TRACE("(%p) -> level(%d) returning volume@%p\n", This, Level, *ppVolumeLevel); } else { - FIXME("(%p) Level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); + WARN("(%p) Level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); return WINED3DERR_INVALIDCALL; } return WINED3D_OK; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 60414ee5437..a9abe07120e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -531,9 +531,7 @@ extern int num_lock; #define MAX_STREAMS 16 /* Maximum possible streams - used for fixed size arrays See MaxStreams in MSDN under GetDeviceCaps */ - /* Maximum number of constants provided to the shaders */ -#define HIGHEST_TRANSFORMSTATE 512 - /* Highest value in WINED3DTRANSFORMSTATETYPE */ +#define HIGHEST_TRANSFORMSTATE WINED3DTS_WORLDMATRIX(255) /* Highest value in WINED3DTRANSFORMSTATETYPE */ /* Checking of API calls */ /* --------------------- */ @@ -801,21 +799,26 @@ struct WineD3DContext { DWORD tid; /* Thread ID which owns this context at the moment */ /* Stores some information about the context state for optimization */ - BOOL draw_buffer_dirty; - BOOL last_was_rhw; /* true iff last draw_primitive was in xyzrhw mode */ - BOOL last_was_pshader; - BOOL last_was_vshader; - BOOL last_was_foggy_shader; - BOOL namedArraysLoaded, numberedArraysLoaded; + WORD draw_buffer_dirty : 1; + WORD last_was_rhw : 1; /* true iff last draw_primitive was in xyzrhw mode */ + WORD last_was_pshader : 1; + WORD last_was_vshader : 1; + WORD last_was_foggy_shader : 1; + WORD namedArraysLoaded : 1; + WORD numberedArraysLoaded : 1; + WORD last_was_blit : 1; + WORD last_was_ckey : 1; + WORD fog_coord : 1; + WORD isPBuffer : 1; + WORD fog_enabled : 1; + WORD num_untracked_materials : 2; /* Max value 2 */ + WORD padding : 2; + BYTE texShaderBumpMap; /* MAX_TEXTURES, 8 */ + BYTE lastWasPow2Texture; /* MAX_TEXTURES, 8 */ DWORD numbered_array_mask; - BOOL lastWasPow2Texture[MAX_TEXTURES]; GLenum tracking_parm; /* Which source is tracking current colour */ - unsigned char num_untracked_materials; GLenum untracked_materials[2]; - BOOL last_was_blit, last_was_ckey; UINT blit_w, blit_h; - char texShaderBumpMap; - BOOL fog_coord; char *vshader_const_dirty, *pshader_const_dirty; @@ -824,7 +827,6 @@ struct WineD3DContext { HWND win_handle; HDC hdc; HPBUFFERARB pbuffer; - BOOL isPBuffer; GLint aux_buffers; /* FBOs */ @@ -834,7 +836,6 @@ struct WineD3DContext { GLuint dst_fbo; /* Extension emulation */ - BOOL fog_enabled; GLint gl_fog_source; GLfloat fog_coord_value; GLfloat color[4], fogstart, fogend, fogcolor[4]; @@ -1062,19 +1063,30 @@ struct IWineD3DDeviceImpl unsigned int max_ffp_textures, max_ffp_texture_stages; - /* To store */ - BOOL view_ident; /* true iff view matrix is identity */ - BOOL untransformed; - BOOL vertexBlendUsed; /* To avoid needless setting of the blend matrices */ + WORD view_ident : 1; /* true iff view matrix is identity */ + WORD untransformed : 1; + WORD vertexBlendUsed : 1; /* To avoid needless setting of the blend matrices */ + WORD isRecordingState : 1; + WORD isInDraw : 1; + WORD render_offscreen : 1; + WORD bCursorVisible : 1; + WORD haveHardwareCursor : 1; + WORD d3d_initialized : 1; + WORD inScene : 1; /* A flag to check for proper BeginScene / EndScene call pairs */ + WORD softwareVertexProcessing : 1; /* process vertex shaders using software or hardware */ + WORD useDrawStridedSlow : 1; + WORD instancedDraw : 1; + WORD padding : 3; + + BYTE fixed_function_usage_map; /* MAX_TEXTURES, 8 */ + #define DDRAW_PITCH_ALIGNMENT 8 #define D3D8_PITCH_ALIGNMENT 4 unsigned char surface_alignment; /* Line Alignment of surfaces */ /* State block related */ - BOOL isRecordingState; IWineD3DStateBlockImpl *stateBlock; IWineD3DStateBlockImpl *updateStateBlock; - BOOL isInDraw; /* Internal use fields */ WINED3DDEVICE_CREATION_PARAMETERS createParms; @@ -1104,7 +1116,6 @@ struct IWineD3DDeviceImpl UINT paletteConversionShader; /* For rendering to a texture using glCopyTexImage */ - BOOL render_offscreen; GLenum *draw_buffers; GLuint depth_blt_texture; GLuint depth_blt_rb; @@ -1112,14 +1123,12 @@ struct IWineD3DDeviceImpl UINT depth_blt_rb_h; /* Cursor management */ - BOOL bCursorVisible; UINT xHotSpot; UINT yHotSpot; UINT xScreenSpace; UINT yScreenSpace; UINT cursorWidth, cursorHeight; GLuint cursorTexture; - BOOL haveHardwareCursor; HCURSOR hardwareCursor; /* The Wine logo surface */ @@ -1128,18 +1137,8 @@ struct IWineD3DDeviceImpl /* Textures for when no other textures are mapped */ UINT dummyTextureName[MAX_TEXTURES]; - /* Debug stream management */ - BOOL debug; - /* Device state management */ HRESULT state; - BOOL d3d_initialized; - - /* A flag to check for proper BeginScene / EndScene call pairs */ - BOOL inScene; - - /* process vertex shaders using software or hardware */ - BOOL softwareVertexProcessing; /* DirectDraw stuff */ DWORD ddraw_width, ddraw_height; @@ -1151,13 +1150,10 @@ struct IWineD3DDeviceImpl /* With register combiners we can skip junk texture stages */ DWORD texUnitMap[MAX_COMBINED_SAMPLERS]; DWORD rev_tex_unit_map[MAX_COMBINED_SAMPLERS]; - BOOL fixed_function_usage_map[MAX_TEXTURES]; /* Stream source management */ WineDirect3DVertexStridedData strided_streams; const WineDirect3DVertexStridedData *up_strided; - BOOL useDrawStridedSlow; - BOOL instancedDraw; /* Context management */ WineD3DContext **contexts; /* Dynamic array containing pointers to context structures */ @@ -1762,27 +1758,28 @@ extern const IWineD3DVertexDeclarationVtbl IWineD3DVertexDeclaration_Vtbl; /* Note: Very long winded but gl Lists are not flexible enough */ /* to resolve everything we need, so doing it manually for now */ typedef struct SAVEDSTATES { - BOOL indices; - BOOL material; - BOOL streamSource[MAX_STREAMS]; - BOOL streamFreq[MAX_STREAMS]; - BOOL textures[MAX_COMBINED_SAMPLERS]; - BOOL transform[HIGHEST_TRANSFORMSTATE + 1]; - BOOL viewport; - BOOL renderState[WINEHIGHEST_RENDER_STATE + 1]; - BOOL textureState[MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1]; - BOOL samplerState[MAX_COMBINED_SAMPLERS][WINED3D_HIGHEST_SAMPLER_STATE + 1]; - BOOL clipplane[MAX_CLIPPLANES]; - BOOL vertexDecl; - BOOL pixelShader; - WORD pixelShaderConstantsB; - WORD pixelShaderConstantsI; - BOOL *pixelShaderConstantsF; - BOOL vertexShader; - WORD vertexShaderConstantsB; - WORD vertexShaderConstantsI; - BOOL *vertexShaderConstantsF; - BOOL scissorRect; + DWORD transform[(HIGHEST_TRANSFORMSTATE >> 5) + 1]; + WORD streamSource; /* MAX_STREAMS, 16 */ + WORD streamFreq; /* MAX_STREAMS, 16 */ + DWORD textures; /* MAX_COMBINED_SAMPLERS, 20 */ + DWORD renderState[(WINEHIGHEST_RENDER_STATE >> 5) + 1]; + BOOL textureState[MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1]; + WORD samplerState[MAX_COMBINED_SAMPLERS]; /* WINED3D_HIGHEST_SAMPLER_STATE + 1, 14*/ + DWORD clipplane; /* WINED3DMAXUSERCLIPPLANES, 32 */ + WORD pixelShaderConstantsB; /* MAX_CONST_B, 16 */ + WORD pixelShaderConstantsI; /* MAX_CONST_I, 16 */ + BOOL *pixelShaderConstantsF; + WORD vertexShaderConstantsB; /* MAX_CONST_B, 16 */ + WORD vertexShaderConstantsI; /* MAX_CONST_I, 16 */ + BOOL *vertexShaderConstantsF; + BYTE indices : 1; + BYTE material : 1; + BYTE viewport : 1; + BYTE vertexDecl : 1; + BYTE pixelShader : 1; + BYTE vertexShader : 1; + BYTE scissorRect : 1; + BYTE padding : 1; } SAVEDSTATES; struct StageState { @@ -2132,7 +2129,6 @@ typedef enum COMPARISON_TYPE { typedef struct SHADER_OPCODE { unsigned int opcode; const char* name; - const char* glname; char dst_token; CONST UINT num_params; enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx; @@ -2463,15 +2459,17 @@ typedef struct { const StaticPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, const WineD3D_GL_Info *gl_info, const struct GlPixelFormatDesc **glDesc); -static inline BOOL use_vs(IWineD3DDeviceImpl *device) { - return (device->vs_selected_mode != SHADER_NONE - && device->stateBlock->vertexShader - && !device->strided_streams.u.s.position_transformed); +static inline BOOL use_vs(IWineD3DStateBlockImpl *stateblock) +{ + return (stateblock->vertexShader + && !stateblock->wineD3DDevice->strided_streams.u.s.position_transformed + && stateblock->wineD3DDevice->vs_selected_mode != SHADER_NONE); } -static inline BOOL use_ps(IWineD3DDeviceImpl *device) { - return (device->ps_selected_mode != SHADER_NONE - && device->stateBlock->pixelShader); +static inline BOOL use_ps(IWineD3DStateBlockImpl *stateblock) +{ + return (stateblock->pixelShader + && stateblock->wineD3DDevice->ps_selected_mode != SHADER_NONE); } void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED3DRECT *src_rect, diff --git a/dlls/winedos/ioports.c b/dlls/winedos/ioports.c index bd73af4da77..2de1b1587e3 100644 --- a/dlls/winedos/ioports.c +++ b/dlls/winedos/ioports.c @@ -67,22 +67,76 @@ static BYTE parport_8255[4] = {0x4f, 0x20, 0xff, 0xff}; static BYTE cmosaddress; -/* if you change anything here, use IO_FixCMOSCheckSum below to compute - * the checksum and put the right values in. - */ +static int cmos_image_initialized = 0; + static BYTE cmosimage[64] = { - 0x27, 0x34, 0x31, 0x47, 0x16, 0x15, 0x00, 0x01, - 0x04, 0x94, 0x26, 0x02, 0x50, 0x80, 0x00, 0x00, - 0x40, 0xb1, 0x00, 0x9c, 0x01, 0x80, 0x02, 0x00, - 0x1c, 0x00, 0x00, 0xad, 0x02, 0x10, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x03, 0x19, /* last 2 bytes are checksum */ - 0x00, 0x1c, 0x19, 0x81, 0x00, 0x0e, 0x00, 0x80, - 0x1b, 0x7b, 0x21, 0x00, 0x00, 0x00, 0x05, 0x5f + 0x27, /* 0x00: seconds */ + 0x34, /* 0X01: seconds alarm */ + 0x31, /* 0x02: minutes */ + 0x47, /* 0x03: minutes alarm */ + 0x16, /* 0x04: hour */ + 0x15, /* 0x05: hour alarm */ + 0x00, /* 0x06: week day */ + 0x01, /* 0x07: month day */ + 0x04, /* 0x08: month */ + 0x94, /* 0x09: year */ + 0x26, /* 0x0a: state A */ + 0x02, /* 0x0b: state B */ + 0x50, /* 0x0c: state C */ + 0x80, /* 0x0d: state D */ + 0x00, /* 0x0e: state diagnostic */ + 0x00, /* 0x0f: state state shutdown */ + 0x40, /* 0x10: floppy type */ + 0xb1, /* 0x11: reserved */ + 0x00, /* 0x12: HD type */ + 0x9c, /* 0x13: reserved */ + 0x01, /* 0x14: equipment */ + 0x80, /* 0x15: low base memory */ + 0x02, /* 0x16: high base memory (0x280 => 640KB) */ + 0x00, /* 0x17: low extended memory */ + 0x3b, /* 0x18: high extended memory (0x3b00 => 15MB) */ + 0x00, /* 0x19: HD 1 extended type byte */ + 0x00, /* 0x1a: HD 2 extended type byte */ + 0xad, /* 0x1b: reserved */ + 0x02, /* 0x1c: reserved */ + 0x10, /* 0x1d: reserved */ + 0x00, /* 0x1e: reserved */ + 0x00, /* 0x1f: installed features */ + 0x08, /* 0x20: HD 1 low cylinder number */ + 0x00, /* 0x21: HD 1 high cylinder number */ + 0x00, /* 0x22: HD 1 heads */ + 0x26, /* 0x23: HD 1 low pre-compensation start */ + 0x00, /* 0x24: HD 1 high pre-compensation start */ + 0x00, /* 0x25: HD 1 low landing zone */ + 0x00, /* 0x26: HD 1 high landing zone */ + 0x00, /* 0x27: HD 1 sectors */ + 0x00, /* 0x28: options 1 */ + 0x00, /* 0x29: reserved */ + 0x00, /* 0x2a: reserved */ + 0x00, /* 0x2b: options 2 */ + 0x00, /* 0x2c: options 3 */ + 0x3f, /* 0x2d: reserved */ + 0xcc, /* 0x2e: low CMOS ram checksum (computed automatically) */ + 0xcc, /* 0x2f: high CMOS ram checksum (computed automatically) */ + 0x00, /* 0x30: low extended memory byte */ + 0x1c, /* 0x31: high extended memory byte */ + 0x19, /* 0x32: century byte */ + 0x81, /* 0x33: setup information */ + 0x00, /* 0x34: CPU speed */ + 0x0e, /* 0x35: HD 2 low cylinder number */ + 0x00, /* 0x36: HD 2 high cylinder number */ + 0x80, /* 0x37: HD 2 heads */ + 0x1b, /* 0x38: HD 2 low pre-compensation start */ + 0x7b, /* 0x39: HD 2 high pre-compensation start */ + 0x21, /* 0x3a: HD 2 low landing zone */ + 0x00, /* 0x3b: HD 2 high landing zone */ + 0x00, /* 0x3c: HD 2 sectors */ + 0x00, /* 0x3d: reserved */ + 0x05, /* 0x3e: reserved */ + 0x5f /* 0x3f: reserved */ }; -#if 0 static void IO_FixCMOSCheckSum(void) { WORD sum = 0; @@ -92,9 +146,8 @@ static void IO_FixCMOSCheckSum(void) sum += cmosimage[i]; cmosimage[0x2e] = sum >> 8; /* yes, this IS hi byte !! */ cmosimage[0x2f] = sum & 0xff; - MESSAGE("calculated hi %02x, lo %02x\n", cmosimage[0x2e], cmosimage[0x2f]); + TRACE("calculated hi %02x, lo %02x\n", cmosimage[0x2e], cmosimage[0x2f]); } -#endif #ifdef DIRECT_IO_ACCESS @@ -403,6 +456,11 @@ DWORD WINAPI DOSVM_inport( int port, int size ) res = (DWORD)cmosaddress; break; case 0x71: + if (!cmos_image_initialized) + { + IO_FixCMOSCheckSum(); + cmos_image_initialized = 1; + } res = (DWORD)cmosimage[cmosaddress & 0x3f]; break; case 0x200: @@ -450,8 +508,8 @@ DWORD WINAPI DOSVM_inport( int port, int size ) case 0x3dd: case 0x3de: case 0x3df: - if(size > 1) - FIXME("Trying to read more than one byte from VGA!\n"); + if (size > 1) + FIXME("Trying to read more than one byte from VGA!\n"); res = (DWORD)VGA_ioport_in( port ); break; case 0x00: @@ -621,6 +679,11 @@ void WINAPI DOSVM_outport( int port, int size, DWORD value ) cmosaddress = (BYTE)value & 0x7f; break; case 0x71: + if (!cmos_image_initialized) + { + IO_FixCMOSCheckSum(); + cmos_image_initialized = 1; + } cmosimage[cmosaddress & 0x3f] = (BYTE)value; break; case 0x226: diff --git a/dlls/wineoss.drv/mixer.c b/dlls/wineoss.drv/mixer.c index 241aa0c2cd7..58433e656dd 100644 --- a/dlls/wineoss.drv/mixer.c +++ b/dlls/wineoss.drv/mixer.c @@ -179,7 +179,7 @@ static const char * getIoctlCommand(int command) static const char * getControlType(DWORD dwControlType) { static char str[64]; -#define TYPE_TO_STR(x) case x: return #x; +#define TYPE_TO_STR(x) case x: return #x switch (dwControlType) { TYPE_TO_STR(MIXERCONTROL_CONTROLTYPE_CUSTOM); TYPE_TO_STR(MIXERCONTROL_CONTROLTYPE_BOOLEANMETER); diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index b79f149aefd..52824125a88 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -399,6 +399,47 @@ void X11DRV_send_mouse_input( HWND hwnd, DWORD flags, DWORD x, DWORD y, } +/*********************************************************************** + * check_alpha_zero + * + * Generally 32 bit bitmaps have an alpha channel which is used in favor of the + * AND mask. However, if all pixels have alpha = 0x00, the bitmap is treated + * like one without alpha and the masks are used. As soon as one pixel has + * alpha != 0x00, and the mask ignored as described in the docs. + * + * This is most likely for applications which create the bitmaps with + * CreateDIBitmap, which creates a device dependent bitmap, so the format that + * arrives when loading depends on the screen's bpp. Apps that were written at + * 8 / 16 bpp times do not know about the 32 bit alpha, so they would get a + * completely transparent cursor on 32 bit displays. + * + * Non-32 bit bitmaps always use the AND mask. + */ +static BOOL check_alpha_zero(CURSORICONINFO *ptr, unsigned char *xor_bits) +{ + int x, y; + unsigned char *xor_ptr; + + if (ptr->bBitsPerPixel == 32) + { + for (y = 0; y < ptr->nHeight; ++y) + { + xor_ptr = xor_bits + (y * ptr->nWidthBytes); + for (x = 0; x < ptr->nWidth; ++x) + { + if (xor_ptr[3] != 0x00) + { + return FALSE; + } + xor_ptr+=4; + } + } + } + + return TRUE; +} + + #ifdef SONAME_LIBXCURSOR /*********************************************************************** @@ -434,12 +475,12 @@ static XcursorImage *create_cursor_image( CURSORICONINFO *ptr ) XcursorPixel *pixel_ptr; XcursorImage *image; unsigned char tmp; - BOOL alpha_zero = TRUE; + BOOL alpha_zero; - and_width_bytes = ptr->nWidth / 8; - xor_width_bytes = and_width_bytes * ptr->bBitsPerPixel; + and_width_bytes = 2 * ((ptr->nWidth+15) / 16); + xor_width_bytes = ptr->nWidthBytes; - and_size = ptr->nWidth * ptr->nHeight / 8; + and_size = ptr->nHeight * and_width_bytes; and_ptr = and_bits = (unsigned char *)(ptr + 1); xor_ptr = xor_bits = and_ptr + and_size; @@ -447,36 +488,7 @@ static XcursorImage *create_cursor_image( CURSORICONINFO *ptr ) image = pXcursorImageCreate( ptr->nWidth, ptr->nHeight ); pixel_ptr = image->pixels; - /* Generally 32 bit bitmaps have an alpha channel which is used in favor - * of the AND mask. However, if all pixels have alpha = 0x00, the bitmap - * is treated like one without alpha and the masks are used. As soon as - * one pixel has alpha != 0x00, and the mask ignored as described in the - * docs. - * - * This is most likely for applications which create the bitmaps with - * CreateDIBitmap, which creates a device dependent bitmap, so the format - * that arrives when loading depends on the screen's bpp. Apps that were - * written at 8 / 16 bpp times do not know about the 32 bit alpha, so - * they would get a completely transparent cursor on 32 bit displays. - * - * Non-32 bit bitmaps always use the AND mask - */ - if(ptr->bBitsPerPixel == 32) - { - for (y = 0; alpha_zero && y < ptr->nHeight; ++y) - { - xor_ptr = xor_bits + (y * xor_width_bytes); - for (x = 0; x < ptr->nWidth; ++x) - { - if (xor_ptr[3] != 0x00) - { - alpha_zero = FALSE; - break; - } - xor_ptr+=4; - } - } - } + alpha_zero = check_alpha_zero(ptr, xor_bits); /* On windows, to calculate the color for a pixel, first an AND is done * with the background and the "and" bitmap, then an XOR with the "xor" @@ -618,6 +630,7 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr ) Cursor cursor = None; POINT hotspot; char *bitMask32 = NULL; + BOOL alpha_zero = TRUE; #ifdef SONAME_LIBXCURSOR if (pXcursorImageLoadCursor) return create_xcursor_cursor( display, ptr ); @@ -733,6 +746,7 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr ) ptr->nWidth, ptr->nHeight); } ymax = (ptr->nHeight > 32) ? 32 : ptr->nHeight; + alpha_zero = check_alpha_zero(ptr, theImage); memset(pXorBits, 0, 128); for (y=0; ynWidth, ptr->nHeight, 1 ); - if (ptr->bBitsPerPixel != 32) + if (alpha_zero) { pixmapMaskInv = XCreatePixmap( display, root_window, ptr->nWidth, ptr->nHeight, 1 ); pixmapMask = XCreatePixmap( display, root_window, ptr->nWidth, ptr->nHeight, 1 ); @@ -901,7 +915,6 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr ) pixmapMask = XCreateBitmapFromData( display, root_window, bitMask32, ptr->nWidth, ptr->nHeight ); - HeapFree( GetProcessHeap(), 0, bitMask32 ); } /* Make sure hotspot is valid */ @@ -924,6 +937,7 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr ) if (pixmapBits) XFreePixmap( display, pixmapBits ); if (pixmapMask) XFreePixmap( display, pixmapMask ); if (pixmapMaskInv) XFreePixmap( display, pixmapMaskInv ); + HeapFree( GetProcessHeap(), 0, bitMask32 ); XFreeGC( display, gc ); } return cursor; diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c index 6bd804ae541..e2aafbceae1 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c @@ -299,7 +299,8 @@ BOOL CDECL X11DRV_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmo devmode->dmPelsHeight = dd_modes[n].dwHeight; devmode->dmBitsPerPel = dd_modes[n].dwBPP; devmode->dmDisplayFrequency = dd_modes[n].wRefreshRate; - devmode->dmFields = (DM_PELSWIDTH|DM_PELSHEIGHT|DM_BITSPERPEL); + devmode->dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL | + DM_DISPLAYFLAGS; if (devmode->dmDisplayFrequency) { devmode->dmFields |= DM_DISPLAYFREQUENCY; diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 01c95604a15..596d9f0661b 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -451,14 +451,45 @@ static BOOL get_gasp_flags(X11DRV_PDEVICE *physDev, WORD *flags) return TRUE; } +static AA_Type get_antialias_type( X11DRV_PDEVICE *physDev, BOOL subpixel, BOOL hinter) +{ + AA_Type ret; + WORD flags; + UINT font_smoothing_type, font_smoothing_orientation; + + if (X11DRV_XRender_Installed && subpixel && + SystemParametersInfoW( SPI_GETFONTSMOOTHINGTYPE, 0, &font_smoothing_type, 0) && + font_smoothing_type == FE_FONTSMOOTHINGCLEARTYPE) + { + if ( SystemParametersInfoW( SPI_GETFONTSMOOTHINGORIENTATION, 0, + &font_smoothing_orientation, 0) && + font_smoothing_orientation == FE_FONTSMOOTHINGORIENTATIONBGR) + { + ret = AA_BGR; + } + else + ret = AA_RGB; + /*FIXME + If the monitor is in portrait mode, ClearType is disabled in the MS Windows (MSDN). + But, Wine's subpixel rendering can support the portrait mode. + */ + } + else if (!hinter || !get_gasp_flags(physDev, &flags) || flags & GASP_DOGRAY) + ret = AA_Grey; + else + ret = AA_None; + + return ret; +} + static int GetCacheEntry(X11DRV_PDEVICE *physDev, LFANDSIZE *plfsz) { int ret; int format; gsCacheEntry *entry; - WORD flags; static int hinter = -1; static int subpixel = -1; + BOOL font_smoothing; if((ret = LookupEntry(plfsz)) != -1) return ret; @@ -479,19 +510,28 @@ static int GetCacheEntry(X11DRV_PDEVICE *physDev, LFANDSIZE *plfsz) subpixel = status.wFlags & WINE_TT_SUBPIXEL_RENDERING_ENABLED; } - /* FIXME: Use the following registry information - [HKEY_CURRENT_USER\Control Panel\Desktop] - "FontSmoothing"="2" ; 0=>Off, 2=>On - "FontSmoothingType"=dword:00000002 ; 1=>Standard, 2=>Cleartype - "FontSmoothingOrientation"=dword:00000001 ; 0=>BGR, 1=>RGB - "FontSmoothingGamma"=dword:00000578 - */ - if ( subpixel && X11DRV_XRender_Installed) - entry->aa_default = AA_RGB; - else if(!hinter || !get_gasp_flags(physDev, &flags) || flags & GASP_DOGRAY) - entry->aa_default = AA_Grey; - else - entry->aa_default = AA_None; + switch (plfsz->lf.lfQuality) + { + case ANTIALIASED_QUALITY: + entry->aa_default = get_antialias_type( physDev, FALSE, hinter ); + break; + case CLEARTYPE_QUALITY: + case CLEARTYPE_NATURAL_QUALITY: + entry->aa_default = get_antialias_type( physDev, subpixel, hinter ); + break; + case DEFAULT_QUALITY: + case DRAFT_QUALITY: + case PROOF_QUALITY: + default: + if ( SystemParametersInfoW( SPI_GETFONTSMOOTHING, 0, &font_smoothing, 0) && + font_smoothing) + { + entry->aa_default = get_antialias_type( physDev, subpixel, hinter ); + } + else + entry->aa_default = AA_None; + break; + } } else entry->aa_default = AA_None; diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c index e9e12f7ded1..2e37b1c3054 100644 --- a/dlls/winhttp/net.c +++ b/dlls/winhttp/net.c @@ -586,7 +586,7 @@ BOOL netconn_resolve( WCHAR *hostnameW, INTERNET_PORT port, struct sockaddr_in * heap_free( hostname ); if (ret != 0) { - TRACE("failed to get address of %s (%s)\n", debugstr_a(hostname), gai_strerror(ret)); + TRACE("failed to get address of %s (%s)\n", debugstr_w(hostnameW), gai_strerror(ret)); return FALSE; } memset( sa, 0, sizeof(struct sockaddr_in) ); @@ -602,7 +602,7 @@ BOOL netconn_resolve( WCHAR *hostnameW, INTERNET_PORT port, struct sockaddr_in * heap_free( hostname ); if (!he) { - TRACE("failed to get address of %s (%d)\n", debugstr_a(hostname), h_errno); + TRACE("failed to get address of %s (%d)\n", debugstr_w(hostnameW), h_errno); LeaveCriticalSection( &cs_gethostbyname ); return FALSE; } diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 868045aef58..29969bab7fd 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -410,7 +410,7 @@ BOOL add_request_headers( request_t *request, LPCWSTR headers, DWORD len, DWORD WCHAR *buffer, *p, *q; header_t *header; - if (len == ~0UL) len = strlenW( headers ); + if (len == ~0u) len = strlenW( headers ); if (!(buffer = heap_alloc( (len + 1) * sizeof(WCHAR) ))) return FALSE; strcpyW( buffer, headers ); @@ -1062,7 +1062,7 @@ static BOOL handle_redirect( request_t *request ) memset( &uc, 0, sizeof(uc) ); uc.dwStructSize = sizeof(uc); - uc.dwSchemeLength = uc.dwHostNameLength = uc.dwUrlPathLength = uc.dwExtraInfoLength = ~0UL; + uc.dwSchemeLength = uc.dwHostNameLength = uc.dwUrlPathLength = uc.dwExtraInfoLength = ~0u; if (!WinHttpCrackUrl( location, size / sizeof(WCHAR), 0, &uc )) /* assume relative redirect */ { @@ -1184,7 +1184,7 @@ static BOOL receive_data_chunked( request_t *request, void *buffer, DWORD size, { if (*read == size) break; - if (request->content_length == ~0UL) /* new chunk */ + if (request->content_length == ~0u) /* new chunk */ { buflen = sizeof(reply); if (!netconn_get_next_line( &request->netconn, reply, &buflen )) break; @@ -1218,7 +1218,7 @@ static BOOL receive_data_chunked( request_t *request, void *buffer, DWORD size, if (request->content_read == request->content_length) /* chunk complete */ { request->content_read = 0; - request->content_length = ~0UL; + request->content_length = ~0u; buflen = sizeof(reply); if (!netconn_get_next_line( &request->netconn, reply, &buflen )) @@ -1249,7 +1249,7 @@ static void finished_reading( request_t *request ) else if (!strcmpW( request->version, http1_0 )) close = TRUE; if (close) close_connection( request ); - request->content_length = ~0UL; + request->content_length = ~0u; request->content_read = 0; } @@ -1331,7 +1331,7 @@ static BOOL receive_response( request_t *request, BOOL async ) size = sizeof(DWORD); query = WINHTTP_QUERY_CONTENT_LENGTH | WINHTTP_QUERY_FLAG_NUMBER; if (!query_headers( request, query, NULL, &request->content_length, &size, NULL )) - request->content_length = ~0UL; + request->content_length = ~0u; if (!(request->hdr.disable_flags & WINHTTP_DISABLE_COOKIES)) record_cookies( request ); diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index db4ce03988f..11c4b4fbf99 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -47,7 +47,7 @@ void send_callback( object_header_t *hdr, DWORD status, LPVOID info, DWORD bufle { TRACE("%p, 0x%08x, %p, %u\n", hdr, status, info, buflen); - if (hdr->notify_mask & status) hdr->callback( hdr->handle, hdr->context, status, info, buflen ); + if (hdr->callback && (hdr->notify_mask & status)) hdr->callback( hdr->handle, hdr->context, status, info, buflen ); } /*********************************************************************** diff --git a/dlls/winhttp/tests/url.c b/dlls/winhttp/tests/url.c index ef48b046266..14b20c1c973 100644 --- a/dlls/winhttp/tests/url.c +++ b/dlls/winhttp/tests/url.c @@ -59,6 +59,14 @@ static const WCHAR url8[] = static const WCHAR url9[] = {'h','t','t','p',':','/','/','u','s','e','r','n','a','m','e',':','p','a','s','s','w','o','r','d', '@','w','w','w','.','w','i','n','e','h','q','.','o','r','g',':','0','/','s','i','t','e','/','a','b','o','u','t','?','q','u','e','r','y',0}; +static const WCHAR url10[] = + {'h','t','t','p',':','/','/','u','s','e','r','n','a','m','e',':','p','a','s','s','w','o','r','d', + '@','w','w','w','.','w','i','n','e','h','q','.','o','r','g',':','8','0','/','s','i','t','e','/','a','b','o','u','t','?','q','u','e','r','y',0}; +static const WCHAR url11[] = + {'h','t','t','p','s',':','/','/','u','s','e','r','n','a','m','e',':','p','a','s','s','w','o','r','d', + '@','w','w','w','.','w','i','n','e','h','q','.','o','r','g',':','4','4','3','/','s','i','t','e','/','a','b','o','u','t','?','q','u','e','r','y',0}; + + static const WCHAR url_k1[] = {'h','t','t','p',':','/','/','u','s','e','r','n','a','m','e',':','p','a','s','s','w','o','r','d', @@ -82,6 +90,13 @@ static const WCHAR url_k9[] = static const WCHAR url_k10[] = {'h','t','t','p',':','/','/','w','i','n','e','h','q','/','p','o','s','t',';','a',0}; +static const char *debugstr_w(LPCWSTR str) +{ + static char buf[1024]; + WideCharToMultiByte(CP_ACP, 0, str, -1, buf, sizeof(buf), NULL, NULL); + return buf; +} + static void fill_url_components( URL_COMPONENTS *uc ) { uc->dwStructSize = sizeof(URL_COMPONENTS); @@ -109,12 +124,12 @@ static void WinHttpCreateUrl_test( void ) BOOL ret; /* NULL components */ - len = ~0UL; + len = ~0u; SetLastError( 0xdeadbeef ); ret = WinHttpCreateUrl( NULL, 0, NULL, &len ); ok( !ret, "expected failure\n" ); ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", GetLastError() ); - ok( len == ~0UL, "expected len ~0UL got %u\n", len ); + ok( len == ~0u, "expected len ~0u got %u\n", len ); /* zero'ed components */ memset( &uc, 0, sizeof(URL_COMPONENTS) ); @@ -122,7 +137,7 @@ static void WinHttpCreateUrl_test( void ) ret = WinHttpCreateUrl( &uc, 0, NULL, &len ); ok( !ret, "expected failure\n" ); ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", GetLastError() ); - ok( len == ~0UL, "expected len ~0UL got %u\n", len ); + ok( len == ~0u, "expected len ~0u got %u\n", len ); /* valid components, NULL url, NULL length */ fill_url_components( &uc ); @@ -130,7 +145,7 @@ static void WinHttpCreateUrl_test( void ) ret = WinHttpCreateUrl( &uc, 0, NULL, NULL ); ok( !ret, "expected failure\n" ); ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", GetLastError() ); - ok( len == ~0UL, "expected len ~0UL got %u\n", len ); + ok( len == ~0u, "expected len ~0u got %u\n", len ); /* valid components, NULL url */ SetLastError( 0xdeadbeef ); @@ -295,12 +310,13 @@ static void reset_url_components( URL_COMPONENTS *uc ) { memset( uc, 0, sizeof(URL_COMPONENTS) ); uc->dwStructSize = sizeof(URL_COMPONENTS); - uc->dwSchemeLength = ~0UL; - uc->dwHostNameLength = ~0UL; - uc->dwUserNameLength = ~0UL; - uc->dwPasswordLength = ~0UL; - uc->dwUrlPathLength = ~0UL; - uc->dwExtraInfoLength = ~0UL; + uc->dwSchemeLength = ~0u; + uc->dwHostNameLength = ~0u; + uc->nPort = 0; + uc->dwUserNameLength = ~0u; + uc->dwPasswordLength = ~0u; + uc->dwUrlPathLength = ~0u; + uc->dwExtraInfoLength = ~0u; } static void WinHttpCrackUrl_test( void ) @@ -328,6 +344,7 @@ static void WinHttpCrackUrl_test( void ) uc.dwPasswordLength = 20; uc.lpszHostName = host; uc.dwHostNameLength = 20; + uc.nPort = 0; uc.lpszUrlPath = path; uc.dwUrlPathLength = 40; uc.lpszExtraInfo = extra; @@ -344,6 +361,7 @@ static void WinHttpCrackUrl_test( void ) ok( uc.dwPasswordLength == 8, "unexpected password length\n" ); ok( !memcmp( uc.lpszHostName, winehq, sizeof(winehq) ), "unexpected hostname\n" ); ok( uc.dwHostNameLength == 14, "unexpected hostname length\n" ); + ok( uc.nPort == 80, "unexpected port: %u\n", uc.nPort ); ok( !memcmp( uc.lpszUrlPath, about, sizeof(about) ), "unexpected path\n" ); ok( uc.dwUrlPathLength == 11, "unexpected path length\n" ); ok( !memcmp( uc.lpszExtraInfo, query, sizeof(query) ), "unexpected extra info\n" ); @@ -374,6 +392,7 @@ static void WinHttpCrackUrl_test( void ) ok( uc.dwPasswordLength == 8, "unexpected password length\n" ); ok( uc.lpszHostName == url_k1 + 25, "unexpected hostname\n" ); ok( uc.dwHostNameLength == 14, "unexpected hostname length\n" ); + ok( uc.nPort == 80, "unexpected port: %u\n", uc.nPort ); ok( uc.lpszUrlPath == url_k1 + 39, "unexpected path\n" ); ok( uc.dwUrlPathLength == 11, "unexpected path length\n" ); ok( uc.lpszExtraInfo == url_k1 + 50, "unexpected extra info\n" ); @@ -392,6 +411,7 @@ static void WinHttpCrackUrl_test( void ) ok( uc.dwPasswordLength == 0, "unexpected password length\n" ); ok( uc.lpszHostName == url_k2 + 7, "unexpected hostname\n" ); ok( uc.dwHostNameLength == 14, "unexpected hostname length\n" ); + ok( uc.nPort == 80, "unexpected port: %u\n", uc.nPort ); ok( uc.lpszUrlPath == url_k2 + 21, "unexpected path\n" ); ok( uc.dwUrlPathLength == 0, "unexpected path length\n" ); ok( uc.lpszExtraInfo == url_k2 + 21, "unexpected extra info\n" ); @@ -410,6 +430,7 @@ static void WinHttpCrackUrl_test( void ) ok( uc.dwPasswordLength == 0, "unexpected password length\n" ); ok( uc.lpszHostName == url_k3 + 8, "unexpected hostname\n" ); ok( uc.dwHostNameLength == 14, "unexpected hostname length\n" ); + ok( uc.nPort == 443, "unexpected port: %u\n", uc.nPort ); ok( uc.lpszUrlPath == url_k3 + 22, "unexpected path\n" ); ok( uc.dwUrlPathLength == 5, "unexpected path length\n" ); ok( uc.lpszExtraInfo == url_k3 + 27, "unexpected extra info\n" ); @@ -483,6 +504,7 @@ static void WinHttpCrackUrl_test( void ) uc.dwPasswordLength = 20; uc.lpszHostName = host; uc.dwHostNameLength = 20; + uc.nPort = 0; uc.lpszUrlPath = path; uc.dwUrlPathLength = 40; uc.lpszExtraInfo = extra; @@ -495,6 +517,59 @@ static void WinHttpCrackUrl_test( void ) ok( uc.dwUrlPathLength == 32, "unexpected path length\n" ); ok( !memcmp( uc.lpszExtraInfo, escape + 21, 12 * sizeof(WCHAR) ), "unexpected extra info\n" ); ok( uc.dwExtraInfoLength == 12, "unexpected extra info length\n" ); + + /* Urls with specified port numbers */ + /* decoding with buffers */ + uc.lpszScheme = scheme; + uc.dwSchemeLength = 20; + uc.lpszUserName = user; + uc.dwUserNameLength = 20; + uc.lpszPassword = pass; + uc.dwPasswordLength = 20; + uc.lpszHostName = host; + uc.dwHostNameLength = 20; + uc.nPort = 0; + uc.lpszUrlPath = path; + uc.dwUrlPathLength = 40; + uc.lpszExtraInfo = extra; + uc.dwExtraInfoLength = 20; + path[0] = 0; + + ret = WinHttpCrackUrl( url7, 0, 0, &uc ); + ok( ret, "WinHttpCrackUrl failed\n" ); + ok( !memcmp( uc.lpszHostName, winehq, sizeof(winehq) ), "unexpected host name: %s\n", debugstr_w(uc.lpszHostName) ); + ok( uc.dwHostNameLength == 14, "unexpected host name length: %d\n", uc.dwHostNameLength ); + ok( uc.nPort == 42, "unexpected port: %u\n", uc.nPort ); + + /* decoding without buffers */ + reset_url_components( &uc ); + ret = WinHttpCrackUrl( url9, 0, 0, &uc ); + ok( ret, "WinHttpCrackUrl failed\n" ); + ok( uc.nPort == 0, "unexpected port: %u\n", uc.nPort ); + + reset_url_components( &uc ); + ret = WinHttpCrackUrl( url10, 0, 0, &uc ); + ok( ret, "WinHttpCrackUrl failed\n" ); + ok( uc.nPort == 80, "unexpected port: %u\n", uc.nPort ); + + reset_url_components( &uc ); + ret = WinHttpCrackUrl( url11, 0, 0, &uc ); + ok( ret, "WinHttpCrackUrl failed\n" ); + ok( uc.nPort == 443, "unexpected port: %u\n", uc.nPort ); + + reset_url_components( &uc ); + SetLastError( 0xdeadbeef ); + ret = WinHttpCrackUrl( empty, 0, 0, &uc ); + error = GetLastError(); + ok( !ret, "WinHttpCrackUrl succeeded\n" ); + ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %u, expected ERROR_WINHTTP_UNRECOGNIZED_SCHEME\n", error ); + + reset_url_components( &uc ); + SetLastError( 0xdeadbeef ); + ret = WinHttpCrackUrl( http, 0, 0, &uc ); + error = GetLastError(); + ok( !ret, "WinHttpCrackUrl succeeded\n" ); + ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %u, expected ERROR_WINHTTP_UNRECOGNIZED_SCHEME\n", error ); } START_TEST(url) diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index a4e33b47086..74e1c9a12ec 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -665,22 +665,22 @@ static void test_WinHttpAddHeaders(void) test_header_name, buffer, &len, &index); ok(ret == FALSE, "WinHttpQueryHeaders succeeded unexpectedly, found third header.\n"); - ret = WinHttpAddRequestHeaders(request, test_headers[8], ~0UL, WINHTTP_ADDREQ_FLAG_ADD); + ret = WinHttpAddRequestHeaders(request, test_headers[8], ~0u, WINHTTP_ADDREQ_FLAG_ADD); ok(!ret, "WinHttpAddRequestHeaders failed\n"); - ret = WinHttpAddRequestHeaders(request, test_headers[9], ~0UL, WINHTTP_ADDREQ_FLAG_ADD); + ret = WinHttpAddRequestHeaders(request, test_headers[9], ~0u, WINHTTP_ADDREQ_FLAG_ADD); ok(ret, "WinHttpAddRequestHeaders failed\n"); - ret = WinHttpAddRequestHeaders(request, test_headers[10], ~0UL, WINHTTP_ADDREQ_FLAG_ADD); + ret = WinHttpAddRequestHeaders(request, test_headers[10], ~0u, WINHTTP_ADDREQ_FLAG_ADD); ok(!ret, "WinHttpAddRequestHeaders failed\n"); - ret = WinHttpAddRequestHeaders(request, test_headers[11], ~0UL, WINHTTP_ADDREQ_FLAG_ADD); + ret = WinHttpAddRequestHeaders(request, test_headers[11], ~0u, WINHTTP_ADDREQ_FLAG_ADD); ok(!ret, "WinHttpAddRequestHeaders failed\n"); - ret = WinHttpAddRequestHeaders(request, test_headers[12], ~0UL, WINHTTP_ADDREQ_FLAG_ADD); + ret = WinHttpAddRequestHeaders(request, test_headers[12], ~0u, WINHTTP_ADDREQ_FLAG_ADD); ok(!ret, "WinHttpAddRequestHeaders failed\n"); - ret = WinHttpAddRequestHeaders(request, test_headers[13], ~0UL, WINHTTP_ADDREQ_FLAG_ADD); + ret = WinHttpAddRequestHeaders(request, test_headers[13], ~0u, WINHTTP_ADDREQ_FLAG_ADD); ok(ret, "WinHttpAddRequestHeaders failed\n"); index = 0; diff --git a/dlls/winhttp/url.c b/dlls/winhttp/url.c index f8c19723c16..711987ab809 100644 --- a/dlls/winhttp/url.c +++ b/dlls/winhttp/url.c @@ -82,7 +82,7 @@ BOOL WINAPI WinHttpCrackUrl( LPCWSTR url, DWORD len, DWORD flags, LPURL_COMPONEN if (flags & ICU_ESCAPE) FIXME("flag ICU_ESCAPE not supported\n"); - if (!url || !url[0] || !uc || uc->dwStructSize != sizeof(URL_COMPONENTS)) + if (!url || !uc || uc->dwStructSize != sizeof(URL_COMPONENTS)) { set_last_error( ERROR_INVALID_PARAMETER ); return FALSE; @@ -114,12 +114,18 @@ BOOL WINAPI WinHttpCrackUrl( LPCWSTR url, DWORD len, DWORD flags, LPURL_COMPONEN } HeapFree( GetProcessHeap(), 0, url_tmp ); } - if (!(p = strchrW( url, ':' ))) return FALSE; - + if (!(p = strchrW( url, ':' ))) + { + set_last_error( ERROR_WINHTTP_UNRECOGNIZED_SCHEME ); + return FALSE; + } if (p - url == 4 && !strncmpiW( url, scheme_http, 4 )) uc->nScheme = INTERNET_SCHEME_HTTP; else if (p - url == 5 && !strncmpiW( url, scheme_https, 5 )) uc->nScheme = INTERNET_SCHEME_HTTPS; - else goto exit; - + else + { + set_last_error( ERROR_WINHTTP_UNRECOGNIZED_SCHEME ); + goto exit; + } if (!(set_component( &uc->lpszScheme, &uc->dwSchemeLength, (WCHAR *)url, p - url, flags ))) goto exit; p++; /* skip ':' */ @@ -149,7 +155,18 @@ BOOL WINAPI WinHttpCrackUrl( LPCWSTR url, DWORD len, DWORD flags, LPURL_COMPONEN } if ((q = memchrW( p, '/', len - (p - url) ))) { - if (!(set_component( &uc->lpszHostName, &uc->dwHostNameLength, p, q - p, flags ))) goto exit; + if ((r = memchrW( p, ':', q - p ))) + { + if (!(set_component( &uc->lpszHostName, &uc->dwHostNameLength, p, r - p, flags ))) goto exit; + r++; + uc->nPort = atoiW( r ); + } + else + { + if (!(set_component( &uc->lpszHostName, &uc->dwHostNameLength, p, q - p, flags ))) goto exit; + if (uc->nScheme == INTERNET_SCHEME_HTTP) uc->nPort = INTERNET_DEFAULT_HTTP_PORT; + if (uc->nScheme == INTERNET_SCHEME_HTTPS) uc->nPort = INTERNET_DEFAULT_HTTPS_PORT; + } if ((r = memchrW( q, '?', len - (q - url) ))) { @@ -164,16 +181,28 @@ BOOL WINAPI WinHttpCrackUrl( LPCWSTR url, DWORD len, DWORD flags, LPURL_COMPONEN } else { - if (!(set_component( &uc->lpszHostName, &uc->dwHostNameLength, p, len - (p - url), flags ))) goto exit; + if ((r = memchrW( p, ':', len - (p - url) ))) + { + if (!(set_component( &uc->lpszHostName, &uc->dwHostNameLength, p, r - p, flags ))) goto exit; + r++; + uc->nPort = atoiW( r ); + } + else + { + if (!(set_component( &uc->lpszHostName, &uc->dwHostNameLength, p, len - (p - url), flags ))) goto exit; + if (uc->nScheme == INTERNET_SCHEME_HTTP) uc->nPort = INTERNET_DEFAULT_HTTP_PORT; + if (uc->nScheme == INTERNET_SCHEME_HTTPS) uc->nPort = INTERNET_DEFAULT_HTTPS_PORT; + } if (!(set_component( &uc->lpszUrlPath, &uc->dwUrlPathLength, (WCHAR *)url + len, 0, flags ))) goto exit; if (!(set_component( &uc->lpszExtraInfo, &uc->dwExtraInfoLength, (WCHAR *)url + len, 0, flags ))) goto exit; } ret = TRUE; - TRACE("scheme(%s) host(%s) path(%s) extra(%s)\n", + TRACE("scheme(%s) host(%s) port(%d) path(%s) extra(%s)\n", debugstr_wn( uc->lpszScheme, uc->dwSchemeLength ), debugstr_wn( uc->lpszHostName, uc->dwHostNameLength ), + uc->nPort, debugstr_wn( uc->lpszUrlPath, uc->dwUrlPathLength ), debugstr_wn( uc->lpszExtraInfo, uc->dwExtraInfoLength )); diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h index 50432351277..511e124c5a3 100644 --- a/dlls/winhttp/winhttp_private.h +++ b/dlls/winhttp/winhttp_private.h @@ -26,6 +26,7 @@ #include "wine/list.h" #include "wine/unicode.h" +#include #ifdef HAVE_NETINET_IN_H # include #endif diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 2b9b95f3673..d4ea219438a 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1695,7 +1695,7 @@ static DWORD HTTP_ReadChunked(WININETHTTPREQW *req, void *buffer, DWORD size, DW { if (*read == size) break; - if (req->dwContentLength == ~0UL) /* new chunk */ + if (req->dwContentLength == ~0u) /* new chunk */ { buflen = sizeof(reply); if (!NETCON_getNextLine(&req->netConnection, reply, &buflen)) break; @@ -1736,7 +1736,7 @@ static DWORD HTTP_ReadChunked(WININETHTTPREQW *req, void *buffer, DWORD size, DW if (req->dwContentRead == req->dwContentLength) /* chunk complete */ { req->dwContentRead = 0; - req->dwContentLength = ~0UL; + req->dwContentLength = ~0u; buflen = sizeof(reply); if (!NETCON_getNextLine(&req->netConnection, reply, &buflen)) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 8b3a8f8a269..89995bf4162 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -363,8 +363,6 @@ static void InternetReadFile_test(int flags) CHECK_NOTIFIED2(INTERNET_STATUS_REQUEST_SENT, 2); CHECK_NOTIFIED2(INTERNET_STATUS_RECEIVING_RESPONSE, 2); CHECK_NOTIFIED2(INTERNET_STATUS_RESPONSE_RECEIVED, 2); - todo_wine CHECK_NOTIFIED2(INTERNET_STATUS_CLOSING_CONNECTION, 2); - todo_wine CHECK_NOTIFIED2(INTERNET_STATUS_CONNECTION_CLOSED, 2); CHECK_NOTIFIED(INTERNET_STATUS_REDIRECT); if (flags & INTERNET_FLAG_ASYNC) CHECK_NOTIFIED(INTERNET_STATUS_REQUEST_COMPLETE); @@ -411,8 +409,6 @@ static void InternetReadFile_test(int flags) length = 100; trace("Entering Query loop\n"); - SET_EXPECT(INTERNET_STATUS_CLOSING_CONNECTION); - SET_EXPECT(INTERNET_STATUS_CONNECTION_CLOSED); while (TRUE) { if (flags & INTERNET_FLAG_ASYNC) @@ -450,9 +446,8 @@ static void InternetReadFile_test(int flags) if (length == 0) break; } - /* WinXP does not send, but Win98 does */ - CLEAR_NOTIFIED(INTERNET_STATUS_CLOSING_CONNECTION); - CLEAR_NOTIFIED(INTERNET_STATUS_CONNECTION_CLOSED); + todo_wine CHECK_NOTIFIED2(INTERNET_STATUS_CLOSING_CONNECTION, 2); + todo_wine CHECK_NOTIFIED2(INTERNET_STATUS_CONNECTION_CLOSED, 2); abort: trace("aborting\n"); SET_EXPECT2(INTERNET_STATUS_HANDLE_CLOSING, (hor != 0x0) + (hic != 0x0)); @@ -1666,7 +1661,7 @@ static void test_header_handling_order(int port) request = HttpOpenRequest(connect, NULL, "/test3", NULL, NULL, types, INTERNET_FLAG_KEEP_CONNECTION, 0); ok(request != NULL, "HttpOpenRequest failed\n"); - ret = HttpAddRequestHeaders(request, authorization, ~0UL, HTTP_ADDREQ_FLAG_ADD); + ret = HttpAddRequestHeaders(request, authorization, ~0u, HTTP_ADDREQ_FLAG_ADD); ok(ret, "HttpAddRequestHeaders failed\n"); ret = HttpSendRequest(request, NULL, 0, NULL, 0); @@ -1683,7 +1678,7 @@ static void test_header_handling_order(int port) request = HttpOpenRequest(connect, NULL, "/test4", NULL, NULL, types, INTERNET_FLAG_KEEP_CONNECTION, 0); ok(request != NULL, "HttpOpenRequest failed\n"); - ret = HttpSendRequest(request, connection, ~0UL, NULL, 0); + ret = HttpSendRequest(request, connection, ~0u, NULL, 0); ok(ret, "HttpSendRequest failed\n"); status = 0; @@ -1697,10 +1692,10 @@ static void test_header_handling_order(int port) request = HttpOpenRequest(connect, "POST", "/test7", NULL, NULL, types, INTERNET_FLAG_KEEP_CONNECTION, 0); ok(request != NULL, "HttpOpenRequest failed\n"); - ret = HttpAddRequestHeaders(request, "Content-Length: 100\r\n", ~0UL, HTTP_ADDREQ_FLAG_ADD_IF_NEW); + ret = HttpAddRequestHeaders(request, "Content-Length: 100\r\n", ~0u, HTTP_ADDREQ_FLAG_ADD_IF_NEW); ok(ret, "HttpAddRequestHeaders failed\n"); - ret = HttpSendRequest(request, connection, ~0UL, NULL, 0); + ret = HttpSendRequest(request, connection, ~0u, NULL, 0); ok(ret, "HttpSendRequest failed\n"); status = 0; @@ -2055,7 +2050,7 @@ static void test_user_agent_header(void) ok(!ret, "HttpQueryInfo succeeded\n"); ok(err == ERROR_HTTP_HEADER_NOT_FOUND, "expected ERROR_HTTP_HEADER_NOT_FOUND, got %u\n", err); - ret = HttpAddRequestHeaders(req, "User-Agent: Gizmo Project\r\n", ~0UL, HTTP_ADDREQ_FLAG_ADD_IF_NEW); + ret = HttpAddRequestHeaders(req, "User-Agent: Gizmo Project\r\n", ~0u, HTTP_ADDREQ_FLAG_ADD_IF_NEW); ok(ret, "HttpAddRequestHeaders succeeded\n"); size = sizeof(buffer); @@ -2075,7 +2070,7 @@ static void test_user_agent_header(void) ok(!ret, "HttpQueryInfo succeeded\n"); ok(err == ERROR_HTTP_HEADER_NOT_FOUND, "expected ERROR_HTTP_HEADER_NOT_FOUND, got %u\n", err); - ret = HttpAddRequestHeaders(req, "Accept: audio/*, image/*, text/*\r\nUser-Agent: Gizmo Project\r\n", ~0UL, HTTP_ADDREQ_FLAG_ADD_IF_NEW); + ret = HttpAddRequestHeaders(req, "Accept: audio/*, image/*, text/*\r\nUser-Agent: Gizmo Project\r\n", ~0u, HTTP_ADDREQ_FLAG_ADD_IF_NEW); ok(ret, "HttpAddRequestHeaders failed\n"); buffer[0] = 0; diff --git a/dlls/winmm/joystick.c b/dlls/winmm/joystick.c index d5d620b5892..01739263eb4 100644 --- a/dlls/winmm/joystick.c +++ b/dlls/winmm/joystick.c @@ -126,6 +126,10 @@ static void CALLBACK JOY_Timer(HWND hWnd, UINT wMsg, UINT_PTR wTimer, DWORD dwTi MMRESULT WINAPI joyConfigChanged(DWORD flags) { FIXME("(%x) - stub\n", flags); + + if (flags) + return JOYERR_PARMS; + return JOYERR_NOERROR; } diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c index 2979d77329e..1ca0728384d 100644 --- a/dlls/winmm/playsound.c +++ b/dlls/winmm/playsound.c @@ -446,6 +446,11 @@ static BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSo if ((fdwSound & (SND_NOWAIT | SND_NOSTOP)) && PlaySoundList != NULL) return FALSE; + if ((fdwSound & SND_ALIAS_ID) == SND_ALIAS_ID) { + FIXME("SND_ALIAS_ID not supported\n"); + return FALSE; + } + /* alloc internal structure, if we need to play something */ if (pszSound && !(fdwSound & SND_PURGE)) { diff --git a/dlls/winmm/tests/capture.c b/dlls/winmm/tests/capture.c index f6155e9e363..c46d35a64f4 100644 --- a/dlls/winmm/tests/capture.c +++ b/dlls/winmm/tests/capture.c @@ -148,7 +148,7 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format, return; win=NULL; - rc=waveInOpen(&win,device,pwfx,(DWORD)hevent,0,CALLBACK_EVENT|flags); + rc=waveInOpen(&win,device,pwfx,(DWORD_PTR)hevent,0,CALLBACK_EVENT|flags); /* Note: Win9x doesn't know WAVE_FORMAT_DIRECT */ ok(rc==MMSYSERR_NOERROR || rc==MMSYSERR_BADDEVICEID || rc==MMSYSERR_NOTENABLED || rc==MMSYSERR_NODRIVER || @@ -255,7 +255,7 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format, HWAVEOUT wout; trace("Playing back recorded sound\n"); - rc=waveOutOpen(&wout,WAVE_MAPPER,pwfx,(DWORD)hevent,0,CALLBACK_EVENT); + rc=waveOutOpen(&wout,WAVE_MAPPER,pwfx,(DWORD_PTR)hevent,0,CALLBACK_EVENT); ok(rc==MMSYSERR_NOERROR || rc==MMSYSERR_BADDEVICEID || rc==MMSYSERR_NOTENABLED || rc==MMSYSERR_NODRIVER || rc==MMSYSERR_ALLOCATED || @@ -295,7 +295,7 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format, CloseHandle(hevent); } -static void wave_in_test_device(int device) +static void wave_in_test_device(UINT_PTR device) { WAVEINCAPSA capsA; WAVEINCAPSW capsW; diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c index fc6f0ff7c47..b2b3d7cc5cb 100644 --- a/dlls/winmm/tests/wave.c +++ b/dlls/winmm/tests/wave.c @@ -604,8 +604,8 @@ static void wave_out_test_deviceOut(int device, double duration, BOOL has_volume = pcaps->dwSupport & WAVECAPS_VOLUME ? TRUE : FALSE; double paused = 0.0; double actual; - DWORD callback = 0; - DWORD callback_instance = 0; + DWORD_PTR callback = 0; + DWORD_PTR callback_instance = 0; HANDLE thread = 0; DWORD thread_id; char * buffer; @@ -619,11 +619,11 @@ static void wave_out_test_deviceOut(int device, double duration, return; if ((flags & CALLBACK_TYPEMASK) == CALLBACK_EVENT) { - callback = (DWORD)hevent; + callback = (DWORD_PTR)hevent; callback_instance = 0; } else if ((flags & CALLBACK_TYPEMASK) == CALLBACK_FUNCTION) { - callback = (DWORD)callback_func; - callback_instance = (DWORD)hevent; + callback = (DWORD_PTR)callback_func; + callback_instance = (DWORD_PTR)hevent; } else if ((flags & CALLBACK_TYPEMASK) == CALLBACK_THREAD) { thread = CreateThread(NULL, 0, callback_thread, hevent, 0, &thread_id); if (thread) { @@ -827,7 +827,7 @@ EXIT: HeapFree(GetProcessHeap(), 0, frags); } -static void wave_out_test_device(int device) +static void wave_out_test_device(UINT_PTR device) { WAVEOUTCAPSA capsA; WAVEOUTCAPSW capsW; diff --git a/dlls/wldap32/add.c b/dlls/wldap32/add.c index 472ee21e8e4..b15f5f9e41c 100644 --- a/dlls/wldap32/add.c +++ b/dlls/wldap32/add.c @@ -58,7 +58,7 @@ ULONG CDECL ldap_addA( WLDAP32_LDAP *ld, PCHAR dn, LDAPModA *attrs[] ) TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), attrs ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (dn) { dnW = strAtoW( dn ); @@ -127,7 +127,7 @@ ULONG CDECL ldap_addW( WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *attrs[] ) if (ret == LDAP_SUCCESS) ret = msg; else - ret = ~0UL; + ret = ~0u; exit: strfreeU( dnU ); diff --git a/dlls/wldap32/ber.c b/dlls/wldap32/ber.c index 5615135f369..41acd7073fa 100644 --- a/dlls/wldap32/ber.c +++ b/dlls/wldap32/ber.c @@ -325,12 +325,12 @@ ULONG CDECL WLDAP32_ber_skip_tag( BerElement *berelement, ULONG *len ) INT CDECL WLDAP32_ber_printf( BerElement *berelement, PCHAR fmt, ... ) { #ifdef HAVE_LDAP - va_list list; + __ms_va_list list; int ret = 0; char new_fmt[2]; new_fmt[1] = 0; - va_start( list, fmt ); + __ms_va_start( list, fmt ); while (*fmt) { new_fmt[0] = *fmt++; @@ -391,7 +391,7 @@ INT CDECL WLDAP32_ber_printf( BerElement *berelement, PCHAR fmt, ... ) } if (ret == -1) break; } - va_end( list ); + __ms_va_end( list ); return ret; #else return LBER_ERROR; @@ -420,12 +420,12 @@ INT CDECL WLDAP32_ber_printf( BerElement *berelement, PCHAR fmt, ... ) INT CDECL WLDAP32_ber_scanf( BerElement *berelement, PCHAR fmt, ... ) { #ifdef HAVE_LDAP - va_list list; + __ms_va_list list; int ret = 0; char new_fmt[2]; new_fmt[1] = 0; - va_start( list, fmt ); + __ms_va_start( list, fmt ); while (*fmt) { new_fmt[0] = *fmt++; @@ -491,7 +491,7 @@ INT CDECL WLDAP32_ber_scanf( BerElement *berelement, PCHAR fmt, ... ) } if (ret == -1) break; } - va_end( list ); + __ms_va_end( list ); return ret; #else return LBER_ERROR; diff --git a/dlls/wldap32/bind.c b/dlls/wldap32/bind.c index dff649b5ecd..18ca869b95a 100644 --- a/dlls/wldap32/bind.c +++ b/dlls/wldap32/bind.c @@ -53,7 +53,7 @@ ULONG CDECL ldap_bindA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR cred, ULONG method ) TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_a(dn), cred, method ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (dn) { dnW = strAtoW( dn ); @@ -104,7 +104,7 @@ ULONG CDECL ldap_bindW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR cred, ULONG method ) TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_w(dn), cred, method ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (method != LDAP_AUTH_SIMPLE) return WLDAP32_LDAP_PARAM_ERROR; if (dn) { @@ -124,7 +124,7 @@ ULONG CDECL ldap_bindW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR cred, ULONG method ) if (ret == LDAP_SUCCESS) ret = msg; else - ret = ~0UL; + ret = ~0u; exit: strfreeU( dnU ); @@ -476,7 +476,7 @@ ULONG CDECL ldap_simple_bindA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR passwd ) TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), passwd ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (dn) { dnW = strAtoW( dn ); @@ -526,7 +526,7 @@ ULONG CDECL ldap_simple_bindW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR passwd ) TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), passwd ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (dn) { dnU = strWtoU( dn ); @@ -545,7 +545,7 @@ ULONG CDECL ldap_simple_bindW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR passwd ) if (ret == LDAP_SUCCESS) ret = msg; else - ret = ~0UL; + ret = ~0u; exit: strfreeU( dnU ); diff --git a/dlls/wldap32/compare.c b/dlls/wldap32/compare.c index 000b075ba91..1ab36b7c75c 100644 --- a/dlls/wldap32/compare.c +++ b/dlls/wldap32/compare.c @@ -49,12 +49,12 @@ ULONG CDECL ldap_compareA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR attr, PCHAR value ) #ifdef HAVE_LDAP WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL; - ret = ~0UL; + ret = ~0u; TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_a(dn), debugstr_a(attr), debugstr_a(value) ); - if (!ld || !attr) return ~0UL; + if (!ld || !attr) return ~0u; if (dn) { dnW = strAtoW( dn ); @@ -103,12 +103,12 @@ ULONG CDECL ldap_compareW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR valu struct berval val = { 0, NULL }; int msg; - ret = ~0UL; + ret = ~0u; TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_w(dn), debugstr_w(attr), debugstr_w(value) ); - if (!ld || !attr) return ~0UL; + if (!ld || !attr) return ~0u; if (dn) { dnU = strWtoU( dn ); @@ -131,7 +131,7 @@ ULONG CDECL ldap_compareW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR valu if (ret == LDAP_SUCCESS) ret = msg; else - ret = ~0UL; + ret = ~0u; exit: strfreeU( dnU ); diff --git a/dlls/wldap32/control.c b/dlls/wldap32/control.c index b9d93555a61..fa415f84792 100644 --- a/dlls/wldap32/control.c +++ b/dlls/wldap32/control.c @@ -215,7 +215,7 @@ INT CDECL ldap_create_vlv_controlA( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info, TRACE( "(%p, %p, 0x%02x, %p)\n", ld, info, critical, control ); - if (!ld || !control) return ~0UL; + if (!ld || !control) return ~0u; ret = ldap_create_vlv_controlW( ld, info, critical, &controlW ); @@ -261,7 +261,7 @@ INT CDECL ldap_create_vlv_controlW( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info, TRACE( "(%p, %p, 0x%02x, %p)\n", ld, info, critical, control ); - if (!ld || !control) return ~0UL; + if (!ld || !control) return ~0u; ret = map_error( ldap_create_vlv_control( ld, (LDAPVLVInfo *)info, &controlU )); diff --git a/dlls/wldap32/delete.c b/dlls/wldap32/delete.c index af0484c5684..226b868fc83 100644 --- a/dlls/wldap32/delete.c +++ b/dlls/wldap32/delete.c @@ -51,7 +51,7 @@ ULONG CDECL ldap_deleteA( WLDAP32_LDAP *ld, PCHAR dn ) TRACE( "(%p, %s)\n", ld, debugstr_a(dn) ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (dn) { dnW = strAtoW( dn ); @@ -92,7 +92,7 @@ ULONG CDECL ldap_deleteW( WLDAP32_LDAP *ld, PWCHAR dn ) TRACE( "(%p, %s)\n", ld, debugstr_w(dn) ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (dn) { dnU = strWtoU( dn ); @@ -104,7 +104,7 @@ ULONG CDECL ldap_deleteW( WLDAP32_LDAP *ld, PWCHAR dn ) if (ret == LDAP_SUCCESS) ret = msg; else - ret = ~0UL; + ret = ~0u; strfreeU( dnU ); diff --git a/dlls/wldap32/error.c b/dlls/wldap32/error.c index 8254a1d995d..ca088e6876f 100644 --- a/dlls/wldap32/error.c +++ b/dlls/wldap32/error.c @@ -161,14 +161,14 @@ ULONG CDECL WLDAP32_ldap_result2error( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *re TRACE( "(%p, %p, 0x%08x)\n", ld, res, free ); - if (!ld || !res) return ~0UL; + if (!ld || !res) return ~0u; ret = ldap_parse_result( ld, res, &error, NULL, NULL, NULL, NULL, free ); if (ret == LDAP_SUCCESS) ret = error; else - ret = ~0UL; + ret = ~0u; #endif return ret; diff --git a/dlls/wldap32/init.c b/dlls/wldap32/init.c index c7b11dea5fb..db9b4517238 100644 --- a/dlls/wldap32/init.c +++ b/dlls/wldap32/init.c @@ -584,7 +584,7 @@ ULONG CDECL ldap_start_tls_sA( WLDAP32_LDAP *ld, PULONG retval, WLDAP32_LDAPMess TRACE( "(%p, %p, %p, %p, %p)\n", ld, retval, result, serverctrls, clientctrls ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (serverctrls) { serverctrlsW = controlarrayAtoW( serverctrls ); @@ -635,7 +635,7 @@ ULONG CDECL ldap_start_tls_sW( WLDAP32_LDAP *ld, PULONG retval, WLDAP32_LDAPMess TRACE( "(%p, %p, %p, %p, %p)\n", ld, retval, result, serverctrls, clientctrls ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (serverctrls) { serverctrlsU = controlarrayWtoU( serverctrls ); diff --git a/dlls/wldap32/misc.c b/dlls/wldap32/misc.c index 09e7995b0ef..fa9ac7ac555 100644 --- a/dlls/wldap32/misc.c +++ b/dlls/wldap32/misc.c @@ -59,7 +59,7 @@ ULONG CDECL WLDAP32_ldap_abandon( WLDAP32_LDAP *ld, ULONG msgid ) TRACE( "(%p, 0x%08x)\n", ld, msgid ); - if (!ld) return ~0UL; + if (!ld) return ~0u; ret = map_error( ldap_abandon_ext( ld, msgid, NULL, NULL )); #endif @@ -153,7 +153,7 @@ WLDAP32_LDAP * CDECL ldap_conn_from_msg( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage * * * RETURNS * Success: The number of entries. - * Failure: ~0UL + * Failure: ~0u */ ULONG CDECL WLDAP32_ldap_count_entries( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *res ) { @@ -162,7 +162,7 @@ ULONG CDECL WLDAP32_ldap_count_entries( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *r TRACE( "(%p, %p)\n", ld, res ); - if (!ld) return ~0UL; + if (!ld) return ~0u; ret = ldap_count_entries( ld, res ); #endif @@ -180,7 +180,7 @@ ULONG CDECL WLDAP32_ldap_count_entries( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *r * * RETURNS * Success: The number of references. - * Failure: ~0UL + * Failure: ~0u */ ULONG CDECL WLDAP32_ldap_count_references( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *res ) { @@ -596,7 +596,7 @@ WLDAP32_LDAPMessage * CDECL WLDAP32_ldap_next_reference( WLDAP32_LDAP *ld, WLDAP * LDAP_RES_SEARCH_ENTRY * LDAP_RES_SEARCH_RESULT * - * Failure: ~0UL + * Failure: ~0u * * This function returns 0 when the timeout has expired. * @@ -614,7 +614,7 @@ ULONG CDECL WLDAP32_ldap_result( WLDAP32_LDAP *ld, ULONG msgid, ULONG all, TRACE( "(%p, 0x%08x, 0x%08x, %p, %p)\n", ld, msgid, all, timeout, res ); - if (!ld || !res || msgid == ~0UL) return ~0UL; + if (!ld || !res || msgid == ~0u) return ~0u; ret = ldap_result( ld, msgid, all, (struct timeval *)timeout, res ); #endif diff --git a/dlls/wldap32/modify.c b/dlls/wldap32/modify.c index 43c5c2e57ce..3c4eac1e041 100644 --- a/dlls/wldap32/modify.c +++ b/dlls/wldap32/modify.c @@ -58,7 +58,7 @@ ULONG CDECL ldap_modifyA( WLDAP32_LDAP *ld, PCHAR dn, LDAPModA *mods[] ) TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), mods ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (dn) { dnW = strAtoW( dn ); @@ -128,7 +128,7 @@ ULONG CDECL ldap_modifyW( WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *mods[] ) if (ret == LDAP_SUCCESS) ret = msg; else - ret = ~0UL; + ret = ~0u; exit: strfreeU( dnU ); @@ -157,7 +157,7 @@ ULONG CDECL ldap_modify_extA( WLDAP32_LDAP *ld, PCHAR dn, LDAPModA *mods[], TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_a(dn), mods, serverctrls, clientctrls, message ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (dn) { dnW = strAtoW( dn ); @@ -226,7 +226,7 @@ ULONG CDECL ldap_modify_extW( WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *mods[], TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_w(dn), mods, serverctrls, clientctrls, message ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (dn) { dnU = strWtoU( dn ); diff --git a/dlls/wldap32/modrdn.c b/dlls/wldap32/modrdn.c index b64e8762b65..76bf892b2a6 100644 --- a/dlls/wldap32/modrdn.c +++ b/dlls/wldap32/modrdn.c @@ -53,7 +53,7 @@ ULONG CDECL ldap_modrdnA( WLDAP32_LDAP *ld, PCHAR dn, PCHAR newdn ) TRACE( "(%p, %s, %s)\n", ld, debugstr_a(dn), debugstr_a(newdn) ); - if (!ld || !newdn) return ~0UL; + if (!ld || !newdn) return ~0u; if (dn) { dnW = strAtoW( dn ); @@ -103,7 +103,7 @@ ULONG CDECL ldap_modrdnW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn ) TRACE( "(%p, %s, %s)\n", ld, debugstr_w(dn), debugstr_w(newdn) ); - if (!ld || !newdn) return ~0UL; + if (!ld || !newdn) return ~0u; if (dn) { dnU = strWtoU( dn ); @@ -118,7 +118,7 @@ ULONG CDECL ldap_modrdnW( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn ) if (ret == LDAP_SUCCESS) ret = msg; else - ret = ~0UL; + ret = ~0u; exit: strfreeU( dnU ); @@ -143,7 +143,7 @@ ULONG CDECL ldap_modrdn2A( WLDAP32_LDAP *ld, PCHAR dn, PCHAR newdn, INT delete ) TRACE( "(%p, %s, %p, 0x%02x)\n", ld, debugstr_a(dn), newdn, delete ); - if (!ld || !newdn) return ~0UL; + if (!ld || !newdn) return ~0u; if (dn) { dnW = strAtoW( dn ); @@ -194,7 +194,7 @@ ULONG CDECL ldap_modrdn2W( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn, INT delete TRACE( "(%p, %s, %p, 0x%02x)\n", ld, debugstr_w(dn), newdn, delete ); - if (!ld || !newdn) return ~0UL; + if (!ld || !newdn) return ~0u; if (dn) { dnU = strWtoU( dn ); @@ -209,7 +209,7 @@ ULONG CDECL ldap_modrdn2W( WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn, INT delete if (ret == LDAP_SUCCESS) ret = msg; else - ret = ~0UL; + ret = ~0u; exit: strfreeU( dnU ); diff --git a/dlls/wldap32/page.c b/dlls/wldap32/page.c index 481635e9bee..b3c2d78d81e 100644 --- a/dlls/wldap32/page.c +++ b/dlls/wldap32/page.c @@ -168,7 +168,7 @@ ULONG CDECL ldap_get_next_page( WLDAP32_LDAP *ld, PLDAPSearch search, ULONG page { FIXME( "(%p, %p, 0x%08x, %p)\n", ld, search, pagesize, message ); - if (!ld) return ~0UL; + if (!ld) return ~0u; return WLDAP32_LDAP_NOT_SUPPORTED; } @@ -179,7 +179,7 @@ ULONG CDECL ldap_get_next_page_s( WLDAP32_LDAP *ld, PLDAPSearch search, FIXME( "(%p, %p, %p, 0x%08x, %p, %p)\n", ld, search, timeout, pagesize, count, results ); - if (!ld) return ~0UL; + if (!ld) return ~0u; return WLDAP32_LDAP_NOT_SUPPORTED; } @@ -269,7 +269,7 @@ ULONG CDECL ldap_search_abandon_page( WLDAP32_LDAP *ld, PLDAPSearch search ) { FIXME( "(%p, %p)\n", ld, search ); - if (!ld) return ~0UL; + if (!ld) return ~0u; return WLDAP32_LDAP_SUCCESS; } diff --git a/dlls/wldap32/parse.c b/dlls/wldap32/parse.c index 7d3826ac604..6439ba61966 100644 --- a/dlls/wldap32/parse.c +++ b/dlls/wldap32/parse.c @@ -125,7 +125,7 @@ ULONG CDECL ldap_parse_referenceA( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *messag TRACE( "(%p, %p, %p)\n", ld, message, referrals ); - if (!ld) return ~0UL; + if (!ld) return ~0u; ret = ldap_parse_referenceW( ld, message, &referralsW ); @@ -162,7 +162,7 @@ ULONG CDECL ldap_parse_referenceW( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *messag TRACE( "(%p, %p, %p)\n", ld, message, referrals ); - if (!ld) return ~0UL; + if (!ld) return ~0u; ret = map_error( ldap_parse_reference( ld, message, &referralsU, NULL, 0 )); @@ -383,7 +383,7 @@ INT CDECL ldap_parse_vlv_controlA( WLDAP32_LDAP *ld, PLDAPControlA *control, TRACE( "(%p, %p, %p, %p, %p, %p)\n", ld, control, targetpos, listcount, context, errcode ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (control) { controlW = controlarrayAtoW( control ); @@ -437,7 +437,7 @@ INT CDECL ldap_parse_vlv_controlW( WLDAP32_LDAP *ld, PLDAPControlW *control, TRACE( "(%p, %p, %p, %p, %p, %p)\n", ld, control, targetpos, listcount, context, errcode ); - if (!ld || !control) return ~0UL; + if (!ld || !control) return ~0u; controlU = controlarrayWtoU( control ); if (!controlU) return WLDAP32_LDAP_NO_MEMORY; diff --git a/dlls/wldap32/search.c b/dlls/wldap32/search.c index 5b296eb9952..16158a4f772 100644 --- a/dlls/wldap32/search.c +++ b/dlls/wldap32/search.c @@ -55,7 +55,7 @@ ULONG CDECL ldap_searchA( WLDAP32_LDAP *ld, PCHAR base, ULONG scope, PCHAR filte TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x)\n", ld, debugstr_a(base), scope, debugstr_a(filter), attrs, attrsonly ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (base) { baseW = strAtoW( base ); @@ -97,7 +97,7 @@ exit: * * RETURNS * Success: Message ID of the search operation. - * Failure: ~0UL + * Failure: ~0u * * NOTES * Call ldap_result with the message ID to get the result of @@ -117,7 +117,7 @@ ULONG CDECL ldap_searchW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope, PWCHAR fil TRACE( "(%p, %s, 0x%08x, %s, %p, 0x%08x)\n", ld, debugstr_w(base), scope, debugstr_w(filter), attrs, attrsonly ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (base) { baseU = strWtoU( base ); @@ -138,7 +138,7 @@ ULONG CDECL ldap_searchW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope, PWCHAR fil if (ret == LDAP_SUCCESS) ret = msg; else - ret = ~0UL; + ret = ~0u; exit: strfreeU( baseU ); @@ -251,7 +251,7 @@ ULONG CDECL ldap_search_extW( WLDAP32_LDAP *ld, PWCHAR base, ULONG scope, ld, debugstr_w(base), scope, debugstr_w(filter), attrs, attrsonly, serverctrls, clientctrls, timelimit, sizelimit, message ); - if (!ld) return ~0UL; + if (!ld) return ~0u; if (base) { baseU = strWtoU( base ); diff --git a/dlls/wldap32/tests/parse.c b/dlls/wldap32/tests/parse.c index 22390a55984..d4b5de2fadf 100644 --- a/dlls/wldap32/tests/parse.c +++ b/dlls/wldap32/tests/parse.c @@ -60,7 +60,7 @@ static void test_ldap_parse_sort_control( LDAP *ld ) ret = ldap_parse_resultA( NULL, res, &result, NULL, NULL, NULL, &server_ctrls, 1 ); ok( ret == LDAP_PARAM_ERROR, "ldap_parse_resultA failed 0x%x\n", ret ); - result = ~0UL; + result = ~0u; ret = ldap_parse_resultA( ld, res, &result, NULL, NULL, NULL, &server_ctrls, 1 ); ok( !ret, "ldap_parse_resultA failed 0x%x\n", ret ); ok( !result, "got 0x%x expected 0\n", result ); diff --git a/dlls/wnaspi32/aspi.c b/dlls/wnaspi32/aspi.c index 2505a25968c..a0658e754f2 100644 --- a/dlls/wnaspi32/aspi.c +++ b/dlls/wnaspi32/aspi.c @@ -311,7 +311,7 @@ SCSI_LinuxDeviceIo( int fd, WARN("Not enough bytes written to scsi device. bytes=%d .. %d\n", cbInBuffer, dwBytes ); /* FIXME: set_last_error() never sets error to ERROR_NOT_ENOUGH_MEMORY... */ if( save_error == ERROR_NOT_ENOUGH_MEMORY ) - MESSAGE("Your Linux kernel was not able to handle the amount of data sent to the scsi device. Try recompiling with a larger SG_BIG_BUFF value (kernel 2.0.x sg.h)"); + MESSAGE("Your Linux kernel was not able to handle the amount of data sent to the scsi device. Try recompiling with a larger SG_BIG_BUFF value (kernel 2.0.x sg.h)\n"); WARN("error= %d\n", save_error ); *lpcbBytesReturned = 0; return FALSE; diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 5b748c84bbd..078c3bec627 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -103,6 +103,9 @@ # ifdef HAVE_ASM_TYPES_H # include # endif +# ifdef HAVE_LINUX_TYPES_H +# include +# endif # include # define HAVE_IPX #endif @@ -1124,7 +1127,7 @@ static int WS2_recv( int fd, struct ws2_async *wsa ) * * Handler for overlapped recv() operations. */ -static NTSTATUS WS2_async_recv( void* user, IO_STATUS_BLOCK* iosb, NTSTATUS status, ULONG *total ) +static NTSTATUS WS2_async_recv( void* user, IO_STATUS_BLOCK* iosb, NTSTATUS status, void **apc) { ws2_async* wsa = user; int result = 0, fd; @@ -1160,7 +1163,8 @@ static NTSTATUS WS2_async_recv( void* user, IO_STATUS_BLOCK* iosb, NTSTATUS stat if (status != STATUS_PENDING) { iosb->u.Status = status; - iosb->Information = *total = result; + iosb->Information = result; + *apc = ws2_async_apc; } return status; } @@ -1225,7 +1229,7 @@ static int WS2_send( int fd, struct ws2_async *wsa ) * * Handler for overlapped send() operations. */ -static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS status, ULONG *total ) +static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS status, void **apc) { ws2_async* wsa = user; int result = 0, fd; @@ -1270,7 +1274,8 @@ static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS statu if (status != STATUS_PENDING) { iosb->u.Status = status; - iosb->Information = *total = result; + iosb->Information = result; + *apc = ws2_async_apc; } return status; } @@ -1280,7 +1285,7 @@ static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS statu * * Handler for shutdown() operations on overlapped sockets. */ -static NTSTATUS WS2_async_shutdown( void* user, PIO_STATUS_BLOCK iosb, NTSTATUS status, ULONG *total ) +static NTSTATUS WS2_async_shutdown( void* user, PIO_STATUS_BLOCK iosb, NTSTATUS status, void **apc ) { ws2_async* wsa = user; int fd, err = 1; @@ -1300,8 +1305,8 @@ static NTSTATUS WS2_async_shutdown( void* user, PIO_STATUS_BLOCK iosb, NTSTATUS status = err ? wsaErrno() : STATUS_SUCCESS; break; } - *total = 0; iosb->u.Status = status; + *apc = ws2_async_apc; return status; } @@ -1327,12 +1332,11 @@ static int WS2_register_async_shutdown( SOCKET s, int type ) SERVER_START_REQ( register_async ) { - req->handle = wine_server_obj_handle( wsa->hSocket ); req->type = type; - req->async.callback = WS2_async_shutdown; - req->async.iosb = &wsa->local_iosb; - req->async.arg = wsa; - req->async.apc = ws2_async_apc; + req->async.handle = wine_server_obj_handle( wsa->hSocket ); + req->async.callback = wine_server_client_ptr( WS2_async_shutdown ); + req->async.iosb = wine_server_client_ptr( &wsa->local_iosb ); + req->async.arg = wine_server_client_ptr( wsa ); req->async.cvalue = 0; status = wine_server_call( req ); } @@ -2780,12 +2784,11 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, SERVER_START_REQ( register_async ) { - req->handle = wine_server_obj_handle( wsa->hSocket ); - req->type = ASYNC_TYPE_WRITE; - req->async.callback = WS2_async_send; - req->async.iosb = iosb; - req->async.arg = wsa; - req->async.apc = ws2_async_apc; + req->type = ASYNC_TYPE_WRITE; + req->async.handle = wine_server_obj_handle( wsa->hSocket ); + req->async.callback = wine_server_client_ptr( WS2_async_send ); + req->async.iosb = wine_server_client_ptr( iosb ); + req->async.arg = wine_server_client_ptr( wsa ); req->async.event = wine_server_obj_handle( lpCompletionRoutine ? 0 : lpOverlapped->hEvent ); req->async.cvalue = cvalue; err = wine_server_call( req ); @@ -4306,12 +4309,11 @@ INT WINAPI WSARecvFrom( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, SERVER_START_REQ( register_async ) { - req->handle = wine_server_obj_handle( wsa->hSocket ); - req->type = ASYNC_TYPE_READ; - req->async.callback = WS2_async_recv; - req->async.iosb = iosb; - req->async.arg = wsa; - req->async.apc = ws2_async_apc; + req->type = ASYNC_TYPE_READ; + req->async.handle = wine_server_obj_handle( wsa->hSocket ); + req->async.callback = wine_server_client_ptr( WS2_async_recv ); + req->async.iosb = wine_server_client_ptr( iosb ); + req->async.arg = wine_server_client_ptr( wsa ); req->async.event = wine_server_obj_handle( lpCompletionRoutine ? 0 : lpOverlapped->hEvent ); req->async.cvalue = cvalue; err = wine_server_call( req ); diff --git a/dlls/xinput1_3/tests/xinput.c b/dlls/xinput1_3/tests/xinput.c index 1125dcc0b9c..4b7f1303138 100644 --- a/dlls/xinput1_3/tests/xinput.c +++ b/dlls/xinput1_3/tests/xinput.c @@ -25,6 +25,37 @@ static DWORD (WINAPI *pXInputGetState)(DWORD, XINPUT_STATE*); static DWORD (WINAPI *pXInputGetCapabilities)(DWORD,DWORD,XINPUT_CAPABILITIES*); +static DWORD (WINAPI *pXInputSetState)(DWORD, XINPUT_VIBRATION*); +static void (WINAPI *pXInputEnable)(BOOL); + +static void test_set_state(void) +{ + XINPUT_VIBRATION vibrator; + DWORD controllerNum; + DWORD result; + + for(controllerNum=0; controllerNum < XUSER_MAX_COUNT; controllerNum++) + { + ZeroMemory(&vibrator, sizeof(XINPUT_VIBRATION)); + + vibrator.wLeftMotorSpeed = 0; + vibrator.wRightMotorSpeed = 0; + result = pXInputSetState(controllerNum, &vibrator); + ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputSetState failed with (%d)\n", result); + + pXInputEnable(0); + + vibrator.wLeftMotorSpeed = 65535; + vibrator.wRightMotorSpeed = 65535; + result = pXInputSetState(controllerNum, &vibrator); + ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputSetState failed with (%d)\n", result); + + pXInputEnable(1); + } + + result = pXInputSetState(XUSER_MAX_COUNT+1, &vibrator); + ok(result == ERROR_BAD_ARGUMENTS, "XInputSetState returned (%d)\n", result); +} static void test_get_state(void) { @@ -100,8 +131,11 @@ START_TEST(xinput) return; } + pXInputEnable = (void*)GetProcAddress(hXinput, "XInputEnable"); + pXInputSetState = (void*)GetProcAddress(hXinput, "XInputSetState"); pXInputGetState = (void*)GetProcAddress(hXinput, "XInputGetState"); pXInputGetCapabilities = (void*)GetProcAddress(hXinput, "XInputGetCapabilities"); + test_set_state(); test_get_state(); test_get_capabilities(); FreeLibrary(hXinput); diff --git a/dlls/xinput1_3/xinput1_3.spec b/dlls/xinput1_3/xinput1_3.spec index 92d45e92e63..7c71bd5ec0f 100644 --- a/dlls/xinput1_3/xinput1_3.spec +++ b/dlls/xinput1_3/xinput1_3.spec @@ -1,5 +1,5 @@ -@ stub XInputEnable #(long) -@ stub XInputSetState #(long ptr) +@ stdcall XInputEnable(long) +@ stdcall XInputSetState(long ptr) @ stdcall XInputGetState(long ptr) @ stub XInputGetKeystroke #(long long ptr) @ stdcall XInputGetCapabilities(long long ptr) diff --git a/dlls/xinput1_3/xinput1_3_main.c b/dlls/xinput1_3/xinput1_3_main.c index c25c0d7de0e..7f28f3738cd 100644 --- a/dlls/xinput1_3/xinput1_3_main.c +++ b/dlls/xinput1_3/xinput1_3_main.c @@ -46,6 +46,27 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) return TRUE; } +void WINAPI XInputEnable(BOOL enable) +{ + /* Setting to false will stop messages from XInputSetState being sent + to the controllers. Setting to true will send the last vibration + value (sent to XInputSetState) to the controller and allow messages to + be sent */ + FIXME("(%d) Stub!\n", enable); +} + +DWORD WINAPI XInputSetState(DWORD dwUserIndex, XINPUT_VIBRATION* pVibration) +{ + FIXME("(%d %p) Stub!\n", dwUserIndex, pVibration); + + if (dwUserIndex < XUSER_MAX_COUNT) + { + return ERROR_DEVICE_NOT_CONNECTED; + /* If controller exists then return ERROR_SUCCESS */ + } + return ERROR_BAD_ARGUMENTS; +} + DWORD WINAPI XInputGetState(DWORD dwUserIndex, XINPUT_STATE* pState) { FIXME("(%u %p)\n", dwUserIndex, pState); diff --git a/include/cfgmgr32.h b/include/cfgmgr32.h index 635ac989b9b..9e999850652 100644 --- a/include/cfgmgr32.h +++ b/include/cfgmgr32.h @@ -117,6 +117,9 @@ extern "C" { CMAPI CONFIGRET WINAPI CM_Connect_MachineA(PCSTR,PHMACHINE); CMAPI CONFIGRET WINAPI CM_Connect_MachineW(PCWSTR,PHMACHINE); #define CM_Connect_Machine WINELIB_NAME_AW(CM_Connect_Machine) +CMAPI CONFIGRET WINAPI CM_Create_DevNodeA(PDEVINST,DEVINSTID_A,DEVINST,ULONG); +CMAPI CONFIGRET WINAPI CM_Create_DevNodeW(PDEVINST,DEVINSTID_W,DEVINST,ULONG); +#define CM_Create_DevNode WINELIB_NAME_AW(CM_Create_DevNode) CMAPI CONFIGRET WINAPI CM_Disconnect_Machine(HMACHINE); CMAPI CONFIGRET WINAPI CM_Get_Device_IDA(DEVINST,PSTR,ULONG,ULONG); CMAPI CONFIGRET WINAPI CM_Get_Device_IDW(DEVINST,PWSTR,ULONG,ULONG); @@ -129,6 +132,9 @@ CMAPI CONFIGRET WINAPI CM_Get_Device_ID_List_ExW(PCWSTR,PWCHAR,ULONG,ULONG,HMACH #define CM_Get_Device_ID_List_Ex WINELIB_NAME_AW(CM_Get_Device_ID_List_Ex) CMAPI CONFIGRET WINAPI CM_Get_Device_ID_Size(PULONG,DEVINST,ULONG); CMAPI CONFIGRET WINAPI CM_Get_Device_ID_Size_Ex(PULONG,DEVINST,ULONG,HMACHINE); +CMAPI CONFIGRET WINAPI CM_Locate_DevNodeA(PDEVINST,DEVINSTID_A,ULONG); +CMAPI CONFIGRET WINAPI CM_Locate_DevNodeW(PDEVINST,DEVINSTID_W,ULONG); +#define CM_Locate_DevNode WINELIB_NAME_AW(CM_Locate_DevNode) #ifdef __cplusplus } diff --git a/include/commctrl.h b/include/commctrl.h index 046e13f252d..9f68edd4d36 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -1213,12 +1213,14 @@ static const WCHAR TOOLBARCLASSNAMEW[] = { 'T','o','o','l','b','a','r', #define TB_GETSTRING WINELIB_NAME_AW(TB_GETSTRING) /* undocumented messages in Toolbar */ +#ifdef __WINESRC__ #define TB_UNKWN45D (WM_USER+93) -#define TB_UNKWN45E (WM_USER+94) -#define TB_UNKWN460 (WM_USER+96) -#define TB_UNKWN462 (WM_USER+98) -#define TB_UNKWN463 (WM_USER+99) +#define TB_SETHOTITEM2 (WM_USER+94) +#define TB_SETLISTGAP (WM_USER+96) +#define TB_GETIMAGELISTCOUNT (WM_USER+98) +#define TB_GETIDEALSIZE (WM_USER+99) #define TB_UNKWN464 (WM_USER+100) +#endif #define TB_GETMETRICS (WM_USER+101) #define TB_SETMETRICS (WM_USER+102) diff --git a/include/config.h.in b/include/config.h.in index 7f3b8883584..69c1fee7b32 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -393,6 +393,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_SERIAL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_TYPES_H + /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_UCDROM_H @@ -966,9 +969,6 @@ /* Define to 1 if you have the `waitpid' function. */ #undef HAVE_WAITPID -/* Define to 1 if you have the header file. */ -#undef HAVE_WINSOCK2_H - /* Define to 1 if you have the header file. */ #undef HAVE_X11_EXTENSIONS_SHAPE_H diff --git a/include/d3d9types.h b/include/d3d9types.h index 61e321c2e95..b45352595e8 100644 --- a/include/d3d9types.h +++ b/include/d3d9types.h @@ -128,7 +128,7 @@ #define MAX_DEVICE_IDENTIFIER_STRING 512 #define D3DFVF_RESERVED0 0x0001 -#define D3DFVF_POSITION_MASK 0x000E +#define D3DFVF_POSITION_MASK 0x400E #define D3DFVF_XYZ 0x0002 #define D3DFVF_XYZRHW 0x0004 #define D3DFVF_XYZB1 0x0006 @@ -1130,21 +1130,9 @@ typedef enum _D3DTEXTURESTAGESTATETYPE { D3DTSS_BUMPENVMAT10 = 9, D3DTSS_BUMPENVMAT11 = 10, D3DTSS_TEXCOORDINDEX = 11, -#if 1 /* TODO: remove once samplerstates are implemented. */ - D3DTSS_ADDRESSU = 13, - D3DTSS_ADDRESSV = 14, - D3DTSS_BORDERCOLOR = 15, - D3DTSS_MAGFILTER = 16, - D3DTSS_MINFILTER = 17, - D3DTSS_MIPFILTER = 18, - D3DTSS_MIPMAPLODBIAS = 19, - D3DTSS_MAXMIPLEVEL = 20, - D3DTSS_MAXANISOTROPY = 21, -#endif D3DTSS_BUMPENVLSCALE = 22, D3DTSS_BUMPENVLOFFSET = 23, D3DTSS_TEXTURETRANSFORMFLAGS = 24, - D3DTSS_ADDRESSW = 25, D3DTSS_COLORARG0 = 26, D3DTSS_ALPHAARG0 = 27, D3DTSS_RESULTARG = 28, diff --git a/include/d3dtypes.h b/include/d3dtypes.h index f0be963e88c..21b9e74d709 100644 --- a/include/d3dtypes.h +++ b/include/d3dtypes.h @@ -55,10 +55,10 @@ typedef LONG D3DFIXED; #define RGBA_MAKE(r, g, b, a) ((D3DCOLOR) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b))) #define D3DRGB(r, g, b) \ - (0xff000000L | ( ((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255)) + (0xff000000 | ( ((LONG)((r) * 255)) << 16) | (((LONG)((g) * 255)) << 8) | (LONG)((b) * 255)) #define D3DRGBA(r, g, b, a) \ - ( (((long)((a) * 255)) << 24) | (((long)((r) * 255)) << 16) \ - | (((long)((g) * 255)) << 8) | (long)((b) * 255) \ + ( (((LONG)((a) * 255)) << 24) | (((LONG)((r) * 255)) << 16) \ + | (((LONG)((g) * 255)) << 8) | (LONG)((b) * 255) \ ) #define RGB_GETRED(rgb) (((rgb) >> 16) & 0xff) diff --git a/include/ddraw.h b/include/ddraw.h index f7d1d375592..a7648b1b632 100644 --- a/include/ddraw.h +++ b/include/ddraw.h @@ -1674,7 +1674,7 @@ DECLARE_INTERFACE_(IDirectDraw4,IUnknown) #define IDirectDraw4_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c) /*** IDirectDraw4 methods ***/ #define IDirectDraw4_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b) -#define IDirectDraw4_RestoreAllSurfaces(pc) (p)->lpVtbl->RestoreAllSurfaces(p) +#define IDirectDraw4_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p) #define IDirectDraw4_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p) #define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b) #else @@ -2274,8 +2274,8 @@ DECLARE_INTERFACE_(IDirectDrawSurface4,IUnknown) STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE; STDMETHOD(BltFast)(THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE; STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface) PURE; - STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; - STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE; + STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpEnumSurfacesCallback) PURE; + STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpfnCallback) PURE; STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE; STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE4 *lplpDDAttachedSurface) PURE; STDMETHOD(GetBltStatus)(THIS_ DWORD dwFlags) PURE; diff --git a/include/mshtml.idl b/include/mshtml.idl index eabf8673fb5..fa3fc977aed 100644 --- a/include/mshtml.idl +++ b/include/mshtml.idl @@ -2245,6 +2245,143 @@ methods: VARIANT minHeight(); } +[ + odl, + oleautomation, + dual, + uuid(3050f656-98b5-11cf-bb82-00aa00bdce0b) +] +interface IHTMLStyle3 : IDispatch +{ + [propput, id(DISPID_IHTMLSTYLE3_LAYOUTFLOW), displaybind, bindable] + HRESULT layoutFlow([in] BSTR v); + + [propget, id(DISPID_IHTMLSTYLE3_LAYOUTFLOW), displaybind, bindable] + HRESULT layoutFlow([retval, out] BSTR * p); + + [propput, id(DISPID_IHTMLSTYLE3_ZOOM), displaybind, bindable] + HRESULT zoom([in] VARIANT v); + + [propget, id(DISPID_IHTMLSTYLE3_ZOOM), displaybind, bindable] + HRESULT zoom([retval, out] VARIANT * p); + + [propput, id(DISPID_IHTMLSTYLE3_WORDWRAP), displaybind, bindable] + HRESULT wordWrap([in] BSTR v); + + [propget, id(DISPID_IHTMLSTYLE3_WORDWRAP), displaybind, bindable] + HRESULT wordWrap([retval, out] BSTR * p); + + [propput, id(DISPID_IHTMLSTYLE3_TEXTUNDERLINEPOSITION), displaybind, bindable] + HRESULT textUnderlinePosition([in] BSTR v); + + [propget, id(DISPID_IHTMLSTYLE3_TEXTUNDERLINEPOSITION), displaybind, bindable] + HRESULT textUnderlinePosition([retval, out] BSTR * p); + + [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARBASECOLOR), displaybind, bindable] + HRESULT scrollbarBaseColor([in] VARIANT v); + + [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARBASECOLOR), displaybind, bindable] + HRESULT scrollbarBaseColor([retval, out] VARIANT * p); + + [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARFACECOLOR), displaybind, bindable] + HRESULT scrollbarFaceColor([in] VARIANT v); + + [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARFACECOLOR), displaybind, bindable] + HRESULT scrollbarFaceColor([retval, out] VARIANT * p); + + [propput, id(DISPID_IHTMLSTYLE3_SCROLLBAR3DLIGHTCOLOR), displaybind, bindable] + HRESULT scrollbar3dLightColor([in] VARIANT v); + + [propget, id(DISPID_IHTMLSTYLE3_SCROLLBAR3DLIGHTCOLOR), displaybind, bindable] + HRESULT scrollbar3dLightColor([retval, out] VARIANT * p); + + [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARSHADOWCOLOR), displaybind, bindable] + HRESULT scrollbarShadowColor([in] VARIANT v); + + [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARSHADOWCOLOR), displaybind, bindable] + HRESULT scrollbarShadowColor([retval, out] VARIANT * p); + + [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARHIGHLIGHTCOLOR), displaybind, bindable] + HRESULT scrollbarHighlightColor([in] VARIANT v); + + [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARHIGHLIGHTCOLOR), displaybind, bindable] + HRESULT scrollbarHighlightColor([retval, out] VARIANT * p); + + [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARDARKSHADOWCOLOR), displaybind, bindable] + HRESULT scrollbarDarkShadowColor([in] VARIANT v); + + [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARDARKSHADOWCOLOR), displaybind, bindable] + HRESULT scrollbarDarkShadowColor([retval, out] VARIANT * p); + + [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARARROWCOLOR), displaybind, bindable] + HRESULT scrollbarArrowColor([in] VARIANT v); + + [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARARROWCOLOR), displaybind, bindable] + HRESULT scrollbarArrowColor([retval, out] VARIANT * p); + + [propput, id(DISPID_IHTMLSTYLE3_SCROLLBARTRACKCOLOR), displaybind, bindable] + HRESULT scrollbarTrackColor([in] VARIANT v); + + [propget, id(DISPID_IHTMLSTYLE3_SCROLLBARTRACKCOLOR), displaybind, bindable] + HRESULT scrollbarTrackColor([retval, out] VARIANT * p); + + [propput, id(DISPID_IHTMLSTYLE3_WRITINGMODE), displaybind, bindable] + HRESULT writingMode([in] BSTR v); + + [propget, id(DISPID_IHTMLSTYLE3_WRITINGMODE), displaybind, bindable] + HRESULT writingMode([retval, out] BSTR * p); + + [propput, id(DISPID_IHTMLSTYLE3_TEXTALIGNLAST), displaybind, bindable] + HRESULT textAlignLast([in] BSTR v); + + [propget, id(DISPID_IHTMLSTYLE3_TEXTALIGNLAST), displaybind, bindable] + HRESULT textAlignLast([retval, out] BSTR * p); + + [propput, id(DISPID_IHTMLSTYLE3_TEXTKASHIDASPACE), displaybind, bindable] + HRESULT textKashidaSpace([in] VARIANT v); + + [propget, id(DISPID_IHTMLSTYLE3_TEXTKASHIDASPACE), displaybind, bindable] + HRESULT textKashidaSpace([retval, out] VARIANT * p); +} + +/***************************************************************************** + * IHTMLSytyle4 interface + */ +[ + odl, + oleautomation, + dual, + uuid(3050f816-98b5-11cf-bb82-00aa00bdce0b) +] +interface IHTMLStyle4 : IDispatch +{ + [propput, id(DISPID_IHTMLSTYLE4_TEXTOVERFLOW), displaybind, bindable] + HRESULT textOverflow([in] BSTR v); + + [propget, id(DISPID_IHTMLSTYLE4_TEXTOVERFLOW), displaybind, bindable] + HRESULT textOverflow([retval, out] BSTR * p); + + [propput, id(DISPID_IHTMLSTYLE4_MINHEIGHT), displaybind, bindable] + HRESULT minHeight([in] VARIANT v); + + [propget, id(DISPID_IHTMLSTYLE4_MINHEIGHT), displaybind, bindable] + HRESULT minHeight([retval, out] VARIANT * p); +} + +[ + noncreatable, + uuid(3050f285-98b5-11cf-bb82-00aa00bdce0b) +] +coclass HTMLStyle +{ + [default] dispinterface DispHTMLStyle; + interface IHTMLStyle; + interface IHTMLStyle2; + interface IHTMLStyle3; + interface IHTMLStyle4; + /* interface IHTMLStyle5; */ +} + /***************************************************************************** * IHTMLRenderStyle interface */ diff --git a/include/msi.h b/include/msi.h index 5564fcd1502..a6a5f3d552c 100644 --- a/include/msi.h +++ b/include/msi.h @@ -27,7 +27,7 @@ extern "C" { #include #endif -typedef unsigned long MSIHANDLE; +typedef ULONG MSIHANDLE; typedef enum tagINSTALLSTATE { diff --git a/include/msvcrt/crtdefs.h b/include/msvcrt/crtdefs.h index 7234c1d9b6d..fce448e94c0 100644 --- a/include/msvcrt/crtdefs.h +++ b/include/msvcrt/crtdefs.h @@ -104,11 +104,6 @@ typedef unsigned int size_t; #define _SIZE_T_DEFINED #endif -#ifndef _TIME_T_DEFINED -typedef long time_t; -#define _TIME_T_DEFINED -#endif - #ifndef _TIME32_T_DEFINED typedef long __time32_t; #define _TIME32_T_DEFINED @@ -119,6 +114,15 @@ typedef __int64 __time64_t; #define _TIME64_T_DEFINED #endif +#ifndef _TIME_T_DEFINED +#ifdef _WIN64 +typedef __time64_t time_t; +#else +typedef __time32_t time_t; +#endif +#define _TIME_T_DEFINED +#endif + #ifndef _WCHAR_T_DEFINED #ifndef __cplusplus typedef unsigned short wchar_t; diff --git a/include/msvcrt/process.h b/include/msvcrt/process.h index c02dbcf994a..7530ab00e3c 100644 --- a/include/msvcrt/process.h +++ b/include/msvcrt/process.h @@ -24,7 +24,7 @@ extern "C" { #endif -typedef void (*_beginthread_start_routine_t)(void *); +typedef void (__cdecl *_beginthread_start_routine_t)(void *); typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *); uintptr_t __cdecl _beginthread(_beginthread_start_routine_t,unsigned int,void*); diff --git a/include/olectl.h b/include/olectl.h index 49a1f75a188..ab51fd28efd 100644 --- a/include/olectl.h +++ b/include/olectl.h @@ -157,10 +157,10 @@ typedef struct tagPICTDESC { } DUMMYUNIONNAME; } PICTDESC, *LPPICTDESC; -typedef long OLE_XPOS_PIXELS; -typedef long OLE_YPOS_PIXELS; -typedef long OLE_XSIZE_PIXELS; -typedef long OLE_YSIZE_PIXELS; +typedef LONG OLE_XPOS_PIXELS; +typedef LONG OLE_YPOS_PIXELS; +typedef LONG OLE_XSIZE_PIXELS; +typedef LONG OLE_YSIZE_PIXELS; typedef float OLE_XPOS_CONTAINER; typedef float OLE_YPOS_CONTAINER; typedef float OLE_XSIZE_CONTAINER; diff --git a/include/oleidl.idl b/include/oleidl.idl index 5c92cb19d45..74962ffeb0a 100644 --- a/include/oleidl.idl +++ b/include/oleidl.idl @@ -24,6 +24,8 @@ import "objidl.idl"; interface IOleInPlaceActiveObject; +cpp_quote("#include ") + /***************************************************************************** * IOleTypes interface */ diff --git a/include/psapi.h b/include/psapi.h index bb7d1cf660e..f0317241d31 100644 --- a/include/psapi.h +++ b/include/psapi.h @@ -28,16 +28,16 @@ typedef struct _MODULEINFO { } MODULEINFO, *LPMODULEINFO; typedef struct _PROCESS_MEMORY_COUNTERS { - DWORD cb; - DWORD PageFaultCount; - DWORD PeakWorkingSetSize; - DWORD WorkingSetSize; - DWORD QuotaPeakPagedPoolUsage; - DWORD QuotaPagedPoolUsage; - DWORD QuotaPeakNonPagedPoolUsage; - DWORD QuotaNonPagedPoolUsage; - DWORD PagefileUsage; - DWORD PeakPagefileUsage; + DWORD cb; + DWORD PageFaultCount; + SIZE_T PeakWorkingSetSize; + SIZE_T WorkingSetSize; + SIZE_T QuotaPeakPagedPoolUsage; + SIZE_T QuotaPagedPoolUsage; + SIZE_T QuotaPeakNonPagedPoolUsage; + SIZE_T QuotaNonPagedPoolUsage; + SIZE_T PagefileUsage; + SIZE_T PeakPagefileUsage; } PROCESS_MEMORY_COUNTERS; typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS; diff --git a/include/richedit.h b/include/richedit.h index 02ebdc2f93a..095cc8ab554 100644 --- a/include/richedit.h +++ b/include/richedit.h @@ -622,7 +622,7 @@ typedef enum tagKHYPH typedef struct hyphresult { KHYPH khyph; - long ichHyph; + LONG ichHyph; WCHAR chHyph; } HYPHRESULT; @@ -630,7 +630,7 @@ typedef struct tagHyphenateInfo { SHORT cbSize; SHORT dxHyphenateZone; - void (WINAPI* pfnHyphenate)(WCHAR*, LANGID, long, HYPHRESULT*); + void (WINAPI* pfnHyphenate)(WCHAR*, LANGID, LONG, HYPHRESULT*); } HYPHENATEINFO; typedef struct _msgfilter { @@ -712,7 +712,7 @@ typedef struct _imecomptext { DWORD flags; } IMECOMPTEXT; -void WINAPI HyphenateProc(WCHAR*, LANGID, long, HYPHRESULT*); +void WINAPI HyphenateProc(WCHAR*, LANGID, LONG, HYPHRESULT*); #define SF_TEXT 0x00000001 #define SF_RTF 0x00000002 diff --git a/include/rpc.h b/include/rpc.h index 6c92ecce084..3e7e1293696 100644 --- a/include/rpc.h +++ b/include/rpc.h @@ -51,7 +51,7 @@ #define __RPC_STUB __stdcall #define RPC_ENTRY __stdcall #define RPCRTAPI -typedef long RPC_STATUS; +typedef LONG RPC_STATUS; typedef void* I_RPC_HANDLE; diff --git a/include/rpcdce.h b/include/rpcdce.h index 1fca11bff37..aec99a49ae2 100644 --- a/include/rpcdce.h +++ b/include/rpcdce.h @@ -54,14 +54,14 @@ typedef RPC_BINDING_HANDLE handle_t; typedef struct _RPC_BINDING_VECTOR { - unsigned long Count; + ULONG Count; RPC_BINDING_HANDLE BindingH[1]; } RPC_BINDING_VECTOR; #define rpc_binding_vector_t RPC_BINDING_VECTOR typedef struct _UUID_VECTOR { - unsigned long Count; + ULONG Count; UUID *Uuid[1]; } UUID_VECTOR; #define uuid_vector_t UUID_VECTOR @@ -75,14 +75,14 @@ typedef struct _RPC_IF_ID typedef struct { - unsigned long Count; + ULONG Count; RPC_IF_ID *IfId[1]; } RPC_IF_ID_VECTOR; typedef struct { unsigned int Count; - unsigned long Stats[1]; + ULONG Stats[1]; } RPC_STATS_VECTOR; typedef I_RPC_HANDLE *RPC_EP_INQ_HANDLE; @@ -195,66 +195,66 @@ typedef void (__RPC_USER *RPC_AUTH_KEY_RETRIEVAL_FN)(); typedef struct _RPC_POLICY { unsigned int Length; - unsigned long EndpointFlags; - unsigned long NICFlags; + ULONG EndpointFlags; + ULONG NICFlags; } RPC_POLICY, *PRPC_POLICY; typedef struct _SEC_WINNT_AUTH_IDENTITY_W { unsigned short* User; - unsigned long UserLength; + ULONG UserLength; unsigned short* Domain; - unsigned long DomainLength; + ULONG DomainLength; unsigned short* Password; - unsigned long PasswordLength; - unsigned long Flags; + ULONG PasswordLength; + ULONG Flags; } SEC_WINNT_AUTH_IDENTITY_W, *PSEC_WINNT_AUTH_IDENTITY_W; typedef struct _SEC_WINNT_AUTH_IDENTITY_A { unsigned char* User; - unsigned long UserLength; + ULONG UserLength; unsigned char* Domain; - unsigned long DomainLength; + ULONG DomainLength; unsigned char* Password; - unsigned long PasswordLength; - unsigned long Flags; + ULONG PasswordLength; + ULONG Flags; } SEC_WINNT_AUTH_IDENTITY_A, *PSEC_WINNT_AUTH_IDENTITY_A; typedef struct _RPC_HTTP_TRANSPORT_CREDENTIALS_W { SEC_WINNT_AUTH_IDENTITY_W *TransportCredentials; - unsigned long Flags; - unsigned long AuthenticationTarget; - unsigned long NumberOfAuthnSchemes; - unsigned long *AuthnSchemes; + ULONG Flags; + ULONG AuthenticationTarget; + ULONG NumberOfAuthnSchemes; + ULONG *AuthnSchemes; unsigned short *ServerCertificateSubject; } RPC_HTTP_TRANSPORT_CREDENTIALS_W, *PRPC_HTTP_TRANSPORT_CREDENTIALS_W; typedef struct _RPC_HTTP_TRANSPORT_CREDENTIALS_A { SEC_WINNT_AUTH_IDENTITY_A *TransportCredentials; - unsigned long Flags; - unsigned long AuthenticationTarget; - unsigned long NumberOfAuthnSchemes; - unsigned long *AuthnSchemes; + ULONG Flags; + ULONG AuthenticationTarget; + ULONG NumberOfAuthnSchemes; + ULONG *AuthnSchemes; unsigned char *ServerCertificateSubject; } RPC_HTTP_TRANSPORT_CREDENTIALS_A, *PRPC_HTTP_TRANSPORT_CREDENTIALS_A; typedef struct _RPC_SECURITY_QOS { - unsigned long Version; - unsigned long Capabilities; - unsigned long IdentityTracking; - unsigned long ImpersonationType; + ULONG Version; + ULONG Capabilities; + ULONG IdentityTracking; + ULONG ImpersonationType; } RPC_SECURITY_QOS, *PRPC_SECURITY_QOS; typedef struct _RPC_SECURITY_QOS_V2_W { - unsigned long Version; - unsigned long Capabilities; - unsigned long IdentityTracking; - unsigned long ImpersonationType; - unsigned long AdditionalSecurityInfoType; + ULONG Version; + ULONG Capabilities; + ULONG IdentityTracking; + ULONG ImpersonationType; + ULONG AdditionalSecurityInfoType; union { RPC_HTTP_TRANSPORT_CREDENTIALS_W *HttpCredentials; @@ -263,11 +263,11 @@ typedef struct _RPC_SECURITY_QOS_V2_W typedef struct _RPC_SECURITY_QOS_V2_A { - unsigned long Version; - unsigned long Capabilities; - unsigned long IdentityTracking; - unsigned long ImpersonationType; - unsigned long AdditionalSecurityInfoType; + ULONG Version; + ULONG Capabilities; + ULONG IdentityTracking; + ULONG ImpersonationType; + ULONG AdditionalSecurityInfoType; union { RPC_HTTP_TRANSPORT_CREDENTIALS_A *HttpCredentials; diff --git a/include/rpcndr.h b/include/rpcndr.h index 15f1cb2a21d..6cec8cd4582 100644 --- a/include/rpcndr.h +++ b/include/rpcndr.h @@ -144,7 +144,7 @@ struct NDR_ALLOC_ALL_NODES_CONTEXT; struct NDR_POINTER_QUEUE_STATE; typedef unsigned char *RPC_BUFPTR; -typedef unsigned long RPC_LENGTH; +typedef ULONG RPC_LENGTH; typedef void (__RPC_USER *EXPR_EVAL)(struct _MIDL_STUB_MESSAGE *); typedef const unsigned char *PFORMAT_STRING; diff --git a/include/shellapi.h b/include/shellapi.h index 67e89235c9c..930f261d050 100644 --- a/include/shellapi.h +++ b/include/shellapi.h @@ -23,7 +23,9 @@ extern "C" { #endif /* defined(__cplusplus) */ +#ifndef _WIN64 #include +#endif DECLARE_HANDLE(HDROP); @@ -510,6 +512,8 @@ DWORD WINAPI DoEnvironmentSubstW(LPWSTR, UINT); } /* extern "C" */ #endif /* defined(__cplusplus) */ +#ifndef _WIN64 #include +#endif #endif /* __WINE_SHELLAPI_H */ diff --git a/include/shlwapi.h b/include/shlwapi.h index b723e546575..eb363457444 100644 --- a/include/shlwapi.h +++ b/include/shlwapi.h @@ -859,8 +859,8 @@ BOOL WINAPI StrTrimA(LPSTR,LPCSTR); BOOL WINAPI StrTrimW(LPWSTR,LPCWSTR); #define StrTrim WINELIB_NAME_AW(StrTrim) -INT WINAPI wvnsprintfA(LPSTR,INT,LPCSTR,va_list); -INT WINAPI wvnsprintfW(LPWSTR,INT,LPCWSTR,va_list); +INT WINAPI wvnsprintfA(LPSTR,INT,LPCSTR,__ms_va_list); +INT WINAPI wvnsprintfW(LPWSTR,INT,LPCWSTR,__ms_va_list); #define wvnsprintf WINELIB_NAME_AW(wvnsprintf) INT WINAPIV wnsprintfA(LPSTR,INT,LPCSTR, ...); diff --git a/include/shobjidl.idl b/include/shobjidl.idl index 156d146c47b..07baea7d14c 100644 --- a/include/shobjidl.idl +++ b/include/shobjidl.idl @@ -103,7 +103,8 @@ cpp_quote("#endif") [ object, uuid(000214E9-0000-0000-C000-000000000046), - pointer_default(unique) + pointer_default(unique), + local ] interface IShellPropSheetExt : IUnknown { @@ -625,7 +626,7 @@ interface IShellLinkA : IUnknown HRESULT GetPath( [out, size_is(cch)] LPSTR pszFile, [in] int cch, - [in, out] WIN32_FIND_DATAA *pfd, + [in, out, unique] WIN32_FIND_DATAA *pfd, [in] DWORD fFlags); HRESULT GetIDList( [out] LPITEMIDLIST * ppidl ); @@ -813,7 +814,8 @@ interface IPersistFolder3 : IPersistFolder2 [ object, uuid(000214eb-0000-0000-c000-000000000046), - pointer_default(unique) + pointer_default(unique), + local ] interface IExtractIconA : IUnknown { @@ -853,7 +855,8 @@ cpp_quote("#define GIL_DONTCACHE 0x0010") [ object, uuid(000214fa-0000-0000-c000-000000000046), - pointer_default(unique) + pointer_default(unique), + local ] interface IExtractIconW : IUnknown { @@ -939,7 +942,8 @@ cpp_quote("#define DWFAF_HIDDEN 0x0001") [ object, uuid(de5bf786-477a-11d2-839d-00c04fd918d0), - pointer_default(unique) + pointer_default(unique), + local ] interface IDragSourceHelper : IUnknown { @@ -968,7 +972,8 @@ interface IDragSourceHelper : IUnknown [ object, uuid(4657278b-411b-11d2-839a-00c04fd918d0), - pointer_default(unique) + pointer_default(unique), + local ] interface IDropTargetHelper : IUnknown { @@ -1119,7 +1124,8 @@ cpp_quote("#define CMIC_MASK_NOZONECHECKS SEE_MASK_NOZONECHECKS") [ object, uuid(000214f4-0000-0000-c000-000000000046), - pointer_default(unique) + pointer_default(unique), + local ] interface IContextMenu2 : IContextMenu { @@ -1138,7 +1144,8 @@ interface IContextMenu2 : IContextMenu [ object, uuid(bcfce0a0-ec17-11d0-8d10-00a0c90f2719), - pointer_default(unique) + pointer_default(unique), + local ] interface IContextMenu3 : IContextMenu2 { @@ -1232,7 +1239,8 @@ interface IResolveShellLink : IUnknown [ object, uuid(ac60f6a0-0fd9-11d0-99cb-00c04fd64497), - pointer_default(unique) + pointer_default(unique), + local ] interface IURLSearchHook : IUnknown { @@ -1248,7 +1256,8 @@ interface IURLSearchHook : IUnknown [ object, uuid(09f656a2-41af-480c-88f7-16cc0d164615), - pointer_default(unique) + pointer_default(unique), + local ] interface ISearchContext : IUnknown { @@ -1267,7 +1276,8 @@ interface ISearchContext : IUnknown [ object, uuid(5ee44da4-6d32-46e3-86bc-07540dedd0e0), - pointer_default(unique) + pointer_default(unique), + local ] interface IURLSearchHook2 : IURLSearchHook { @@ -1295,7 +1305,7 @@ interface INewShortcutHookA : IUnknown [in] LPCSTR pcszReferent, [in] HWND hwnd); HRESULT GetReferent( - [out] LPCSTR pcszReferent, + [out] LPSTR pcszReferent, [in] int cchReferent); HRESULT SetFolder( [in] LPCSTR pcszReferent); @@ -1326,7 +1336,7 @@ interface INewShortcutHookW : IUnknown [in] LPCWSTR pcszReferent, [in] HWND hwnd); HRESULT GetReferent( - [out] LPCWSTR pcszReferent, + [out] LPWSTR pcszReferent, [in] int cchReferent); HRESULT SetFolder( [in] LPCWSTR pcszReferent); @@ -1365,7 +1375,8 @@ interface IRunnableTask : IUnknown [ object, uuid(d82be2b1-5764-11d0-a96e-00c04fd705a2), - pointer_default(unique) + pointer_default(unique), + local ] interface IShellChangeNotify : IUnknown { @@ -1381,7 +1392,8 @@ interface IShellChangeNotify : IUnknown [ object, uuid(01e18d10-4d8b-11d2-855d-006008059367), - pointer_default(unique) + pointer_default(unique), + local ] interface IFileSystemBindData : IUnknown { diff --git a/include/tlhelp32.h b/include/tlhelp32.h index cc5a237d2ca..4b4d224ce28 100644 --- a/include/tlhelp32.h +++ b/include/tlhelp32.h @@ -60,30 +60,30 @@ BOOL WINAPI Thread32Next(HANDLE,LPTHREADENTRY32); typedef struct tagPROCESSENTRY32 { - DWORD dwSize; - DWORD cntUsage; - DWORD th32ProcessID; - DWORD th32DefaultHeapID; - DWORD th32ModuleID; - DWORD cntThreads; - DWORD th32ParentProcessID; - LONG pcPriClassBase; - DWORD dwFlags; - char szExeFile[MAX_PATH]; + DWORD dwSize; + DWORD cntUsage; + DWORD th32ProcessID; + ULONG_PTR th32DefaultHeapID; + DWORD th32ModuleID; + DWORD cntThreads; + DWORD th32ParentProcessID; + LONG pcPriClassBase; + DWORD dwFlags; + char szExeFile[MAX_PATH]; } PROCESSENTRY32, *PPROCESSENTRY32, *LPPROCESSENTRY32; typedef struct tagPROCESSENTRY32W { - DWORD dwSize; - DWORD cntUsage; - DWORD th32ProcessID; - DWORD th32DefaultHeapID; - DWORD th32ModuleID; - DWORD cntThreads; - DWORD th32ParentProcessID; - LONG pcPriClassBase; - DWORD dwFlags; - WCHAR szExeFile[MAX_PATH]; + DWORD dwSize; + DWORD cntUsage; + DWORD th32ProcessID; + ULONG_PTR th32DefaultHeapID; + DWORD th32ModuleID; + DWORD cntThreads; + DWORD th32ParentProcessID; + LONG pcPriClassBase; + DWORD dwFlags; + WCHAR szExeFile[MAX_PATH]; } PROCESSENTRY32W, *PPROCESSENTRY32W, *LPPROCESSENTRY32W; BOOL WINAPI Process32First(HANDLE,LPPROCESSENTRY32); diff --git a/include/winbase.h b/include/winbase.h index f7bb9bf27ff..521bb16f680 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -776,7 +776,7 @@ typedef struct _SYSTEM_INFO DWORD dwPageSize; LPVOID lpMinimumApplicationAddress; LPVOID lpMaximumApplicationAddress; - DWORD dwActiveProcessorMask; + DWORD_PTR dwActiveProcessorMask; DWORD dwNumberOfProcessors; DWORD dwProcessorType; DWORD dwAllocationGranularity; @@ -1533,8 +1533,8 @@ WINBASEAPI BOOL WINAPI FlsSetValue(DWORD,PVOID); WINBASEAPI BOOL WINAPI FlushFileBuffers(HANDLE); WINBASEAPI BOOL WINAPI FlushInstructionCache(HANDLE,LPCVOID,SIZE_T); WINBASEAPI BOOL WINAPI FlushViewOfFile(LPCVOID,SIZE_T); -WINBASEAPI DWORD WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*); -WINBASEAPI DWORD WINAPI FormatMessageW(DWORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*); +WINBASEAPI DWORD WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,__ms_va_list*); +WINBASEAPI DWORD WINAPI FormatMessageW(DWORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,__ms_va_list*); #define FormatMessage WINELIB_NAME_AW(FormatMessage) WINBASEAPI BOOL WINAPI FreeEnvironmentStringsA(LPSTR); WINBASEAPI BOOL WINAPI FreeEnvironmentStringsW(LPWSTR); diff --git a/include/wincred.h b/include/wincred.h index 58650637118..59f248905d0 100644 --- a/include/wincred.h +++ b/include/wincred.h @@ -98,6 +98,37 @@ typedef struct _CREDENTIALW DECL_WINELIB_TYPE_AW(CREDENTIAL) DECL_WINELIB_TYPE_AW(PCREDENTIAL) +typedef struct _CREDENTIAL_TARGET_INFORMATIONA +{ + LPSTR TargetName; + LPSTR NetbiosServerName; + LPSTR DnsServerName; + LPSTR NetbiosDomainName; + LPSTR DnsDomainName; + LPSTR DnsTreeName; + LPSTR PackageName; + DWORD Flags; + DWORD CredTypeCount; + LPDWORD CredTypes; +} CREDENTIAL_TARGET_INFORMATIONA, *PCREDENTIAL_TARGET_INFORMATIONA; + +typedef struct _CREDENTIAL_TARGET_INFORMATIONW +{ + LPWSTR TargetName; + LPWSTR NetbiosServerName; + LPWSTR DnsServerName; + LPWSTR NetbiosDomainName; + LPWSTR DnsDomainName; + LPWSTR DnsTreeName; + LPWSTR PackageName; + DWORD Flags; + DWORD CredTypeCount; + LPDWORD CredTypes; +} CREDENTIAL_TARGET_INFORMATIONW, *PCREDENTIAL_TARGET_INFORMATIONW; + +DECL_WINELIB_TYPE_AW(CREDENTIAL_TARGET_INFORMATION) +DECL_WINELIB_TYPE_AW(PCREDENTIAL_TARGET_INFORMATION) + typedef struct _CREDUI_INFOA { DWORD cbSize; @@ -157,6 +188,11 @@ DECL_WINELIB_TYPE_AW(PCREDUI_INFO) #define CRED_PERSIST_LOCAL_MACHINE 2 #define CRED_PERSIST_ENTERPRISE 3 +/* values for CREDENTIAL_TARGET_INFORMATION::Flags */ +#define CRED_TI_SERVER_FORMAT_UNKNOWN 1 +#define CRED_TI_DOMAIN_FORMAT_UNKNOWN 2 +#define CRED_TI_ONLY_PASSWORD_REQUIRED 4 + #define CREDUI_FLAGS_INCORRECT_PASSWORD 0x00000001 #define CREDUI_FLAGS_DO_NOT_PERSIST 0x00000002 #define CREDUI_FLAGS_REQUEST_ADMINISTRATOR 0x00000004 @@ -189,6 +225,9 @@ WINADVAPI BOOL WINAPI CredGetSessionTypes(DWORD,LPDWORD); WINADVAPI BOOL WINAPI CredReadA(LPCSTR,DWORD,DWORD,PCREDENTIALA *); WINADVAPI BOOL WINAPI CredReadW(LPCWSTR,DWORD,DWORD,PCREDENTIALW *); #define CredRead WINELIB_NAME_AW(CredRead) +WINADVAPI BOOL WINAPI CredReadDomainCredentialsA(PCREDENTIAL_TARGET_INFORMATIONA,DWORD,DWORD *,PCREDENTIALA **); +WINADVAPI BOOL WINAPI CredReadDomainCredentialsW(PCREDENTIAL_TARGET_INFORMATIONW,DWORD,DWORD *,PCREDENTIALW **); +#define CredReadDomainCredentials WINELIB_NAME_AW(CredReadDomainCredentials) WINADVAPI BOOL WINAPI CredRenameA(LPCSTR,LPCSTR,DWORD,DWORD); WINADVAPI BOOL WINAPI CredRenameW(LPCWSTR,LPCWSTR,DWORD,DWORD); #define CredRename WINELIB_NAME_AW(CredRename) diff --git a/include/windef.h b/include/windef.h index 3c9de7a9137..825255b537b 100644 --- a/include/windef.h +++ b/include/windef.h @@ -84,6 +84,18 @@ extern "C" { # endif #endif /* __cdecl */ +#ifndef __ms_va_list +# if defined(__x86_64__) && defined (__GNUC__) +# define __ms_va_list __builtin_ms_va_list +# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg) +# define __ms_va_end(list) __builtin_ms_va_end(list) +# else +# define __ms_va_list va_list +# define __ms_va_start(list,arg) va_start(list,arg) +# define __ms_va_end(list) va_end(list) +# endif +#endif + #ifdef __WINESRC__ #define __ONLY_IN_WINELIB(x) do_not_use_this_in_wine #else diff --git a/include/wine/port.h b/include/wine/port.h index e445c08e3ee..817f02b76e4 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -224,19 +224,6 @@ struct statvfs #endif /* __GNUC__ */ -/* Register functions */ - -#ifdef __i386__ -#define DEFINE_REGS_ENTRYPOINT( name, args, pop_args ) \ - __ASM_GLOBAL_FUNC( name, \ - "pushl %eax\n\t" \ - "call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \ - ".long " __ASM_NAME("__regs_") #name "-.\n\t" \ - ".byte " #args "," #pop_args ) -/* FIXME: add support for other CPUs */ -#endif /* __i386__ */ - - /**************************************************************** * Function definitions (only when using libwine_port) */ diff --git a/include/wine/server.h b/include/wine/server.h index 3dab6001ece..d573d1f7ad4 100644 --- a/include/wine/server.h +++ b/include/wine/server.h @@ -108,6 +108,18 @@ static inline HANDLE wine_server_ptr_handle( obj_handle_t handle ) return (HANDLE)(INT_PTR)(int)handle; } +/* convert a client pointer to a server client_ptr_t */ +static inline client_ptr_t wine_server_client_ptr( const void *ptr ) +{ + return (client_ptr_t)(ULONG_PTR)ptr; +} + +/* convert a server client_ptr_t to a real pointer */ +static inline void *wine_server_get_ptr( client_ptr_t ptr ) +{ + return (void *)(ULONG_PTR)ptr; +} + /* macros for server requests */ diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index e2166aebd8b..de80fc2908b 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -17,15 +17,17 @@ typedef unsigned int obj_handle_t; typedef unsigned int user_handle_t; -typedef unsigned short atom_t; +typedef unsigned int atom_t; typedef unsigned int process_id_t; typedef unsigned int thread_id_t; typedef unsigned int data_size_t; typedef unsigned int ioctl_code_t; -typedef unsigned long lparam_t; +typedef unsigned __int64 lparam_t; typedef unsigned __int64 apc_param_t; typedef unsigned __int64 mem_size_t; typedef unsigned __int64 file_pos_t; +typedef unsigned __int64 client_ptr_t; +typedef client_ptr_t mod_handle_t; struct request_header { @@ -52,75 +54,76 @@ struct request_max_size -struct debug_event_exception -{ - EXCEPTION_RECORD record; - int first; -}; -struct debug_event_create_thread -{ - obj_handle_t handle; - void *teb; - void *start; -}; -struct debug_event_create_process -{ - obj_handle_t file; - obj_handle_t process; - obj_handle_t thread; - void *base; - int dbg_offset; - int dbg_size; - void *teb; - void *start; - void *name; - int unicode; -}; -struct debug_event_exit -{ - int exit_code; -}; -struct debug_event_load_dll -{ - obj_handle_t handle; - void *base; - int dbg_offset; - int dbg_size; - void *name; - int unicode; -}; -struct debug_event_unload_dll -{ - void *base; -}; -struct debug_event_output_string -{ - void *string; - int unicode; - int length; -}; -struct debug_event_rip_info -{ - int error; - int type; -}; -union debug_event_data -{ - struct debug_event_exception exception; - struct debug_event_create_thread create_thread; - struct debug_event_create_process create_process; - struct debug_event_exit exit; - struct debug_event_load_dll load_dll; - struct debug_event_unload_dll unload_dll; - struct debug_event_output_string output_string; - struct debug_event_rip_info rip_info; -}; - - -typedef struct +typedef union { - int code; - union debug_event_data info; + int code; + struct + { + int code; + int first; + unsigned int exc_code; + unsigned int flags; + client_ptr_t record; + client_ptr_t address; + int nb_params; + int __pad; + client_ptr_t params[15]; + } exception; + struct + { + int code; + obj_handle_t handle; + client_ptr_t teb; + client_ptr_t start; + } create_thread; + struct + { + int code; + obj_handle_t file; + obj_handle_t process; + obj_handle_t thread; + mod_handle_t base; + int dbg_offset; + int dbg_size; + client_ptr_t teb; + client_ptr_t start; + client_ptr_t name; + int unicode; + } create_process; + struct + { + int code; + int exit_code; + } exit; + struct + { + int code; + obj_handle_t handle; + mod_handle_t base; + int dbg_offset; + int dbg_size; + client_ptr_t name; + int unicode; + } load_dll; + struct + { + int code; + int __pad; + mod_handle_t base; + } unload_dll; + struct + { + int code; + int unicode; + client_ptr_t string; + data_size_t length; + } output_string; + struct + { + int code; + int error; + int type; + } rip_info; } debug_event_t; @@ -133,8 +136,9 @@ struct send_fd struct wake_up_reply { - void *cookie; - int signaled; + client_ptr_t cookie; + int signaled; + int __pad; }; @@ -145,7 +149,7 @@ typedef __int64 timeout_t; typedef struct { atom_t atom; - short string; + int string; lparam_t data; } property_data_t; @@ -161,19 +165,28 @@ typedef struct typedef struct { - void *callback; - void *iosb; - void *arg; - void *apc; + obj_handle_t handle; obj_handle_t event; + client_ptr_t callback; + client_ptr_t iosb; + client_ptr_t arg; apc_param_t cvalue; } async_data_t; +struct hardware_msg_data +{ + lparam_t info; + int x; + int y; + unsigned int hw_id; + int __pad; +}; + struct callback_msg_data { - void *callback; + client_ptr_t callback; lparam_t data; lparam_t result; }; @@ -182,7 +195,7 @@ struct winevent_msg_data { user_handle_t hook; thread_id_t tid; - void *hook_proc; + client_ptr_t hook_proc; }; @@ -261,94 +274,101 @@ typedef union struct { enum apc_type type; - void (__stdcall *func)(unsigned long,unsigned long,unsigned long); + int __pad; + client_ptr_t func; apc_param_t args[3]; } user; struct { - enum apc_type type; - void (__stdcall *func)(void*, unsigned int, unsigned int); + enum apc_type type; + int __pad; + client_ptr_t func; timeout_t time; - void *arg; + client_ptr_t arg; } timer; struct { enum apc_type type; - unsigned int (*func)(void*, void*, unsigned int, unsigned int *); - void *user; - void *sb; unsigned int status; + client_ptr_t func; + client_ptr_t user; + client_ptr_t sb; } async_io; struct { enum apc_type type; - void *addr; + unsigned int op_type; + client_ptr_t addr; mem_size_t size; unsigned int zero_bits; - unsigned int op_type; unsigned int prot; } virtual_alloc; struct { enum apc_type type; - void *addr; - mem_size_t size; unsigned int op_type; + client_ptr_t addr; + mem_size_t size; } virtual_free; struct { enum apc_type type; - const void *addr; + int __pad; + client_ptr_t addr; } virtual_query; struct { enum apc_type type; - void *addr; - mem_size_t size; unsigned int prot; + client_ptr_t addr; + mem_size_t size; } virtual_protect; struct { enum apc_type type; - const void *addr; + int __pad; + client_ptr_t addr; mem_size_t size; } virtual_flush; struct { enum apc_type type; - void *addr; + int __pad; + client_ptr_t addr; mem_size_t size; } virtual_lock; struct { enum apc_type type; - void *addr; + int __pad; + client_ptr_t addr; mem_size_t size; } virtual_unlock; struct { enum apc_type type; obj_handle_t handle; - void *addr; + client_ptr_t addr; mem_size_t size; file_pos_t offset; - unsigned int zero_bits; unsigned int alloc_type; - unsigned int prot; + unsigned short zero_bits; + unsigned short prot; } map_view; struct { enum apc_type type; - void *addr; + int __pad; + client_ptr_t addr; } unmap_view; struct { enum apc_type type; - void (__stdcall *func)(void*); - void *arg; + int suspend; + client_ptr_t func; + client_ptr_t arg; mem_size_t reserve; mem_size_t commit; - int suspend; } create_thread; } apc_call_t; @@ -359,39 +379,40 @@ typedef union { enum apc_type type; unsigned int status; + client_ptr_t apc; unsigned int total; } async_io; struct { enum apc_type type; unsigned int status; - void *addr; + client_ptr_t addr; mem_size_t size; } virtual_alloc; struct { enum apc_type type; unsigned int status; - void *addr; + client_ptr_t addr; mem_size_t size; } virtual_free; struct { enum apc_type type; unsigned int status; - void *base; - void *alloc_base; + client_ptr_t base; + client_ptr_t alloc_base; mem_size_t size; - unsigned int state; - unsigned int prot; - unsigned int alloc_prot; - unsigned int alloc_type; + unsigned short state; + unsigned short prot; + unsigned short alloc_prot; + unsigned short alloc_type; } virtual_query; struct { enum apc_type type; unsigned int status; - void *addr; + client_ptr_t addr; mem_size_t size; unsigned int prot; } virtual_protect; @@ -399,28 +420,28 @@ typedef union { enum apc_type type; unsigned int status; - const void *addr; + client_ptr_t addr; mem_size_t size; } virtual_flush; struct { enum apc_type type; unsigned int status; - void *addr; + client_ptr_t addr; mem_size_t size; } virtual_lock; struct { enum apc_type type; unsigned int status; - void *addr; + client_ptr_t addr; mem_size_t size; } virtual_unlock; struct { enum apc_type type; unsigned int status; - void *addr; + client_ptr_t addr; mem_size_t size; } map_view; struct @@ -521,9 +542,10 @@ struct get_startup_info_reply struct init_process_done_request { struct request_header __header; - void* module; - void* entry; int gui; + mod_handle_t module; + client_ptr_t ldt_copy; + client_ptr_t entry; }; struct init_process_done_reply { @@ -538,20 +560,19 @@ struct init_thread_request int unix_pid; int unix_tid; int debug_level; - void* teb; - void* peb; - void* entry; - void* ldt_copy; + client_ptr_t teb; + client_ptr_t entry; int reply_fd; int wait_fd; + client_ptr_t peb; }; struct init_thread_reply { struct reply_header __header; process_id_t pid; thread_id_t tid; - data_size_t info_size; timeout_t server_start; + data_size_t info_size; int version; }; @@ -596,12 +617,12 @@ struct get_process_info_reply struct reply_header __header; process_id_t pid; process_id_t ppid; - int exit_code; int priority; unsigned int affinity; - void* peb; + client_ptr_t peb; timeout_t start_time; timeout_t end_time; + int exit_code; }; @@ -634,12 +655,12 @@ struct get_thread_info_reply struct reply_header __header; process_id_t pid; thread_id_t tid; - void* teb; - int exit_code; + client_ptr_t teb; int priority; unsigned int affinity; timeout_t creation_time; timeout_t exit_time; + int exit_code; int last; }; @@ -668,12 +689,12 @@ struct get_dll_info_request { struct request_header __header; obj_handle_t handle; - void* base_address; + mod_handle_t base_address; }; struct get_dll_info_reply { struct reply_header __header; - void* entry_point; + client_ptr_t entry_point; data_size_t size; data_size_t filename_len; /* VARARG(filename,unicode_str); */ @@ -711,8 +732,8 @@ struct load_dll_request { struct request_header __header; obj_handle_t handle; - void* base; - void* name; + mod_handle_t base; + client_ptr_t name; data_size_t size; int dbg_offset; int dbg_size; @@ -728,7 +749,8 @@ struct load_dll_reply struct unload_dll_request { struct request_header __header; - void* base; + int __pad; + mod_handle_t base; }; struct unload_dll_reply { @@ -740,8 +762,7 @@ struct unload_dll_reply struct queue_apc_request { struct request_header __header; - obj_handle_t thread; - obj_handle_t process; + obj_handle_t handle; apc_call_t call; }; struct queue_apc_reply @@ -850,7 +871,7 @@ struct select_request { struct request_header __header; int flags; - void* cookie; + client_ptr_t cookie; obj_handle_t signal; obj_handle_t prev_apc; timeout_t timeout; @@ -860,9 +881,9 @@ struct select_request struct select_reply { struct reply_header __header; - obj_handle_t apc_handle; timeout_t timeout; apc_call_t call; + obj_handle_t apc_handle; }; #define SELECT_ALL 1 #define SELECT_ALERTABLE 2 @@ -1643,7 +1664,6 @@ struct read_directory_changes_request { struct request_header __header; unsigned int filter; - obj_handle_t handle; int subtree; int want_data; async_data_t async; @@ -1673,8 +1693,8 @@ struct create_mapping_request struct request_header __header; unsigned int access; unsigned int attributes; - mem_size_t size; unsigned int protect; + mem_size_t size; obj_handle_t file_handle; /* VARARG(objattr,object_attributes); */ }; @@ -1728,7 +1748,7 @@ struct get_mapping_info_reply mem_size_t size; int protect; int header_size; - void* base; + client_ptr_t base; obj_handle_t mapping; obj_handle_t shared_file; }; @@ -1837,8 +1857,14 @@ struct wait_debug_event_reply struct queue_exception_event_request { struct request_header __header; - int first; - /* VARARG(record,exc_event); */ + int first; + unsigned int code; + unsigned int flags; + client_ptr_t record; + client_ptr_t address; + data_size_t len; + /* VARARG(params,uints64,len); */ + /* VARARG(context,context); */ }; struct queue_exception_event_reply { @@ -1864,9 +1890,9 @@ struct get_exception_status_reply struct output_debug_string_request { struct request_header __header; - void* string; + data_size_t length; + client_ptr_t string; int unicode; - int length; }; struct output_debug_string_reply { @@ -1931,7 +1957,7 @@ struct read_process_memory_request { struct request_header __header; obj_handle_t handle; - void* addr; + client_ptr_t addr; }; struct read_process_memory_reply { @@ -1945,7 +1971,7 @@ struct write_process_memory_request { struct request_header __header; obj_handle_t handle; - void* addr; + client_ptr_t addr; /* VARARG(data,bytes); */ }; struct write_process_memory_reply @@ -2194,9 +2220,9 @@ struct set_timer_request struct request_header __header; obj_handle_t handle; timeout_t expire; + client_ptr_t callback; + client_ptr_t arg; int period; - void* callback; - void* arg; }; struct set_timer_reply { @@ -2494,12 +2520,12 @@ struct send_hardware_message_request thread_id_t id; user_handle_t win; unsigned int msg; - unsigned int time; lparam_t wparam; lparam_t lparam; lparam_t info; int x; int y; + unsigned int time; }; struct send_hardware_message_reply { @@ -2523,15 +2549,11 @@ struct get_message_reply { struct reply_header __header; user_handle_t win; - int type; unsigned int msg; lparam_t wparam; lparam_t lparam; - lparam_t info; - int x; - int y; + int type; unsigned int time; - unsigned int hw_id; unsigned int active_hooks; data_size_t total; /* VARARG(data,message_data); */ @@ -2542,8 +2564,8 @@ struct get_message_reply struct reply_message_request { struct request_header __header; - lparam_t result; int remove; + lparam_t result; /* VARARG(data,bytes); */ }; struct reply_message_reply @@ -2602,8 +2624,8 @@ struct kill_win_timer_request { struct request_header __header; user_handle_t win; - unsigned int msg; lparam_t id; + unsigned int msg; }; struct kill_win_timer_reply { @@ -2667,10 +2689,9 @@ struct set_serial_info_reply struct register_async_request { struct request_header __header; - obj_handle_t handle; int type; - int count; async_data_t async; + int count; }; struct register_async_reply { @@ -2697,9 +2718,9 @@ struct cancel_async_reply struct ioctl_request { struct request_header __header; - obj_handle_t handle; ioctl_code_t code; async_data_t async; + int blocking; /* VARARG(in_data,bytes); */ }; struct ioctl_reply @@ -2716,7 +2737,7 @@ struct get_ioctl_result_request { struct request_header __header; obj_handle_t handle; - void* user_arg; + client_ptr_t user_arg; }; struct get_ioctl_result_reply { @@ -2733,11 +2754,11 @@ struct create_named_pipe_request unsigned int attributes; obj_handle_t rootdir; unsigned int options; - unsigned int flags; unsigned int maxinstances; unsigned int outsize; unsigned int insize; timeout_t timeout; + unsigned int flags; /* VARARG(name,unicode_str); */ }; struct create_named_pipe_reply @@ -2776,7 +2797,7 @@ struct create_window_request user_handle_t parent; user_handle_t owner; atom_t atom; - void* instance; + mod_handle_t instance; /* VARARG(class,unicode_str); */ }; struct create_window_reply @@ -2786,7 +2807,7 @@ struct create_window_reply user_handle_t parent; user_handle_t owner; int extra; - void* class_ptr; + client_ptr_t class_ptr; }; @@ -2853,13 +2874,13 @@ struct get_window_info_reply struct set_window_info_request { struct request_header __header; - unsigned int flags; + unsigned short flags; + short int is_unicode; user_handle_t handle; unsigned int style; unsigned int ex_style; unsigned int id; - int is_unicode; - void* instance; + mod_handle_t instance; lparam_t user_data; int extra_offset; data_size_t extra_size; @@ -2870,10 +2891,10 @@ struct set_window_info_reply struct reply_header __header; unsigned int old_style; unsigned int old_ex_style; - unsigned int old_id; - void* old_instance; + mod_handle_t old_instance; lparam_t old_user_data; lparam_t old_extra_value; + unsigned int old_id; }; #define SET_WIN_STYLE 0x01 #define SET_WIN_EXSTYLE 0x02 @@ -3145,8 +3166,8 @@ struct set_window_property_request { struct request_header __header; user_handle_t window; - atom_t atom; lparam_t data; + atom_t atom; /* VARARG(name,unicode_str); */ }; struct set_window_property_reply @@ -3561,8 +3582,8 @@ struct set_hook_request thread_id_t tid; int event_min; int event_max; + client_ptr_t proc; int flags; - void* proc; int unicode; /* VARARG(module,unicode_str); */ }; @@ -3579,8 +3600,8 @@ struct remove_hook_request { struct request_header __header; user_handle_t handle; + client_ptr_t proc; int id; - void* proc; }; struct remove_hook_reply { @@ -3605,8 +3626,8 @@ struct start_hook_chain_reply user_handle_t handle; process_id_t pid; thread_id_t tid; - void* proc; int unicode; + client_ptr_t proc; unsigned int active_hooks; /* VARARG(module,unicode_str); */ }; @@ -3642,7 +3663,7 @@ struct get_hook_info_reply int id; process_id_t pid; thread_id_t tid; - void* proc; + client_ptr_t proc; int unicode; /* VARARG(module,unicode_str); */ }; @@ -3655,10 +3676,10 @@ struct create_class_request int local; atom_t atom; unsigned int style; - void* instance; + mod_handle_t instance; int extra; int win_extra; - void* client_ptr; + client_ptr_t client_ptr; /* VARARG(name,unicode_str); */ }; struct create_class_reply @@ -3673,13 +3694,13 @@ struct destroy_class_request { struct request_header __header; atom_t atom; - void* instance; + mod_handle_t instance; /* VARARG(name,unicode_str); */ }; struct destroy_class_reply { struct reply_header __header; - void* client_ptr; + client_ptr_t client_ptr; }; @@ -3692,7 +3713,7 @@ struct set_class_info_request atom_t atom; unsigned int style; int win_extra; - void* instance; + mod_handle_t instance; int extra_offset; data_size_t extra_size; lparam_t extra_value; @@ -3704,7 +3725,7 @@ struct set_class_info_reply unsigned int old_style; int old_extra; int old_win_extra; - void* old_instance; + mod_handle_t old_instance; lparam_t old_extra_value; }; #define SET_CLASS_ATOM 0x0001 @@ -3920,8 +3941,8 @@ struct create_mailslot_request unsigned int access; unsigned int attributes; obj_handle_t rootdir; - unsigned int max_msgsize; timeout_t read_timeout; + unsigned int max_msgsize; /* VARARG(name,unicode_str); */ }; struct create_mailslot_reply @@ -3936,14 +3957,14 @@ struct set_mailslot_info_request { struct request_header __header; obj_handle_t handle; - unsigned int flags; timeout_t read_timeout; + unsigned int flags; }; struct set_mailslot_info_reply { struct reply_header __header; - unsigned int max_msgsize; timeout_t read_timeout; + unsigned int max_msgsize; }; #define MAILSLOT_SET_READ_TIMEOUT 1 @@ -4114,8 +4135,8 @@ struct create_device_request unsigned int access; unsigned int attributes; obj_handle_t rootdir; + client_ptr_t user_ptr; obj_handle_t manager; - void* user_ptr; /* VARARG(name,unicode_str); */ }; struct create_device_reply @@ -4151,7 +4172,7 @@ struct get_next_device_request_reply struct reply_header __header; obj_handle_t next; ioctl_code_t code; - void* user_ptr; + client_ptr_t user_ptr; data_size_t in_size; data_size_t out_size; /* VARARG(next_data,bytes); */ @@ -4271,8 +4292,8 @@ struct set_completion_info_request { struct request_header __header; obj_handle_t handle; - obj_handle_t chandle; apc_param_t ckey; + obj_handle_t chandle; }; struct set_completion_info_reply { @@ -5049,6 +5070,6 @@ union generic_reply struct set_window_layered_info_reply set_window_layered_info_reply; }; -#define SERVER_PROTOCOL_VERSION 351 +#define SERVER_PROTOCOL_VERSION 380 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/include/wine/wine_common_ver.rc b/include/wine/wine_common_ver.rc index f1a46445068..6d6cf92008f 100644 --- a/include/wine/wine_common_ver.rc +++ b/include/wine/wine_common_ver.rc @@ -104,7 +104,7 @@ FILESUBTYPE WINE_FILESUBTYPE VALUE "FileDescription", WINE_FILEDESCRIPTION_STR VALUE "FileVersion", WINE_FILEVERSION_STR VALUE "InternalName", WINE_FILENAME - VALUE "LegalCopyright", "Copyright (c) 1993-2008 the Wine project authors (see the file AUTHORS for a complete list)" + VALUE "LegalCopyright", "Copyright (c) 1993-2009 the Wine project authors (see the file AUTHORS for a complete list)" VALUE "OriginalFilename", WINE_FILENAME_STR VALUE "ProductName", WINE_PRODUCTNAME_STR VALUE "ProductVersion", WINE_PRODUCTVERSION_STR diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl index ae648885da4..4c89a4d8718 100644 --- a/include/wine/wined3d.idl +++ b/include/wine/wined3d.idl @@ -565,20 +565,9 @@ typedef enum _WINED3DTEXTURESTAGESTATETYPE WINED3DTSS_BUMPENVMAT10 = 9, WINED3DTSS_BUMPENVMAT11 = 10, WINED3DTSS_TEXCOORDINDEX = 11, - WINED3DTSS_ADDRESS = 12, - WINED3DTSS_ADDRESSU = 13, - WINED3DTSS_ADDRESSV = 14, - WINED3DTSS_BORDERCOLOR = 15, - WINED3DTSS_MAGFILTER = 16, - WINED3DTSS_MINFILTER = 17, - WINED3DTSS_MIPFILTER = 18, - WINED3DTSS_MIPMAPLODBIAS = 19, - WINED3DTSS_MAXMIPLEVEL = 20, - WINED3DTSS_MAXANISOTROPY = 21, WINED3DTSS_BUMPENVLSCALE = 22, WINED3DTSS_BUMPENVLOFFSET = 23, WINED3DTSS_TEXTURETRANSFORMFLAGS = 24, - WINED3DTSS_ADDRESSW = 25, WINED3DTSS_COLORARG0 = 26, WINED3DTSS_ALPHAARG0 = 27, WINED3DTSS_RESULTARG = 28, @@ -889,7 +878,7 @@ const UINT WINED3DCLIPPLANE5 = (1 << 5); /* FVF (Flexible Vertex Format) codes */ const UINT WINED3DFVF_RESERVED0 = 0x0001; -const UINT WINED3DFVF_POSITION_MASK = 0x000e; +const UINT WINED3DFVF_POSITION_MASK = 0x400e; const UINT WINED3DFVF_XYZ = 0x0002; const UINT WINED3DFVF_XYZRHW = 0x0004; const UINT WINED3DFVF_XYZB1 = 0x0006; diff --git a/include/wingdi.h b/include/wingdi.h index 58411034dee..96a0d2003d0 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -771,6 +771,8 @@ typedef struct tagXFORM #define PROOF_QUALITY 2 #define NONANTIALIASED_QUALITY 3 #define ANTIALIASED_QUALITY 4 +#define CLEARTYPE_QUALITY 5 +#define CLEARTYPE_NATURAL_QUALITY 6 /* lfPitchAndFamily pitch values */ #define DEFAULT_PITCH 0x00 diff --git a/include/winnt.h b/include/winnt.h index 0c8e0a96f9f..57f4c5c354b 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -540,7 +540,12 @@ typedef DWORD FLONG; #define PROCESSOR_ARM920 2336 /* 0x920 */ #define PROCESSOR_ARM_7TDMI 70001 +#ifdef _WIN64 +#define MAXIMUM_PROCESSORS 64 +#else #define MAXIMUM_PROCESSORS 32 +#endif + typedef struct _MEMORY_BASIC_INFORMATION { LPVOID BaseAddress; diff --git a/include/winsock.h b/include/winsock.h index b531bb3975c..537e16ab9a2 100644 --- a/include/winsock.h +++ b/include/winsock.h @@ -144,9 +144,6 @@ typedef unsigned int u_long; extern "C" { #endif /* defined(__cplusplus) */ -/* proper 4-byte packing */ -#include - /* * Address families */ @@ -365,8 +362,13 @@ typedef struct WS(servent) { char* s_name; /* official service name */ char** s_aliases; /* alias list */ +#ifdef _WIN64 + char* s_proto; /* protocol to use */ + short s_port; /* port # */ +#else short s_port; /* port # */ char* s_proto; /* protocol to use */ +#endif } SERVENT, *PSERVENT, *LPSERVENT; @@ -647,11 +649,19 @@ typedef struct WS(WSAData) { WORD wVersion; WORD wHighVersion; +#ifdef _WIN64 + WORD iMaxSockets; + WORD iMaxUdpDg; + char *lpVendorInfo; + char szDescription[WSADESCRIPTION_LEN+1]; + char szSystemStatus[WSASYS_STATUS_LEN+1]; +#else char szDescription[WSADESCRIPTION_LEN+1]; char szSystemStatus[WSASYS_STATUS_LEN+1]; WORD iMaxSockets; WORD iMaxUdpDg; char *lpVendorInfo; +#endif } WSADATA, *LPWSADATA; @@ -1051,9 +1061,6 @@ SOCKET WINAPI WS(socket)(int,int,int); #endif /* !defined(__WINE_WINSOCK2__) || WS_API_PROTOTYPES */ - -#include - #ifdef __cplusplus } #endif diff --git a/include/winternl.h b/include/winternl.h index d0180a545e7..60ca82126e6 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1000,20 +1000,20 @@ PVOID WINAPI RtlVirtualUnwind(ULONG,ULONG64,ULONG64,RUNTIME_FUNCTION*,CONTEXT*,P */ /* This is used by NtQuerySystemInformation */ -typedef struct _SYSTEM_THREAD_INFORMATION{ - FILETIME ftKernelTime; - FILETIME ftUserTime; - FILETIME ftCreateTime; - DWORD dwTickCount; - DWORD dwStartAddress; - DWORD dwOwningPID; - DWORD dwThreadID; - DWORD dwCurrentPriority; - DWORD dwBasePriority; - DWORD dwContextSwitches; - DWORD dwThreadState; - DWORD dwWaitReason; - DWORD dwUnknown; +typedef struct _SYSTEM_THREAD_INFORMATION +{ /* win32/win64 */ + LARGE_INTEGER KernelTime; /* 00/00 */ + LARGE_INTEGER UserTime; /* 08/08 */ + LARGE_INTEGER CreateTime; /* 10/10 */ + DWORD dwTickCount; /* 18/18 */ + LPVOID StartAddress; /* 1c/20 */ + CLIENT_ID ClientId; /* 20/28 */ + DWORD dwCurrentPriority; /* 28/38 */ + DWORD dwBasePriority; /* 2c/3c */ + DWORD dwContextSwitches; /* 30/40 */ + DWORD dwThreadState; /* 34/44 */ + DWORD dwWaitReason; /* 38/48 */ + DWORD dwUnknown; /* 3c/4c */ } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION; typedef struct _IO_STATUS_BLOCK { @@ -1353,38 +1353,39 @@ typedef struct _VM_COUNTERS_ { SIZE_T QuotaNonPagedPoolUsage; SIZE_T PagefileUsage; SIZE_T PeakPagefileUsage; + SIZE_T PrivatePageCount; } VM_COUNTERS, *PVM_COUNTERS; typedef struct _SYSTEM_PROCESS_INFORMATION { -#ifdef __WINESRC__ - DWORD dwOffset; - DWORD dwThreadCount; - DWORD dwUnknown1[6]; - FILETIME ftCreationTime; - FILETIME ftUserTime; - FILETIME ftKernelTime; - UNICODE_STRING ProcessName; - DWORD dwBasePriority; - DWORD dwProcessID; - DWORD dwParentProcessID; - DWORD dwHandleCount; - DWORD dwUnknown3; - DWORD dwUnknown4; - VM_COUNTERS vmCounters; - IO_COUNTERS ioCounters; - SYSTEM_THREAD_INFORMATION ti[1]; +#ifdef __WINESRC__ /* win32/win64 */ + ULONG NextEntryOffset; /* 00/00 */ + DWORD dwThreadCount; /* 04/04 */ + DWORD dwUnknown1[6]; /* 08/08 */ + LARGE_INTEGER CreationTime; /* 20/20 */ + LARGE_INTEGER UserTime; /* 28/28 */ + LARGE_INTEGER KernelTime; /* 30/30 */ + UNICODE_STRING ProcessName; /* 38/38 */ + DWORD dwBasePriority; /* 40/48 */ + HANDLE UniqueProcessId; /* 44/50 */ + HANDLE ParentProcessId; /* 48/58 */ + ULONG HandleCount; /* 4c/60 */ + DWORD dwUnknown3; /* 50/64 */ + DWORD dwUnknown4; /* 54/68 */ + VM_COUNTERS vmCounters; /* 58/70 */ + IO_COUNTERS ioCounters; /* 88/d0 */ + SYSTEM_THREAD_INFORMATION ti[1]; /* b8/100 */ #else - ULONG NextEntryOffset; - BYTE Reserved1[52]; - PVOID Reserved2[3]; - HANDLE UniqueProcessId; - PVOID Reserved3; - ULONG HandleCount; - BYTE Reserved4[4]; - PVOID Reserved5[11]; - SIZE_T PeakPagefileUsage; - SIZE_T PrivatePageCount; - LARGE_INTEGER Reserved6[6]; + ULONG NextEntryOffset; /* 00/00 */ + BYTE Reserved1[52]; /* 04/04 */ + PVOID Reserved2[3]; /* 38/38 */ + HANDLE UniqueProcessId; /* 44/50 */ + PVOID Reserved3; /* 48/58 */ + ULONG HandleCount; /* 4c/60 */ + BYTE Reserved4[4]; /* 50/64 */ + PVOID Reserved5[11]; /* 54/68 */ + SIZE_T PeakPagefileUsage; /* 80/c0 */ + SIZE_T PrivatePageCount; /* 84/c8 */ + LARGE_INTEGER Reserved6[6]; /* 88/d0 */ #endif } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION; @@ -1936,16 +1937,16 @@ typedef struct _LDR_MODULE typedef struct _SYSTEM_MODULE { - ULONG Reserved1; - ULONG Reserved2; - PVOID ImageBaseAddress; - ULONG ImageSize; - ULONG Flags; - WORD Id; - WORD Rank; - WORD Unknown; - WORD NameOffset; - BYTE Name[MAXIMUM_FILENAME_LENGTH]; + PVOID Reserved1; /* 00/00 */ + PVOID Reserved2; /* 04/08 */ + PVOID ImageBaseAddress; /* 08/10 */ + ULONG ImageSize; /* 0c/18 */ + ULONG Flags; /* 10/1c */ + WORD Id; /* 14/20 */ + WORD Rank; /* 16/22 */ + WORD Unknown; /* 18/24 */ + WORD NameOffset; /* 1a/26 */ + BYTE Name[MAXIMUM_FILENAME_LENGTH]; /* 1c/28 */ } SYSTEM_MODULE, *PSYSTEM_MODULE; typedef struct _SYSTEM_MODULE_INFORMATION @@ -1978,7 +1979,7 @@ NTSYSAPI NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, UL NTSYSAPI void WINAPI LdrInitializeThunk(ULONG,ULONG,ULONG,ULONG); NTSYSAPI NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*); NTSYSAPI NTSTATUS WINAPI LdrLockLoaderLock(ULONG,ULONG*,ULONG*); -IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock(void*,UINT,USHORT*,INT); +IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock(void*,UINT,USHORT*,INT_PTR); NTSYSAPI NTSTATUS WINAPI LdrQueryProcessModuleInformation(SYSTEM_MODULE_INFORMATION*, ULONG, ULONG*); NTSYSAPI void WINAPI LdrShutdownProcess(void); NTSYSAPI void WINAPI LdrShutdownThread(void); @@ -2331,7 +2332,7 @@ NTSYSAPI ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG); NTSYSAPI ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN); NTSYSAPI BOOLEAN WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *); NTSYSAPI NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING); -NTSYSAPI NTSTATUS WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,va_list *,LPWSTR,ULONG); +NTSYSAPI NTSTATUS WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,__ms_va_list *,LPWSTR,ULONG); NTSYSAPI void WINAPI RtlFreeAnsiString(PANSI_STRING); NTSYSAPI BOOLEAN WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *); NTSYSAPI BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID); diff --git a/include/winuser.h b/include/winuser.h index 8382a07f22f..3f202b19946 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -2078,9 +2078,9 @@ typedef struct tagMSG #define POINTSTOPOINT(pt, pts) { (pt).x = (pts).x; (pt).y = (pts).y; } #define POINTTOPOINTS(pt) (MAKELONG((short)((pt).x), (short)((pt).y))) -#define MAKELPARAM(low,high) ((LPARAM)MAKELONG(low,high)) -#define MAKEWPARAM(low,high) ((WPARAM)MAKELONG(low,high)) -#define MAKELRESULT(low,high) ((LRESULT)MAKELONG(low,high)) +#define MAKELPARAM(low,high) ((LPARAM)(DWORD)MAKELONG(low,high)) +#define MAKEWPARAM(low,high) ((WPARAM)(DWORD)MAKELONG(low,high)) +#define MAKELRESULT(low,high) ((LRESULT)(DWORD)MAKELONG(low,high)) /* Cursors / Icons */ @@ -5068,8 +5068,8 @@ WINUSERAPI VOID WINAPI mouse_event(DWORD,DWORD,DWORD,DWORD,ULONG_PTR); WINUSERAPI INT WINAPIV wsprintfA(LPSTR,LPCSTR,...); WINUSERAPI INT WINAPIV wsprintfW(LPWSTR,LPCWSTR,...); #define wsprintf WINELIB_NAME_AW(wsprintf) -WINUSERAPI INT WINAPI wvsprintfA(LPSTR,LPCSTR,va_list); -WINUSERAPI INT WINAPI wvsprintfW(LPWSTR,LPCWSTR,va_list); +WINUSERAPI INT WINAPI wvsprintfA(LPSTR,LPCSTR,__ms_va_list); +WINUSERAPI INT WINAPI wvsprintfW(LPWSTR,LPCWSTR,__ms_va_list); #define wvsprintf WINELIB_NAME_AW(wvsprintf) /* Undocumented functions */ diff --git a/include/winuser.rh b/include/winuser.rh index c4c8875d0dc..e7609178fad 100644 --- a/include/winuser.rh +++ b/include/winuser.rh @@ -75,6 +75,36 @@ #define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE|WS_EX_CLIENTEDGE) #define WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW|WS_EX_TOPMOST) +/* Standard dialog button IDs */ +#define IDOK 1 +#define IDCANCEL 2 +#define IDABORT 3 +#define IDRETRY 4 +#define IDIGNORE 5 +#define IDYES 6 +#define IDNO 7 +#define IDCLOSE 8 +#define IDHELP 9 +#define IDTRYAGAIN 10 +#define IDCONTINUE 11 + +/* Win32 button control messages */ +#define BM_GETCHECK 0x00f0 +#define BM_SETCHECK 0x00f1 +#define BM_GETSTATE 0x00f2 +#define BM_SETSTATE 0x00f3 +#define BM_SETSTYLE 0x00f4 +#define BM_CLICK 0x00f5 +#define BM_GETIMAGE 0x00f6 +#define BM_SETIMAGE 0x00f7 + +/* Button states */ +#define BST_UNCHECKED 0x0000 +#define BST_CHECKED 0x0001 +#define BST_INDETERMINATE 0x0002 +#define BST_PUSHED 0x0004 +#define BST_FOCUS 0x0008 + /* Button control styles */ #define BS_PUSHBUTTON 0x00000000L #define BS_DEFPUSHBUTTON 0x00000001L @@ -155,6 +185,38 @@ #define ES_WANTRETURN 0x00001000 #define ES_NUMBER 0x00002000 + +#define HELP_CONTEXT 0x0001 +#define HELP_QUIT 0x0002 +#define HELP_INDEX 0x0003 +#define HELP_CONTENTS 0x0003 +#define HELP_HELPONHELP 0x0004 +#define HELP_SETINDEX 0x0005 +#define HELP_SETCONTENTS 0x0005 +#define HELP_CONTEXTPOPUP 0x0008 +#define HELP_FORCEFILE 0x0009 +#define HELP_KEY 0x0101 +#define HELP_COMMAND 0x0102 +#define HELP_PARTIALKEY 0x0105 +#define HELP_MULTIKEY 0x0201 +#define HELP_SETWINPOS 0x0203 +#define HELP_CONTEXTMENU 0x000a +#define HELP_FINDER 0x000b +#define HELP_WM_HELP 0x000c +#define HELP_SETPOPUP_POS 0x000d + +#define HELP_TCARD 0x8000 +#define HELP_TCARD_DATA 0x0010 +#define HELP_TCARD_OTHER_CALLER 0x0011 + + +#define IDH_NO_HELP 28440 +#define IDH_MISSING_CONTEXT 28441 +#define IDH_GENERIC_HELP_BUTTON 28442 +#define IDH_OK 28443 +#define IDH_CANCEL 28444 +#define IDH_HELP 28445 + /* Listbox styles */ #define LBS_NOTIFY 0x0001 #define LBS_SORT 0x0002 @@ -174,6 +236,105 @@ #define LBS_COMBOBOX 0x8000 #define LBS_STANDARD (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER) +/* Menu flags */ +#define MF_INSERT 0x0000 +#define MF_CHANGE 0x0080 +#define MF_APPEND 0x0100 +#define MF_DELETE 0x0200 +#define MF_REMOVE 0x1000 +#define MF_END 0x0080 + +#define MF_ENABLED 0x0000 +#define MF_GRAYED 0x0001 +#define MF_DISABLED 0x0002 +#define MF_STRING 0x0000 +#define MF_BITMAP 0x0004 +#define MF_UNCHECKED 0x0000 +#define MF_CHECKED 0x0008 +#define MF_POPUP 0x0010 +#define MF_MENUBARBREAK 0x0020 +#define MF_MENUBREAK 0x0040 +#define MF_UNHILITE 0x0000 +#define MF_HILITE 0x0080 +#define MF_OWNERDRAW 0x0100 +#define MF_USECHECKBITMAPS 0x0200 +#define MF_BYCOMMAND 0x0000 +#define MF_BYPOSITION 0x0400 +#define MF_SEPARATOR 0x0800 +#define MF_DEFAULT 0x1000 +#define MF_SYSMENU 0x2000 +#define MF_HELP 0x4000 +#define MF_RIGHTJUSTIFY 0x4000 +#define MF_MOUSESELECT 0x8000 + +/* Flags for extended menu item types. */ +#define MFT_STRING MF_STRING +#define MFT_BITMAP MF_BITMAP +#define MFT_MENUBARBREAK MF_MENUBARBREAK +#define MFT_MENUBREAK MF_MENUBREAK +#define MFT_OWNERDRAW MF_OWNERDRAW +#define MFT_RADIOCHECK 0x00000200L +#define MFT_SEPARATOR MF_SEPARATOR +#define MFT_RIGHTORDER 0x00002000L +#define MFT_RIGHTJUSTIFY MF_RIGHTJUSTIFY + +/* Flags for extended menu item states. */ +#define MFS_GRAYED 0x00000003L +#define MFS_DISABLED MFS_GRAYED +#define MFS_CHECKED MF_CHECKED +#define MFS_HILITE MF_HILITE +#define MFS_ENABLED MF_ENABLED +#define MFS_UNCHECKED MF_UNCHECKED +#define MFS_UNHILITE MF_UNHILITE +#define MFS_DEFAULT MF_DEFAULT +#define MFS_MASK 0x0000108BL +#define MFS_HOTTRACKDRAWN 0x10000000L +#define MFS_CACHEDBMP 0x20000000L +#define MFS_BOTTOMGAPDROP 0x40000000L +#define MFS_TOPGAPDROP 0x80000000L +#define MFS_GAPDROP 0xC0000000L +/* Scrollbar styles */ +#define SBS_HORZ 0x0000L +#define SBS_VERT 0x0001L +#define SBS_TOPALIGN 0x0002L +#define SBS_LEFTALIGN 0x0002L +#define SBS_BOTTOMALIGN 0x0004L +#define SBS_RIGHTALIGN 0x0004L +#define SBS_SIZEBOXTOPLEFTALIGN 0x0002L +#define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L +#define SBS_SIZEBOX 0x0008L +#define SBS_SIZEGRIP 0x0010L + +/* WM_SYSCOMMAND parameters */ +#ifdef SC_SIZE /* at least HP-UX: already defined in /usr/include/sys/signal.h */ +#undef SC_SIZE +#endif +#define SC_SIZE 0xf000 +#define SC_MOVE 0xf010 +#define SC_MINIMIZE 0xf020 +#define SC_MAXIMIZE 0xf030 +#define SC_NEXTWINDOW 0xf040 +#define SC_PREVWINDOW 0xf050 +#define SC_CLOSE 0xf060 +#define SC_VSCROLL 0xf070 +#define SC_HSCROLL 0xf080 +#define SC_MOUSEMENU 0xf090 +#define SC_KEYMENU 0xf100 +#define SC_ARRANGE 0xf110 +#define SC_RESTORE 0xf120 +#define SC_TASKLIST 0xf130 +#define SC_SCREENSAVE 0xf140 +#define SC_HOTKEY 0xf150 + /* Win32 4.0 */ +#define SC_DEFAULT 0xf160 +#define SC_MONITORPOWER 0xf170 +#define SC_CONTEXTHELP 0xf180 +#define SC_SEPARATOR 0xf00f + +/* obsolete names(SC_ICON and SC_ZOOM) */ +#define SC_ICON SC_MINIMIZE +#define SC_ZOOM SC_MAXIMIZE + /* Static Control Styles */ #define SS_LEFT 0x00000000L #define SS_CENTER 0x00000001L @@ -208,3 +369,32 @@ #define SS_PATHELLIPSIS 0x00008000L #define SS_WORDELLIPSIS 0x0000C000L #define SS_ELLIPSISMASK 0x0000C000L + +/* ShowWindow() codes */ +#define SW_HIDE 0 +#define SW_SHOWNORMAL 1 +#define SW_NORMAL 1 +#define SW_SHOWMINIMIZED 2 +#define SW_SHOWMAXIMIZED 3 +#define SW_MAXIMIZE 3 +#define SW_SHOWNOACTIVATE 4 +#define SW_SHOW 5 +#define SW_MINIMIZE 6 +#define SW_SHOWMINNOACTIVE 7 +#define SW_SHOWNA 8 +#define SW_RESTORE 9 +#define SW_SHOWDEFAULT 10 +#define SW_FORCEMINIMIZE 11 +#define SW_MAX 11 + +/* Predefined resources */ +#define IDI_APPLICATION MAKEINTRESOURCE(32512) +#define IDI_HAND MAKEINTRESOURCE(32513) +#define IDI_QUESTION MAKEINTRESOURCE(32514) +#define IDI_EXCLAMATION MAKEINTRESOURCE(32515) +#define IDI_ASTERISK MAKEINTRESOURCE(32516) +#define IDI_WINLOGO MAKEINTRESOURCE(32517) + +#define IDI_WARNING IDI_EXCLAMATION +#define IDI_ERROR IDI_HAND +#define IDI_INFORMATION IDI_ASTERISK diff --git a/include/xinput.h b/include/xinput.h index 46fd0acba2e..24fbdb379d3 100644 --- a/include/xinput.h +++ b/include/xinput.h @@ -202,4 +202,38 @@ typedef struct _XINPUT_CAPABILITIES { XINPUT_VIBRATION Vibration; } XINPUT_CAPABILITIES, *PXINPUT_CAPABILITIES; +/* + * Defines the structure for a joystick input event which is + * retrieved using the function XInputGetKeystroke + */ +typedef struct _XINPUT_KEYSTROKE { + WORD VirtualKey; + WCHAR Unicode; + WORD Flags; + BYTE UserIndex; + BYTE HidCode; +} XINPUT_KEYSTROKE, *PXINPUT_KEYSTROKE; + +typedef struct _XINPUT_BATTERY_INFORMATION +{ + BYTE BatteryType; + BYTE BatteryLevel; +} XINPUT_BATTERY_INFORMATION, *PXINPUT_BATTERY_INFORMATION; + +#ifdef __cplusplus +extern "C" { +#endif + +void WINAPI XInputEnable(BOOL); +DWORD WINAPI XInputSetState(DWORD, XINPUT_VIBRATION*); +DWORD WINAPI XInputGetState(DWORD, XINPUT_STATE*); +DWORD WINAPI XInputGetKeystroke(DWORD, DWORD, PXINPUT_KEYSTROKE); +DWORD WINAPI XInputGetCapabilities(DWORD, DWORD, XINPUT_CAPABILITIES*); +DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD, GUID*, GUID*); +DWORD WINAPI XInputGetBatteryInformation(DWORD, BYTE, XINPUT_BATTERY_INFORMATION*); + +#ifdef __cplusplus +} +#endif + #endif /* __WINE_XINPUT_H */ diff --git a/libs/port/poll.c b/libs/port/poll.c index b633a0d90ef..7ee585203f4 100644 --- a/libs/port/poll.c +++ b/libs/port/poll.c @@ -23,9 +23,6 @@ #ifndef HAVE_POLL -#ifdef HAVE_WINSOCK2_H -#include -#endif #ifdef HAVE_SYS_TIME_H #include #endif @@ -33,6 +30,26 @@ #include #endif +/* we can't include winsock2.h here so we have to duplicate the definitions for Windows */ +#if defined(__MINGW32__) || defined(_MSC_VER) + +#define FD_SETSIZE 64 + +typedef struct +{ + unsigned int fd_count; + int fd_array[FD_SETSIZE]; /* an array of SOCKETs */ +} fd_set; + +#define FD_ZERO(set) ((set)->fd_count = 0) +#define FD_ISSET(fd, set) __WSAFDIsSet((fd), (set)) +#define FD_SET(fd, set) do { if ((set)->fd_count < FD_SETSIZE) (set)->fd_array[(set)->fd_count++]=(fd); } while(0) + +int __stdcall select(int,fd_set*,fd_set*,fd_set*,const struct timeval*); +int __stdcall __WSAFDIsSet(int,fd_set*); + +#endif + int poll( struct pollfd *fds, unsigned int count, int timeout ) { fd_set read_set, write_set, except_set; diff --git a/libs/port/spawn.c b/libs/port/spawn.c index 490abb30ac8..38c2944191b 100644 --- a/libs/port/spawn.c +++ b/libs/port/spawn.c @@ -43,7 +43,10 @@ int spawnvp(int mode, const char *cmdname, const char *const argv[]) { execvp(cmdname, (char **)argv); /* if we get here it failed */ - if (errno != ENOTSUP) return -1; /* exec fails on MacOS if the process has multiple threads */ +#ifdef ENOTSUP + if (errno != ENOTSUP) /* exec fails on MacOS if the process has multiple threads */ +#endif + return -1; } dfl_act.sa_handler = SIG_DFL; diff --git a/libs/wine/string.c b/libs/wine/string.c index 195af6ca7ff..3c41019c80f 100644 --- a/libs/wine/string.c +++ b/libs/wine/string.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include #include #include @@ -298,6 +299,53 @@ noconv: } +/* format a WCHAR string according to a printf format; helper for vsnprintfW */ +static int format_string( WCHAR *buffer, size_t len, const char *format, const WCHAR *str ) +{ + size_t count = 0; + int i, left_align = 0, width = 0, max = 0; + + assert( *format == '%' ); + format++; /* skip '%' */ + + while (*format == '0' || *format == '+' || *format == '-' || *format == ' ' || *format == '#') + { + if (*format == '-') left_align = 1; + format++; + } + + while (isdigit(*format)) width = width * 10 + *format++ - '0'; + + if (*format == '.') + { + format++; + while (isdigit(*format)) max = max * 10 + *format++ - '0'; + for (i = 0; i < max; i++) if (!str[i]) max = i; + } + else max = strlenW(str); + + if (*format == 'h' || *format == 'l') format++; + + assert( *format == 's' ); + + if (!left_align && width > max) + { + if ((count += width - max) >= len) return -1; + for (i = 0; i < width - max; i++) *buffer++ = ' '; + } + + if ((count += max) >= len) return -1; + memcpy( buffer, str, max * sizeof(WCHAR) ); + buffer += max; + + if (left_align && width > max) + { + if ((count += width - max) >= len) return -1; + for (i = 0; i < width - max; i++) *buffer++ = ' '; + } + return count; +} + int vsnprintfW(WCHAR *str, size_t len, const WCHAR *format, va_list valist) { unsigned int written = 0; @@ -372,23 +420,34 @@ int vsnprintfW(WCHAR *str, size_t len, const WCHAR *format, va_list valist) { static const WCHAR none[] = { '(','n','u','l','l',')',0 }; const WCHAR *wstr = va_arg(valist, const WCHAR *); - const WCHAR *striter = wstr ? wstr : none; - while (*striter) - { - if (written++ >= len) - return -1; - *str++ = *striter++; - } + int count; + + *fmta++ = 's'; + *fmta = 0; + count = format_string( str, len - written, fmtbufa, wstr ? wstr : none ); + if (count == -1) return -1; + str += count; + written += count; iter++; break; } case 'c': - if (written++ >= len) - return -1; - *str++ = (WCHAR)va_arg(valist, int); + { + WCHAR wstr[2]; + int count; + + wstr[0] = va_arg(valist, int); + wstr[1] = 0; + *fmta++ = 's'; + *fmta = 0; + count = format_string( str, len - written, fmtbufa, wstr ); + if (count == -1) return -1; + str += count; + written += count; iter++; break; + } default: { @@ -396,7 +455,8 @@ int vsnprintfW(WCHAR *str, size_t len, const WCHAR *format, va_list valist) /* FIXME: for unrecognised types, should ignore % when printing */ char *bufaiter = bufa; if (*iter == 'p') - sprintf(bufaiter, "%08lX", va_arg(valist, long)); + sprintf(bufaiter, "%0*lX", 2 * (int)sizeof(void*), + (unsigned long)va_arg(valist, void *)); else { *fmta++ = *iter; @@ -408,9 +468,7 @@ int vsnprintfW(WCHAR *str, size_t len, const WCHAR *format, va_list valist) sprintf(bufaiter, fmtbufa, va_arg(valist, double)); else { - /* FIXME: On 32 bit systems this doesn't handle int 64's. - * on 64 bit systems this doesn't work for 32 bit types - */ + /* FIXME: On 32 bit systems this doesn't handle int 64's. */ sprintf(bufaiter, fmtbufa, va_arg(valist, void *)); } } diff --git a/libs/wpp/preproc.c b/libs/wpp/preproc.c index c1fa3fc6ec7..63455ce3a69 100644 --- a/libs/wpp/preproc.c +++ b/libs/wpp/preproc.c @@ -20,6 +20,7 @@ #include "wine/port.h" #include +#include #include #include #include diff --git a/loader/preloader.c b/loader/preloader.c index 5fcb9749a87..11439726f76 100644 --- a/loader/preloader.c +++ b/loader/preloader.c @@ -163,6 +163,7 @@ void __bb_init_func(void) { return; } /* similar to the above but for -fstack-protector */ void *__stack_chk_guard = 0; +void __stack_chk_fail_local(void) { return; } void __stack_chk_fail(void) { return; } /* data for setting up the glibc-style thread-local storage in %gs */ diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 564ce452303..ad186ff91e8 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2135,7 +2135,7 @@ void WCMD_setshow_time (void) { GetLocalTime(&st); if (GetTimeFormat (LOCALE_USER_DEFAULT, 0, &st, NULL, curtime, sizeof(curtime)/sizeof(WCHAR))) { - WCMD_output (WCMD_LoadMessage(WCMD_CURRENTDATE), curtime); + WCMD_output (WCMD_LoadMessage(WCMD_CURRENTTIME), curtime); if (strstrW (quals, parmT) == NULL) { WCMD_output (WCMD_LoadMessage(WCMD_NEWTIME)); WCMD_ReadFile (GetStdHandle(STD_INPUT_HANDLE), buffer, diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c index c70fca5304b..cd17d31d719 100644 --- a/programs/cmd/directory.c +++ b/programs/cmd/directory.c @@ -33,11 +33,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(cmd); -int WCMD_dir_sort (const void *a, const void *b); -WCHAR * WCMD_filesize64 (ULONGLONG free); -WCHAR * WCMD_strrev (WCHAR *buff); -static void WCMD_getfileowner(WCHAR *filename, WCHAR *owner, int ownerlen); -static void WCMD_dir_trailer(WCHAR drive); extern int echo_mode; extern WCHAR quals[MAX_PATH], param1[MAX_PATH], param2[MAX_PATH]; @@ -58,7 +53,6 @@ typedef enum _DISPLAYORDER Date } DISPLAYORDER; -static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *parms, int level); static int file_total, dir_total, recurse, wide, bare, max_width, lower; static int shortname, usernames; static ULONGLONG byte_total; @@ -76,368 +70,183 @@ static const WCHAR emptyW[] = {'\0'}; static const WCHAR spaceW[] = {' ','\0'}; /***************************************************************************** - * WCMD_directory - * - * List a file directory. + * WCMD_strrev * + * Reverse a WCHARacter string in-place (strrev() is not available under unixen :-( ). */ +WCHAR * WCMD_strrev (WCHAR *buff) { -void WCMD_directory (WCHAR *cmd) { + int r, i; + WCHAR b; - WCHAR path[MAX_PATH], cwd[MAX_PATH]; - int status, paged_mode; - CONSOLE_SCREEN_BUFFER_INFO consoleInfo; + r = strlenW (buff); + for (i=0; idwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || + (fileb->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))) + { + BOOL aDir = filea->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; + if (aDir) result = -1; + else result = 1; + if (orderGroupDirsReverse) result = -result; + return result; - /* Initialize all flags to their defaults as if no DIRCMD or quals */ - paged_mode = FALSE; - recurse = FALSE; - wide = FALSE; - bare = FALSE; - lower = FALSE; - shortname = FALSE; - usernames = FALSE; - orderByCol = FALSE; - separator = TRUE; - dirTime = Written; - dirOrder = Name; - orderReverse = FALSE; - orderGroupDirs = FALSE; - orderGroupDirsReverse = FALSE; - showattrs = 0; - attrsbits = 0; + /* Order by Name: */ + } else if (dirOrder == Name) { + result = lstrcmpiW(filea->cFileName, fileb->cFileName); - /* Handle args - Loop through so right most is the effective one */ - /* Note: /- appears to be a negate rather than an off, eg. dir - /-W is wide, or dir /w /-w /-w is also wide */ - p = quals; - while (*p && (*p=='/' || *p==' ')) { - BOOL negate = FALSE; - if (*p++==' ') continue; /* Skip / and blanks introduced through DIRCMD */ + /* Order by Size: */ + } else if (dirOrder == Size) { + ULONG64 sizea = (((ULONG64)filea->nFileSizeHigh) << 32) + filea->nFileSizeLow; + ULONG64 sizeb = (((ULONG64)fileb->nFileSizeHigh) << 32) + fileb->nFileSizeLow; + if( sizea < sizeb ) result = -1; + else if( sizea == sizeb ) result = 0; + else result = 1; - if (*p=='-') { - negate = TRUE; - p++; + /* Order by Date: (Takes into account which date (/T option) */ + } else if (dirOrder == Date) { + + FILETIME *ft; + ULONG64 timea, timeb; + + if (dirTime == Written) { + ft = &filea->ftLastWriteTime; + timea = (((ULONG64)ft->dwHighDateTime) << 32) + ft->dwLowDateTime; + ft = &fileb->ftLastWriteTime; + timeb = (((ULONG64)ft->dwHighDateTime) << 32) + ft->dwLowDateTime; + } else if (dirTime == Access) { + ft = &filea->ftLastAccessTime; + timea = (((ULONG64)ft->dwHighDateTime) << 32) + ft->dwLowDateTime; + ft = &fileb->ftLastAccessTime; + timeb = (((ULONG64)ft->dwHighDateTime) << 32) + ft->dwLowDateTime; + } else { + ft = &filea->ftCreationTime; + timea = (((ULONG64)ft->dwHighDateTime) << 32) + ft->dwLowDateTime; + ft = &fileb->ftCreationTime; + timeb = (((ULONG64)ft->dwHighDateTime) << 32) + ft->dwLowDateTime; } + if( timea < timeb ) result = -1; + else if( timea == timeb ) result = 0; + else result = 1; - WINE_TRACE("Processing arg '%c' (in %s)\n", *p, wine_dbgstr_w(quals)); - switch (*p) { - case 'P': if (negate) paged_mode = !paged_mode; - else paged_mode = TRUE; - break; - case 'S': if (negate) recurse = !recurse; - else recurse = TRUE; - break; - case 'W': if (negate) wide = !wide; - else wide = TRUE; - break; - case 'B': if (negate) bare = !bare; - else bare = TRUE; - break; - case 'L': if (negate) lower = !lower; - else lower = TRUE; - break; - case 'X': if (negate) shortname = !shortname; - else shortname = TRUE; - break; - case 'Q': if (negate) usernames = !usernames; - else usernames = TRUE; - break; - case 'D': if (negate) orderByCol = !orderByCol; - else orderByCol = TRUE; - break; - case 'C': if (negate) separator = !separator; - else separator = TRUE; - break; - case 'T': p = p + 1; - if (*p==':') p++; /* Skip optional : */ + /* Order by Extension: (Takes into account which date (/T option) */ + } else if (dirOrder == Extension) { + WCHAR drive[10]; + WCHAR dir[MAX_PATH]; + WCHAR fname[MAX_PATH]; + WCHAR extA[MAX_PATH]; + WCHAR extB[MAX_PATH]; - if (*p == 'A') dirTime = Access; - else if (*p == 'C') dirTime = Creation; - else if (*p == 'W') dirTime = Written; + /* Split into components */ + WCMD_splitpath(filea->cFileName, drive, dir, fname, extA); + WCMD_splitpath(fileb->cFileName, drive, dir, fname, extB); + result = lstrcmpiW(extA, extB); + } - /* Support /T and /T: with no parms, default to written */ - else if (*p == 0x00 || *p == '/') { - dirTime = Written; - p = p - 1; /* So when step on, move to '/' */ - } else { - SetLastError(ERROR_INVALID_PARAMETER); - WCMD_print_error(); - errorlevel = 1; - return; - } - break; - case 'O': p = p + 1; - if (*p==':') p++; /* Skip optional : */ - while (*p && *p != '/') { - WINE_TRACE("Processing subparm '%c' (in %s)\n", *p, wine_dbgstr_w(quals)); - switch (*p) { - case 'N': dirOrder = Name; break; - case 'E': dirOrder = Extension; break; - case 'S': dirOrder = Size; break; - case 'D': dirOrder = Date; break; - case '-': if (*(p+1)=='G') orderGroupDirsReverse=TRUE; - else orderReverse = TRUE; - break; - case 'G': orderGroupDirs = TRUE; break; - default: - SetLastError(ERROR_INVALID_PARAMETER); - WCMD_print_error(); - errorlevel = 1; - return; - } - p++; - } - p = p - 1; /* So when step on, move to '/' */ - break; - case 'A': p = p + 1; - showattrs = 0; - attrsbits = 0; - if (*p==':') p++; /* Skip optional : */ - while (*p && *p != '/') { - BOOL anegate = FALSE; - ULONG mask; + if (orderReverse) result = -result; + return result; +} - /* Note /A: - options are 'offs' not toggles */ - if (*p=='-') { - anegate = TRUE; - p++; - } +/***************************************************************************** + * WCMD_getfileowner + * + * Reverse a WCHARacter string in-place (strrev() is not available under unixen :-( ). + */ +void WCMD_getfileowner(WCHAR *filename, WCHAR *owner, int ownerlen) { - WINE_TRACE("Processing subparm '%c' (in %s)\n", *p, wine_dbgstr_w(quals)); - switch (*p) { - case 'D': mask = FILE_ATTRIBUTE_DIRECTORY; break; - case 'H': mask = FILE_ATTRIBUTE_HIDDEN; break; - case 'S': mask = FILE_ATTRIBUTE_SYSTEM; break; - case 'R': mask = FILE_ATTRIBUTE_READONLY; break; - case 'A': mask = FILE_ATTRIBUTE_ARCHIVE; break; - default: - SetLastError(ERROR_INVALID_PARAMETER); - WCMD_print_error(); - errorlevel = 1; - return; - } - - /* Keep running list of bits we care about */ - attrsbits |= mask; - - /* Mask shows what MUST be in the bits we care about */ - if (anegate) showattrs = showattrs & ~mask; - else showattrs |= mask; + ULONG sizeNeeded = 0; + DWORD rc; + WCHAR name[MAXSTRING]; + WCHAR domain[MAXSTRING]; - p++; - } - p = p - 1; /* So when step on, move to '/' */ - WINE_TRACE("Result: showattrs %x, bits %x\n", showattrs, attrsbits); - break; - default: - SetLastError(ERROR_INVALID_PARAMETER); - WCMD_print_error(); - errorlevel = 1; - return; - } - p = p + 1; - } + /* In case of error, return empty string */ + *owner = 0x00; - /* Handle conflicting args and initialization */ - if (bare || shortname) wide = FALSE; - if (bare) shortname = FALSE; - if (wide) usernames = FALSE; - if (orderByCol) wide = TRUE; + /* Find out how much space we need for the owner security descriptor */ + GetFileSecurity(filename, OWNER_SECURITY_INFORMATION, 0, 0, &sizeNeeded); + rc = GetLastError(); - if (wide) { - if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &consoleInfo)) - max_width = consoleInfo.dwSize.X; - else - max_width = 80; - } - if (paged_mode) { - WCMD_enter_paged_mode(NULL); - } + if(rc == ERROR_INSUFFICIENT_BUFFER && sizeNeeded > 0) { - argno = 0; - argsProcessed = 0; - argN = cmd; - GetCurrentDirectory (MAX_PATH, cwd); - strcatW(cwd, slashW); + LPBYTE secBuffer; + PSID pSID = NULL; + BOOL defaulted = FALSE; + ULONG nameLen = MAXSTRING; + ULONG domainLen = MAXSTRING; + SID_NAME_USE nameuse; - /* Loop through all args, calculating full effective directory */ - fullParms = NULL; - prevEntry = NULL; - while (argN) { - WCHAR fullname[MAXSTRING]; - WCHAR *thisArg = WCMD_parameter (cmd, argno++, &argN); - if (argN && argN[0] != '/') { + secBuffer = HeapAlloc(GetProcessHeap(),0,sizeNeeded * sizeof(BYTE)); + if(!secBuffer) return; - WINE_TRACE("Found parm '%s'\n", wine_dbgstr_w(thisArg)); - if (thisArg[1] == ':' && thisArg[2] == '\\') { - strcpyW(fullname, thisArg); - } else if (thisArg[1] == ':' && thisArg[2] != '\\') { - WCHAR envvar[4]; - static const WCHAR envFmt[] = {'=','%','c',':','\0'}; - wsprintf(envvar, envFmt, thisArg[0]); - if (!GetEnvironmentVariable(envvar, fullname, MAX_PATH)) { - static const WCHAR noEnvFmt[] = {'%','c',':','\0'}; - wsprintf(fullname, noEnvFmt, thisArg[0]); + /* Get the owners security descriptor */ + if(!GetFileSecurity(filename, OWNER_SECURITY_INFORMATION, secBuffer, + sizeNeeded, &sizeNeeded)) { + HeapFree(GetProcessHeap(),0,secBuffer); + return; } - strcatW(fullname, slashW); - strcatW(fullname, &thisArg[2]); - } else if (thisArg[0] == '\\') { - memcpy(fullname, cwd, 2 * sizeof(WCHAR)); - strcpyW(fullname+2, thisArg); - } else { - strcpyW(fullname, cwd); - strcatW(fullname, thisArg); - } - WINE_TRACE("Using location '%s'\n", wine_dbgstr_w(fullname)); - status = GetFullPathName (fullname, sizeof(path)/sizeof(WCHAR), path, NULL); - - /* - * If the path supplied does not include a wildcard, and the endpoint of the - * path references a directory, we need to list the *contents* of that - * directory not the directory file itself. - */ - if ((strchrW(path, '*') == NULL) && (strchrW(path, '%') == NULL)) { - status = GetFileAttributes (path); - if ((status != INVALID_FILE_ATTRIBUTES) && (status & FILE_ATTRIBUTE_DIRECTORY)) { - if (path[strlenW(path)-1] == '\\') { - strcatW (path, starW); - } - else { - const WCHAR slashStarW[] = {'\\','*','\0'}; - strcatW (path, slashStarW); - } + /* Get the SID from the SD */ + if(!GetSecurityDescriptorOwner(secBuffer, &pSID, &defaulted)) { + HeapFree(GetProcessHeap(),0,secBuffer); + return; } - } else { - /* Special case wildcard search with no extension (ie parameters ending in '.') as - GetFullPathName strips off the additional '.' */ - if (fullname[strlenW(fullname)-1] == '.') strcatW(path, dotW); - } - WINE_TRACE("Using path '%s'\n", wine_dbgstr_w(path)); - thisEntry = HeapAlloc(GetProcessHeap(),0,sizeof(DIRECTORY_STACK)); - if (fullParms == NULL) fullParms = thisEntry; - if (prevEntry != NULL) prevEntry->next = thisEntry; - prevEntry = thisEntry; - thisEntry->next = NULL; - - /* Split into components */ - WCMD_splitpath(path, drive, dir, fname, ext); - WINE_TRACE("Path Parts: drive: '%s' dir: '%s' name: '%s' ext:'%s'\n", - wine_dbgstr_w(drive), wine_dbgstr_w(dir), - wine_dbgstr_w(fname), wine_dbgstr_w(ext)); - - thisEntry->dirName = HeapAlloc(GetProcessHeap(),0, - sizeof(WCHAR) * (strlenW(drive)+strlenW(dir)+1)); - strcpyW(thisEntry->dirName, drive); - strcatW(thisEntry->dirName, dir); - - thisEntry->fileName = HeapAlloc(GetProcessHeap(),0, - sizeof(WCHAR) * (strlenW(fname)+strlenW(ext)+1)); - strcpyW(thisEntry->fileName, fname); - strcatW(thisEntry->fileName, ext); - - } - } - - /* If just 'dir' entered, a '*' parameter is assumed */ - if (fullParms == NULL) { - WINE_TRACE("Inserting default '*'\n"); - fullParms = HeapAlloc(GetProcessHeap(),0, sizeof(DIRECTORY_STACK)); - fullParms->next = NULL; - fullParms->dirName = HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR) * (strlenW(cwd)+1)); - strcpyW(fullParms->dirName, cwd); - fullParms->fileName = HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR) * 2); - strcpyW(fullParms->fileName, starW); - } - - lastDrive = '?'; - prevEntry = NULL; - thisEntry = fullParms; - trailerReqd = FALSE; - - while (thisEntry != NULL) { - - /* Output disk free (trailer) and volume information (header) if the drive - letter changes */ - if (lastDrive != toupper(thisEntry->dirName[0])) { - - /* Trailer Information */ - if (lastDrive != '?') { - trailerReqd = FALSE; - WCMD_dir_trailer(prevEntry->dirName[0]); - } - - lastDrive = toupper(thisEntry->dirName[0]); - - if (!bare) { - WCHAR drive[3]; - - WINE_TRACE("Writing volume for '%c:'\n", thisEntry->dirName[0]); - memcpy(drive, thisEntry->dirName, 2 * sizeof(WCHAR)); - drive[2] = 0x00; - status = WCMD_volume (0, drive); - trailerReqd = TRUE; - if (!status) { - errorlevel = 1; - goto exit; - } - } - } else { - static const WCHAR newLine2[] = {'\n','\n','\0'}; - if (!bare) WCMD_output (newLine2); + /* Convert to a username */ + if (LookupAccountSid(NULL, pSID, name, &nameLen, domain, &domainLen, &nameuse)) { + static const WCHAR fmt[] = {'%','s','%','c','%','s','\0'}; + snprintfW(owner, ownerlen, fmt, domain, '\\', name); + } + HeapFree(GetProcessHeap(),0,secBuffer); } - - /* Clear any errors from previous invocations, and process it */ - errorlevel = 0; - prevEntry = thisEntry; - thisEntry = WCMD_list_directory (thisEntry, 0); - } - - /* Trailer Information */ - if (trailerReqd) { - WCMD_dir_trailer(prevEntry->dirName[0]); - } - -exit: - if (paged_mode) WCMD_leave_paged_mode(); - - /* Free storage allocated for parms */ - while (fullParms != NULL) { - prevEntry = fullParms; - fullParms = prevEntry->next; - HeapFree(GetProcessHeap(),0,prevEntry->dirName); - HeapFree(GetProcessHeap(),0,prevEntry->fileName); - HeapFree(GetProcessHeap(),0,prevEntry); - } + return; } /***************************************************************************** @@ -782,217 +591,399 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le } /***************************************************************************** - * WCMD_filesize64 + * WCMD_dir_trailer * - * Convert a 64-bit number into a WCHARacter string, with commas every three digits. - * Result is returned in a static string overwritten with each call. - * FIXME: There must be a better algorithm! + * Print out the trailer for the supplied drive letter */ +static void WCMD_dir_trailer(WCHAR drive) { + ULARGE_INTEGER avail, total, freebytes; + DWORD status; + WCHAR driveName[4] = {'c',':','\\','\0'}; -WCHAR * WCMD_filesize64 (ULONGLONG n) { - - ULONGLONG q; - unsigned int r, i; - WCHAR *p; - static WCHAR buff[32]; + driveName[0] = drive; + status = GetDiskFreeSpaceEx (driveName, &avail, &total, &freebytes); + WINE_TRACE("Writing trailer for '%s' gave %d(%d)\n", wine_dbgstr_w(driveName), + status, GetLastError()); - p = buff; - i = -3; - do { - if (separator && ((++i)%3 == 1)) *p++ = ','; - q = n / 10; - r = n - (q * 10); - *p++ = r + '0'; - *p = '\0'; - n = q; - } while (n != 0); - WCMD_strrev (buff); - return buff; + if (errorlevel==0 && !bare) { + if (recurse) { + static const WCHAR fmt1[] = {'\n',' ',' ',' ',' ',' ','T','o','t','a','l',' ','f','i','l','e','s', + ' ','l','i','s','t','e','d',':','\n','%','8','d',' ','f','i','l','e', + 's','%','2','5','s',' ','b','y','t','e','s','\n','\0'}; + static const WCHAR fmt2[] = {'%','8','d',' ','d','i','r','e','c','t','o','r','i','e','s',' ','%', + '1','8','s',' ','b','y','t','e','s',' ','f','r','e','e','\n','\n', + '\0'}; + WCMD_output (fmt1, file_total, WCMD_filesize64 (byte_total)); + WCMD_output (fmt2, dir_total, WCMD_filesize64 (freebytes.QuadPart)); + } else { + static const WCHAR fmt[] = {' ','%','1','8','s',' ','b','y','t','e','s',' ','f','r','e','e', + '\n','\n','\0'}; + WCMD_output (fmt, WCMD_filesize64 (freebytes.QuadPart)); + } + } } /***************************************************************************** - * WCMD_strrev + * WCMD_directory + * + * List a file directory. * - * Reverse a WCHARacter string in-place (strrev() is not available under unixen :-( ). */ -WCHAR * WCMD_strrev (WCHAR *buff) { +void WCMD_directory (WCHAR *cmd) { - int r, i; - WCHAR b; + WCHAR path[MAX_PATH], cwd[MAX_PATH]; + int status, paged_mode; + CONSOLE_SCREEN_BUFFER_INFO consoleInfo; + WCHAR *p; + WCHAR string[MAXSTRING]; + int argno = 0; + int argsProcessed = 0; + WCHAR *argN = cmd; + WCHAR lastDrive; + BOOL trailerReqd = FALSE; + DIRECTORY_STACK *fullParms = NULL; + DIRECTORY_STACK *prevEntry = NULL; + DIRECTORY_STACK *thisEntry = NULL; + WCHAR drive[10]; + WCHAR dir[MAX_PATH]; + WCHAR fname[MAX_PATH]; + WCHAR ext[MAX_PATH]; + static const WCHAR dircmdW[] = {'D','I','R','C','M','D','\0'}; - r = strlenW (buff); - for (i=0; idwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || - (fileb->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))) - { - BOOL aDir = filea->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; - if (aDir) result = -1; - else result = 1; - if (orderGroupDirsReverse) result = -result; - return result; + /* Handle args - Loop through so right most is the effective one */ + /* Note: /- appears to be a negate rather than an off, eg. dir + /-W is wide, or dir /w /-w /-w is also wide */ + p = quals; + while (*p && (*p=='/' || *p==' ')) { + BOOL negate = FALSE; + if (*p++==' ') continue; /* Skip / and blanks introduced through DIRCMD */ + + if (*p=='-') { + negate = TRUE; + p++; + } + + WINE_TRACE("Processing arg '%c' (in %s)\n", *p, wine_dbgstr_w(quals)); + switch (*p) { + case 'P': if (negate) paged_mode = !paged_mode; + else paged_mode = TRUE; + break; + case 'S': if (negate) recurse = !recurse; + else recurse = TRUE; + break; + case 'W': if (negate) wide = !wide; + else wide = TRUE; + break; + case 'B': if (negate) bare = !bare; + else bare = TRUE; + break; + case 'L': if (negate) lower = !lower; + else lower = TRUE; + break; + case 'X': if (negate) shortname = !shortname; + else shortname = TRUE; + break; + case 'Q': if (negate) usernames = !usernames; + else usernames = TRUE; + break; + case 'D': if (negate) orderByCol = !orderByCol; + else orderByCol = TRUE; + break; + case 'C': if (negate) separator = !separator; + else separator = TRUE; + break; + case 'T': p = p + 1; + if (*p==':') p++; /* Skip optional : */ + + if (*p == 'A') dirTime = Access; + else if (*p == 'C') dirTime = Creation; + else if (*p == 'W') dirTime = Written; + + /* Support /T and /T: with no parms, default to written */ + else if (*p == 0x00 || *p == '/') { + dirTime = Written; + p = p - 1; /* So when step on, move to '/' */ + } else { + SetLastError(ERROR_INVALID_PARAMETER); + WCMD_print_error(); + errorlevel = 1; + return; + } + break; + case 'O': p = p + 1; + if (*p==':') p++; /* Skip optional : */ + while (*p && *p != '/') { + WINE_TRACE("Processing subparm '%c' (in %s)\n", *p, wine_dbgstr_w(quals)); + switch (*p) { + case 'N': dirOrder = Name; break; + case 'E': dirOrder = Extension; break; + case 'S': dirOrder = Size; break; + case 'D': dirOrder = Date; break; + case '-': if (*(p+1)=='G') orderGroupDirsReverse=TRUE; + else orderReverse = TRUE; + break; + case 'G': orderGroupDirs = TRUE; break; + default: + SetLastError(ERROR_INVALID_PARAMETER); + WCMD_print_error(); + errorlevel = 1; + return; + } + p++; + } + p = p - 1; /* So when step on, move to '/' */ + break; + case 'A': p = p + 1; + showattrs = 0; + attrsbits = 0; + if (*p==':') p++; /* Skip optional : */ + while (*p && *p != '/') { + BOOL anegate = FALSE; + ULONG mask; + + /* Note /A: - options are 'offs' not toggles */ + if (*p=='-') { + anegate = TRUE; + p++; + } + + WINE_TRACE("Processing subparm '%c' (in %s)\n", *p, wine_dbgstr_w(quals)); + switch (*p) { + case 'D': mask = FILE_ATTRIBUTE_DIRECTORY; break; + case 'H': mask = FILE_ATTRIBUTE_HIDDEN; break; + case 'S': mask = FILE_ATTRIBUTE_SYSTEM; break; + case 'R': mask = FILE_ATTRIBUTE_READONLY; break; + case 'A': mask = FILE_ATTRIBUTE_ARCHIVE; break; + default: + SetLastError(ERROR_INVALID_PARAMETER); + WCMD_print_error(); + errorlevel = 1; + return; + } + + /* Keep running list of bits we care about */ + attrsbits |= mask; + + /* Mask shows what MUST be in the bits we care about */ + if (anegate) showattrs = showattrs & ~mask; + else showattrs |= mask; + + p++; + } + p = p - 1; /* So when step on, move to '/' */ + WINE_TRACE("Result: showattrs %x, bits %x\n", showattrs, attrsbits); + break; + default: + SetLastError(ERROR_INVALID_PARAMETER); + WCMD_print_error(); + errorlevel = 1; + return; + } + p = p + 1; + } + + /* Handle conflicting args and initialization */ + if (bare || shortname) wide = FALSE; + if (bare) shortname = FALSE; + if (wide) usernames = FALSE; + if (orderByCol) wide = TRUE; + + if (wide) { + if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &consoleInfo)) + max_width = consoleInfo.dwSize.X; + else + max_width = 80; + } + if (paged_mode) { + WCMD_enter_paged_mode(NULL); + } - /* Order by Name: */ - } else if (dirOrder == Name) { - result = lstrcmpiW(filea->cFileName, fileb->cFileName); + argno = 0; + argsProcessed = 0; + argN = cmd; + GetCurrentDirectory (MAX_PATH, cwd); + strcatW(cwd, slashW); - /* Order by Size: */ - } else if (dirOrder == Size) { - ULONG64 sizea = (((ULONG64)filea->nFileSizeHigh) << 32) + filea->nFileSizeLow; - ULONG64 sizeb = (((ULONG64)fileb->nFileSizeHigh) << 32) + fileb->nFileSizeLow; - if( sizea < sizeb ) result = -1; - else if( sizea == sizeb ) result = 0; - else result = 1; + /* Loop through all args, calculating full effective directory */ + fullParms = NULL; + prevEntry = NULL; + while (argN) { + WCHAR fullname[MAXSTRING]; + WCHAR *thisArg = WCMD_parameter (cmd, argno++, &argN); + if (argN && argN[0] != '/') { - /* Order by Date: (Takes into account which date (/T option) */ - } else if (dirOrder == Date) { + WINE_TRACE("Found parm '%s'\n", wine_dbgstr_w(thisArg)); + if (thisArg[1] == ':' && thisArg[2] == '\\') { + strcpyW(fullname, thisArg); + } else if (thisArg[1] == ':' && thisArg[2] != '\\') { + WCHAR envvar[4]; + static const WCHAR envFmt[] = {'=','%','c',':','\0'}; + wsprintf(envvar, envFmt, thisArg[0]); + if (!GetEnvironmentVariable(envvar, fullname, MAX_PATH)) { + static const WCHAR noEnvFmt[] = {'%','c',':','\0'}; + wsprintf(fullname, noEnvFmt, thisArg[0]); + } + strcatW(fullname, slashW); + strcatW(fullname, &thisArg[2]); + } else if (thisArg[0] == '\\') { + memcpy(fullname, cwd, 2 * sizeof(WCHAR)); + strcpyW(fullname+2, thisArg); + } else { + strcpyW(fullname, cwd); + strcatW(fullname, thisArg); + } + WINE_TRACE("Using location '%s'\n", wine_dbgstr_w(fullname)); - FILETIME *ft; - ULONG64 timea, timeb; + status = GetFullPathName (fullname, sizeof(path)/sizeof(WCHAR), path, NULL); - if (dirTime == Written) { - ft = &filea->ftLastWriteTime; - timea = (((ULONG64)ft->dwHighDateTime) << 32) + ft->dwLowDateTime; - ft = &fileb->ftLastWriteTime; - timeb = (((ULONG64)ft->dwHighDateTime) << 32) + ft->dwLowDateTime; - } else if (dirTime == Access) { - ft = &filea->ftLastAccessTime; - timea = (((ULONG64)ft->dwHighDateTime) << 32) + ft->dwLowDateTime; - ft = &fileb->ftLastAccessTime; - timeb = (((ULONG64)ft->dwHighDateTime) << 32) + ft->dwLowDateTime; - } else { - ft = &filea->ftCreationTime; - timea = (((ULONG64)ft->dwHighDateTime) << 32) + ft->dwLowDateTime; - ft = &fileb->ftCreationTime; - timeb = (((ULONG64)ft->dwHighDateTime) << 32) + ft->dwLowDateTime; - } - if( timea < timeb ) result = -1; - else if( timea == timeb ) result = 0; - else result = 1; + /* + * If the path supplied does not include a wildcard, and the endpoint of the + * path references a directory, we need to list the *contents* of that + * directory not the directory file itself. + */ + if ((strchrW(path, '*') == NULL) && (strchrW(path, '%') == NULL)) { + status = GetFileAttributes (path); + if ((status != INVALID_FILE_ATTRIBUTES) && (status & FILE_ATTRIBUTE_DIRECTORY)) { + if (path[strlenW(path)-1] == '\\') { + strcatW (path, starW); + } + else { + const WCHAR slashStarW[] = {'\\','*','\0'}; + strcatW (path, slashStarW); + } + } + } else { + /* Special case wildcard search with no extension (ie parameters ending in '.') as + GetFullPathName strips off the additional '.' */ + if (fullname[strlenW(fullname)-1] == '.') strcatW(path, dotW); + } - /* Order by Extension: (Takes into account which date (/T option) */ - } else if (dirOrder == Extension) { - WCHAR drive[10]; - WCHAR dir[MAX_PATH]; - WCHAR fname[MAX_PATH]; - WCHAR extA[MAX_PATH]; - WCHAR extB[MAX_PATH]; + WINE_TRACE("Using path '%s'\n", wine_dbgstr_w(path)); + thisEntry = HeapAlloc(GetProcessHeap(),0,sizeof(DIRECTORY_STACK)); + if (fullParms == NULL) fullParms = thisEntry; + if (prevEntry != NULL) prevEntry->next = thisEntry; + prevEntry = thisEntry; + thisEntry->next = NULL; /* Split into components */ - WCMD_splitpath(filea->cFileName, drive, dir, fname, extA); - WCMD_splitpath(fileb->cFileName, drive, dir, fname, extB); - result = lstrcmpiW(extA, extB); - } + WCMD_splitpath(path, drive, dir, fname, ext); + WINE_TRACE("Path Parts: drive: '%s' dir: '%s' name: '%s' ext:'%s'\n", + wine_dbgstr_w(drive), wine_dbgstr_w(dir), + wine_dbgstr_w(fname), wine_dbgstr_w(ext)); - if (orderReverse) result = -result; - return result; -} + thisEntry->dirName = HeapAlloc(GetProcessHeap(),0, + sizeof(WCHAR) * (strlenW(drive)+strlenW(dir)+1)); + strcpyW(thisEntry->dirName, drive); + strcatW(thisEntry->dirName, dir); -/***************************************************************************** - * WCMD_getfileowner - * - * Reverse a WCHARacter string in-place (strrev() is not available under unixen :-( ). - */ -void WCMD_getfileowner(WCHAR *filename, WCHAR *owner, int ownerlen) { + thisEntry->fileName = HeapAlloc(GetProcessHeap(),0, + sizeof(WCHAR) * (strlenW(fname)+strlenW(ext)+1)); + strcpyW(thisEntry->fileName, fname); + strcatW(thisEntry->fileName, ext); - ULONG sizeNeeded = 0; - DWORD rc; - WCHAR name[MAXSTRING]; - WCHAR domain[MAXSTRING]; + } + } - /* In case of error, return empty string */ - *owner = 0x00; + /* If just 'dir' entered, a '*' parameter is assumed */ + if (fullParms == NULL) { + WINE_TRACE("Inserting default '*'\n"); + fullParms = HeapAlloc(GetProcessHeap(),0, sizeof(DIRECTORY_STACK)); + fullParms->next = NULL; + fullParms->dirName = HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR) * (strlenW(cwd)+1)); + strcpyW(fullParms->dirName, cwd); + fullParms->fileName = HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR) * 2); + strcpyW(fullParms->fileName, starW); + } - /* Find out how much space we need for the owner security descriptor */ - GetFileSecurity(filename, OWNER_SECURITY_INFORMATION, 0, 0, &sizeNeeded); - rc = GetLastError(); + lastDrive = '?'; + prevEntry = NULL; + thisEntry = fullParms; + trailerReqd = FALSE; - if(rc == ERROR_INSUFFICIENT_BUFFER && sizeNeeded > 0) { + while (thisEntry != NULL) { - LPBYTE secBuffer; - PSID pSID = NULL; - BOOL defaulted = FALSE; - ULONG nameLen = MAXSTRING; - ULONG domainLen = MAXSTRING; - SID_NAME_USE nameuse; + /* Output disk free (trailer) and volume information (header) if the drive + letter changes */ + if (lastDrive != toupper(thisEntry->dirName[0])) { - secBuffer = HeapAlloc(GetProcessHeap(),0,sizeNeeded * sizeof(BYTE)); - if(!secBuffer) return; + /* Trailer Information */ + if (lastDrive != '?') { + trailerReqd = FALSE; + WCMD_dir_trailer(prevEntry->dirName[0]); + } - /* Get the owners security descriptor */ - if(!GetFileSecurity(filename, OWNER_SECURITY_INFORMATION, secBuffer, - sizeNeeded, &sizeNeeded)) { - HeapFree(GetProcessHeap(),0,secBuffer); - return; - } + lastDrive = toupper(thisEntry->dirName[0]); - /* Get the SID from the SD */ - if(!GetSecurityDescriptorOwner(secBuffer, &pSID, &defaulted)) { - HeapFree(GetProcessHeap(),0,secBuffer); - return; - } + if (!bare) { + WCHAR drive[3]; - /* Convert to a username */ - if (LookupAccountSid(NULL, pSID, name, &nameLen, domain, &domainLen, &nameuse)) { - static const WCHAR fmt[] = {'%','s','%','c','%','s','\0'}; - snprintfW(owner, ownerlen, fmt, domain, '\\', name); - } - HeapFree(GetProcessHeap(),0,secBuffer); + WINE_TRACE("Writing volume for '%c:'\n", thisEntry->dirName[0]); + memcpy(drive, thisEntry->dirName, 2 * sizeof(WCHAR)); + drive[2] = 0x00; + status = WCMD_volume (0, drive); + trailerReqd = TRUE; + if (!status) { + errorlevel = 1; + goto exit; + } + } + } else { + static const WCHAR newLine2[] = {'\n','\n','\0'}; + if (!bare) WCMD_output (newLine2); } - return; -} -/***************************************************************************** - * WCMD_dir_trailer - * - * Print out the trailer for the supplied drive letter - */ -static void WCMD_dir_trailer(WCHAR drive) { - ULARGE_INTEGER avail, total, freebytes; - DWORD status; - WCHAR driveName[4] = {'c',':','\\','\0'}; + /* Clear any errors from previous invocations, and process it */ + errorlevel = 0; + prevEntry = thisEntry; + thisEntry = WCMD_list_directory (thisEntry, 0); + } - driveName[0] = drive; - status = GetDiskFreeSpaceEx (driveName, &avail, &total, &freebytes); - WINE_TRACE("Writing trailer for '%s' gave %d(%d)\n", wine_dbgstr_w(driveName), - status, GetLastError()); + /* Trailer Information */ + if (trailerReqd) { + WCMD_dir_trailer(prevEntry->dirName[0]); + } - if (errorlevel==0 && !bare) { - if (recurse) { - static const WCHAR fmt1[] = {'\n',' ',' ',' ',' ',' ','T','o','t','a','l',' ','f','i','l','e','s', - ' ','l','i','s','t','e','d',':','\n','%','8','d',' ','f','i','l','e', - 's','%','2','5','s',' ','b','y','t','e','s','\n','\0'}; - static const WCHAR fmt2[] = {'%','8','d',' ','d','i','r','e','c','t','o','r','i','e','s',' ','%', - '1','8','s',' ','b','y','t','e','s',' ','f','r','e','e','\n','\n', - '\0'}; - WCMD_output (fmt1, file_total, WCMD_filesize64 (byte_total)); - WCMD_output (fmt2, dir_total, WCMD_filesize64 (freebytes.QuadPart)); - } else { - static const WCHAR fmt[] = {' ','%','1','8','s',' ','b','y','t','e','s',' ','f','r','e','e', - '\n','\n','\0'}; - WCMD_output (fmt, WCMD_filesize64 (freebytes.QuadPart)); - } - } +exit: + if (paged_mode) WCMD_leave_paged_mode(); + + /* Free storage allocated for parms */ + while (fullParms != NULL) { + prevEntry = fullParms; + fullParms = prevEntry->next; + HeapFree(GetProcessHeap(),0,prevEntry->dirName); + HeapFree(GetProcessHeap(),0,prevEntry->fileName); + HeapFree(GetProcessHeap(),0,prevEntry); + } } diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 8d587e6d06c..e4f29a1f350 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -26,7 +26,6 @@ */ #include "config.h" -#include #include "wcmd.h" #include "wine/debug.h" @@ -97,833 +96,820 @@ static char *output_bufA = NULL; #define MAX_WRITECONSOLE_SIZE 65535 BOOL unicodePipes = FALSE; -static WCHAR *WCMD_expand_envvar(WCHAR *start, WCHAR *forvar, WCHAR *forVal); -static void WCMD_output_asis_len(const WCHAR *message, int len, HANDLE device); -/***************************************************************************** - * Main entry point. This is a console application so we have a main() not a - * winmain(). +/******************************************************************* + * WCMD_output_asis_len - send output to current standard output + * + * Output a formatted unicode string. Ideally this will go to the console + * and hence required WriteConsoleW to output it, however if file i/o is + * redirected, it needs to be WriteFile'd using OEM (not ANSI) format */ +static void WCMD_output_asis_len(const WCHAR *message, int len, HANDLE device) { -int wmain (int argc, WCHAR *argvW[]) -{ - int args; - WCHAR *cmd = NULL; - WCHAR string[1024]; - WCHAR envvar[4]; - HANDLE h; - int opt_q; - int opt_t = 0; - static const WCHAR autoexec[] = {'\\','a','u','t','o','e','x','e','c','.', - 'b','a','t','\0'}; - char ansiVersion[100]; - CMD_LIST *toExecute = NULL; /* Commands left to be executed */ + DWORD nOut= 0; + DWORD res = 0; - srand(time(NULL)); + /* If nothing to write, return (MORE does this sometimes) */ + if (!len) return; - /* Pre initialize some messages */ - strcpy(ansiVersion, PACKAGE_VERSION); - MultiByteToWideChar(CP_ACP, 0, ansiVersion, -1, string, 1024); - wsprintf(version_string, WCMD_LoadMessage(WCMD_VERSION), string); - strcpyW(anykey, WCMD_LoadMessage(WCMD_ANYKEY)); + /* Try to write as unicode assuming it is to a console */ + res = WriteConsoleW(device, message, len, &nOut, NULL); - args = argc; - opt_c=opt_k=opt_q=opt_s=0; - while (args > 0) - { - WCHAR c; - WINE_TRACE("Command line parm: '%s'\n", wine_dbgstr_w(*argvW)); - if ((*argvW)[0]!='/' || (*argvW)[1]=='\0') { - argvW++; - args--; - continue; - } + /* If writing to console fails, assume its file + i/o so convert to OEM codepage and output */ + if (!res) { + BOOL usedDefaultChar = FALSE; + DWORD convertedChars; - c=(*argvW)[1]; - if (tolowerW(c)=='c') { - opt_c=1; - } else if (tolowerW(c)=='q') { - opt_q=1; - } else if (tolowerW(c)=='k') { - opt_k=1; - } else if (tolowerW(c)=='s') { - opt_s=1; - } else if (tolowerW(c)=='a') { - unicodePipes=FALSE; - } else if (tolowerW(c)=='u') { - unicodePipes=TRUE; - } else if (tolowerW(c)=='t' && (*argvW)[2]==':') { - opt_t=strtoulW(&(*argvW)[3], NULL, 16); - } else if (tolowerW(c)=='x' || tolowerW(c)=='y') { - /* Ignored for compatibility with Windows */ - } + if (!unicodePipes) { + /* + * Allocate buffer to use when writing to file. (Not freed, as one off) + */ + if (!output_bufA) output_bufA = HeapAlloc(GetProcessHeap(), 0, + MAX_WRITECONSOLE_SIZE); + if (!output_bufA) { + WINE_FIXME("Out of memory - could not allocate ansi 64K buffer\n"); + return; + } - if ((*argvW)[2]==0) { - argvW++; - args--; - } - else /* handle `cmd /cnotepad.exe` and `cmd /x/c ...` */ - { - *argvW+=2; + /* Convert to OEM, then output */ + convertedChars = WideCharToMultiByte(GetConsoleOutputCP(), 0, message, + len, output_bufA, MAX_WRITECONSOLE_SIZE, + "?", &usedDefaultChar); + WriteFile(device, output_bufA, convertedChars, + &nOut, FALSE); + } else { + WriteFile(device, message, len*sizeof(WCHAR), + &nOut, FALSE); } + } + return; +} - if (opt_c || opt_k) /* break out of parsing immediately after c or k */ - break; - } +/******************************************************************* + * WCMD_output - send output to current standard output device. + * + */ - if (opt_q) { - const WCHAR eoff[] = {'O','F','F','\0'}; - WCMD_echo(eoff); - } +void WCMD_output (const WCHAR *format, ...) { - if (opt_c || opt_k) { - int len,qcount; - WCHAR** arg; - int argsLeft; - WCHAR* p; + va_list ap; + WCHAR string[1024]; + int ret; - /* opt_s left unflagged if the command starts with and contains exactly - * one quoted string (exactly two quote characters). The quoted string - * must be an executable name that has whitespace and must not have the - * following characters: &<>()@^| */ + va_start(ap,format); + ret = vsnprintfW(string, sizeof(string)/sizeof(WCHAR), format, ap); + if( ret >= (sizeof(string)/sizeof(WCHAR))) { + WINE_ERR("Output truncated in WCMD_output\n" ); + ret = (sizeof(string)/sizeof(WCHAR)) - 1; + string[ret] = '\0'; + } + va_end(ap); + WCMD_output_asis_len(string, ret, GetStdHandle(STD_OUTPUT_HANDLE)); +} - /* Build the command to execute */ - len = 0; - qcount = 0; - argsLeft = args; - for (arg = argvW; argsLeft>0; arg++,argsLeft--) - { - int has_space,bcount; - WCHAR* a; - has_space=0; - bcount=0; - a=*arg; - if( !*a ) has_space=1; - while (*a!='\0') { - if (*a=='\\') { - bcount++; - } else { - if (*a==' ' || *a=='\t') { - has_space=1; - } else if (*a=='"') { - /* doubling of '\' preceding a '"', - * plus escaping of said '"' - */ - len+=2*bcount+1; - qcount++; - } - bcount=0; - } - a++; - } - len+=(a-*arg) + 1; /* for the separating space */ - if (has_space) - { - len+=2; /* for the quotes */ - qcount+=2; - } - } +static int line_count; +static int max_height; +static int max_width; +static BOOL paged_mode; +static int numChars; - if (qcount!=2) - opt_s=1; +void WCMD_enter_paged_mode(const WCHAR *msg) +{ + CONSOLE_SCREEN_BUFFER_INFO consoleInfo; - /* check argvW[0] for a space and invalid characters */ - if (!opt_s) { - opt_s=1; - p=*argvW; - while (*p!='\0') { - if (*p=='&' || *p=='<' || *p=='>' || *p=='(' || *p==')' - || *p=='@' || *p=='^' || *p=='|') { - opt_s=1; - break; - } - if (*p==' ') - opt_s=0; - p++; - } - } + if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &consoleInfo)) { + max_height = consoleInfo.dwSize.Y; + max_width = consoleInfo.dwSize.X; + } else { + max_height = 25; + max_width = 80; + } + paged_mode = TRUE; + line_count = 0; + numChars = 0; + pagedMessage = (msg==NULL)? anykey : msg; +} - cmd = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - if (!cmd) - exit(1); +void WCMD_leave_paged_mode(void) +{ + paged_mode = FALSE; + pagedMessage = NULL; +} - p = cmd; - argsLeft = args; - for (arg = argvW; argsLeft>0; arg++,argsLeft--) - { - int has_space,has_quote; - WCHAR* a; +/*************************************************************************** + * WCMD_Readfile + * + * Read characters in from a console/file, returning result in Unicode + * with signature identical to ReadFile + */ +BOOL WCMD_ReadFile(const HANDLE hIn, WCHAR *intoBuf, const DWORD maxChars, + LPDWORD charsRead, const LPOVERLAPPED unused) { - /* Check for quotes and spaces in this argument */ - has_space=has_quote=0; - a=*arg; - if( !*a ) has_space=1; - while (*a!='\0') { - if (*a==' ' || *a=='\t') { - has_space=1; - if (has_quote) - break; - } else if (*a=='"') { - has_quote=1; - if (has_space) - break; - } - a++; - } + BOOL res; - /* Now transfer it to the command line */ - if (has_space) - *p++='"'; - if (has_quote) { - int bcount; - WCHAR* a; + /* Try to read from console as Unicode */ + res = ReadConsoleW(hIn, intoBuf, maxChars, charsRead, NULL); - bcount=0; - a=*arg; - while (*a!='\0') { - if (*a=='\\') { - *p++=*a; - bcount++; - } else { - if (*a=='"') { - int i; - - /* Double all the '\\' preceding this '"', plus one */ - for (i=0;i<=bcount;i++) - *p++='\\'; - *p++='"'; - } else { - *p++=*a; - } - bcount=0; - } - a++; - } - } else { - strcpyW(p,*arg); - p+=strlenW(*arg); - } - if (has_space) - *p++='"'; - *p++=' '; - } - if (p > cmd) - p--; /* remove last space */ - *p = '\0'; - - WINE_TRACE("/c command line: '%s'\n", wine_dbgstr_w(cmd)); + /* If reading from console has failed we assume its file + i/o so read in and convert from OEM codepage */ + if (!res) { - /* strip first and last quote characters if opt_s; check for invalid - * executable is done later */ - if (opt_s && *cmd=='\"') - WCMD_opt_s_strip_quotes(cmd); - } + DWORD numRead; + /* + * Allocate buffer to use when reading from file. Not freed + */ + if (!output_bufA) output_bufA = HeapAlloc(GetProcessHeap(), 0, + MAX_WRITECONSOLE_SIZE); + if (!output_bufA) { + WINE_FIXME("Out of memory - could not allocate ansi 64K buffer\n"); + return 0; + } - if (opt_c) { - /* If we do a "wcmd /c command", we don't want to allocate a new - * console since the command returns immediately. Rather, we use - * the currently allocated input and output handles. This allows - * us to pipe to and read from the command interpreter. - */ + /* Read from file (assume OEM codepage) */ + res = ReadFile(hIn, output_bufA, maxChars, &numRead, unused); - /* Parse the command string, without reading any more input */ - WCMD_ReadAndParseLine(cmd, &toExecute, INVALID_HANDLE_VALUE); - WCMD_process_commands(toExecute, FALSE, NULL, NULL); - WCMD_free_commands(toExecute); - toExecute = NULL; + /* Convert from OEM */ + *charsRead = MultiByteToWideChar(GetConsoleCP(), 0, output_bufA, numRead, + intoBuf, maxChars); - HeapFree(GetProcessHeap(), 0, cmd); - return errorlevel; - } + } + return res; +} - SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), ENABLE_LINE_INPUT | - ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT); - SetConsoleTitle(WCMD_LoadMessage(WCMD_CONSTITLE)); +/******************************************************************* + * WCMD_output_asis - send output to current standard output device. + * without formatting eg. when message contains '%' + */ +void WCMD_output_asis (const WCHAR *message) { + DWORD count; + const WCHAR* ptr; + WCHAR string[1024]; - /* Note: cmd.exe /c dir does not get a new color, /k dir does */ - if (opt_t) { - if (!(((opt_t & 0xF0) >> 4) == (opt_t & 0x0F))) { - defaultColor = opt_t & 0xFF; - param1[0] = 0x00; - WCMD_color(); + if (paged_mode) { + do { + ptr = message; + while (*ptr && *ptr!='\n' && (numChars < max_width)) { + numChars++; + ptr++; + }; + if (*ptr == '\n') ptr++; + WCMD_output_asis_len(message, (ptr) ? ptr - message : strlenW(message), + GetStdHandle(STD_OUTPUT_HANDLE)); + if (ptr) { + numChars = 0; + if (++line_count >= max_height - 1) { + line_count = 0; + WCMD_output_asis_len(pagedMessage, strlenW(pagedMessage), + GetStdHandle(STD_OUTPUT_HANDLE)); + WCMD_ReadFile (GetStdHandle(STD_INPUT_HANDLE), string, + sizeof(string)/sizeof(WCHAR), &count, NULL); + } } + } while (((message = ptr) != NULL) && (*ptr)); } else { - /* Check HKCU\Software\Microsoft\Command Processor - Then HKLM\Software\Microsoft\Command Processor - for defaultcolour value - Note Can be supplied as DWORD or REG_SZ - Note2 When supplied as REG_SZ it's in decimal!!! */ - HKEY key; - DWORD type; - DWORD value=0, size=4; - static const WCHAR regKeyW[] = {'S','o','f','t','w','a','r','e','\\', - 'M','i','c','r','o','s','o','f','t','\\', - 'C','o','m','m','a','n','d',' ','P','r','o','c','e','s','s','o','r','\0'}; - static const WCHAR dfltColorW[] = {'D','e','f','a','u','l','t','C','o','l','o','r','\0'}; - - if (RegOpenKeyEx(HKEY_CURRENT_USER, regKeyW, - 0, KEY_READ, &key) == ERROR_SUCCESS) { - WCHAR strvalue[4]; - - /* See if DWORD or REG_SZ */ - if (RegQueryValueEx(key, dfltColorW, NULL, &type, - NULL, NULL) == ERROR_SUCCESS) { - if (type == REG_DWORD) { - size = sizeof(DWORD); - RegQueryValueEx(key, dfltColorW, NULL, NULL, - (LPBYTE)&value, &size); - } else if (type == REG_SZ) { - size = sizeof(strvalue)/sizeof(WCHAR); - RegQueryValueEx(key, dfltColorW, NULL, NULL, - (LPBYTE)strvalue, &size); - value = strtoulW(strvalue, NULL, 10); - } - } - RegCloseKey(key); - } - - if (value == 0 && RegOpenKeyEx(HKEY_LOCAL_MACHINE, regKeyW, - 0, KEY_READ, &key) == ERROR_SUCCESS) { - WCHAR strvalue[4]; - - /* See if DWORD or REG_SZ */ - if (RegQueryValueEx(key, dfltColorW, NULL, &type, - NULL, NULL) == ERROR_SUCCESS) { - if (type == REG_DWORD) { - size = sizeof(DWORD); - RegQueryValueEx(key, dfltColorW, NULL, NULL, - (LPBYTE)&value, &size); - } else if (type == REG_SZ) { - size = sizeof(strvalue)/sizeof(WCHAR); - RegQueryValueEx(key, dfltColorW, NULL, NULL, - (LPBYTE)strvalue, &size); - value = strtoulW(strvalue, NULL, 10); - } - } - RegCloseKey(key); - } - - /* If one found, set the screen to that colour */ - if (!(((value & 0xF0) >> 4) == (value & 0x0F))) { - defaultColor = value & 0xFF; - param1[0] = 0x00; - WCMD_color(); - } - - } - - /* Save cwd into appropriate env var */ - GetCurrentDirectory(1024, string); - if (IsCharAlpha(string[0]) && string[1] == ':') { - static const WCHAR fmt[] = {'=','%','c',':','\0'}; - wsprintf(envvar, fmt, string[0]); - SetEnvironmentVariable(envvar, string); - WINE_TRACE("Set %s to %s\n", wine_dbgstr_w(envvar), wine_dbgstr_w(string)); - } - - if (opt_k) { - /* Parse the command string, without reading any more input */ - WCMD_ReadAndParseLine(cmd, &toExecute, INVALID_HANDLE_VALUE); - WCMD_process_commands(toExecute, FALSE, NULL, NULL); - WCMD_free_commands(toExecute); - toExecute = NULL; - HeapFree(GetProcessHeap(), 0, cmd); - } - -/* - * If there is an AUTOEXEC.BAT file, try to execute it. - */ - - GetFullPathName (autoexec, sizeof(string)/sizeof(WCHAR), string, NULL); - h = CreateFile (string, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (h != INVALID_HANDLE_VALUE) { - CloseHandle (h); -#if 0 - WCMD_batch (autoexec, autoexec, 0, NULL, INVALID_HANDLE_VALUE); -#endif + WCMD_output_asis_len(message, lstrlen(message), + GetStdHandle(STD_OUTPUT_HANDLE)); } +} -/* - * Loop forever getting commands and executing them. +/**************************************************************************** + * WCMD_print_error + * + * Print the message for GetLastError */ - WCMD_version (); - while (TRUE) { +void WCMD_print_error (void) { + LPVOID lpMsgBuf; + DWORD error_code; + int status; - /* Read until EOF (which for std input is never, but if redirect - in place, may occur */ - WCMD_show_prompt (); - if (WCMD_ReadAndParseLine(NULL, &toExecute, - GetStdHandle(STD_INPUT_HANDLE)) == NULL) - break; - WCMD_process_commands(toExecute, FALSE, NULL, NULL); - WCMD_free_commands(toExecute); - toExecute = NULL; + error_code = GetLastError (); + status = FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, error_code, 0, (LPTSTR) &lpMsgBuf, 0, NULL); + if (!status) { + WINE_FIXME ("Cannot display message for error %d, status %d\n", + error_code, GetLastError()); + return; } - return 0; + + WCMD_output_asis_len(lpMsgBuf, lstrlen(lpMsgBuf), + GetStdHandle(STD_ERROR_HANDLE)); + LocalFree (lpMsgBuf); + WCMD_output_asis_len (newline, lstrlen(newline), + GetStdHandle(STD_ERROR_HANDLE)); + return; } -/***************************************************************************** - * Expand the command. Native expands lines from batch programs as they are - * read in and not again, except for 'for' variable substitution. - * eg. As evidence, "echo %1 && shift && echo %1" or "echo %%path%%" +/****************************************************************************** + * WCMD_show_prompt + * + * Display the prompt on STDout + * */ -void handleExpansion(WCHAR *cmd, BOOL justFors, WCHAR *forVariable, WCHAR *forValue) { - /* For commands in a context (batch program): */ - /* Expand environment variables in a batch file %{0-9} first */ - /* including support for any ~ modifiers */ - /* Additionally: */ - /* Expand the DATE, TIME, CD, RANDOM and ERRORLEVEL special */ - /* names allowing environment variable overrides */ - /* NOTE: To support the %PATH:xxx% syntax, also perform */ - /* manual expansion of environment variables here */ +void WCMD_show_prompt (void) { - WCHAR *p = cmd; - WCHAR *s, *t; - int i; + int status; + WCHAR out_string[MAX_PATH], curdir[MAX_PATH], prompt_string[MAX_PATH]; + WCHAR *p, *q; + DWORD len; + static const WCHAR envPrompt[] = {'P','R','O','M','P','T','\0'}; - while ((p = strchrW(p, '%'))) { + len = GetEnvironmentVariable (envPrompt, prompt_string, + sizeof(prompt_string)/sizeof(WCHAR)); + if ((len == 0) || (len >= (sizeof(prompt_string)/sizeof(WCHAR)))) { + const WCHAR dfltPrompt[] = {'$','P','$','G','\0'}; + strcpyW (prompt_string, dfltPrompt); + } + p = prompt_string; + q = out_string; + *q = '\0'; + while (*p != '\0') { + if (*p != '$') { + *q++ = *p++; + *q = '\0'; + } + else { + p++; + switch (toupper(*p)) { + case '$': + *q++ = '$'; + break; + case 'A': + *q++ = '&'; + break; + case 'B': + *q++ = '|'; + break; + case 'C': + *q++ = '('; + break; + case 'D': + GetDateFormat (LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, q, MAX_PATH); + while (*q) q++; + break; + case 'E': + *q++ = '\E'; + break; + case 'F': + *q++ = ')'; + break; + case 'G': + *q++ = '>'; + break; + case 'H': + *q++ = '\b'; + break; + case 'L': + *q++ = '<'; + break; + case 'N': + status = GetCurrentDirectory (sizeof(curdir)/sizeof(WCHAR), curdir); + if (status) { + *q++ = curdir[0]; + } + break; + case 'P': + status = GetCurrentDirectory (sizeof(curdir)/sizeof(WCHAR), curdir); + if (status) { + strcatW (q, curdir); + while (*q) q++; + } + break; + case 'Q': + *q++ = '='; + break; + case 'S': + *q++ = ' '; + break; + case 'T': + GetTimeFormat (LOCALE_USER_DEFAULT, 0, NULL, NULL, q, MAX_PATH); + while (*q) q++; + break; + case 'V': + strcatW (q, version_string); + while (*q) q++; + break; + case '_': + *q++ = '\n'; + break; + case '+': + if (pushd_directories) { + memset(q, '+', pushd_directories->u.stackdepth); + q = q + pushd_directories->u.stackdepth; + } + break; + } + p++; + *q = '\0'; + } + } + WCMD_output_asis (out_string); +} - WINE_TRACE("Translate command:%s %d (at: %s)\n", - wine_dbgstr_w(cmd), justFors, wine_dbgstr_w(p)); - i = *(p+1) - '0'; - /* Don't touch %% unless its in Batch */ - if (!justFors && *(p+1) == '%') { - if (context) { - s = WCMD_strdupW(p+1); - strcpyW (p, s); - free (s); - } - p+=1; +/************************************************************************* + * WCMD_strdupW + * A wide version of strdup as its missing from unicode.h + */ +WCHAR *WCMD_strdupW(WCHAR *input) { + int len=strlenW(input)+1; + /* Note: Use malloc not HeapAlloc to emulate strdup */ + WCHAR *result = malloc(len * sizeof(WCHAR)); + memcpy(result, input, len * sizeof(WCHAR)); + return result; +} - /* Replace %~ modifications if in batch program */ - } else if (*(p+1) == '~') { - WCMD_HandleTildaModifiers(&p, forVariable, forValue, justFors); - p++; +/*************************************************************************** + * WCMD_strtrim_leading_spaces + * + * Remove leading spaces from a string. Return a pointer to the first + * non-space character. Does not modify the input string + */ +WCHAR *WCMD_strtrim_leading_spaces (WCHAR *string) { - /* Replace use of %0...%9 if in batch program*/ - } else if (!justFors && context && (i >= 0) && (i <= 9)) { - s = WCMD_strdupW(p+2); - t = WCMD_parameter (context -> command, i + context -> shift_count[i], NULL); - strcpyW (p, t); - strcatW (p, s); - free (s); + WCHAR *ptr; - /* Replace use of %* if in batch program*/ - } else if (!justFors && context && *(p+1)=='*') { - WCHAR *startOfParms = NULL; - s = WCMD_strdupW(p+2); - t = WCMD_parameter (context -> command, 1, &startOfParms); - if (startOfParms != NULL) strcpyW (p, startOfParms); - else *p = 0x00; - strcatW (p, s); - free (s); + ptr = string; + while (*ptr == ' ') ptr++; + return ptr; +} - } else if (forVariable && - (CompareString (LOCALE_USER_DEFAULT, - SORT_STRINGSORT, - p, - strlenW(forVariable), - forVariable, -1) == 2)) { - s = WCMD_strdupW(p + strlenW(forVariable)); - strcpyW(p, forValue); - strcatW(p, s); - free(s); +/************************************************************************* + * WCMD_strtrim_trailing_spaces + * + * Remove trailing spaces from a string. This routine modifies the input + * string by placing a null after the last non-space WCHARacter + */ +void WCMD_strtrim_trailing_spaces (WCHAR *string) { - } else if (!justFors) { - p = WCMD_expand_envvar(p, forVariable, forValue); + WCHAR *ptr; - /* In a FOR loop, see if this is the variable to replace */ - } else { /* Ignore %'s on second pass of batch program */ - p++; - } + ptr = string + strlenW (string) - 1; + while ((*ptr == ' ') && (ptr >= string)) { + *ptr = '\0'; + ptr--; } +} - return; +/************************************************************************* + * WCMD_opt_s_strip_quotes + * + * Remove first and last quote WCHARacters, preserving all other text + */ +void WCMD_opt_s_strip_quotes(WCHAR *cmd) { + WCHAR *src = cmd + 1, *dest = cmd, *lastq = NULL; + while((*dest=*src) != '\0') { + if (*src=='\"') + lastq=dest; + dest++, src++; + } + if (lastq) { + dest=lastq++; + while ((*dest++=*lastq++) != 0) + ; + } } -/***************************************************************************** - * Process one command. If the command is EXIT this routine does not return. - * We will recurse through here executing batch files. +/************************************************************************* + * WCMD_expand_envvar + * + * Expands environment variables, allowing for WCHARacter substitution */ +static WCHAR *WCMD_expand_envvar(WCHAR *start, WCHAR *forVar, WCHAR *forVal) { + WCHAR *endOfVar = NULL, *s; + WCHAR *colonpos = NULL; + WCHAR thisVar[MAXSTRING]; + WCHAR thisVarContents[MAXSTRING]; + WCHAR savedchar = 0x00; + int len; + static const WCHAR ErrorLvl[] = {'E','R','R','O','R','L','E','V','E','L','\0'}; + static const WCHAR ErrorLvlP[] = {'%','E','R','R','O','R','L','E','V','E','L','%','\0'}; + static const WCHAR Date[] = {'D','A','T','E','\0'}; + static const WCHAR DateP[] = {'%','D','A','T','E','%','\0'}; + static const WCHAR Time[] = {'T','I','M','E','\0'}; + static const WCHAR TimeP[] = {'%','T','I','M','E','%','\0'}; + static const WCHAR Cd[] = {'C','D','\0'}; + static const WCHAR CdP[] = {'%','C','D','%','\0'}; + static const WCHAR Random[] = {'R','A','N','D','O','M','\0'}; + static const WCHAR RandomP[] = {'%','R','A','N','D','O','M','%','\0'}; + static const WCHAR Delims[] = {'%',' ',':','\0'}; -void WCMD_execute (WCHAR *command, WCHAR *redirects, - WCHAR *forVariable, WCHAR *forValue, - CMD_LIST **cmdList) -{ - WCHAR *cmd, *p, *redir; - int status, i; - DWORD count, creationDisposition; - HANDLE h; - WCHAR *whichcmd; - SECURITY_ATTRIBUTES sa; - WCHAR *new_cmd = NULL; - WCHAR *new_redir = NULL; - HANDLE old_stdhandles[3] = {INVALID_HANDLE_VALUE, - INVALID_HANDLE_VALUE, - INVALID_HANDLE_VALUE}; - DWORD idx_stdhandles[3] = {STD_INPUT_HANDLE, - STD_OUTPUT_HANDLE, - STD_ERROR_HANDLE}; - BOOL piped = FALSE; + WINE_TRACE("Expanding: %s (%s,%s)\n", wine_dbgstr_w(start), + wine_dbgstr_w(forVal), wine_dbgstr_w(forVar)); - WINE_TRACE("command on entry:%s (%p), with '%s'='%s'\n", - wine_dbgstr_w(command), cmdList, - wine_dbgstr_w(forVariable), wine_dbgstr_w(forValue)); + /* Find the end of the environment variable, and extract name */ + endOfVar = strpbrkW(start+1, Delims); - /* If the next command is a pipe then we implement pipes by redirecting - the output from this command to a temp file and input into the - next command from that temp file. - FIXME: Use of named pipes would make more sense here as currently this - process has to finish before the next one can start but this requires - a change to not wait for the first app to finish but rather the pipe */ - if (cmdList && (*cmdList)->nextcommand && - (*cmdList)->nextcommand->prevDelim == CMD_PIPE) { - - WCHAR temp_path[MAX_PATH]; - static const WCHAR cmdW[] = {'C','M','D','\0'}; + if (endOfVar == NULL || *endOfVar==' ') { - /* Remember piping is in action */ - WINE_TRACE("Output needs to be piped\n"); - piped = TRUE; + /* In batch program, missing terminator for % and no following + ':' just removes the '%' */ + if (context) { + s = WCMD_strdupW(start + 1); + strcpyW (start, s); + free(s); + return start; + } else { - /* Generate a unique temporary filename */ - GetTempPath (sizeof(temp_path)/sizeof(WCHAR), temp_path); - GetTempFileName (temp_path, cmdW, 0, (*cmdList)->nextcommand->pipeFile); - WINE_TRACE("Using temporary file of %s\n", - wine_dbgstr_w((*cmdList)->nextcommand->pipeFile)); + /* In command processing, just ignore it - allows command line + syntax like: for %i in (a.a) do echo %i */ + return start+1; + } } - /* Move copy of the command onto the heap so it can be expanded */ - new_cmd = HeapAlloc( GetProcessHeap(), 0, MAXSTRING * sizeof(WCHAR)); - if (!new_cmd) - { - WINE_ERR("Could not allocate memory for new_cmd\n"); - return; + /* If ':' found, process remaining up until '%' (or stop at ':' if + a missing '%' */ + if (*endOfVar==':') { + WCHAR *endOfVar2 = strchrW(endOfVar+1, '%'); + if (endOfVar2 != NULL) endOfVar = endOfVar2; } - strcpyW(new_cmd, command); - /* Move copy of the redirects onto the heap so it can be expanded */ - new_redir = HeapAlloc( GetProcessHeap(), 0, MAXSTRING * sizeof(WCHAR)); - if (!new_redir) - { - WINE_ERR("Could not allocate memory for new_redir\n"); - HeapFree( GetProcessHeap(), 0, new_cmd ); - return; - } + memcpy(thisVar, start, ((endOfVar - start) + 1) * sizeof(WCHAR)); + thisVar[(endOfVar - start)+1] = 0x00; + colonpos = strchrW(thisVar+1, ':'); - /* If piped output, send stdout to the pipe by appending >filename to redirects */ - if (piped) { - static const WCHAR redirOut[] = {'%','s',' ','>',' ','%','s','\0'}; - wsprintf (new_redir, redirOut, redirects, (*cmdList)->nextcommand->pipeFile); - WINE_TRACE("Redirects now %s\n", wine_dbgstr_w(new_redir)); - } else { - strcpyW(new_redir, redirects); + /* If there's complex substitution, just need %var% for now + to get the expanded data to play with */ + if (colonpos) { + *colonpos = '%'; + savedchar = *(colonpos+1); + *(colonpos+1) = 0x00; } - /* Expand variables in command line mode only (batch mode will - be expanded as the line is read in, except for 'for' loops) */ - handleExpansion(new_cmd, (context != NULL), forVariable, forValue); - handleExpansion(new_redir, (context != NULL), forVariable, forValue); - cmd = new_cmd; + WINE_TRACE("Retrieving contents of %s\n", wine_dbgstr_w(thisVar)); - /* Show prompt before batch line IF echo is on and in batch program */ - if (context && echo_mode && (cmd[0] != '@')) { - WCMD_show_prompt(); - WCMD_output_asis ( cmd); - WCMD_output_asis ( newline); - } + /* Expand to contents, if unchanged, return */ + /* Handle DATE, TIME, ERRORLEVEL and CD replacements allowing */ + /* override if existing env var called that name */ + if ((CompareString (LOCALE_USER_DEFAULT, + NORM_IGNORECASE | SORT_STRINGSORT, + thisVar, 12, ErrorLvlP, -1) == 2) && + (GetEnvironmentVariable(ErrorLvl, thisVarContents, 1) == 0) && + (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) { + static const WCHAR fmt[] = {'%','d','\0'}; + wsprintf(thisVarContents, fmt, errorlevel); + len = strlenW(thisVarContents); -/* - * Changing default drive has to be handled as a special case. - */ + } else if ((CompareString (LOCALE_USER_DEFAULT, + NORM_IGNORECASE | SORT_STRINGSORT, + thisVar, 6, DateP, -1) == 2) && + (GetEnvironmentVariable(Date, thisVarContents, 1) == 0) && + (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) { - if ((cmd[1] == ':') && IsCharAlpha (cmd[0]) && (strlenW(cmd) == 2)) { - WCHAR envvar[5]; - WCHAR dir[MAX_PATH]; + GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, + NULL, thisVarContents, MAXSTRING); + len = strlenW(thisVarContents); - /* According to MSDN CreateProcess docs, special env vars record - the current directory on each drive, in the form =C: - so see if one specified, and if so go back to it */ - strcpyW(envvar, equalsW); - strcatW(envvar, cmd); - if (GetEnvironmentVariable(envvar, dir, MAX_PATH) == 0) { - static const WCHAR fmt[] = {'%','s','\\','\0'}; - wsprintf(cmd, fmt, cmd); - WINE_TRACE("No special directory settings, using dir of %s\n", wine_dbgstr_w(cmd)); - } - WINE_TRACE("Got directory %s as %s\n", wine_dbgstr_w(envvar), wine_dbgstr_w(cmd)); - status = SetCurrentDirectory (cmd); - if (!status) WCMD_print_error (); - HeapFree( GetProcessHeap(), 0, cmd ); - HeapFree( GetProcessHeap(), 0, new_redir ); - return; - } + } else if ((CompareString (LOCALE_USER_DEFAULT, + NORM_IGNORECASE | SORT_STRINGSORT, + thisVar, 6, TimeP, -1) == 2) && + (GetEnvironmentVariable(Time, thisVarContents, 1) == 0) && + (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) { + GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, NULL, + NULL, thisVarContents, MAXSTRING); + len = strlenW(thisVarContents); - sa.nLength = sizeof(sa); - sa.lpSecurityDescriptor = NULL; - sa.bInheritHandle = TRUE; + } else if ((CompareString (LOCALE_USER_DEFAULT, + NORM_IGNORECASE | SORT_STRINGSORT, + thisVar, 4, CdP, -1) == 2) && + (GetEnvironmentVariable(Cd, thisVarContents, 1) == 0) && + (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) { + GetCurrentDirectory (MAXSTRING, thisVarContents); + len = strlenW(thisVarContents); -/* - * Redirect stdin, stdout and/or stderr if required. - */ + } else if ((CompareString (LOCALE_USER_DEFAULT, + NORM_IGNORECASE | SORT_STRINGSORT, + thisVar, 8, RandomP, -1) == 2) && + (GetEnvironmentVariable(Random, thisVarContents, 1) == 0) && + (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) { + static const WCHAR fmt[] = {'%','d','\0'}; + wsprintf(thisVarContents, fmt, rand() % 32768); + len = strlenW(thisVarContents); - /* STDIN could come from a preceding pipe, so delete on close if it does */ - if (cmdList && (*cmdList)->pipeFile[0] != 0x00) { - WINE_TRACE("Input coming from %s\n", wine_dbgstr_w((*cmdList)->pipeFile)); - h = CreateFile ((*cmdList)->pipeFile, GENERIC_READ, - FILE_SHARE_READ, &sa, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, NULL); - if (h == INVALID_HANDLE_VALUE) { - WCMD_print_error (); - HeapFree( GetProcessHeap(), 0, cmd ); - HeapFree( GetProcessHeap(), 0, new_redir ); - return; - } - old_stdhandles[0] = GetStdHandle (STD_INPUT_HANDLE); - SetStdHandle (STD_INPUT_HANDLE, h); + /* Look for a matching 'for' variable */ + } else if (forVar && + (CompareString (LOCALE_USER_DEFAULT, + SORT_STRINGSORT, + thisVar, + (colonpos - thisVar) - 1, + forVar, -1) == 2)) { + strcpyW(thisVarContents, forVal); + len = strlenW(thisVarContents); - /* No need to remember the temporary name any longer once opened */ - (*cmdList)->pipeFile[0] = 0x00; + } else { - /* Otherwise STDIN could come from a '<' redirect */ - } else if ((p = strchrW(new_redir,'<')) != NULL) { - h = CreateFile (WCMD_parameter (++p, 0, NULL), GENERIC_READ, FILE_SHARE_READ, &sa, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); - if (h == INVALID_HANDLE_VALUE) { - WCMD_print_error (); - HeapFree( GetProcessHeap(), 0, cmd ); - HeapFree( GetProcessHeap(), 0, new_redir ); - return; - } - old_stdhandles[0] = GetStdHandle (STD_INPUT_HANDLE); - SetStdHandle (STD_INPUT_HANDLE, h); + len = ExpandEnvironmentStrings(thisVar, thisVarContents, + sizeof(thisVarContents)/sizeof(WCHAR)); } - /* Scan the whole command looking for > and 2> */ - redir = new_redir; - while (redir != NULL && ((p = strchrW(redir,'>')) != NULL)) { - int handle = 0; + if (len == 0) + return endOfVar+1; - if (*(p-1)!='2') { - handle = 1; - } else { - handle = 2; - } + /* In a batch program, unknown env vars are replaced with nothing, + note syntax %garbage:1,3% results in anything after the ':' + except the % + From the command line, you just get back what you entered */ + if (lstrcmpiW(thisVar, thisVarContents) == 0) { - p++; - if ('>' == *p) { - creationDisposition = OPEN_ALWAYS; - p++; - } - else { - creationDisposition = CREATE_ALWAYS; + /* Restore the complex part after the compare */ + if (colonpos) { + *colonpos = ':'; + *(colonpos+1) = savedchar; } - /* Add support for 2>&1 */ - redir = p; - if (*p == '&') { - int idx = *(p+1) - '0'; + /* Command line - just ignore this */ + if (context == NULL) return endOfVar+1; - if (DuplicateHandle(GetCurrentProcess(), - GetStdHandle(idx_stdhandles[idx]), - GetCurrentProcess(), - &h, - 0, TRUE, DUPLICATE_SAME_ACCESS) == 0) { - WINE_FIXME("Duplicating handle failed with gle %d\n", GetLastError()); - } - WINE_TRACE("Redirect %d (%p) to %d (%p)\n", handle, GetStdHandle(idx_stdhandles[idx]), idx, h); + s = WCMD_strdupW(endOfVar + 1); + + /* Batch - replace unknown env var with nothing */ + if (colonpos == NULL) { + strcpyW (start, s); } else { - WCHAR *param = WCMD_parameter (p, 0, NULL); - h = CreateFile (param, GENERIC_WRITE, 0, &sa, creationDisposition, - FILE_ATTRIBUTE_NORMAL, NULL); - if (h == INVALID_HANDLE_VALUE) { - WCMD_print_error (); - HeapFree( GetProcessHeap(), 0, cmd ); - HeapFree( GetProcessHeap(), 0, new_redir ); - return; - } - if (SetFilePointer (h, 0, NULL, FILE_END) == - INVALID_SET_FILE_POINTER) { - WCMD_print_error (); + len = strlenW(thisVar); + thisVar[len-1] = 0x00; + /* If %:...% supplied, : is retained */ + if (colonpos == thisVar+1) { + strcpyW (start, colonpos); + } else { + strcpyW (start, colonpos+1); } - WINE_TRACE("Redirect %d to '%s' (%p)\n", handle, wine_dbgstr_w(param), h); + strcatW (start, s); } + free (s); + return start; - old_stdhandles[handle] = GetStdHandle (idx_stdhandles[handle]); - SetStdHandle (idx_stdhandles[handle], h); } -/* - * Strip leading whitespaces, and a '@' if supplied - */ - whichcmd = WCMD_strtrim_leading_spaces(cmd); - WINE_TRACE("Command: '%s'\n", wine_dbgstr_w(cmd)); - if (whichcmd[0] == '@') whichcmd++; + /* See if we need to do complex substitution (any ':'s), if not + then our work here is done */ + if (colonpos == NULL) { + s = WCMD_strdupW(endOfVar + 1); + strcpyW (start, thisVarContents); + strcatW (start, s); + free(s); + return start; + } -/* - * Check if the command entered is internal. If it is, pass the rest of the - * line down to the command. If not try to run a program. - */ + /* Restore complex bit */ + *colonpos = ':'; + *(colonpos+1) = savedchar; - count = 0; - while (IsCharAlphaNumeric(whichcmd[count])) { - count++; + /* + Handle complex substitutions: + xxx=yyy (replace xxx with yyy) + *xxx=yyy (replace up to and including xxx with yyy) + ~x (from x WCHARs in) + ~-x (from x WCHARs from the end) + ~x,y (from x WCHARs in for y WCHARacters) + ~x,-y (from x WCHARs in until y WCHARacters from the end) + */ + + /* ~ is substring manipulation */ + if (savedchar == '~') { + + int substrposition, substrlength = 0; + WCHAR *commapos = strchrW(colonpos+2, ','); + WCHAR *startCopy; + + substrposition = atolW(colonpos+2); + if (commapos) substrlength = atolW(commapos+1); + + s = WCMD_strdupW(endOfVar + 1); + + /* Check bounds */ + if (substrposition >= 0) { + startCopy = &thisVarContents[min(substrposition, len)]; + } else { + startCopy = &thisVarContents[max(0, len+substrposition-1)]; + } + + if (commapos == NULL) { + strcpyW (start, startCopy); /* Copy the lot */ + } else if (substrlength < 0) { + + int copybytes = (len+substrlength-1)-(startCopy-thisVarContents); + if (copybytes > len) copybytes = len; + else if (copybytes < 0) copybytes = 0; + memcpy (start, startCopy, copybytes * sizeof(WCHAR)); /* Copy the lot */ + start[copybytes] = 0x00; + } else { + memcpy (start, startCopy, substrlength * sizeof(WCHAR)); /* Copy the lot */ + start[substrlength] = 0x00; + } + + strcatW (start, s); + free(s); + return start; + + /* search and replace manipulation */ + } else { + WCHAR *equalspos = strstrW(colonpos, equalsW); + WCHAR *replacewith = equalspos+1; + WCHAR *found = NULL; + WCHAR *searchIn; + WCHAR *searchFor; + + s = WCMD_strdupW(endOfVar + 1); + if (equalspos == NULL) return start+1; + + /* Null terminate both strings */ + thisVar[strlenW(thisVar)-1] = 0x00; + *equalspos = 0x00; + + /* Since we need to be case insensitive, copy the 2 buffers */ + searchIn = WCMD_strdupW(thisVarContents); + CharUpperBuff(searchIn, strlenW(thisVarContents)); + searchFor = WCMD_strdupW(colonpos+1); + CharUpperBuff(searchFor, strlenW(colonpos+1)); + + + /* Handle wildcard case */ + if (*(colonpos+1) == '*') { + /* Search for string to replace */ + found = strstrW(searchIn, searchFor+1); + + if (found) { + /* Do replacement */ + strcpyW(start, replacewith); + strcatW(start, thisVarContents + (found-searchIn) + strlenW(searchFor+1)); + strcatW(start, s); + free(s); + } else { + /* Copy as it */ + strcpyW(start, thisVarContents); + strcatW(start, s); + } + + } else { + /* Loop replacing all instances */ + WCHAR *lastFound = searchIn; + WCHAR *outputposn = start; + + *start = 0x00; + while ((found = strstrW(lastFound, searchFor))) { + lstrcpynW(outputposn, + thisVarContents + (lastFound-searchIn), + (found - lastFound)+1); + outputposn = outputposn + (found - lastFound); + strcatW(outputposn, replacewith); + outputposn = outputposn + strlenW(replacewith); + lastFound = found + strlenW(searchFor); + } + strcatW(outputposn, + thisVarContents + (lastFound-searchIn)); + strcatW(outputposn, s); + } + free(searchIn); + free(searchFor); + return start; } - for (i=0; i<=WCMD_EXIT; i++) { - if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - whichcmd, count, inbuilt[i], -1) == 2) break; + return start+1; +} + +/***************************************************************************** + * Expand the command. Native expands lines from batch programs as they are + * read in and not again, except for 'for' variable substitution. + * eg. As evidence, "echo %1 && shift && echo %1" or "echo %%path%%" + */ +void handleExpansion(WCHAR *cmd, BOOL justFors, WCHAR *forVariable, WCHAR *forValue) { + + /* For commands in a context (batch program): */ + /* Expand environment variables in a batch file %{0-9} first */ + /* including support for any ~ modifiers */ + /* Additionally: */ + /* Expand the DATE, TIME, CD, RANDOM and ERRORLEVEL special */ + /* names allowing environment variable overrides */ + /* NOTE: To support the %PATH:xxx% syntax, also perform */ + /* manual expansion of environment variables here */ + + WCHAR *p = cmd; + WCHAR *s, *t; + int i; + + while ((p = strchrW(p, '%'))) { + + WINE_TRACE("Translate command:%s %d (at: %s)\n", + wine_dbgstr_w(cmd), justFors, wine_dbgstr_w(p)); + i = *(p+1) - '0'; + + /* Don't touch %% unless its in Batch */ + if (!justFors && *(p+1) == '%') { + if (context) { + s = WCMD_strdupW(p+1); + strcpyW (p, s); + free (s); + } + p+=1; + + /* Replace %~ modifications if in batch program */ + } else if (*(p+1) == '~') { + WCMD_HandleTildaModifiers(&p, forVariable, forValue, justFors); + p++; + + /* Replace use of %0...%9 if in batch program*/ + } else if (!justFors && context && (i >= 0) && (i <= 9)) { + s = WCMD_strdupW(p+2); + t = WCMD_parameter (context -> command, i + context -> shift_count[i], NULL); + strcpyW (p, t); + strcatW (p, s); + free (s); + + /* Replace use of %* if in batch program*/ + } else if (!justFors && context && *(p+1)=='*') { + WCHAR *startOfParms = NULL; + s = WCMD_strdupW(p+2); + t = WCMD_parameter (context -> command, 1, &startOfParms); + if (startOfParms != NULL) strcpyW (p, startOfParms); + else *p = 0x00; + strcatW (p, s); + free (s); + + } else if (forVariable && + (CompareString (LOCALE_USER_DEFAULT, + SORT_STRINGSORT, + p, + strlenW(forVariable), + forVariable, -1) == 2)) { + s = WCMD_strdupW(p + strlenW(forVariable)); + strcpyW(p, forValue); + strcatW(p, s); + free(s); + + } else if (!justFors) { + p = WCMD_expand_envvar(p, forVariable, forValue); + + /* In a FOR loop, see if this is the variable to replace */ + } else { /* Ignore %'s on second pass of batch program */ + p++; } - p = WCMD_strtrim_leading_spaces (&whichcmd[count]); - WCMD_parse (p, quals, param1, param2); - WINE_TRACE("param1: %s, param2: %s\n", wine_dbgstr_w(param1), wine_dbgstr_w(param2)); + } - switch (i) { + return; +} - case WCMD_ATTRIB: - WCMD_setshow_attrib (); - break; - case WCMD_CALL: - WCMD_call (p); - break; - case WCMD_CD: - case WCMD_CHDIR: - WCMD_setshow_default (p); - break; - case WCMD_CLS: - WCMD_clear_screen (); - break; - case WCMD_COPY: - WCMD_copy (); - break; - case WCMD_CTTY: - WCMD_change_tty (); - break; - case WCMD_DATE: - WCMD_setshow_date (); - break; - case WCMD_DEL: - case WCMD_ERASE: - WCMD_delete (p, TRUE); - break; - case WCMD_DIR: - WCMD_directory (p); - break; - case WCMD_ECHO: - WCMD_echo(&whichcmd[count]); - break; - case WCMD_FOR: - WCMD_for (p, cmdList); - break; - case WCMD_GOTO: - WCMD_goto (cmdList); - break; - case WCMD_HELP: - WCMD_give_help (p); - break; - case WCMD_IF: - WCMD_if (p, cmdList); - break; - case WCMD_LABEL: - WCMD_volume (1, p); - break; - case WCMD_MD: - case WCMD_MKDIR: - WCMD_create_dir (); - break; - case WCMD_MOVE: - WCMD_move (); - break; - case WCMD_PATH: - WCMD_setshow_path (p); - break; - case WCMD_PAUSE: - WCMD_pause (); - break; - case WCMD_PROMPT: - WCMD_setshow_prompt (); - break; - case WCMD_REM: - break; - case WCMD_REN: - case WCMD_RENAME: - WCMD_rename (); - break; - case WCMD_RD: - case WCMD_RMDIR: - WCMD_remove_dir (p); - break; - case WCMD_SETLOCAL: - WCMD_setlocal(p); - break; - case WCMD_ENDLOCAL: - WCMD_endlocal(); - break; - case WCMD_SET: - WCMD_setshow_env (p); + +/******************************************************************* + * WCMD_parse - parse a command into parameters and qualifiers. + * + * On exit, all qualifiers are concatenated into q, the first string + * not beginning with "/" is in p1 and the + * second in p2. Any subsequent non-qualifier strings are lost. + * Parameters in quotes are handled. + */ +void WCMD_parse (WCHAR *s, WCHAR *q, WCHAR *p1, WCHAR *p2) +{ + int p = 0; + + *q = *p1 = *p2 = '\0'; + while (TRUE) { + switch (*s) { + case '/': + *q++ = *s++; + while ((*s != '\0') && (*s != ' ') && *s != '/') { + *q++ = toupperW (*s++); + } + *q = '\0'; break; - case WCMD_SHIFT: - WCMD_shift (p); - break; - case WCMD_TIME: - WCMD_setshow_time (); - break; - case WCMD_TITLE: - if (strlenW(&whichcmd[count]) > 0) - WCMD_title(&whichcmd[count+1]); - break; - case WCMD_TYPE: - WCMD_type (p); + case ' ': + case '\t': + s++; break; - case WCMD_VER: - WCMD_version (); - break; - case WCMD_VERIFY: - WCMD_verify (p); - break; - case WCMD_VOL: - WCMD_volume (0, p); - break; - case WCMD_PUSHD: - WCMD_pushd(p); - break; - case WCMD_POPD: - WCMD_popd(); - break; - case WCMD_ASSOC: - WCMD_assoc(p, TRUE); - break; - case WCMD_COLOR: - WCMD_color(); - break; - case WCMD_FTYPE: - WCMD_assoc(p, FALSE); - break; - case WCMD_MORE: - WCMD_more(p); - break; - case WCMD_EXIT: - WCMD_exit (cmdList); - break; + case '"': + s++; + while ((*s != '\0') && (*s != '"')) { + if (p == 0) *p1++ = *s++; + else if (p == 1) *p2++ = *s++; + else s++; + } + if (p == 0) *p1 = '\0'; + if (p == 1) *p2 = '\0'; + p++; + if (*s == '"') s++; + break; + case '\0': + return; default: - WCMD_run_program (whichcmd, 0); - } - HeapFree( GetProcessHeap(), 0, cmd ); - HeapFree( GetProcessHeap(), 0, new_redir ); + while ((*s != '\0') && (*s != ' ') && (*s != '\t') + && (*s != '=') && (*s != ',') ) { + if (p == 0) *p1++ = *s++; + else if (p == 1) *p2++ = *s++; + else s++; + } + /* Skip concurrent parms */ + while ((*s == ' ') || (*s == '\t') || (*s == '=') || (*s == ',') ) s++; - /* Restore old handles */ - for (i=0; i<3; i++) { - if (old_stdhandles[i] != INVALID_HANDLE_VALUE) { - CloseHandle (GetStdHandle (idx_stdhandles[i])); - SetStdHandle (idx_stdhandles[i], old_stdhandles[i]); - } + if (p == 0) *p1 = '\0'; + if (p == 1) *p2 = '\0'; + p++; } + } } static void init_msvcrt_io_block(STARTUPINFO* st) @@ -1219,1294 +1205,1299 @@ void WCMD_run_program (WCHAR *command, int called) { } -/****************************************************************************** - * WCMD_show_prompt - * - * Display the prompt on STDout - * - */ - -void WCMD_show_prompt (void) { - - int status; - WCHAR out_string[MAX_PATH], curdir[MAX_PATH], prompt_string[MAX_PATH]; - WCHAR *p, *q; - DWORD len; - static const WCHAR envPrompt[] = {'P','R','O','M','P','T','\0'}; - - len = GetEnvironmentVariable (envPrompt, prompt_string, - sizeof(prompt_string)/sizeof(WCHAR)); - if ((len == 0) || (len >= (sizeof(prompt_string)/sizeof(WCHAR)))) { - const WCHAR dfltPrompt[] = {'$','P','$','G','\0'}; - strcpyW (prompt_string, dfltPrompt); - } - p = prompt_string; - q = out_string; - *q = '\0'; - while (*p != '\0') { - if (*p != '$') { - *q++ = *p++; - *q = '\0'; - } - else { - p++; - switch (toupper(*p)) { - case '$': - *q++ = '$'; - break; - case 'A': - *q++ = '&'; - break; - case 'B': - *q++ = '|'; - break; - case 'C': - *q++ = '('; - break; - case 'D': - GetDateFormat (LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, q, MAX_PATH); - while (*q) q++; - break; - case 'E': - *q++ = '\E'; - break; - case 'F': - *q++ = ')'; - break; - case 'G': - *q++ = '>'; - break; - case 'H': - *q++ = '\b'; - break; - case 'L': - *q++ = '<'; - break; - case 'N': - status = GetCurrentDirectory (sizeof(curdir)/sizeof(WCHAR), curdir); - if (status) { - *q++ = curdir[0]; - } - break; - case 'P': - status = GetCurrentDirectory (sizeof(curdir)/sizeof(WCHAR), curdir); - if (status) { - strcatW (q, curdir); - while (*q) q++; - } - break; - case 'Q': - *q++ = '='; - break; - case 'S': - *q++ = ' '; - break; - case 'T': - GetTimeFormat (LOCALE_USER_DEFAULT, 0, NULL, NULL, q, MAX_PATH); - while (*q) q++; - break; - case 'V': - strcatW (q, version_string); - while (*q) q++; - break; - case '_': - *q++ = '\n'; - break; - case '+': - if (pushd_directories) { - memset(q, '+', pushd_directories->u.stackdepth); - q = q + pushd_directories->u.stackdepth; - } - break; - } - p++; - *q = '\0'; - } - } - WCMD_output_asis (out_string); -} - -/**************************************************************************** - * WCMD_print_error - * - * Print the message for GetLastError - */ - -void WCMD_print_error (void) { - LPVOID lpMsgBuf; - DWORD error_code; - int status; - - error_code = GetLastError (); - status = FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, error_code, 0, (LPTSTR) &lpMsgBuf, 0, NULL); - if (!status) { - WINE_FIXME ("Cannot display message for error %d, status %d\n", - error_code, GetLastError()); - return; - } - - WCMD_output_asis_len(lpMsgBuf, lstrlen(lpMsgBuf), - GetStdHandle(STD_ERROR_HANDLE)); - LocalFree (lpMsgBuf); - WCMD_output_asis_len (newline, lstrlen(newline), - GetStdHandle(STD_ERROR_HANDLE)); - return; -} - -/******************************************************************* - * WCMD_parse - parse a command into parameters and qualifiers. - * - * On exit, all qualifiers are concatenated into q, the first string - * not beginning with "/" is in p1 and the - * second in p2. Any subsequent non-qualifier strings are lost. - * Parameters in quotes are handled. - */ - -void WCMD_parse (WCHAR *s, WCHAR *q, WCHAR *p1, WCHAR *p2) { - -int p = 0; - - *q = *p1 = *p2 = '\0'; - while (TRUE) { - switch (*s) { - case '/': - *q++ = *s++; - while ((*s != '\0') && (*s != ' ') && *s != '/') { - *q++ = toupperW (*s++); - } - *q = '\0'; - break; - case ' ': - case '\t': - s++; - break; - case '"': - s++; - while ((*s != '\0') && (*s != '"')) { - if (p == 0) *p1++ = *s++; - else if (p == 1) *p2++ = *s++; - else s++; - } - if (p == 0) *p1 = '\0'; - if (p == 1) *p2 = '\0'; - p++; - if (*s == '"') s++; - break; - case '\0': - return; - default: - while ((*s != '\0') && (*s != ' ') && (*s != '\t') - && (*s != '=') && (*s != ',') ) { - if (p == 0) *p1++ = *s++; - else if (p == 1) *p2++ = *s++; - else s++; - } - /* Skip concurrent parms */ - while ((*s == ' ') || (*s == '\t') || (*s == '=') || (*s == ',') ) s++; - - if (p == 0) *p1 = '\0'; - if (p == 1) *p2 = '\0'; - p++; - } - } -} - -/******************************************************************* - * WCMD_output_asis_len - send output to current standard output - * - * Output a formatted unicode string. Ideally this will go to the console - * and hence required WriteConsoleW to output it, however if file i/o is - * redirected, it needs to be WriteFile'd using OEM (not ANSI) format +/***************************************************************************** + * Process one command. If the command is EXIT this routine does not return. + * We will recurse through here executing batch files. */ -static void WCMD_output_asis_len(const WCHAR *message, int len, HANDLE device) { - - DWORD nOut= 0; - DWORD res = 0; +void WCMD_execute (WCHAR *command, WCHAR *redirects, + WCHAR *forVariable, WCHAR *forValue, + CMD_LIST **cmdList) +{ + WCHAR *cmd, *p, *redir; + int status, i; + DWORD count, creationDisposition; + HANDLE h; + WCHAR *whichcmd; + SECURITY_ATTRIBUTES sa; + WCHAR *new_cmd = NULL; + WCHAR *new_redir = NULL; + HANDLE old_stdhandles[3] = {INVALID_HANDLE_VALUE, + INVALID_HANDLE_VALUE, + INVALID_HANDLE_VALUE}; + DWORD idx_stdhandles[3] = {STD_INPUT_HANDLE, + STD_OUTPUT_HANDLE, + STD_ERROR_HANDLE}; + BOOL piped = FALSE; - /* If nothing to write, return (MORE does this sometimes) */ - if (!len) return; + WINE_TRACE("command on entry:%s (%p), with '%s'='%s'\n", + wine_dbgstr_w(command), cmdList, + wine_dbgstr_w(forVariable), wine_dbgstr_w(forValue)); - /* Try to write as unicode assuming it is to a console */ - res = WriteConsoleW(device, message, len, &nOut, NULL); + /* If the next command is a pipe then we implement pipes by redirecting + the output from this command to a temp file and input into the + next command from that temp file. + FIXME: Use of named pipes would make more sense here as currently this + process has to finish before the next one can start but this requires + a change to not wait for the first app to finish but rather the pipe */ + if (cmdList && (*cmdList)->nextcommand && + (*cmdList)->nextcommand->prevDelim == CMD_PIPE) { - /* If writing to console fails, assume its file - i/o so convert to OEM codepage and output */ - if (!res) { - BOOL usedDefaultChar = FALSE; - DWORD convertedChars; + WCHAR temp_path[MAX_PATH]; + static const WCHAR cmdW[] = {'C','M','D','\0'}; - if (!unicodePipes) { - /* - * Allocate buffer to use when writing to file. (Not freed, as one off) - */ - if (!output_bufA) output_bufA = HeapAlloc(GetProcessHeap(), 0, - MAX_WRITECONSOLE_SIZE); - if (!output_bufA) { - WINE_FIXME("Out of memory - could not allocate ansi 64K buffer\n"); - return; - } + /* Remember piping is in action */ + WINE_TRACE("Output needs to be piped\n"); + piped = TRUE; - /* Convert to OEM, then output */ - convertedChars = WideCharToMultiByte(GetConsoleOutputCP(), 0, message, - len, output_bufA, MAX_WRITECONSOLE_SIZE, - "?", &usedDefaultChar); - WriteFile(device, output_bufA, convertedChars, - &nOut, FALSE); - } else { - WriteFile(device, message, len*sizeof(WCHAR), - &nOut, FALSE); - } + /* Generate a unique temporary filename */ + GetTempPath (sizeof(temp_path)/sizeof(WCHAR), temp_path); + GetTempFileName (temp_path, cmdW, 0, (*cmdList)->nextcommand->pipeFile); + WINE_TRACE("Using temporary file of %s\n", + wine_dbgstr_w((*cmdList)->nextcommand->pipeFile)); } - return; -} -/******************************************************************* - * WCMD_output - send output to current standard output device. - * - */ + /* Move copy of the command onto the heap so it can be expanded */ + new_cmd = HeapAlloc( GetProcessHeap(), 0, MAXSTRING * sizeof(WCHAR)); + if (!new_cmd) + { + WINE_ERR("Could not allocate memory for new_cmd\n"); + return; + } + strcpyW(new_cmd, command); -void WCMD_output (const WCHAR *format, ...) { + /* Move copy of the redirects onto the heap so it can be expanded */ + new_redir = HeapAlloc( GetProcessHeap(), 0, MAXSTRING * sizeof(WCHAR)); + if (!new_redir) + { + WINE_ERR("Could not allocate memory for new_redir\n"); + HeapFree( GetProcessHeap(), 0, new_cmd ); + return; + } - va_list ap; - WCHAR string[1024]; - int ret; + /* If piped output, send stdout to the pipe by appending >filename to redirects */ + if (piped) { + static const WCHAR redirOut[] = {'%','s',' ','>',' ','%','s','\0'}; + wsprintf (new_redir, redirOut, redirects, (*cmdList)->nextcommand->pipeFile); + WINE_TRACE("Redirects now %s\n", wine_dbgstr_w(new_redir)); + } else { + strcpyW(new_redir, redirects); + } - va_start(ap,format); - ret = wvsprintf (string, format, ap); - if( ret >= (sizeof(string)/sizeof(WCHAR))) { - WINE_ERR("Output truncated in WCMD_output\n" ); - ret = (sizeof(string)/sizeof(WCHAR)) - 1; - string[ret] = '\0'; - } - va_end(ap); - WCMD_output_asis_len(string, ret, GetStdHandle(STD_OUTPUT_HANDLE)); -} + /* Expand variables in command line mode only (batch mode will + be expanded as the line is read in, except for 'for' loops) */ + handleExpansion(new_cmd, (context != NULL), forVariable, forValue); + handleExpansion(new_redir, (context != NULL), forVariable, forValue); + cmd = new_cmd; + /* Show prompt before batch line IF echo is on and in batch program */ + if (context && echo_mode && (cmd[0] != '@')) { + WCMD_show_prompt(); + WCMD_output_asis ( cmd); + WCMD_output_asis ( newline); + } -static int line_count; -static int max_height; -static int max_width; -static BOOL paged_mode; -static int numChars; +/* + * Changing default drive has to be handled as a special case. + */ -void WCMD_enter_paged_mode(const WCHAR *msg) -{ - CONSOLE_SCREEN_BUFFER_INFO consoleInfo; + if ((cmd[1] == ':') && IsCharAlpha (cmd[0]) && (strlenW(cmd) == 2)) { + WCHAR envvar[5]; + WCHAR dir[MAX_PATH]; - if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &consoleInfo)) { - max_height = consoleInfo.dwSize.Y; - max_width = consoleInfo.dwSize.X; - } else { - max_height = 25; - max_width = 80; - } - paged_mode = TRUE; - line_count = 0; - numChars = 0; - pagedMessage = (msg==NULL)? anykey : msg; -} + /* According to MSDN CreateProcess docs, special env vars record + the current directory on each drive, in the form =C: + so see if one specified, and if so go back to it */ + strcpyW(envvar, equalsW); + strcatW(envvar, cmd); + if (GetEnvironmentVariable(envvar, dir, MAX_PATH) == 0) { + static const WCHAR fmt[] = {'%','s','\\','\0'}; + wsprintf(cmd, fmt, cmd); + WINE_TRACE("No special directory settings, using dir of %s\n", wine_dbgstr_w(cmd)); + } + WINE_TRACE("Got directory %s as %s\n", wine_dbgstr_w(envvar), wine_dbgstr_w(cmd)); + status = SetCurrentDirectory (cmd); + if (!status) WCMD_print_error (); + HeapFree( GetProcessHeap(), 0, cmd ); + HeapFree( GetProcessHeap(), 0, new_redir ); + return; + } -void WCMD_leave_paged_mode(void) -{ - paged_mode = FALSE; - pagedMessage = NULL; -} + sa.nLength = sizeof(sa); + sa.lpSecurityDescriptor = NULL; + sa.bInheritHandle = TRUE; -/******************************************************************* - * WCMD_output_asis - send output to current standard output device. - * without formatting eg. when message contains '%' +/* + * Redirect stdin, stdout and/or stderr if required. */ -void WCMD_output_asis (const WCHAR *message) { - DWORD count; - const WCHAR* ptr; - WCHAR string[1024]; - - if (paged_mode) { - do { - ptr = message; - while (*ptr && *ptr!='\n' && (numChars < max_width)) { - numChars++; - ptr++; - }; - if (*ptr == '\n') ptr++; - WCMD_output_asis_len(message, (ptr) ? ptr - message : strlenW(message), - GetStdHandle(STD_OUTPUT_HANDLE)); - if (ptr) { - numChars = 0; - if (++line_count >= max_height - 1) { - line_count = 0; - WCMD_output_asis_len(pagedMessage, strlenW(pagedMessage), - GetStdHandle(STD_OUTPUT_HANDLE)); - WCMD_ReadFile (GetStdHandle(STD_INPUT_HANDLE), string, - sizeof(string)/sizeof(WCHAR), &count, NULL); + /* STDIN could come from a preceding pipe, so delete on close if it does */ + if (cmdList && (*cmdList)->pipeFile[0] != 0x00) { + WINE_TRACE("Input coming from %s\n", wine_dbgstr_w((*cmdList)->pipeFile)); + h = CreateFile ((*cmdList)->pipeFile, GENERIC_READ, + FILE_SHARE_READ, &sa, OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, NULL); + if (h == INVALID_HANDLE_VALUE) { + WCMD_print_error (); + HeapFree( GetProcessHeap(), 0, cmd ); + HeapFree( GetProcessHeap(), 0, new_redir ); + return; } - } - } while (((message = ptr) != NULL) && (*ptr)); - } else { - WCMD_output_asis_len(message, lstrlen(message), - GetStdHandle(STD_OUTPUT_HANDLE)); - } -} + old_stdhandles[0] = GetStdHandle (STD_INPUT_HANDLE); + SetStdHandle (STD_INPUT_HANDLE, h); + /* No need to remember the temporary name any longer once opened */ + (*cmdList)->pipeFile[0] = 0x00; -/*************************************************************************** - * WCMD_strtrim_leading_spaces - * - * Remove leading spaces from a string. Return a pointer to the first - * non-space character. Does not modify the input string - */ + /* Otherwise STDIN could come from a '<' redirect */ + } else if ((p = strchrW(new_redir,'<')) != NULL) { + h = CreateFile (WCMD_parameter (++p, 0, NULL), GENERIC_READ, FILE_SHARE_READ, &sa, OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, NULL); + if (h == INVALID_HANDLE_VALUE) { + WCMD_print_error (); + HeapFree( GetProcessHeap(), 0, cmd ); + HeapFree( GetProcessHeap(), 0, new_redir ); + return; + } + old_stdhandles[0] = GetStdHandle (STD_INPUT_HANDLE); + SetStdHandle (STD_INPUT_HANDLE, h); + } -WCHAR *WCMD_strtrim_leading_spaces (WCHAR *string) { + /* Scan the whole command looking for > and 2> */ + redir = new_redir; + while (redir != NULL && ((p = strchrW(redir,'>')) != NULL)) { + int handle = 0; - WCHAR *ptr; + if (*(p-1)!='2') { + handle = 1; + } else { + handle = 2; + } - ptr = string; - while (*ptr == ' ') ptr++; - return ptr; -} + p++; + if ('>' == *p) { + creationDisposition = OPEN_ALWAYS; + p++; + } + else { + creationDisposition = CREATE_ALWAYS; + } -/************************************************************************* - * WCMD_strtrim_trailing_spaces - * - * Remove trailing spaces from a string. This routine modifies the input - * string by placing a null after the last non-space WCHARacter - */ + /* Add support for 2>&1 */ + redir = p; + if (*p == '&') { + int idx = *(p+1) - '0'; -void WCMD_strtrim_trailing_spaces (WCHAR *string) { + if (DuplicateHandle(GetCurrentProcess(), + GetStdHandle(idx_stdhandles[idx]), + GetCurrentProcess(), + &h, + 0, TRUE, DUPLICATE_SAME_ACCESS) == 0) { + WINE_FIXME("Duplicating handle failed with gle %d\n", GetLastError()); + } + WINE_TRACE("Redirect %d (%p) to %d (%p)\n", handle, GetStdHandle(idx_stdhandles[idx]), idx, h); - WCHAR *ptr; + } else { + WCHAR *param = WCMD_parameter (p, 0, NULL); + h = CreateFile (param, GENERIC_WRITE, 0, &sa, creationDisposition, + FILE_ATTRIBUTE_NORMAL, NULL); + if (h == INVALID_HANDLE_VALUE) { + WCMD_print_error (); + HeapFree( GetProcessHeap(), 0, cmd ); + HeapFree( GetProcessHeap(), 0, new_redir ); + return; + } + if (SetFilePointer (h, 0, NULL, FILE_END) == + INVALID_SET_FILE_POINTER) { + WCMD_print_error (); + } + WINE_TRACE("Redirect %d to '%s' (%p)\n", handle, wine_dbgstr_w(param), h); + } - ptr = string + strlenW (string) - 1; - while ((*ptr == ' ') && (ptr >= string)) { - *ptr = '\0'; - ptr--; - } -} + old_stdhandles[handle] = GetStdHandle (idx_stdhandles[handle]); + SetStdHandle (idx_stdhandles[handle], h); + } -/************************************************************************* - * WCMD_opt_s_strip_quotes - * - * Remove first and last quote WCHARacters, preserving all other text +/* + * Strip leading whitespaces, and a '@' if supplied */ + whichcmd = WCMD_strtrim_leading_spaces(cmd); + WINE_TRACE("Command: '%s'\n", wine_dbgstr_w(cmd)); + if (whichcmd[0] == '@') whichcmd++; -void WCMD_opt_s_strip_quotes(WCHAR *cmd) { - WCHAR *src = cmd + 1, *dest = cmd, *lastq = NULL; - while((*dest=*src) != '\0') { - if (*src=='\"') - lastq=dest; - dest++, src++; - } - if (lastq) { - dest=lastq++; - while ((*dest++=*lastq++) != 0) - ; - } -} - -/************************************************************************* - * WCMD_expand_envvar - * - * Expands environment variables, allowing for WCHARacter substitution +/* + * Check if the command entered is internal. If it is, pass the rest of the + * line down to the command. If not try to run a program. */ -static WCHAR *WCMD_expand_envvar(WCHAR *start, WCHAR *forVar, WCHAR *forVal) { - WCHAR *endOfVar = NULL, *s; - WCHAR *colonpos = NULL; - WCHAR thisVar[MAXSTRING]; - WCHAR thisVarContents[MAXSTRING]; - WCHAR savedchar = 0x00; - int len; - - static const WCHAR ErrorLvl[] = {'E','R','R','O','R','L','E','V','E','L','\0'}; - static const WCHAR ErrorLvlP[] = {'%','E','R','R','O','R','L','E','V','E','L','%','\0'}; - static const WCHAR Date[] = {'D','A','T','E','\0'}; - static const WCHAR DateP[] = {'%','D','A','T','E','%','\0'}; - static const WCHAR Time[] = {'T','I','M','E','\0'}; - static const WCHAR TimeP[] = {'%','T','I','M','E','%','\0'}; - static const WCHAR Cd[] = {'C','D','\0'}; - static const WCHAR CdP[] = {'%','C','D','%','\0'}; - static const WCHAR Random[] = {'R','A','N','D','O','M','\0'}; - static const WCHAR RandomP[] = {'%','R','A','N','D','O','M','%','\0'}; - static const WCHAR Delims[] = {'%',' ',':','\0'}; - - WINE_TRACE("Expanding: %s (%s,%s)\n", wine_dbgstr_w(start), - wine_dbgstr_w(forVal), wine_dbgstr_w(forVar)); - /* Find the end of the environment variable, and extract name */ - endOfVar = strpbrkW(start+1, Delims); + count = 0; + while (IsCharAlphaNumeric(whichcmd[count])) { + count++; + } + for (i=0; i<=WCMD_EXIT; i++) { + if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + whichcmd, count, inbuilt[i], -1) == 2) break; + } + p = WCMD_strtrim_leading_spaces (&whichcmd[count]); + WCMD_parse (p, quals, param1, param2); + WINE_TRACE("param1: %s, param2: %s\n", wine_dbgstr_w(param1), wine_dbgstr_w(param2)); - if (endOfVar == NULL || *endOfVar==' ') { + switch (i) { - /* In batch program, missing terminator for % and no following - ':' just removes the '%' */ - if (context) { - s = WCMD_strdupW(start + 1); - strcpyW (start, s); - free(s); - return start; - } else { + case WCMD_ATTRIB: + WCMD_setshow_attrib (); + break; + case WCMD_CALL: + WCMD_call (p); + break; + case WCMD_CD: + case WCMD_CHDIR: + WCMD_setshow_default (p); + break; + case WCMD_CLS: + WCMD_clear_screen (); + break; + case WCMD_COPY: + WCMD_copy (); + break; + case WCMD_CTTY: + WCMD_change_tty (); + break; + case WCMD_DATE: + WCMD_setshow_date (); + break; + case WCMD_DEL: + case WCMD_ERASE: + WCMD_delete (p, TRUE); + break; + case WCMD_DIR: + WCMD_directory (p); + break; + case WCMD_ECHO: + WCMD_echo(&whichcmd[count]); + break; + case WCMD_FOR: + WCMD_for (p, cmdList); + break; + case WCMD_GOTO: + WCMD_goto (cmdList); + break; + case WCMD_HELP: + WCMD_give_help (p); + break; + case WCMD_IF: + WCMD_if (p, cmdList); + break; + case WCMD_LABEL: + WCMD_volume (1, p); + break; + case WCMD_MD: + case WCMD_MKDIR: + WCMD_create_dir (); + break; + case WCMD_MOVE: + WCMD_move (); + break; + case WCMD_PATH: + WCMD_setshow_path (p); + break; + case WCMD_PAUSE: + WCMD_pause (); + break; + case WCMD_PROMPT: + WCMD_setshow_prompt (); + break; + case WCMD_REM: + break; + case WCMD_REN: + case WCMD_RENAME: + WCMD_rename (); + break; + case WCMD_RD: + case WCMD_RMDIR: + WCMD_remove_dir (p); + break; + case WCMD_SETLOCAL: + WCMD_setlocal(p); + break; + case WCMD_ENDLOCAL: + WCMD_endlocal(); + break; + case WCMD_SET: + WCMD_setshow_env (p); + break; + case WCMD_SHIFT: + WCMD_shift (p); + break; + case WCMD_TIME: + WCMD_setshow_time (); + break; + case WCMD_TITLE: + if (strlenW(&whichcmd[count]) > 0) + WCMD_title(&whichcmd[count+1]); + break; + case WCMD_TYPE: + WCMD_type (p); + break; + case WCMD_VER: + WCMD_version (); + break; + case WCMD_VERIFY: + WCMD_verify (p); + break; + case WCMD_VOL: + WCMD_volume (0, p); + break; + case WCMD_PUSHD: + WCMD_pushd(p); + break; + case WCMD_POPD: + WCMD_popd(); + break; + case WCMD_ASSOC: + WCMD_assoc(p, TRUE); + break; + case WCMD_COLOR: + WCMD_color(); + break; + case WCMD_FTYPE: + WCMD_assoc(p, FALSE); + break; + case WCMD_MORE: + WCMD_more(p); + break; + case WCMD_EXIT: + WCMD_exit (cmdList); + break; + default: + WCMD_run_program (whichcmd, 0); + } + HeapFree( GetProcessHeap(), 0, cmd ); + HeapFree( GetProcessHeap(), 0, new_redir ); - /* In command processing, just ignore it - allows command line - syntax like: for %i in (a.a) do echo %i */ - return start+1; + /* Restore old handles */ + for (i=0; i<3; i++) { + if (old_stdhandles[i] != INVALID_HANDLE_VALUE) { + CloseHandle (GetStdHandle (idx_stdhandles[i])); + SetStdHandle (idx_stdhandles[i], old_stdhandles[i]); } } +} +/************************************************************************* + * WCMD_LoadMessage + * Load a string from the resource file, handling any error + * Returns string retrieved from resource file + */ +WCHAR *WCMD_LoadMessage(UINT id) { + static WCHAR msg[2048]; + static const WCHAR failedMsg[] = {'F','a','i','l','e','d','!','\0'}; - /* If ':' found, process remaining up until '%' (or stop at ':' if - a missing '%' */ - if (*endOfVar==':') { - WCHAR *endOfVar2 = strchrW(endOfVar+1, '%'); - if (endOfVar2 != NULL) endOfVar = endOfVar2; + if (!LoadString(GetModuleHandle(NULL), id, msg, sizeof(msg)/sizeof(WCHAR))) { + WINE_FIXME("LoadString failed with %d\n", GetLastError()); + strcpyW(msg, failedMsg); } + return msg; +} - memcpy(thisVar, start, ((endOfVar - start) + 1) * sizeof(WCHAR)); - thisVar[(endOfVar - start)+1] = 0x00; - colonpos = strchrW(thisVar+1, ':'); +/*************************************************************************** + * WCMD_DumpCommands + * + * Dumps out the parsed command line to ensure syntax is correct + */ +static void WCMD_DumpCommands(CMD_LIST *commands) { + WCHAR buffer[MAXSTRING]; + CMD_LIST *thisCmd = commands; + const WCHAR fmt[] = {'%','p',' ','%','d',' ','%','2','.','2','d',' ', + '%','p',' ','%','s',' ','R','e','d','i','r',':', + '%','s','\0'}; - /* If there's complex substitution, just need %var% for now - to get the expanded data to play with */ - if (colonpos) { - *colonpos = '%'; - savedchar = *(colonpos+1); - *(colonpos+1) = 0x00; + WINE_TRACE("Parsed line:\n"); + while (thisCmd != NULL) { + sprintfW(buffer, fmt, + thisCmd, + thisCmd->prevDelim, + thisCmd->bracketDepth, + thisCmd->nextcommand, + thisCmd->command, + thisCmd->redirects); + WINE_TRACE("%s\n", wine_dbgstr_w(buffer)); + thisCmd = thisCmd->nextcommand; } +} - WINE_TRACE("Retrieving contents of %s\n", wine_dbgstr_w(thisVar)); - - /* Expand to contents, if unchanged, return */ - /* Handle DATE, TIME, ERRORLEVEL and CD replacements allowing */ - /* override if existing env var called that name */ - if ((CompareString (LOCALE_USER_DEFAULT, - NORM_IGNORECASE | SORT_STRINGSORT, - thisVar, 12, ErrorLvlP, -1) == 2) && - (GetEnvironmentVariable(ErrorLvl, thisVarContents, 1) == 0) && - (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) { - static const WCHAR fmt[] = {'%','d','\0'}; - wsprintf(thisVarContents, fmt, errorlevel); - len = strlenW(thisVarContents); - - } else if ((CompareString (LOCALE_USER_DEFAULT, - NORM_IGNORECASE | SORT_STRINGSORT, - thisVar, 6, DateP, -1) == 2) && - (GetEnvironmentVariable(Date, thisVarContents, 1) == 0) && - (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) { +/*************************************************************************** + * WCMD_addCommand + * + * Adds a command to the current command list + */ +void WCMD_addCommand(WCHAR *command, int *commandLen, + WCHAR *redirs, int *redirLen, + WCHAR **copyTo, int **copyToLen, + CMD_DELIMITERS prevDelim, int curDepth, + CMD_LIST **lastEntry, CMD_LIST **output) { - GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, - NULL, thisVarContents, MAXSTRING); - len = strlenW(thisVarContents); + CMD_LIST *thisEntry = NULL; - } else if ((CompareString (LOCALE_USER_DEFAULT, - NORM_IGNORECASE | SORT_STRINGSORT, - thisVar, 6, TimeP, -1) == 2) && - (GetEnvironmentVariable(Time, thisVarContents, 1) == 0) && - (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) { - GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, NULL, - NULL, thisVarContents, MAXSTRING); - len = strlenW(thisVarContents); + /* Allocate storage for command */ + thisEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(CMD_LIST)); - } else if ((CompareString (LOCALE_USER_DEFAULT, - NORM_IGNORECASE | SORT_STRINGSORT, - thisVar, 4, CdP, -1) == 2) && - (GetEnvironmentVariable(Cd, thisVarContents, 1) == 0) && - (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) { - GetCurrentDirectory (MAXSTRING, thisVarContents); - len = strlenW(thisVarContents); + /* Copy in the command */ + if (command) { + thisEntry->command = HeapAlloc(GetProcessHeap(), 0, + (*commandLen+1) * sizeof(WCHAR)); + memcpy(thisEntry->command, command, *commandLen * sizeof(WCHAR)); + thisEntry->command[*commandLen] = 0x00; - } else if ((CompareString (LOCALE_USER_DEFAULT, - NORM_IGNORECASE | SORT_STRINGSORT, - thisVar, 8, RandomP, -1) == 2) && - (GetEnvironmentVariable(Random, thisVarContents, 1) == 0) && - (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) { - static const WCHAR fmt[] = {'%','d','\0'}; - wsprintf(thisVarContents, fmt, rand() % 32768); - len = strlenW(thisVarContents); + /* Copy in the redirects */ + thisEntry->redirects = HeapAlloc(GetProcessHeap(), 0, + (*redirLen+1) * sizeof(WCHAR)); + memcpy(thisEntry->redirects, redirs, *redirLen * sizeof(WCHAR)); + thisEntry->redirects[*redirLen] = 0x00; + thisEntry->pipeFile[0] = 0x00; - /* Look for a matching 'for' variable */ - } else if (forVar && - (CompareString (LOCALE_USER_DEFAULT, - SORT_STRINGSORT, - thisVar, - (colonpos - thisVar) - 1, - forVar, -1) == 2)) { - strcpyW(thisVarContents, forVal); - len = strlenW(thisVarContents); + /* Reset the lengths */ + *commandLen = 0; + *redirLen = 0; + *copyToLen = commandLen; + *copyTo = command; } else { - - len = ExpandEnvironmentStrings(thisVar, thisVarContents, - sizeof(thisVarContents)/sizeof(WCHAR)); + thisEntry->command = NULL; } - if (len == 0) - return endOfVar+1; - - /* In a batch program, unknown env vars are replaced with nothing, - note syntax %garbage:1,3% results in anything after the ':' - except the % - From the command line, you just get back what you entered */ - if (lstrcmpiW(thisVar, thisVarContents) == 0) { - - /* Restore the complex part after the compare */ - if (colonpos) { - *colonpos = ':'; - *(colonpos+1) = savedchar; - } - - /* Command line - just ignore this */ - if (context == NULL) return endOfVar+1; - - s = WCMD_strdupW(endOfVar + 1); + /* Fill in other fields */ + thisEntry->nextcommand = NULL; + thisEntry->prevDelim = prevDelim; + thisEntry->bracketDepth = curDepth; + if (*lastEntry) { + (*lastEntry)->nextcommand = thisEntry; + } else { + *output = thisEntry; + } + *lastEntry = thisEntry; +} - /* Batch - replace unknown env var with nothing */ - if (colonpos == NULL) { - strcpyW (start, s); +/*************************************************************************** + * WCMD_ReadAndParseLine + * + * Either uses supplied input or + * Reads a file from the handle, and then... + * Parse the text buffer, spliting into separate commands + * - unquoted && strings split 2 commands but the 2nd is flagged as + * following an && + * - ( as the first character just ups the bracket depth + * - unquoted ) when bracket depth > 0 terminates a bracket and + * adds a CMD_LIST structure with null command + * - Anything else gets put into the command string (including + * redirects) + */ +WCHAR *WCMD_ReadAndParseLine(WCHAR *optionalcmd, CMD_LIST **output, HANDLE readFrom) { - } else { - len = strlenW(thisVar); - thisVar[len-1] = 0x00; - /* If %:...% supplied, : is retained */ - if (colonpos == thisVar+1) { - strcpyW (start, colonpos); - } else { - strcpyW (start, colonpos+1); - } - strcatW (start, s); - } - free (s); - return start; + WCHAR *curPos; + BOOL inQuotes = FALSE; + WCHAR curString[MAXSTRING]; + int curStringLen = 0; + WCHAR curRedirs[MAXSTRING]; + int curRedirsLen = 0; + WCHAR *curCopyTo; + int *curLen; + int curDepth = 0; + CMD_LIST *lastEntry = NULL; + CMD_DELIMITERS prevDelim = CMD_NONE; + static WCHAR *extraSpace = NULL; /* Deliberately never freed */ + const WCHAR remCmd[] = {'r','e','m',' ','\0'}; + const WCHAR forCmd[] = {'f','o','r',' ','\0'}; + const WCHAR ifCmd[] = {'i','f',' ','\0'}; + const WCHAR ifElse[] = {'e','l','s','e',' ','\0'}; + BOOL inRem = FALSE; + BOOL inFor = FALSE; + BOOL inIn = FALSE; + BOOL inIf = FALSE; + BOOL inElse= FALSE; + BOOL onlyWhiteSpace = FALSE; + BOOL lastWasWhiteSpace = FALSE; + BOOL lastWasDo = FALSE; + BOOL lastWasIn = FALSE; + BOOL lastWasElse = FALSE; + BOOL lastWasRedirect = TRUE; + /* Allocate working space for a command read from keyboard, file etc */ + if (!extraSpace) + extraSpace = HeapAlloc(GetProcessHeap(), 0, (MAXSTRING+1) * sizeof(WCHAR)); + if (!extraSpace) + { + WINE_ERR("Could not allocate memory for extraSpace\n"); + return NULL; } - /* See if we need to do complex substitution (any ':'s), if not - then our work here is done */ - if (colonpos == NULL) { - s = WCMD_strdupW(endOfVar + 1); - strcpyW (start, thisVarContents); - strcatW (start, s); - free(s); - return start; + /* If initial command read in, use that, otherwise get input from handle */ + if (optionalcmd != NULL) { + strcpyW(extraSpace, optionalcmd); + } else if (readFrom == INVALID_HANDLE_VALUE) { + WINE_FIXME("No command nor handle supplied\n"); + } else { + if (WCMD_fgets(extraSpace, MAXSTRING, readFrom) == NULL) return NULL; } + curPos = extraSpace; - /* Restore complex bit */ - *colonpos = ':'; - *(colonpos+1) = savedchar; + /* Handle truncated input - issue warning */ + if (strlenW(extraSpace) == MAXSTRING -1) { + WCMD_output_asis(WCMD_LoadMessage(WCMD_TRUNCATEDLINE)); + WCMD_output_asis(extraSpace); + WCMD_output_asis(newline); + } - /* - Handle complex substitutions: - xxx=yyy (replace xxx with yyy) - *xxx=yyy (replace up to and including xxx with yyy) - ~x (from x WCHARs in) - ~-x (from x WCHARs from the end) - ~x,y (from x WCHARs in for y WCHARacters) - ~x,-y (from x WCHARs in until y WCHARacters from the end) - */ + /* Replace env vars if in a batch context */ + if (context) handleExpansion(extraSpace, FALSE, NULL, NULL); - /* ~ is substring manipulation */ - if (savedchar == '~') { + /* Start with an empty string, copying to the command string */ + curStringLen = 0; + curRedirsLen = 0; + curCopyTo = curString; + curLen = &curStringLen; + lastWasRedirect = FALSE; /* Required for eg spaces between > and filename */ - int substrposition, substrlength = 0; - WCHAR *commapos = strchrW(colonpos+2, ','); - WCHAR *startCopy; + /* Parse every character on the line being processed */ + while (*curPos != 0x00) { - substrposition = atolW(colonpos+2); - if (commapos) substrlength = atolW(commapos+1); + WCHAR thisChar; - s = WCMD_strdupW(endOfVar + 1); + /* Debugging AID: + WINE_TRACE("Looking at '%c' (len:%d, lws:%d, ows:%d)\n", *curPos, *curLen, + lastWasWhiteSpace, onlyWhiteSpace); + */ - /* Check bounds */ - if (substrposition >= 0) { - startCopy = &thisVarContents[min(substrposition, len)]; - } else { - startCopy = &thisVarContents[max(0, len+substrposition-1)]; - } + /* Certain commands need special handling */ + if (curStringLen == 0 && curCopyTo == curString) { + const WCHAR forDO[] = {'d','o',' ','\0'}; - if (commapos == NULL) { - strcpyW (start, startCopy); /* Copy the lot */ - } else if (substrlength < 0) { + /* If command starts with 'rem', ignore any &&, ( etc */ + if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + curPos, 4, remCmd, -1) == 2) { + inRem = TRUE; - int copybytes = (len+substrlength-1)-(startCopy-thisVarContents); - if (copybytes > len) copybytes = len; - else if (copybytes < 0) copybytes = 0; - memcpy (start, startCopy, copybytes * sizeof(WCHAR)); /* Copy the lot */ - start[copybytes] = 0x00; - } else { - memcpy (start, startCopy, substrlength * sizeof(WCHAR)); /* Copy the lot */ - start[substrlength] = 0x00; - } + /* If command starts with 'for', handle ('s mid line after IN or DO */ + } else if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + curPos, 4, forCmd, -1) == 2) { + inFor = TRUE; - strcatW (start, s); - free(s); - return start; + /* If command starts with 'if' or 'else', handle ('s mid line. We should ensure this + is only true in the command portion of the IF statement, but this + should suffice for now + FIXME: Silly syntax like "if 1(==1( ( + echo they equal + )" will be parsed wrong */ + } else if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + curPos, 3, ifCmd, -1) == 2) { + inIf = TRUE; - /* search and replace manipulation */ - } else { - WCHAR *equalspos = strstrW(colonpos, equalsW); - WCHAR *replacewith = equalspos+1; - WCHAR *found = NULL; - WCHAR *searchIn; - WCHAR *searchFor; + } else if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + curPos, 5, ifElse, -1) == 2) { + inElse = TRUE; + lastWasElse = TRUE; + onlyWhiteSpace = TRUE; + memcpy(&curCopyTo[*curLen], curPos, 5*sizeof(WCHAR)); + (*curLen)+=5; + curPos+=5; + continue; - s = WCMD_strdupW(endOfVar + 1); - if (equalspos == NULL) return start+1; + /* In a for loop, the DO command will follow a close bracket followed by + whitespace, followed by DO, ie closeBracket inserts a NULL entry, curLen + is then 0, and all whitespace is skipped */ + } else if (inFor && + (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + curPos, 3, forDO, -1) == 2)) { + WINE_TRACE("Found DO\n"); + lastWasDo = TRUE; + onlyWhiteSpace = TRUE; + memcpy(&curCopyTo[*curLen], curPos, 3*sizeof(WCHAR)); + (*curLen)+=3; + curPos+=3; + continue; + } + } else if (curCopyTo == curString) { - /* Null terminate both strings */ - thisVar[strlenW(thisVar)-1] = 0x00; - *equalspos = 0x00; + /* Special handling for the 'FOR' command */ + if (inFor && lastWasWhiteSpace) { + const WCHAR forIN[] = {'i','n',' ','\0'}; - /* Since we need to be case insensitive, copy the 2 buffers */ - searchIn = WCMD_strdupW(thisVarContents); - CharUpperBuff(searchIn, strlenW(thisVarContents)); - searchFor = WCMD_strdupW(colonpos+1); - CharUpperBuff(searchFor, strlenW(colonpos+1)); + WINE_TRACE("Found 'FOR', comparing next parm: '%s'\n", wine_dbgstr_w(curPos)); + if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + curPos, 3, forIN, -1) == 2) { + WINE_TRACE("Found IN\n"); + lastWasIn = TRUE; + onlyWhiteSpace = TRUE; + memcpy(&curCopyTo[*curLen], curPos, 3*sizeof(WCHAR)); + (*curLen)+=3; + curPos+=3; + continue; + } + } + } - /* Handle wildcard case */ - if (*(colonpos+1) == '*') { - /* Search for string to replace */ - found = strstrW(searchIn, searchFor+1); + /* Nothing 'ends' a REM statement and &&, quotes etc are ineffective, + so just use the default processing ie skip character specific + matching below */ + if (!inRem) thisChar = *curPos; + else thisChar = 'X'; /* Character with no special processing */ - if (found) { - /* Do replacement */ - strcpyW(start, replacewith); - strcatW(start, thisVarContents + (found-searchIn) + strlenW(searchFor+1)); - strcatW(start, s); - free(s); - } else { - /* Copy as it */ - strcpyW(start, thisVarContents); - strcatW(start, s); - } + lastWasWhiteSpace = FALSE; /* Will be reset below */ - } else { - /* Loop replacing all instances */ - WCHAR *lastFound = searchIn; - WCHAR *outputposn = start; + switch (thisChar) { - *start = 0x00; - while ((found = strstrW(lastFound, searchFor))) { - lstrcpynW(outputposn, - thisVarContents + (lastFound-searchIn), - (found - lastFound)+1); - outputposn = outputposn + (found - lastFound); - strcatW(outputposn, replacewith); - outputposn = outputposn + strlenW(replacewith); - lastFound = found + strlenW(searchFor); - } - strcatW(outputposn, - thisVarContents + (lastFound-searchIn)); - strcatW(outputposn, s); - } - free(searchIn); - free(searchFor); - return start; - } - return start+1; -} + case '=': /* drop through - ignore token delimiters at the start of a command */ + case ',': /* drop through - ignore token delimiters at the start of a command */ + case '\t':/* drop through - ignore token delimiters at the start of a command */ + case ' ': + /* If a redirect in place, it ends here */ + if (!inQuotes && !lastWasRedirect) { -/************************************************************************* - * WCMD_LoadMessage - * Load a string from the resource file, handling any error - * Returns string retrieved from resource file - */ -WCHAR *WCMD_LoadMessage(UINT id) { - static WCHAR msg[2048]; - static const WCHAR failedMsg[] = {'F','a','i','l','e','d','!','\0'}; + /* If finishing off a redirect, add a whitespace delimiter */ + if (curCopyTo == curRedirs) { + curCopyTo[(*curLen)++] = ' '; + } + curCopyTo = curString; + curLen = &curStringLen; + } + if (*curLen > 0) { + curCopyTo[(*curLen)++] = *curPos; + } - if (!LoadString(GetModuleHandle(NULL), id, msg, sizeof(msg)/sizeof(WCHAR))) { - WINE_FIXME("LoadString failed with %d\n", GetLastError()); - strcpyW(msg, failedMsg); - } - return msg; -} + /* Remember just processed whitespace */ + lastWasWhiteSpace = TRUE; -/************************************************************************* - * WCMD_strdupW - * A wide version of strdup as its missing from unicode.h - */ -WCHAR *WCMD_strdupW(WCHAR *input) { - int len=strlenW(input)+1; - /* Note: Use malloc not HeapAlloc to emulate strdup */ - WCHAR *result = malloc(len * sizeof(WCHAR)); - memcpy(result, input, len * sizeof(WCHAR)); - return result; -} + break; -/*************************************************************************** - * WCMD_Readfile - * - * Read characters in from a console/file, returning result in Unicode - * with signature identical to ReadFile - */ -BOOL WCMD_ReadFile(const HANDLE hIn, WCHAR *intoBuf, const DWORD maxChars, - LPDWORD charsRead, const LPOVERLAPPED unused) { + case '>': /* drop through - handle redirect chars the same */ + case '<': + /* Make a redirect start here */ + if (!inQuotes) { + curCopyTo = curRedirs; + curLen = &curRedirsLen; + lastWasRedirect = TRUE; + } - BOOL res; + /* See if 1>, 2> etc, in which case we have some patching up + to do */ + if (curPos != extraSpace && + *(curPos-1)>='1' && *(curPos-1)<='9') { - /* Try to read from console as Unicode */ - res = ReadConsoleW(hIn, intoBuf, maxChars, charsRead, NULL); + curStringLen--; + curString[curStringLen] = 0x00; + curCopyTo[(*curLen)++] = *(curPos-1); + } - /* If reading from console has failed we assume its file - i/o so read in and convert from OEM codepage */ - if (!res) { + curCopyTo[(*curLen)++] = *curPos; + break; - DWORD numRead; - /* - * Allocate buffer to use when reading from file. Not freed - */ - if (!output_bufA) output_bufA = HeapAlloc(GetProcessHeap(), 0, - MAX_WRITECONSOLE_SIZE); - if (!output_bufA) { - WINE_FIXME("Out of memory - could not allocate ansi 64K buffer\n"); - return 0; - } + case '|': /* Pipe character only if not || */ + if (!inQuotes) { + lastWasRedirect = FALSE; - /* Read from file (assume OEM codepage) */ - res = ReadFile(hIn, output_bufA, maxChars, &numRead, unused); + /* Add an entry to the command list */ + if (curStringLen > 0) { - /* Convert from OEM */ - *charsRead = MultiByteToWideChar(GetConsoleCP(), 0, output_bufA, numRead, - intoBuf, maxChars); + /* Add the current command */ + WCMD_addCommand(curString, &curStringLen, + curRedirs, &curRedirsLen, + &curCopyTo, &curLen, + prevDelim, curDepth, + &lastEntry, output); - } - return res; -} + } -/*************************************************************************** - * WCMD_DumpCommands - * - * Dumps out the parsed command line to ensure syntax is correct - */ -static void WCMD_DumpCommands(CMD_LIST *commands) { - WCHAR buffer[MAXSTRING]; - CMD_LIST *thisCmd = commands; - const WCHAR fmt[] = {'%','p',' ','%','d',' ','%','2','.','2','d',' ', - '%','p',' ','%','s',' ','R','e','d','i','r',':', - '%','s','\0'}; + if (*(curPos+1) == '|') { + curPos++; /* Skip other | */ + prevDelim = CMD_ONFAILURE; + } else { + prevDelim = CMD_PIPE; + } + } else { + curCopyTo[(*curLen)++] = *curPos; + } + break; - WINE_TRACE("Parsed line:\n"); - while (thisCmd != NULL) { - sprintfW(buffer, fmt, - thisCmd, - thisCmd->prevDelim, - thisCmd->bracketDepth, - thisCmd->nextcommand, - thisCmd->command, - thisCmd->redirects); - WINE_TRACE("%s\n", wine_dbgstr_w(buffer)); - thisCmd = thisCmd->nextcommand; - } -} + case '"': inQuotes = !inQuotes; + curCopyTo[(*curLen)++] = *curPos; + lastWasRedirect = FALSE; + break; -/*************************************************************************** - * WCMD_addCommand - * - * Adds a command to the current command list - */ -void WCMD_addCommand(WCHAR *command, int *commandLen, - WCHAR *redirs, int *redirLen, - WCHAR **copyTo, int **copyToLen, - CMD_DELIMITERS prevDelim, int curDepth, - CMD_LIST **lastEntry, CMD_LIST **output) { + case '(': /* If a '(' is the first non whitespace in a command portion + ie start of line or just after &&, then we read until an + unquoted ) is found */ + WINE_TRACE("Found '(' conditions: curLen(%d), inQ(%d), onlyWS(%d)" + ", for(%d, In:%d, Do:%d)" + ", if(%d, else:%d, lwe:%d)\n", + *curLen, inQuotes, + onlyWhiteSpace, + inFor, lastWasIn, lastWasDo, + inIf, inElse, lastWasElse); + lastWasRedirect = FALSE; - CMD_LIST *thisEntry = NULL; + /* Ignore open brackets inside the for set */ + if (*curLen == 0 && !inIn) { + curDepth++; - /* Allocate storage for command */ - thisEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(CMD_LIST)); + /* If in quotes, ignore brackets */ + } else if (inQuotes) { + curCopyTo[(*curLen)++] = *curPos; - /* Copy in the command */ - if (command) { - thisEntry->command = HeapAlloc(GetProcessHeap(), 0, - (*commandLen+1) * sizeof(WCHAR)); - memcpy(thisEntry->command, command, *commandLen * sizeof(WCHAR)); - thisEntry->command[*commandLen] = 0x00; + /* In a FOR loop, an unquoted '(' may occur straight after + IN or DO + In an IF statement just handle it regardless as we don't + parse the operands + In an ELSE statement, only allow it straight away after + the ELSE and whitespace + */ + } else if (inIf || + (inElse && lastWasElse && onlyWhiteSpace) || + (inFor && (lastWasIn || lastWasDo) && onlyWhiteSpace)) { - /* Copy in the redirects */ - thisEntry->redirects = HeapAlloc(GetProcessHeap(), 0, - (*redirLen+1) * sizeof(WCHAR)); - memcpy(thisEntry->redirects, redirs, *redirLen * sizeof(WCHAR)); - thisEntry->redirects[*redirLen] = 0x00; - thisEntry->pipeFile[0] = 0x00; + /* If entering into an 'IN', set inIn */ + if (inFor && lastWasIn && onlyWhiteSpace) { + WINE_TRACE("Inside an IN\n"); + inIn = TRUE; + } - /* Reset the lengths */ - *commandLen = 0; - *redirLen = 0; - *copyToLen = commandLen; - *copyTo = command; + /* Add the current command */ + WCMD_addCommand(curString, &curStringLen, + curRedirs, &curRedirsLen, + &curCopyTo, &curLen, + prevDelim, curDepth, + &lastEntry, output); - } else { - thisEntry->command = NULL; - } + curDepth++; + } else { + curCopyTo[(*curLen)++] = *curPos; + } + break; - /* Fill in other fields */ - thisEntry->nextcommand = NULL; - thisEntry->prevDelim = prevDelim; - thisEntry->bracketDepth = curDepth; - if (*lastEntry) { - (*lastEntry)->nextcommand = thisEntry; - } else { - *output = thisEntry; - } - *lastEntry = thisEntry; -} + case '&': if (!inQuotes) { + lastWasRedirect = FALSE; -/*************************************************************************** - * WCMD_ReadAndParseLine - * - * Either uses supplied input or - * Reads a file from the handle, and then... - * Parse the text buffer, spliting into separate commands - * - unquoted && strings split 2 commands but the 2nd is flagged as - * following an && - * - ( as the first character just ups the bracket depth - * - unquoted ) when bracket depth > 0 terminates a bracket and - * adds a CMD_LIST structure with null command - * - Anything else gets put into the command string (including - * redirects) - */ -WCHAR *WCMD_ReadAndParseLine(WCHAR *optionalcmd, CMD_LIST **output, HANDLE readFrom) { + /* Add an entry to the command list */ + if (curStringLen > 0) { - WCHAR *curPos; - BOOL inQuotes = FALSE; - WCHAR curString[MAXSTRING]; - int curStringLen = 0; - WCHAR curRedirs[MAXSTRING]; - int curRedirsLen = 0; - WCHAR *curCopyTo; - int *curLen; - int curDepth = 0; - CMD_LIST *lastEntry = NULL; - CMD_DELIMITERS prevDelim = CMD_NONE; - static WCHAR *extraSpace = NULL; /* Deliberately never freed */ - const WCHAR remCmd[] = {'r','e','m',' ','\0'}; - const WCHAR forCmd[] = {'f','o','r',' ','\0'}; - const WCHAR ifCmd[] = {'i','f',' ','\0'}; - const WCHAR ifElse[] = {'e','l','s','e',' ','\0'}; - BOOL inRem = FALSE; - BOOL inFor = FALSE; - BOOL inIn = FALSE; - BOOL inIf = FALSE; - BOOL inElse= FALSE; - BOOL onlyWhiteSpace = FALSE; - BOOL lastWasWhiteSpace = FALSE; - BOOL lastWasDo = FALSE; - BOOL lastWasIn = FALSE; - BOOL lastWasElse = FALSE; - BOOL lastWasRedirect = TRUE; + /* Add the current command */ + WCMD_addCommand(curString, &curStringLen, + curRedirs, &curRedirsLen, + &curCopyTo, &curLen, + prevDelim, curDepth, + &lastEntry, output); - /* Allocate working space for a command read from keyboard, file etc */ - if (!extraSpace) - extraSpace = HeapAlloc(GetProcessHeap(), 0, (MAXSTRING+1) * sizeof(WCHAR)); - if (!extraSpace) - { - WINE_ERR("Could not allocate memory for extraSpace\n"); - return NULL; - } + } - /* If initial command read in, use that, otherwise get input from handle */ - if (optionalcmd != NULL) { - strcpyW(extraSpace, optionalcmd); - } else if (readFrom == INVALID_HANDLE_VALUE) { - WINE_FIXME("No command nor handle supplied\n"); - } else { - if (WCMD_fgets(extraSpace, MAXSTRING, readFrom) == NULL) return NULL; - } - curPos = extraSpace; + if (*(curPos+1) == '&') { + curPos++; /* Skip other & */ + prevDelim = CMD_ONSUCCESS; + } else { + prevDelim = CMD_NONE; + } + } else { + curCopyTo[(*curLen)++] = *curPos; + } + break; - /* Handle truncated input - issue warning */ - if (strlenW(extraSpace) == MAXSTRING -1) { - WCMD_output_asis(WCMD_LoadMessage(WCMD_TRUNCATEDLINE)); - WCMD_output_asis(extraSpace); - WCMD_output_asis(newline); - } + case ')': if (!inQuotes && curDepth > 0) { + lastWasRedirect = FALSE; - /* Replace env vars if in a batch context */ - if (context) handleExpansion(extraSpace, FALSE, NULL, NULL); + /* Add the current command if there is one */ + if (curStringLen) { - /* Start with an empty string, copying to the command string */ - curStringLen = 0; - curRedirsLen = 0; - curCopyTo = curString; - curLen = &curStringLen; - lastWasRedirect = FALSE; /* Required for eg spaces between > and filename */ + /* Add the current command */ + WCMD_addCommand(curString, &curStringLen, + curRedirs, &curRedirsLen, + &curCopyTo, &curLen, + prevDelim, curDepth, + &lastEntry, output); + } - /* Parse every character on the line being processed */ - while (*curPos != 0x00) { + /* Add an empty entry to the command list */ + prevDelim = CMD_NONE; + WCMD_addCommand(NULL, &curStringLen, + curRedirs, &curRedirsLen, + &curCopyTo, &curLen, + prevDelim, curDepth, + &lastEntry, output); + curDepth--; - WCHAR thisChar; + /* Leave inIn if necessary */ + if (inIn) inIn = FALSE; + } else { + curCopyTo[(*curLen)++] = *curPos; + } + break; + default: + lastWasRedirect = FALSE; + curCopyTo[(*curLen)++] = *curPos; + } - /* Debugging AID: - WINE_TRACE("Looking at '%c' (len:%d, lws:%d, ows:%d)\n", *curPos, *curLen, - lastWasWhiteSpace, onlyWhiteSpace); - */ + curPos++; - /* Certain commands need special handling */ - if (curStringLen == 0 && curCopyTo == curString) { - const WCHAR forDO[] = {'d','o',' ','\0'}; + /* At various times we need to know if we have only skipped whitespace, + so reset this variable and then it will remain true until a non + whitespace is found */ + if ((thisChar != ' ') && (thisChar != '\n')) onlyWhiteSpace = FALSE; - /* If command starts with 'rem', ignore any &&, ( etc */ - if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - curPos, 4, remCmd, -1) == 2) { - inRem = TRUE; + /* Flag end of interest in FOR DO and IN parms once something has been processed */ + if (!lastWasWhiteSpace) { + lastWasIn = lastWasDo = FALSE; + } - /* If command starts with 'for', handle ('s mid line after IN or DO */ - } else if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - curPos, 4, forCmd, -1) == 2) { - inFor = TRUE; + /* If we have reached the end, add this command into the list */ + if (*curPos == 0x00 && *curLen > 0) { - /* If command starts with 'if' or 'else', handle ('s mid line. We should ensure this - is only true in the command portion of the IF statement, but this - should suffice for now - FIXME: Silly syntax like "if 1(==1( ( - echo they equal - )" will be parsed wrong */ - } else if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - curPos, 3, ifCmd, -1) == 2) { - inIf = TRUE; + /* Add an entry to the command list */ + WCMD_addCommand(curString, &curStringLen, + curRedirs, &curRedirsLen, + &curCopyTo, &curLen, + prevDelim, curDepth, + &lastEntry, output); + } - } else if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - curPos, 5, ifElse, -1) == 2) { - inElse = TRUE; - lastWasElse = TRUE; - onlyWhiteSpace = TRUE; - memcpy(&curCopyTo[*curLen], curPos, 5*sizeof(WCHAR)); - (*curLen)+=5; - curPos+=5; - continue; + /* If we have reached the end of the string, see if bracketing outstanding */ + if (*curPos == 0x00 && curDepth > 0 && readFrom != INVALID_HANDLE_VALUE) { + inRem = FALSE; + prevDelim = CMD_NONE; + inQuotes = FALSE; + memset(extraSpace, 0x00, (MAXSTRING+1) * sizeof(WCHAR)); - /* In a for loop, the DO command will follow a close bracket followed by - whitespace, followed by DO, ie closeBracket inserts a NULL entry, curLen - is then 0, and all whitespace is skipped */ - } else if (inFor && - (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - curPos, 3, forDO, -1) == 2)) { - WINE_TRACE("Found DO\n"); - lastWasDo = TRUE; - onlyWhiteSpace = TRUE; - memcpy(&curCopyTo[*curLen], curPos, 3*sizeof(WCHAR)); - (*curLen)+=3; - curPos+=3; - continue; + /* Read more, skipping any blank lines */ + while (*extraSpace == 0x00) { + if (!context) WCMD_output_asis( WCMD_LoadMessage(WCMD_MOREPROMPT)); + if (WCMD_fgets(extraSpace, MAXSTRING, readFrom) == NULL) break; } - } else if (curCopyTo == curString) { + curPos = extraSpace; + if (context) handleExpansion(extraSpace, FALSE, NULL, NULL); + } + } - /* Special handling for the 'FOR' command */ - if (inFor && lastWasWhiteSpace) { - const WCHAR forIN[] = {'i','n',' ','\0'}; + /* Dump out the parsed output */ + WCMD_DumpCommands(*output); - WINE_TRACE("Found 'FOR', comparing next parm: '%s'\n", wine_dbgstr_w(curPos)); + return extraSpace; +} - if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - curPos, 3, forIN, -1) == 2) { - WINE_TRACE("Found IN\n"); - lastWasIn = TRUE; - onlyWhiteSpace = TRUE; - memcpy(&curCopyTo[*curLen], curPos, 3*sizeof(WCHAR)); - (*curLen)+=3; - curPos+=3; - continue; - } - } - } +/*************************************************************************** + * WCMD_process_commands + * + * Process all the commands read in so far + */ +CMD_LIST *WCMD_process_commands(CMD_LIST *thisCmd, BOOL oneBracket, + WCHAR *var, WCHAR *val) { - /* Nothing 'ends' a REM statement and &&, quotes etc are ineffective, - so just use the default processing ie skip character specific - matching below */ - if (!inRem) thisChar = *curPos; - else thisChar = 'X'; /* Character with no special processing */ + int bdepth = -1; - lastWasWhiteSpace = FALSE; /* Will be reset below */ + if (thisCmd && oneBracket) bdepth = thisCmd->bracketDepth; - switch (thisChar) { + /* Loop through the commands, processing them one by one */ + while (thisCmd) { - case '=': /* drop through - ignore token delimiters at the start of a command */ - case ',': /* drop through - ignore token delimiters at the start of a command */ - case '\t':/* drop through - ignore token delimiters at the start of a command */ - case ' ': - /* If a redirect in place, it ends here */ - if (!inQuotes && !lastWasRedirect) { + CMD_LIST *origCmd = thisCmd; - /* If finishing off a redirect, add a whitespace delimiter */ - if (curCopyTo == curRedirs) { - curCopyTo[(*curLen)++] = ' '; - } - curCopyTo = curString; - curLen = &curStringLen; - } - if (*curLen > 0) { - curCopyTo[(*curLen)++] = *curPos; - } + /* If processing one bracket only, and we find the end bracket + entry (or less), return */ + if (oneBracket && !thisCmd->command && + bdepth <= thisCmd->bracketDepth) { + WINE_TRACE("Finished bracket @ %p, next command is %p\n", + thisCmd, thisCmd->nextcommand); + return thisCmd->nextcommand; + } - /* Remember just processed whitespace */ - lastWasWhiteSpace = TRUE; + /* Ignore the NULL entries a ')' inserts (Only 'if' cares + about them and it will be handled in there) + Also, skip over any batch labels (eg. :fred) */ + if (thisCmd->command && thisCmd->command[0] != ':') { + WINE_TRACE("Executing command: '%s'\n", wine_dbgstr_w(thisCmd->command)); + WCMD_execute (thisCmd->command, thisCmd->redirects, var, val, &thisCmd); + } - break; + /* Step on unless the command itself already stepped on */ + if (thisCmd == origCmd) thisCmd = thisCmd->nextcommand; + } + return NULL; +} - case '>': /* drop through - handle redirect chars the same */ - case '<': - /* Make a redirect start here */ - if (!inQuotes) { - curCopyTo = curRedirs; - curLen = &curRedirsLen; - lastWasRedirect = TRUE; - } +/*************************************************************************** + * WCMD_free_commands + * + * Frees the storage held for a parsed command line + * - This is not done in the process_commands, as eventually the current + * pointer will be modified within the commands, and hence a single free + * routine is simpler + */ +void WCMD_free_commands(CMD_LIST *cmds) { - /* See if 1>, 2> etc, in which case we have some patching up - to do */ - if (curPos != extraSpace && - *(curPos-1)>='1' && *(curPos-1)<='9') { + /* Loop through the commands, freeing them one by one */ + while (cmds) { + CMD_LIST *thisCmd = cmds; + cmds = cmds->nextcommand; + HeapFree(GetProcessHeap(), 0, thisCmd->command); + HeapFree(GetProcessHeap(), 0, thisCmd); + } +} + + +/***************************************************************************** + * Main entry point. This is a console application so we have a main() not a + * winmain(). + */ + +int wmain (int argc, WCHAR *argvW[]) +{ + int args; + WCHAR *cmd = NULL; + WCHAR string[1024]; + WCHAR envvar[4]; + HANDLE h; + int opt_q; + int opt_t = 0; + static const WCHAR autoexec[] = {'\\','a','u','t','o','e','x','e','c','.', + 'b','a','t','\0'}; + char ansiVersion[100]; + CMD_LIST *toExecute = NULL; /* Commands left to be executed */ + + srand(time(NULL)); - curStringLen--; - curString[curStringLen] = 0x00; - curCopyTo[(*curLen)++] = *(curPos-1); - } + /* Pre initialize some messages */ + strcpy(ansiVersion, PACKAGE_VERSION); + MultiByteToWideChar(CP_ACP, 0, ansiVersion, -1, string, 1024); + wsprintf(version_string, WCMD_LoadMessage(WCMD_VERSION), string); + strcpyW(anykey, WCMD_LoadMessage(WCMD_ANYKEY)); - curCopyTo[(*curLen)++] = *curPos; - break; + args = argc; + opt_c=opt_k=opt_q=opt_s=0; + while (args > 0) + { + WCHAR c; + WINE_TRACE("Command line parm: '%s'\n", wine_dbgstr_w(*argvW)); + if ((*argvW)[0]!='/' || (*argvW)[1]=='\0') { + argvW++; + args--; + continue; + } - case '|': /* Pipe character only if not || */ - if (!inQuotes) { - lastWasRedirect = FALSE; + c=(*argvW)[1]; + if (tolowerW(c)=='c') { + opt_c=1; + } else if (tolowerW(c)=='q') { + opt_q=1; + } else if (tolowerW(c)=='k') { + opt_k=1; + } else if (tolowerW(c)=='s') { + opt_s=1; + } else if (tolowerW(c)=='a') { + unicodePipes=FALSE; + } else if (tolowerW(c)=='u') { + unicodePipes=TRUE; + } else if (tolowerW(c)=='t' && (*argvW)[2]==':') { + opt_t=strtoulW(&(*argvW)[3], NULL, 16); + } else if (tolowerW(c)=='x' || tolowerW(c)=='y') { + /* Ignored for compatibility with Windows */ + } - /* Add an entry to the command list */ - if (curStringLen > 0) { + if ((*argvW)[2]==0) { + argvW++; + args--; + } + else /* handle `cmd /cnotepad.exe` and `cmd /x/c ...` */ + { + *argvW+=2; + } - /* Add the current command */ - WCMD_addCommand(curString, &curStringLen, - curRedirs, &curRedirsLen, - &curCopyTo, &curLen, - prevDelim, curDepth, - &lastEntry, output); + if (opt_c || opt_k) /* break out of parsing immediately after c or k */ + break; + } - } + if (opt_q) { + const WCHAR eoff[] = {'O','F','F','\0'}; + WCMD_echo(eoff); + } - if (*(curPos+1) == '|') { - curPos++; /* Skip other | */ - prevDelim = CMD_ONFAILURE; - } else { - prevDelim = CMD_PIPE; - } - } else { - curCopyTo[(*curLen)++] = *curPos; - } - break; + if (opt_c || opt_k) { + int len,qcount; + WCHAR** arg; + int argsLeft; + WCHAR* p; - case '"': inQuotes = !inQuotes; - curCopyTo[(*curLen)++] = *curPos; - lastWasRedirect = FALSE; - break; + /* opt_s left unflagged if the command starts with and contains exactly + * one quoted string (exactly two quote characters). The quoted string + * must be an executable name that has whitespace and must not have the + * following characters: &<>()@^| */ - case '(': /* If a '(' is the first non whitespace in a command portion - ie start of line or just after &&, then we read until an - unquoted ) is found */ - WINE_TRACE("Found '(' conditions: curLen(%d), inQ(%d), onlyWS(%d)" - ", for(%d, In:%d, Do:%d)" - ", if(%d, else:%d, lwe:%d)\n", - *curLen, inQuotes, - onlyWhiteSpace, - inFor, lastWasIn, lastWasDo, - inIf, inElse, lastWasElse); - lastWasRedirect = FALSE; + /* Build the command to execute */ + len = 0; + qcount = 0; + argsLeft = args; + for (arg = argvW; argsLeft>0; arg++,argsLeft--) + { + int has_space,bcount; + WCHAR* a; - /* Ignore open brackets inside the for set */ - if (*curLen == 0 && !inIn) { - curDepth++; + has_space=0; + bcount=0; + a=*arg; + if( !*a ) has_space=1; + while (*a!='\0') { + if (*a=='\\') { + bcount++; + } else { + if (*a==' ' || *a=='\t') { + has_space=1; + } else if (*a=='"') { + /* doubling of '\' preceding a '"', + * plus escaping of said '"' + */ + len+=2*bcount+1; + qcount++; + } + bcount=0; + } + a++; + } + len+=(a-*arg) + 1; /* for the separating space */ + if (has_space) + { + len+=2; /* for the quotes */ + qcount+=2; + } + } - /* If in quotes, ignore brackets */ - } else if (inQuotes) { - curCopyTo[(*curLen)++] = *curPos; + if (qcount!=2) + opt_s=1; - /* In a FOR loop, an unquoted '(' may occur straight after - IN or DO - In an IF statement just handle it regardless as we don't - parse the operands - In an ELSE statement, only allow it straight away after - the ELSE and whitespace - */ - } else if (inIf || - (inElse && lastWasElse && onlyWhiteSpace) || - (inFor && (lastWasIn || lastWasDo) && onlyWhiteSpace)) { + /* check argvW[0] for a space and invalid characters */ + if (!opt_s) { + opt_s=1; + p=*argvW; + while (*p!='\0') { + if (*p=='&' || *p=='<' || *p=='>' || *p=='(' || *p==')' + || *p=='@' || *p=='^' || *p=='|') { + opt_s=1; + break; + } + if (*p==' ') + opt_s=0; + p++; + } + } - /* If entering into an 'IN', set inIn */ - if (inFor && lastWasIn && onlyWhiteSpace) { - WINE_TRACE("Inside an IN\n"); - inIn = TRUE; - } + cmd = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!cmd) + exit(1); - /* Add the current command */ - WCMD_addCommand(curString, &curStringLen, - curRedirs, &curRedirsLen, - &curCopyTo, &curLen, - prevDelim, curDepth, - &lastEntry, output); + p = cmd; + argsLeft = args; + for (arg = argvW; argsLeft>0; arg++,argsLeft--) + { + int has_space,has_quote; + WCHAR* a; - curDepth++; - } else { - curCopyTo[(*curLen)++] = *curPos; - } - break; + /* Check for quotes and spaces in this argument */ + has_space=has_quote=0; + a=*arg; + if( !*a ) has_space=1; + while (*a!='\0') { + if (*a==' ' || *a=='\t') { + has_space=1; + if (has_quote) + break; + } else if (*a=='"') { + has_quote=1; + if (has_space) + break; + } + a++; + } - case '&': if (!inQuotes) { - lastWasRedirect = FALSE; + /* Now transfer it to the command line */ + if (has_space) + *p++='"'; + if (has_quote) { + int bcount; + WCHAR* a; - /* Add an entry to the command list */ - if (curStringLen > 0) { + bcount=0; + a=*arg; + while (*a!='\0') { + if (*a=='\\') { + *p++=*a; + bcount++; + } else { + if (*a=='"') { + int i; - /* Add the current command */ - WCMD_addCommand(curString, &curStringLen, - curRedirs, &curRedirsLen, - &curCopyTo, &curLen, - prevDelim, curDepth, - &lastEntry, output); + /* Double all the '\\' preceding this '"', plus one */ + for (i=0;i<=bcount;i++) + *p++='\\'; + *p++='"'; + } else { + *p++=*a; + } + bcount=0; + } + a++; + } + } else { + strcpyW(p,*arg); + p+=strlenW(*arg); + } + if (has_space) + *p++='"'; + *p++=' '; + } + if (p > cmd) + p--; /* remove last space */ + *p = '\0'; - } + WINE_TRACE("/c command line: '%s'\n", wine_dbgstr_w(cmd)); - if (*(curPos+1) == '&') { - curPos++; /* Skip other & */ - prevDelim = CMD_ONSUCCESS; - } else { - prevDelim = CMD_NONE; - } - } else { - curCopyTo[(*curLen)++] = *curPos; - } - break; + /* strip first and last quote characters if opt_s; check for invalid + * executable is done later */ + if (opt_s && *cmd=='\"') + WCMD_opt_s_strip_quotes(cmd); + } - case ')': if (!inQuotes && curDepth > 0) { - lastWasRedirect = FALSE; + if (opt_c) { + /* If we do a "wcmd /c command", we don't want to allocate a new + * console since the command returns immediately. Rather, we use + * the currently allocated input and output handles. This allows + * us to pipe to and read from the command interpreter. + */ - /* Add the current command if there is one */ - if (curStringLen) { + /* Parse the command string, without reading any more input */ + WCMD_ReadAndParseLine(cmd, &toExecute, INVALID_HANDLE_VALUE); + WCMD_process_commands(toExecute, FALSE, NULL, NULL); + WCMD_free_commands(toExecute); + toExecute = NULL; - /* Add the current command */ - WCMD_addCommand(curString, &curStringLen, - curRedirs, &curRedirsLen, - &curCopyTo, &curLen, - prevDelim, curDepth, - &lastEntry, output); - } + HeapFree(GetProcessHeap(), 0, cmd); + return errorlevel; + } - /* Add an empty entry to the command list */ - prevDelim = CMD_NONE; - WCMD_addCommand(NULL, &curStringLen, - curRedirs, &curRedirsLen, - &curCopyTo, &curLen, - prevDelim, curDepth, - &lastEntry, output); - curDepth--; + SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), ENABLE_LINE_INPUT | + ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT); + SetConsoleTitle(WCMD_LoadMessage(WCMD_CONSTITLE)); - /* Leave inIn if necessary */ - if (inIn) inIn = FALSE; - } else { - curCopyTo[(*curLen)++] = *curPos; - } - break; - default: - lastWasRedirect = FALSE; - curCopyTo[(*curLen)++] = *curPos; + /* Note: cmd.exe /c dir does not get a new color, /k dir does */ + if (opt_t) { + if (!(((opt_t & 0xF0) >> 4) == (opt_t & 0x0F))) { + defaultColor = opt_t & 0xFF; + param1[0] = 0x00; + WCMD_color(); } + } else { + /* Check HKCU\Software\Microsoft\Command Processor + Then HKLM\Software\Microsoft\Command Processor + for defaultcolour value + Note Can be supplied as DWORD or REG_SZ + Note2 When supplied as REG_SZ it's in decimal!!! */ + HKEY key; + DWORD type; + DWORD value=0, size=4; + static const WCHAR regKeyW[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'C','o','m','m','a','n','d',' ','P','r','o','c','e','s','s','o','r','\0'}; + static const WCHAR dfltColorW[] = {'D','e','f','a','u','l','t','C','o','l','o','r','\0'}; - curPos++; - - /* At various times we need to know if we have only skipped whitespace, - so reset this variable and then it will remain true until a non - whitespace is found */ - if ((thisChar != ' ') && (thisChar != '\n')) onlyWhiteSpace = FALSE; + if (RegOpenKeyEx(HKEY_CURRENT_USER, regKeyW, + 0, KEY_READ, &key) == ERROR_SUCCESS) { + WCHAR strvalue[4]; - /* Flag end of interest in FOR DO and IN parms once something has been processed */ - if (!lastWasWhiteSpace) { - lastWasIn = lastWasDo = FALSE; + /* See if DWORD or REG_SZ */ + if (RegQueryValueEx(key, dfltColorW, NULL, &type, + NULL, NULL) == ERROR_SUCCESS) { + if (type == REG_DWORD) { + size = sizeof(DWORD); + RegQueryValueEx(key, dfltColorW, NULL, NULL, + (LPBYTE)&value, &size); + } else if (type == REG_SZ) { + size = sizeof(strvalue)/sizeof(WCHAR); + RegQueryValueEx(key, dfltColorW, NULL, NULL, + (LPBYTE)strvalue, &size); + value = strtoulW(strvalue, NULL, 10); + } + } + RegCloseKey(key); } - /* If we have reached the end, add this command into the list */ - if (*curPos == 0x00 && *curLen > 0) { + if (value == 0 && RegOpenKeyEx(HKEY_LOCAL_MACHINE, regKeyW, + 0, KEY_READ, &key) == ERROR_SUCCESS) { + WCHAR strvalue[4]; - /* Add an entry to the command list */ - WCMD_addCommand(curString, &curStringLen, - curRedirs, &curRedirsLen, - &curCopyTo, &curLen, - prevDelim, curDepth, - &lastEntry, output); + /* See if DWORD or REG_SZ */ + if (RegQueryValueEx(key, dfltColorW, NULL, &type, + NULL, NULL) == ERROR_SUCCESS) { + if (type == REG_DWORD) { + size = sizeof(DWORD); + RegQueryValueEx(key, dfltColorW, NULL, NULL, + (LPBYTE)&value, &size); + } else if (type == REG_SZ) { + size = sizeof(strvalue)/sizeof(WCHAR); + RegQueryValueEx(key, dfltColorW, NULL, NULL, + (LPBYTE)strvalue, &size); + value = strtoulW(strvalue, NULL, 10); + } + } + RegCloseKey(key); } - /* If we have reached the end of the string, see if bracketing outstanding */ - if (*curPos == 0x00 && curDepth > 0 && readFrom != INVALID_HANDLE_VALUE) { - inRem = FALSE; - prevDelim = CMD_NONE; - inQuotes = FALSE; - memset(extraSpace, 0x00, (MAXSTRING+1) * sizeof(WCHAR)); - - /* Read more, skipping any blank lines */ - while (*extraSpace == 0x00) { - if (!context) WCMD_output_asis( WCMD_LoadMessage(WCMD_MOREPROMPT)); - if (WCMD_fgets(extraSpace, MAXSTRING, readFrom) == NULL) break; - } - curPos = extraSpace; - if (context) handleExpansion(extraSpace, FALSE, NULL, NULL); + /* If one found, set the screen to that colour */ + if (!(((value & 0xF0) >> 4) == (value & 0x0F))) { + defaultColor = value & 0xFF; + param1[0] = 0x00; + WCMD_color(); } - } - - /* Dump out the parsed output */ - WCMD_DumpCommands(*output); - - return extraSpace; -} - -/*************************************************************************** - * WCMD_process_commands - * - * Process all the commands read in so far - */ -CMD_LIST *WCMD_process_commands(CMD_LIST *thisCmd, BOOL oneBracket, - WCHAR *var, WCHAR *val) { - - int bdepth = -1; - if (thisCmd && oneBracket) bdepth = thisCmd->bracketDepth; - - /* Loop through the commands, processing them one by one */ - while (thisCmd) { + } - CMD_LIST *origCmd = thisCmd; + /* Save cwd into appropriate env var */ + GetCurrentDirectory(1024, string); + if (IsCharAlpha(string[0]) && string[1] == ':') { + static const WCHAR fmt[] = {'=','%','c',':','\0'}; + wsprintf(envvar, fmt, string[0]); + SetEnvironmentVariable(envvar, string); + WINE_TRACE("Set %s to %s\n", wine_dbgstr_w(envvar), wine_dbgstr_w(string)); + } - /* If processing one bracket only, and we find the end bracket - entry (or less), return */ - if (oneBracket && !thisCmd->command && - bdepth <= thisCmd->bracketDepth) { - WINE_TRACE("Finished bracket @ %p, next command is %p\n", - thisCmd, thisCmd->nextcommand); - return thisCmd->nextcommand; - } + if (opt_k) { + /* Parse the command string, without reading any more input */ + WCMD_ReadAndParseLine(cmd, &toExecute, INVALID_HANDLE_VALUE); + WCMD_process_commands(toExecute, FALSE, NULL, NULL); + WCMD_free_commands(toExecute); + toExecute = NULL; + HeapFree(GetProcessHeap(), 0, cmd); + } - /* Ignore the NULL entries a ')' inserts (Only 'if' cares - about them and it will be handled in there) - Also, skip over any batch labels (eg. :fred) */ - if (thisCmd->command && thisCmd->command[0] != ':') { - WINE_TRACE("Executing command: '%s'\n", wine_dbgstr_w(thisCmd->command)); - WCMD_execute (thisCmd->command, thisCmd->redirects, var, val, &thisCmd); - } +/* + * If there is an AUTOEXEC.BAT file, try to execute it. + */ - /* Step on unless the command itself already stepped on */ - if (thisCmd == origCmd) thisCmd = thisCmd->nextcommand; - } - return NULL; -} + GetFullPathName (autoexec, sizeof(string)/sizeof(WCHAR), string, NULL); + h = CreateFile (string, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (h != INVALID_HANDLE_VALUE) { + CloseHandle (h); +#if 0 + WCMD_batch (autoexec, autoexec, 0, NULL, INVALID_HANDLE_VALUE); +#endif + } -/*************************************************************************** - * WCMD_free_commands - * - * Frees the storage held for a parsed command line - * - This is not done in the process_commands, as eventually the current - * pointer will be modified within the commands, and hence a single free - * routine is simpler +/* + * Loop forever getting commands and executing them. */ -void WCMD_free_commands(CMD_LIST *cmds) { - /* Loop through the commands, freeing them one by one */ - while (cmds) { - CMD_LIST *thisCmd = cmds; - cmds = cmds->nextcommand; - HeapFree(GetProcessHeap(), 0, thisCmd->command); - HeapFree(GetProcessHeap(), 0, thisCmd); - } + WCMD_version (); + while (TRUE) { + + /* Read until EOF (which for std input is never, but if redirect + in place, may occur */ + WCMD_show_prompt (); + if (WCMD_ReadAndParseLine(NULL, &toExecute, + GetStdHandle(STD_INPUT_HANDLE)) == NULL) + break; + WCMD_process_commands(toExecute, FALSE, NULL, NULL); + WCMD_free_commands(toExecute); + toExecute = NULL; + } + return 0; } diff --git a/programs/reg/reg.c b/programs/reg/reg.c index 34da9f14062..7ce787dbd5c 100644 --- a/programs/reg/reg.c +++ b/programs/reg/reg.c @@ -53,18 +53,14 @@ static int reg_printfW(const WCHAR *msg, ...) return count; } -static int reg_message(int msg, ...) +static int reg_message(int msg) { - va_list va_args; + static const WCHAR formatW[] = {'%','s',0}; WCHAR msg_buffer[8192]; LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer, sizeof(msg_buffer)/sizeof(WCHAR)); - va_start(va_args, msg); - reg_printfW(msg_buffer, va_args); - va_end(va_args); - - return 0; + return reg_printfW(formatW, msg_buffer); } static int reg_add(WCHAR *key_name, WCHAR *value_name, BOOL value_empty, diff --git a/programs/rpcss/epmp.c b/programs/rpcss/epmp.c index d7712b9f4ea..e9cb5e95e5f 100644 --- a/programs/rpcss/epmp.c +++ b/programs/rpcss/epmp.c @@ -120,7 +120,7 @@ void ept_insert(handle_t h, &entry->address); if (rpc_status != RPC_S_OK) { - WINE_WARN("TowerExplode failed %lu\n", rpc_status); + WINE_WARN("TowerExplode failed %u\n", rpc_status); *status = rpc_status; break; /* FIXME: more cleanup? */ } diff --git a/programs/start/start.c b/programs/start/start.c index d98f215da6e..ed7df03099f 100644 --- a/programs/start/start.c +++ b/programs/start/start.c @@ -281,6 +281,7 @@ int wmain (int argc, WCHAR *argv[]) sei.lpFile = dos_filename; sei.lpDirectory = parent_directory = get_parent_dir(dos_filename); + sei.fMask &= ~SEE_MASK_FLAG_NO_UI; if (GetBinaryTypeW(sei.lpFile, &binary_type)) { WCHAR *commandline; diff --git a/programs/winecfg/Ko.rc b/programs/winecfg/Ko.rc index 2a60d409005..ca94b5b650d 100644 --- a/programs/winecfg/Ko.rc +++ b/programs/winecfg/Ko.rc @@ -73,7 +73,7 @@ BEGIN CONTROL "¸¶¿ì½º Ä¿¼­¸¦ DirectX ÇÁ·Î±×·¥ â¾È¿¡ Àâ¾ÆµÎ±â(&M)",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,230,8 CONTROL "â°ü¸®ÀÚ°¡ WineâÀ» ²Ù¹Ìµµ·Ï ÇÔ(&D)",IDC_ENABLE_DECORATED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,32,230,8 CONTROL "â°ü¸®ÀÚ°¡ WineâÀ» °ü¸®Çϵµ·Ï ÇÔ(&W)",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,44,230,8 - CONTROL "°¡»ó µ¥½ºÅ©Å¾ Èä³»³»±â(&D)",IDC_ENABLE_DESKTOP,"Button", + CONTROL "°¡»ó µ¥½ºÅ©Å¾ Èä³»³»±â(&E)",IDC_ENABLE_DESKTOP,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,15,56,230,8 LTEXT "µ¥½ºÅ©Å¾ Å©±â(&S):",IDC_DESKTOP_SIZE,15,70,44,8,WS_DISABLED LTEXT "X",IDC_DESKTOP_BY,109,70,8,8,WS_DISABLED diff --git a/programs/winedbg/tgt_module.c b/programs/winedbg/tgt_module.c index 5341726d5e5..71a24495178 100644 --- a/programs/winedbg/tgt_module.c +++ b/programs/winedbg/tgt_module.c @@ -29,9 +29,7 @@ #include #include "debugger.h" -#include "wine/debug.h" -WINE_DEFAULT_DEBUG_CHANNEL(winedbg); static struct be_process_io be_process_module_io; diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index ec7a162aa80..56eac5ada71 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -494,14 +494,13 @@ static BOOL extract_icon32(LPCWSTR szFileName, int nIndex, char *szXPMFileName) { for (i = 0; i < pIconDir->idCount; i++) { - if ((pIconDir->idEntries[i].wBitCount >= nMaxBits) && (pIconDir->idEntries[i].wBitCount <= 8)) + if (pIconDir->idEntries[i].wBitCount >= nMaxBits) { - nMaxBits = pIconDir->idEntries[i].wBitCount; - if ((pIconDir->idEntries[i].bHeight * pIconDir->idEntries[i].bWidth) >= nMax) { lpName = MAKEINTRESOURCEW(pIconDir->idEntries[i].nID); nMax = pIconDir->idEntries[i].bHeight * pIconDir->idEntries[i].bWidth; + nMaxBits = pIconDir->idEntries[i].wBitCount; } } } diff --git a/programs/winemine/dialog.c b/programs/winemine/dialog.c index fb7efb22a95..dc4ab349fd6 100644 --- a/programs/winemine/dialog.c +++ b/programs/winemine/dialog.c @@ -114,21 +114,3 @@ INT_PTR CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara } return FALSE; } - -INT_PTR CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) -{ - switch( uMsg ) { - case WM_INITDIALOG: - return TRUE; - - case WM_COMMAND: - switch( LOWORD( wParam ) ) { - case IDOK: - case IDCANCEL: - EndDialog( hDlg, 0 ); - return TRUE; - } - break; - } - return FALSE; -} diff --git a/programs/winemine/main.c b/programs/winemine/main.c index a8ea08ec7eb..3d0998f87c9 100644 --- a/programs/winemine/main.c +++ b/programs/winemine/main.c @@ -36,240 +36,25 @@ static const DWORD wnd_style = WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMI static const char* registry_key = "Software\\Microsoft\\WinMine"; -int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow ) -{ - MSG msg; - WNDCLASS wc; - HWND hWnd; - HACCEL haccel; - char appname[20]; - - LoadString( hInst, IDS_APPNAME, appname, sizeof(appname)); - - wc.style = 0; - wc.lpfnWndProc = MainProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = hInst; - wc.hIcon = LoadIcon( hInst, "WINEMINE" ); - wc.hCursor = LoadCursor( 0, IDI_APPLICATION ); - wc.hbrBackground = (HBRUSH) GetStockObject( BLACK_BRUSH ); - wc.lpszMenuName = "MENU_WINEMINE"; - wc.lpszClassName = appname; - - if (!RegisterClass(&wc)) ExitProcess(1); - hWnd = CreateWindow( appname, appname, - wnd_style, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - 0, 0, hInst, NULL ); - - if (!hWnd) ExitProcess(1); - - ShowWindow( hWnd, cmdshow ); - UpdateWindow( hWnd ); - - haccel = LoadAccelerators( hInst, MAKEINTRESOURCE(IDA_WINEMINE) ); - SetTimer( hWnd, ID_TIMER, 1000, NULL ); - - while( GetMessage(&msg, 0, 0, 0) ) { - if (!TranslateAccelerator( hWnd, haccel, &msg )) - TranslateMessage( &msg ); - - DispatchMessage( &msg ); - } - return msg.wParam; -} - -LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +void CheckLevel( BOARD *p_board ) { - HDC hdc; - PAINTSTRUCT ps; - HMENU hMenu; - static BOARD board; - - switch( msg ) { - case WM_CREATE: - board.hInst = ((LPCREATESTRUCT) lParam)->hInstance; - board.hWnd = hWnd; - InitBoard( &board ); - CreateBoard( &board ); - return 0; - - case WM_PAINT: - { - HDC hMemDC; - - WINE_TRACE("WM_PAINT\n"); - hdc = BeginPaint( hWnd, &ps ); - hMemDC = CreateCompatibleDC( hdc ); - - DrawBoard( hdc, hMemDC, &ps, &board ); - - DeleteDC( hMemDC ); - EndPaint( hWnd, &ps ); - - return 0; - } - - case WM_MOVE: - WINE_TRACE("WM_MOVE\n"); - board.pos.x = (short)LOWORD(lParam); - board.pos.y = (short)HIWORD(lParam); - return 0; - - case WM_DESTROY: - SaveBoard( &board ); - DestroyBoard( &board ); - PostQuitMessage( 0 ); - return 0; - - case WM_TIMER: - if( board.status == PLAYING ) { - board.time++; - RedrawWindow( hWnd, &board.timer_rect, 0, - RDW_INVALIDATE | RDW_UPDATENOW ); - } - return 0; - - case WM_LBUTTONDOWN: - WINE_TRACE("WM_LBUTTONDOWN\n"); - if( wParam & MK_RBUTTON ) - msg = WM_MBUTTONDOWN; - TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); - SetCapture( hWnd ); - return 0; - - case WM_LBUTTONUP: - WINE_TRACE("WM_LBUTTONUP\n"); - if( wParam & MK_RBUTTON ) - msg = WM_MBUTTONUP; - TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); - ReleaseCapture(); - return 0; - - case WM_RBUTTONDOWN: - WINE_TRACE("WM_RBUTTONDOWN\n"); - if( wParam & MK_LBUTTON ) { - board.press.x = 0; - board.press.y = 0; - msg = WM_MBUTTONDOWN; - } - TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); - return 0; - - case WM_RBUTTONUP: - WINE_TRACE("WM_RBUTTONUP\n"); - if( wParam & MK_LBUTTON ) - msg = WM_MBUTTONUP; - TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); - return 0; - - case WM_MBUTTONDOWN: - WINE_TRACE("WM_MBUTTONDOWN\n"); - TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); - return 0; - - case WM_MBUTTONUP: - WINE_TRACE("WM_MBUTTONUP\n"); - TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); - return 0; - - case WM_MOUSEMOVE: - { - if( wParam & MK_MBUTTON ) { - msg = WM_MBUTTONDOWN; - } - else if( wParam & MK_LBUTTON ) { - msg = WM_LBUTTONDOWN; - } - else { - return 0; - } - - TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); - - return 0; - } - - case WM_COMMAND: - switch(LOWORD(wParam)) { - case IDM_NEW: - CreateBoard( &board ); - return 0; - - case IDM_MARKQ: - hMenu = GetMenu( hWnd ); - board.IsMarkQ = !board.IsMarkQ; - if( board.IsMarkQ ) - CheckMenuItem( hMenu, IDM_MARKQ, MF_CHECKED ); - else - CheckMenuItem( hMenu, IDM_MARKQ, MF_UNCHECKED ); - return 0; - - case IDM_BEGINNER: - SetDifficulty( &board, BEGINNER ); - CreateBoard( &board ); - return 0; - - case IDM_ADVANCED: - SetDifficulty( &board, ADVANCED ); - CreateBoard( &board ); - return 0; - - case IDM_EXPERT: - SetDifficulty( &board, EXPERT ); - CreateBoard( &board ); - return 0; - - case IDM_CUSTOM: - SetDifficulty( &board, CUSTOM ); - CreateBoard( &board ); - return 0; - - case IDM_EXIT: - SendMessage( hWnd, WM_CLOSE, 0, 0); - return 0; - - case IDM_TIMES: - DialogBoxParam( board.hInst, "DLG_TIMES", hWnd, - TimesDlgProc, (LPARAM) &board); - return 0; + if( p_board->rows < BEGINNER_ROWS ) + p_board->rows = BEGINNER_ROWS; - case IDM_ABOUT: - { - WCHAR appname[256], other[256]; - LoadStringW( board.hInst, IDS_APPNAME, appname, sizeof(appname)/sizeof(WCHAR) ); - LoadStringW( board.hInst, IDS_ABOUT, other, sizeof(other)/sizeof(WCHAR) ); - ShellAboutW( hWnd, appname, other, - LoadImageA( board.hInst, "WINEMINE", IMAGE_ICON, 48, 48, LR_SHARED )); - return 0; - } - default: - WINE_TRACE("Unknown WM_COMMAND command message received\n"); - break; - } - } - return( DefWindowProc( hWnd, msg, wParam, lParam )); -} + if( p_board->rows > MAX_ROWS ) + p_board->rows = MAX_ROWS; -void InitBoard( BOARD *p_board ) -{ - HMENU hMenu; + if( p_board->cols < BEGINNER_COLS ) + p_board->cols = BEGINNER_COLS; - p_board->hMinesBMP = LoadBitmap( p_board->hInst, "mines"); - p_board->hFacesBMP = LoadBitmap( p_board->hInst, "faces"); - p_board->hLedsBMP = LoadBitmap( p_board->hInst, "leds"); + if( p_board->cols > MAX_COLS ) + p_board->cols = MAX_COLS; - LoadBoard( p_board ); + if( p_board->mines < BEGINNER_MINES ) + p_board->mines = BEGINNER_MINES; - hMenu = GetMenu( p_board->hWnd ); - CheckMenuItem( hMenu, IDM_BEGINNER + (unsigned) p_board->difficulty, - MF_CHECKED ); - if( p_board->IsMarkQ ) - CheckMenuItem( hMenu, IDM_MARKQ, MF_CHECKED ); - else - CheckMenuItem( hMenu, IDM_MARKQ, MF_UNCHECKED ); - CheckLevel( p_board ); + if( p_board->mines > p_board->cols * p_board->rows - 2 ) + p_board->mines = p_board->cols * p_board->rows - 2; } void LoadBoard( BOARD *p_board ) @@ -341,18 +126,38 @@ void LoadBoard( BOARD *p_board ) RegCloseKey( hkey ); } -void SaveBoard( BOARD *p_board ) +void InitBoard( BOARD *p_board ) { - HKEY hkey; - unsigned i; - char data[MAX_PLAYER_NAME_SIZE+1]; - char key_name[8]; + HMENU hMenu; - if( RegCreateKeyEx( HKEY_CURRENT_USER, registry_key, - 0, NULL, - REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, - &hkey, NULL ) != ERROR_SUCCESS) - return; + p_board->hMinesBMP = LoadBitmap( p_board->hInst, "mines"); + p_board->hFacesBMP = LoadBitmap( p_board->hInst, "faces"); + p_board->hLedsBMP = LoadBitmap( p_board->hInst, "leds"); + + LoadBoard( p_board ); + + hMenu = GetMenu( p_board->hWnd ); + CheckMenuItem( hMenu, IDM_BEGINNER + (unsigned) p_board->difficulty, + MF_CHECKED ); + if( p_board->IsMarkQ ) + CheckMenuItem( hMenu, IDM_MARKQ, MF_CHECKED ); + else + CheckMenuItem( hMenu, IDM_MARKQ, MF_UNCHECKED ); + CheckLevel( p_board ); +} + +void SaveBoard( BOARD *p_board ) +{ + HKEY hkey; + unsigned i; + char data[MAX_PLAYER_NAME_SIZE+1]; + char key_name[8]; + + if( RegCreateKeyEx( HKEY_CURRENT_USER, registry_key, + 0, NULL, + REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, + &hkey, NULL ) != ERROR_SUCCESS) + return; RegSetValueEx( hkey, "Xpos", 0, REG_DWORD, (LPBYTE) &p_board->pos.x, sizeof(p_board->pos.x) ); RegSetValueEx( hkey, "Ypos", 0, REG_DWORD, (LPBYTE) &p_board->pos.y, sizeof(p_board->pos.y) ); @@ -525,27 +330,6 @@ void CreateBoard( BOARD *p_board ) } -void CheckLevel( BOARD *p_board ) -{ - if( p_board->rows < BEGINNER_ROWS ) - p_board->rows = BEGINNER_ROWS; - - if( p_board->rows > MAX_ROWS ) - p_board->rows = MAX_ROWS; - - if( p_board->cols < BEGINNER_COLS ) - p_board->cols = BEGINNER_COLS; - - if( p_board->cols > MAX_COLS ) - p_board->cols = MAX_COLS; - - if( p_board->mines < BEGINNER_MINES ) - p_board->mines = BEGINNER_MINES; - - if( p_board->mines > p_board->cols * p_board->rows - 2 ) - p_board->mines = p_board->cols * p_board->rows - 2; -} - /* Randomly places mines everywhere except the selected box. */ void PlaceMines ( BOARD *p_board, int selected_col, int selected_row ) { @@ -588,20 +372,6 @@ void PlaceMines ( BOARD *p_board, int selected_col, int selected_row ) } } -void DrawMines ( HDC hdc, HDC hMemDC, BOARD *p_board ) -{ - HGDIOBJ hOldObj; - unsigned col, row; - hOldObj = SelectObject (hMemDC, p_board->hMinesBMP); - - for( row = 1; row <= p_board->rows; row++ ) { - for( col = 1; col <= p_board->cols; col++ ) { - DrawMine( hdc, hMemDC, p_board, col, row, FALSE ); - } - } - SelectObject( hMemDC, hOldObj ); -} - void DrawMine( HDC hdc, HDC hMemDC, BOARD *p_board, unsigned col, unsigned row, BOOL IsPressed ) { MINEBMP_OFFSET offset = BOX_BMP; @@ -679,6 +449,20 @@ void DrawMine( HDC hdc, HDC hMemDC, BOARD *p_board, unsigned col, unsigned row, hMemDC, 0, offset * MINE_HEIGHT, SRCCOPY ); } +void DrawMines ( HDC hdc, HDC hMemDC, BOARD *p_board ) +{ + HGDIOBJ hOldObj; + unsigned col, row; + hOldObj = SelectObject (hMemDC, p_board->hMinesBMP); + + for( row = 1; row <= p_board->rows; row++ ) { + for( col = 1; col <= p_board->cols; col++ ) { + DrawMine( hdc, hMemDC, p_board, col, row, FALSE ); + } + } + SelectObject( hMemDC, hOldObj ); +} + void DrawLeds( HDC hdc, HDC hMemDC, BOARD *p_board, int number, int x, int y ) { HGDIOBJ hOldObj; @@ -761,56 +545,154 @@ void DrawBoard( HDC hdc, HDC hMemDC, PAINTSTRUCT *ps, BOARD *p_board ) } -void TestBoard( HWND hWnd, BOARD *p_board, int x, int y, int msg ) +void AddFlag( BOARD *p_board, unsigned col, unsigned row ) { - POINT pt; - unsigned col,row; + if( p_board->box[col][row].FlagType != COMPLETE ) { + switch( p_board->box[col][row].FlagType ) { + case FLAG: + if( p_board->IsMarkQ ) + p_board->box[col][row].FlagType = QUESTION; + else + p_board->box[col][row].FlagType = NORMAL; + p_board->num_flags--; + break; - pt.x = x; - pt.y = y; + case QUESTION: + p_board->box[col][row].FlagType = NORMAL; + break; - if( PtInRect( &p_board->mines_rect, pt ) && p_board->status != GAMEOVER - && p_board->status != WON ) - TestMines( p_board, pt, msg ); - else { - UnpressBoxes( p_board, - p_board->press.x, - p_board->press.y ); - p_board->press.x = 0; - p_board->press.y = 0; + default: + p_board->box[col][row].FlagType = FLAG; + p_board->num_flags++; + } } +} - if( p_board->boxes_left == 0 ) { - p_board->status = WON; - if (p_board->num_flags < p_board->mines) { - for( row = 1; row <= p_board->rows; row++ ) { - for( col = 1; col <= p_board->cols; col++ ) { - if (p_board->box[col][row].IsMine && p_board->box[col][row].FlagType != FLAG) - p_board->box[col][row].FlagType = FLAG; - } - } +void UnpressBox( BOARD *p_board, unsigned col, unsigned row ) +{ + HDC hdc; + HGDIOBJ hOldObj; + HDC hMemDC; - p_board->num_flags = p_board->mines; + hdc = GetDC( p_board->hWnd ); + hMemDC = CreateCompatibleDC( hdc ); + hOldObj = SelectObject( hMemDC, p_board->hMinesBMP ); - RedrawWindow( p_board->hWnd, NULL, 0, - RDW_INVALIDATE | RDW_UPDATENOW ); + DrawMine( hdc, hMemDC, p_board, col, row, FALSE ); + + SelectObject( hMemDC, hOldObj ); + DeleteDC( hMemDC ); + ReleaseDC( p_board->hWnd, hdc ); +} + + +void UnpressBoxes( BOARD *p_board, unsigned col, unsigned row ) +{ + int i, j; + + for( i = -1; i <= 1; i++ ) + for( j = -1; j <= 1; j++ ) { + UnpressBox( p_board, col + i, row + j ); + } +} + + +void PressBox( BOARD *p_board, unsigned col, unsigned row ) +{ + HDC hdc; + HGDIOBJ hOldObj; + HDC hMemDC; + + hdc = GetDC( p_board->hWnd ); + hMemDC = CreateCompatibleDC( hdc ); + hOldObj = SelectObject (hMemDC, p_board->hMinesBMP); + + DrawMine( hdc, hMemDC, p_board, col, row, TRUE ); + + SelectObject( hMemDC, hOldObj ); + DeleteDC( hMemDC ); + ReleaseDC( p_board->hWnd, hdc ); +} + + +void PressBoxes( BOARD *p_board, unsigned col, unsigned row ) +{ + int i, j; + + for( i = -1; i <= 1; i++ ) + for( j = -1; j <= 1; j++ ) { + p_board->box[col + i][row + j].IsPressed = TRUE; + PressBox( p_board, col + i, row + j ); + } + + for( i = -1; i <= 1; i++ ) + for( j = -1; j <= 1; j++ ) { + if( !p_board->box[p_board->press.x + i][p_board->press.y + j].IsPressed ) + UnpressBox( p_board, p_board->press.x + i, p_board->press.y + j ); + } + + for( i = -1; i <= 1; i++ ) + for( j = -1; j <= 1; j++ ) { + p_board->box[col + i][row + j].IsPressed = FALSE; + PressBox( p_board, col + i, row + j ); + } + + p_board->press.x = col; + p_board->press.y = row; +} + + +void CompleteBox( BOARD *p_board, unsigned col, unsigned row ) +{ + int i, j; + + if( p_board->box[col][row].FlagType != COMPLETE && + p_board->box[col][row].FlagType != FLAG && + col > 0 && col < p_board->cols + 1 && + row > 0 && row < p_board->rows + 1 ) { + p_board->box[col][row].FlagType = COMPLETE; + + if( p_board->box[col][row].IsMine ) { + p_board->face_bmp = DEAD_BMP; + p_board->status = GAMEOVER; } + else if( p_board->status != GAMEOVER ) + p_board->boxes_left--; - if( p_board->difficulty != CUSTOM && - p_board->time < p_board->best_time[p_board->difficulty] ) { - p_board->best_time[p_board->difficulty] = p_board->time; + if( p_board->box[col][row].NumMines == 0 ) + { + for( i = -1; i <= 1; i++ ) + for( j = -1; j <= 1; j++ ) + CompleteBox( p_board, col + i, row + j ); + } + } +} - DialogBoxParam( p_board->hInst, "DLG_CONGRATS", hWnd, - CongratsDlgProc, (LPARAM) p_board); - DialogBoxParam( p_board->hInst, "DLG_TIMES", hWnd, - TimesDlgProc, (LPARAM) p_board); +void CompleteBoxes( BOARD *p_board, unsigned col, unsigned row ) +{ + unsigned numFlags = 0; + int i, j; + + if( p_board->box[col][row].FlagType == COMPLETE ) { + for( i = -1; i <= 1; i++ ) + for( j = -1; j <= 1; j++ ) { + if( p_board->box[col+i][row+j].FlagType == FLAG ) + numFlags++; + } + + if( numFlags == p_board->box[col][row].NumMines ) { + for( i = -1; i <= 1; i++ ) + for( j = -1; j <= 1; j++ ) { + if( p_board->box[col+i][row+j].FlagType != FLAG ) + CompleteBox( p_board, col+i, row+j ); + } } } - TestFace( p_board, pt, msg ); } + void TestMines( BOARD *p_board, POINT pt, int msg ) { BOOL draw = TRUE; @@ -901,149 +783,269 @@ void TestFace( BOARD *p_board, POINT pt, int msg ) } -void CompleteBox( BOARD *p_board, unsigned col, unsigned row ) +void TestBoard( HWND hWnd, BOARD *p_board, int x, int y, int msg ) { - int i, j; + POINT pt; + unsigned col,row; - if( p_board->box[col][row].FlagType != COMPLETE && - p_board->box[col][row].FlagType != FLAG && - col > 0 && col < p_board->cols + 1 && - row > 0 && row < p_board->rows + 1 ) { - p_board->box[col][row].FlagType = COMPLETE; + pt.x = x; + pt.y = y; - if( p_board->box[col][row].IsMine ) { - p_board->face_bmp = DEAD_BMP; - p_board->status = GAMEOVER; - } - else if( p_board->status != GAMEOVER ) - p_board->boxes_left--; - - if( p_board->box[col][row].NumMines == 0 ) - { - for( i = -1; i <= 1; i++ ) - for( j = -1; j <= 1; j++ ) - CompleteBox( p_board, col + i, row + j ); - } + if( PtInRect( &p_board->mines_rect, pt ) && p_board->status != GAMEOVER + && p_board->status != WON ) + TestMines( p_board, pt, msg ); + else { + UnpressBoxes( p_board, + p_board->press.x, + p_board->press.y ); + p_board->press.x = 0; + p_board->press.y = 0; } -} + if( p_board->boxes_left == 0 ) { + p_board->status = WON; -void CompleteBoxes( BOARD *p_board, unsigned col, unsigned row ) -{ - unsigned numFlags = 0; - int i, j; + if (p_board->num_flags < p_board->mines) { + for( row = 1; row <= p_board->rows; row++ ) { + for( col = 1; col <= p_board->cols; col++ ) { + if (p_board->box[col][row].IsMine && p_board->box[col][row].FlagType != FLAG) + p_board->box[col][row].FlagType = FLAG; + } + } - if( p_board->box[col][row].FlagType == COMPLETE ) { - for( i = -1; i <= 1; i++ ) - for( j = -1; j <= 1; j++ ) { - if( p_board->box[col+i][row+j].FlagType == FLAG ) - numFlags++; - } + p_board->num_flags = p_board->mines; - if( numFlags == p_board->box[col][row].NumMines ) { - for( i = -1; i <= 1; i++ ) - for( j = -1; j <= 1; j++ ) { - if( p_board->box[col+i][row+j].FlagType != FLAG ) - CompleteBox( p_board, col+i, row+j ); - } + RedrawWindow( p_board->hWnd, NULL, 0, + RDW_INVALIDATE | RDW_UPDATENOW ); } - } -} - -void AddFlag( BOARD *p_board, unsigned col, unsigned row ) -{ - if( p_board->box[col][row].FlagType != COMPLETE ) { - switch( p_board->box[col][row].FlagType ) { - case FLAG: - if( p_board->IsMarkQ ) - p_board->box[col][row].FlagType = QUESTION; - else - p_board->box[col][row].FlagType = NORMAL; - p_board->num_flags--; - break; + if( p_board->difficulty != CUSTOM && + p_board->time < p_board->best_time[p_board->difficulty] ) { + p_board->best_time[p_board->difficulty] = p_board->time; - case QUESTION: - p_board->box[col][row].FlagType = NORMAL; - break; + DialogBoxParam( p_board->hInst, "DLG_CONGRATS", hWnd, + CongratsDlgProc, (LPARAM) p_board); - default: - p_board->box[col][row].FlagType = FLAG; - p_board->num_flags++; + DialogBoxParam( p_board->hInst, "DLG_TIMES", hWnd, + TimesDlgProc, (LPARAM) p_board); } } + TestFace( p_board, pt, msg ); } -void PressBox( BOARD *p_board, unsigned col, unsigned row ) +LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { HDC hdc; - HGDIOBJ hOldObj; - HDC hMemDC; + PAINTSTRUCT ps; + HMENU hMenu; + static BOARD board; - hdc = GetDC( p_board->hWnd ); - hMemDC = CreateCompatibleDC( hdc ); - hOldObj = SelectObject (hMemDC, p_board->hMinesBMP); + switch( msg ) { + case WM_CREATE: + board.hInst = ((LPCREATESTRUCT) lParam)->hInstance; + board.hWnd = hWnd; + InitBoard( &board ); + CreateBoard( &board ); + return 0; - DrawMine( hdc, hMemDC, p_board, col, row, TRUE ); + case WM_PAINT: + { + HDC hMemDC; - SelectObject( hMemDC, hOldObj ); - DeleteDC( hMemDC ); - ReleaseDC( p_board->hWnd, hdc ); -} + WINE_TRACE("WM_PAINT\n"); + hdc = BeginPaint( hWnd, &ps ); + hMemDC = CreateCompatibleDC( hdc ); + DrawBoard( hdc, hMemDC, &ps, &board ); -void PressBoxes( BOARD *p_board, unsigned col, unsigned row ) -{ - int i, j; + DeleteDC( hMemDC ); + EndPaint( hWnd, &ps ); - for( i = -1; i <= 1; i++ ) - for( j = -1; j <= 1; j++ ) { - p_board->box[col + i][row + j].IsPressed = TRUE; - PressBox( p_board, col + i, row + j ); - } + return 0; + } - for( i = -1; i <= 1; i++ ) - for( j = -1; j <= 1; j++ ) { - if( !p_board->box[p_board->press.x + i][p_board->press.y + j].IsPressed ) - UnpressBox( p_board, p_board->press.x + i, p_board->press.y + j ); - } + case WM_MOVE: + WINE_TRACE("WM_MOVE\n"); + board.pos.x = (short)LOWORD(lParam); + board.pos.y = (short)HIWORD(lParam); + return 0; - for( i = -1; i <= 1; i++ ) - for( j = -1; j <= 1; j++ ) { - p_board->box[col + i][row + j].IsPressed = FALSE; - PressBox( p_board, col + i, row + j ); + case WM_DESTROY: + SaveBoard( &board ); + DestroyBoard( &board ); + PostQuitMessage( 0 ); + return 0; + + case WM_TIMER: + if( board.status == PLAYING ) { + board.time++; + RedrawWindow( hWnd, &board.timer_rect, 0, + RDW_INVALIDATE | RDW_UPDATENOW ); + } + return 0; + + case WM_LBUTTONDOWN: + WINE_TRACE("WM_LBUTTONDOWN\n"); + if( wParam & MK_RBUTTON ) + msg = WM_MBUTTONDOWN; + TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); + SetCapture( hWnd ); + return 0; + + case WM_LBUTTONUP: + WINE_TRACE("WM_LBUTTONUP\n"); + if( wParam & MK_RBUTTON ) + msg = WM_MBUTTONUP; + TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); + ReleaseCapture(); + return 0; + + case WM_RBUTTONDOWN: + WINE_TRACE("WM_RBUTTONDOWN\n"); + if( wParam & MK_LBUTTON ) { + board.press.x = 0; + board.press.y = 0; + msg = WM_MBUTTONDOWN; + } + TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); + return 0; + + case WM_RBUTTONUP: + WINE_TRACE("WM_RBUTTONUP\n"); + if( wParam & MK_LBUTTON ) + msg = WM_MBUTTONUP; + TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); + return 0; + + case WM_MBUTTONDOWN: + WINE_TRACE("WM_MBUTTONDOWN\n"); + TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); + return 0; + + case WM_MBUTTONUP: + WINE_TRACE("WM_MBUTTONUP\n"); + TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); + return 0; + + case WM_MOUSEMOVE: + { + if( wParam & MK_MBUTTON ) { + msg = WM_MBUTTONDOWN; + } + else if( wParam & MK_LBUTTON ) { + msg = WM_LBUTTONDOWN; + } + else { + return 0; + } + + TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); + + return 0; } - p_board->press.x = col; - p_board->press.y = row; -} + case WM_COMMAND: + switch(LOWORD(wParam)) { + case IDM_NEW: + CreateBoard( &board ); + return 0; + case IDM_MARKQ: + hMenu = GetMenu( hWnd ); + board.IsMarkQ = !board.IsMarkQ; + if( board.IsMarkQ ) + CheckMenuItem( hMenu, IDM_MARKQ, MF_CHECKED ); + else + CheckMenuItem( hMenu, IDM_MARKQ, MF_UNCHECKED ); + return 0; -void UnpressBox( BOARD *p_board, unsigned col, unsigned row ) -{ - HDC hdc; - HGDIOBJ hOldObj; - HDC hMemDC; + case IDM_BEGINNER: + SetDifficulty( &board, BEGINNER ); + CreateBoard( &board ); + return 0; - hdc = GetDC( p_board->hWnd ); - hMemDC = CreateCompatibleDC( hdc ); - hOldObj = SelectObject( hMemDC, p_board->hMinesBMP ); + case IDM_ADVANCED: + SetDifficulty( &board, ADVANCED ); + CreateBoard( &board ); + return 0; - DrawMine( hdc, hMemDC, p_board, col, row, FALSE ); + case IDM_EXPERT: + SetDifficulty( &board, EXPERT ); + CreateBoard( &board ); + return 0; - SelectObject( hMemDC, hOldObj ); - DeleteDC( hMemDC ); - ReleaseDC( p_board->hWnd, hdc ); -} + case IDM_CUSTOM: + SetDifficulty( &board, CUSTOM ); + CreateBoard( &board ); + return 0; + + case IDM_EXIT: + SendMessage( hWnd, WM_CLOSE, 0, 0); + return 0; + case IDM_TIMES: + DialogBoxParam( board.hInst, "DLG_TIMES", hWnd, + TimesDlgProc, (LPARAM) &board); + return 0; -void UnpressBoxes( BOARD *p_board, unsigned col, unsigned row ) + case IDM_ABOUT: + { + WCHAR appname[256], other[256]; + LoadStringW( board.hInst, IDS_APPNAME, appname, sizeof(appname)/sizeof(WCHAR) ); + LoadStringW( board.hInst, IDS_ABOUT, other, sizeof(other)/sizeof(WCHAR) ); + ShellAboutW( hWnd, appname, other, + LoadImageA( board.hInst, "WINEMINE", IMAGE_ICON, 48, 48, LR_SHARED )); + return 0; + } + default: + WINE_TRACE("Unknown WM_COMMAND command message received\n"); + break; + } + } + return( DefWindowProc( hWnd, msg, wParam, lParam )); +} + +int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow ) { - int i, j; + MSG msg; + WNDCLASS wc; + HWND hWnd; + HACCEL haccel; + char appname[20]; - for( i = -1; i <= 1; i++ ) - for( j = -1; j <= 1; j++ ) { - UnpressBox( p_board, col + i, row + j ); - } + LoadString( hInst, IDS_APPNAME, appname, sizeof(appname)); + + wc.style = 0; + wc.lpfnWndProc = MainProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInst; + wc.hIcon = LoadIcon( hInst, "WINEMINE" ); + wc.hCursor = LoadCursor( 0, IDI_APPLICATION ); + wc.hbrBackground = (HBRUSH) GetStockObject( BLACK_BRUSH ); + wc.lpszMenuName = "MENU_WINEMINE"; + wc.lpszClassName = appname; + + if (!RegisterClass(&wc)) ExitProcess(1); + hWnd = CreateWindow( appname, appname, + wnd_style, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + 0, 0, hInst, NULL ); + + if (!hWnd) ExitProcess(1); + + ShowWindow( hWnd, cmdshow ); + UpdateWindow( hWnd ); + + haccel = LoadAccelerators( hInst, MAKEINTRESOURCE(IDA_WINEMINE) ); + SetTimer( hWnd, ID_TIMER, 1000, NULL ); + + while( GetMessage(&msg, 0, 0, 0) ) { + if (!TranslateAccelerator( hWnd, haccel, &msg )) + TranslateMessage( &msg ); + + DispatchMessage( &msg ); + } + return msg.wParam; } diff --git a/programs/winemine/main.h b/programs/winemine/main.h index a813c95f04a..396f19e0eb7 100644 --- a/programs/winemine/main.h +++ b/programs/winemine/main.h @@ -120,64 +120,13 @@ typedef struct tagBOARD } BOARD; -void ExitApp( int error ); - -void InitBoard( BOARD *p_board ); - -void LoadBoard( BOARD *p_board ); - -void SaveBoard( BOARD *p_board ); - -void DestroyBoard( BOARD *p_board ); - -void SetDifficulty( BOARD *p_board, DIFFICULTY difficulty ); - void CheckLevel( BOARD *p_board ); -void CreateBoard( BOARD *p_board ); - -void PlaceMines ( BOARD *p_board, int selected_col, int selected_row ); - -void TestBoard( HWND hWnd, BOARD *p_board, int x, int y, int msg ); - -void TestMines( BOARD *p_board, POINT pt, int msg ); - -void TestFace( BOARD *p_board, POINT pt, int msg ); - -void DrawBoard( HDC hdc, HDC hMemDC, PAINTSTRUCT *ps, BOARD *p_board ); - -void DrawMines( HDC hdc, HDC hMemDC, BOARD *p_board ); - -void DrawMine( HDC hdc, HDC hMemDC, BOARD *p_board, unsigned col, unsigned row, BOOL IsPressed ); - -void AddFlag( BOARD *p_board, unsigned col, unsigned row ); - -void CompleteBox( BOARD *p_board, unsigned col, unsigned row ); - -void CompleteBoxes( BOARD *p_board, unsigned col, unsigned row ); - -void PressBox( BOARD *p_board, unsigned col, unsigned row ); - -void PressBoxes( BOARD *p_board, unsigned col, unsigned row ); - -void UnpressBox( BOARD *p_board, unsigned col, unsigned row ); - -void UnpressBoxes( BOARD *p_board, unsigned col, unsigned row ); - -void UpdateTimer( BOARD *p_board ); - -void DrawLeds( HDC hdc, HDC hMemDC, BOARD *p_board, int number, int x, int y); - -void DrawFace( HDC hdc, HDC hMemDC, BOARD *p_board ); - -LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); - INT_PTR CALLBACK CustomDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ); INT_PTR CALLBACK CongratsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ); INT_PTR CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ); -INT_PTR CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ); /* end of header */ diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in index b89041f758b..1139ee36327 100644 --- a/programs/winetest/Makefile.in +++ b/programs/winetest/Makefile.in @@ -52,7 +52,7 @@ winetest-dist: $(WINEWRAPPER) $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@ winetest-dist.exe: $(OBJS) dist.res.o Makefile.in - $(CC) $(APPMODE) $(OBJS) dist.res.o -o $@ $(DELAYIMPORTS:%=-l%) $(ALL_LIBS) + $(CC) $(APPMODE) $(OBJS) dist.res.o -o $@ -L$(DLLDIR) $(IMPORTS:%=-L$(DLLDIR)/%) $(ALL_LIBS) -upx -9 -qqq $@ dist.res: winetest.rc tests.rc build.nfo tests.url winetest.ico $(TESTBINS) diff --git a/programs/xcopy/xcopy.c b/programs/xcopy/xcopy.c index 273047c29ff..e89c404b2c2 100644 --- a/programs/xcopy/xcopy.c +++ b/programs/xcopy/xcopy.c @@ -43,6 +43,7 @@ #include #include #include +#include #include "xcopy.h" WINE_DEFAULT_DEBUG_CHANNEL(xcopy); @@ -999,9 +1000,8 @@ int XCOPY_wprintf(const WCHAR *format, ...) { return 0; } - /* Use wvsprintf to store output into unicode buffer */ va_start(parms, format); - len = vswprintf(output_bufW, format, parms); + len = vsnprintfW(output_bufW, MAX_WRITECONSOLE_SIZE/sizeof(WCHAR), format, parms); va_end(parms); /* Try to write as unicode all the time we think its a console */ diff --git a/server/async.c b/server/async.c index f3186d77255..0a69f7ae5ee 100644 --- a/server/async.c +++ b/server/async.c @@ -234,7 +234,7 @@ void async_set_timeout( struct async *async, timeout_t timeout, unsigned int sta } /* store the result of the client-side async callback */ -void async_set_result( struct object *obj, unsigned int status, unsigned int total ) +void async_set_result( struct object *obj, unsigned int status, unsigned int total, client_ptr_t apc ) { struct async *async = (struct async *)obj; @@ -260,14 +260,14 @@ void async_set_result( struct object *obj, unsigned int status, unsigned int tot async->status = status; if (async->completion && async->data.cvalue) add_completion( async->completion, async->comp_key, async->data.cvalue, status, total ); - if (async->data.apc) + if (apc) { apc_call_t data; memset( &data, 0, sizeof(data) ); data.type = APC_USER; - data.user.func = async->data.apc; - data.user.args[0] = (apc_param_t)(unsigned long)async->data.arg; - data.user.args[1] = (apc_param_t)(unsigned long)async->data.iosb; + data.user.func = apc; + data.user.args[0] = async->data.arg; + data.user.args[1] = async->data.iosb; data.user.args[2] = 0; thread_queue_apc( async->thread, NULL, &data ); } diff --git a/server/change.c b/server/change.c index aded8490919..63985f4bc67 100644 --- a/server/change.c +++ b/server/change.c @@ -1139,12 +1139,12 @@ DECL_HANDLER(read_directory_changes) return; } - dir = get_dir_obj( current->process, req->handle, 0 ); + dir = get_dir_obj( current->process, req->async.handle, 0 ); if (!dir) return; /* requests don't timeout */ - if (!(async = fd_queue_async( dir->fd, &req->async, ASYNC_TYPE_WAIT, 0 ))) goto end; + if (!(async = fd_queue_async( dir->fd, &req->async, ASYNC_TYPE_WAIT ))) goto end; /* assign it once */ if (!dir->filter) diff --git a/server/class.c b/server/class.c index 5c30738dc82..0e402ba6314 100644 --- a/server/class.c +++ b/server/class.c @@ -46,10 +46,10 @@ struct window_class int count; /* reference count */ int local; /* local class? */ atom_t atom; /* class atom */ - void *instance; /* module instance */ + mod_handle_t instance; /* module instance */ unsigned int style; /* class style */ int win_extra; /* number of window extra bytes */ - void *client_ptr; /* pointer to class in client address space */ + client_ptr_t client_ptr; /* pointer to class in client address space */ int nb_extra_bytes; /* number of extra bytes */ char extra_bytes[1]; /* extra bytes storage */ }; @@ -91,7 +91,7 @@ void destroy_process_classes( struct process *process ) } } -static struct window_class *find_class( struct process *process, atom_t atom, void *instance ) +static struct window_class *find_class( struct process *process, atom_t atom, mod_handle_t instance ) { struct list *ptr; @@ -105,7 +105,7 @@ static struct window_class *find_class( struct process *process, atom_t atom, vo } struct window_class *grab_class( struct process *process, atom_t atom, - void *instance, int *extra_bytes ) + mod_handle_t instance, int *extra_bytes ) { struct window_class *class = find_class( process, atom, instance ); if (class) @@ -141,7 +141,7 @@ atom_t get_class_atom( struct window_class *class ) return class->atom; } -void *get_class_client_ptr( struct window_class *class ) +client_ptr_t get_class_client_ptr( struct window_class *class ) { return class->client_ptr; } diff --git a/server/context_alpha.c b/server/context_alpha.c index 29bd73e3850..3aed4f80d8f 100644 --- a/server/context_alpha.c +++ b/server/context_alpha.c @@ -327,9 +327,9 @@ void copy_context( CONTEXT *to, const CONTEXT *from, unsigned int flags ) } /* retrieve the current instruction pointer of a context */ -void *get_context_ip( const CONTEXT *context ) +client_ptr_t get_context_ip( const CONTEXT *context ) { - return (void *)context->Fir; + return context->Fir; } /* return the context flag that contains the CPU id */ diff --git a/server/context_i386.c b/server/context_i386.c index 57709fe0491..458b04f316e 100644 --- a/server/context_i386.c +++ b/server/context_i386.c @@ -83,9 +83,9 @@ void copy_context( CONTEXT *to, const CONTEXT *from, unsigned int flags ) } /* retrieve the current instruction pointer of a context */ -void *get_context_ip( const CONTEXT *context ) +client_ptr_t get_context_ip( const CONTEXT *context ) { - return (void *)context->Eip; + return context->Eip; } /* return the context flag that contains the CPU id */ diff --git a/server/context_powerpc.c b/server/context_powerpc.c index 5ce63648cd1..9825a4a9fb9 100644 --- a/server/context_powerpc.c +++ b/server/context_powerpc.c @@ -265,9 +265,9 @@ void copy_context( CONTEXT *to, const CONTEXT *from, unsigned int flags ) } /* retrieve the current instruction pointer of a context */ -void *get_context_ip( const CONTEXT *context ) +client_ptr_t get_context_ip( const CONTEXT *context ) { - return (void *)context->Iar; + return context->Iar; } /* return the context flag that contains the CPU id */ diff --git a/server/context_sparc.c b/server/context_sparc.c index 5d70271d0e2..b94d917d53f 100644 --- a/server/context_sparc.c +++ b/server/context_sparc.c @@ -163,9 +163,9 @@ void copy_context( CONTEXT *to, const CONTEXT *from, unsigned int flags ) } /* retrieve the current instruction pointer of a context */ -void *get_context_ip( const CONTEXT *context ) +client_ptr_t get_context_ip( const CONTEXT *context ) { - return (void *)context->pc; + return context->pc; } /* return the context flag that contains the CPU id */ diff --git a/server/context_x86_64.c b/server/context_x86_64.c index e45cbc0e251..264c549e20b 100644 --- a/server/context_x86_64.c +++ b/server/context_x86_64.c @@ -83,9 +83,9 @@ void copy_context( CONTEXT *to, const CONTEXT *from, unsigned int flags ) } /* retrieve the current instruction pointer of a context */ -void *get_context_ip( const CONTEXT *context ) +client_ptr_t get_context_ip( const CONTEXT *context ) { - return (void *)context->Rip; + return context->Rip; } /* return the context flag that contains the CPU id */ diff --git a/server/debugger.c b/server/debugger.c index 37ddd689c69..9399cb302d8 100644 --- a/server/debugger.c +++ b/server/debugger.c @@ -112,111 +112,116 @@ static const struct object_ops debug_ctx_ops = /* routines to build an event according to its type */ -static int fill_exception_event( struct debug_event *event, void *arg ) +static int fill_exception_event( struct debug_event *event, const void *arg ) { - memcpy( &event->data.info.exception, arg, sizeof(event->data.info.exception) ); + const debug_event_t *data = arg; + event->data.exception = data->exception; + event->data.exception.nb_params = min( event->data.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS ); return 1; } -static int fill_create_thread_event( struct debug_event *event, void *arg ) +static int fill_create_thread_event( struct debug_event *event, const void *arg ) { struct process *debugger = event->debugger->process; struct thread *thread = event->sender; + const client_ptr_t *entry = arg; obj_handle_t handle; /* documented: THREAD_GET_CONTEXT | THREAD_SET_CONTEXT | THREAD_SUSPEND_RESUME */ if (!(handle = alloc_handle( debugger, thread, THREAD_ALL_ACCESS, 0 ))) return 0; - event->data.info.create_thread.handle = handle; - event->data.info.create_thread.teb = thread->teb; - event->data.info.create_thread.start = arg; + event->data.create_thread.handle = handle; + event->data.create_thread.teb = thread->teb; + if (entry) event->data.create_thread.start = *entry; return 1; } -static int fill_create_process_event( struct debug_event *event, void *arg ) +static int fill_create_process_event( struct debug_event *event, const void *arg ) { struct process *debugger = event->debugger->process; struct thread *thread = event->sender; struct process *process = thread->process; struct process_dll *exe_module = get_process_exe_module( process ); + const client_ptr_t *entry = arg; obj_handle_t handle; /* documented: PROCESS_VM_READ | PROCESS_VM_WRITE */ if (!(handle = alloc_handle( debugger, process, PROCESS_ALL_ACCESS, 0 ))) return 0; - event->data.info.create_process.process = handle; + event->data.create_process.process = handle; /* documented: THREAD_GET_CONTEXT | THREAD_SET_CONTEXT | THREAD_SUSPEND_RESUME */ if (!(handle = alloc_handle( debugger, thread, THREAD_ALL_ACCESS, 0 ))) { - close_handle( debugger, event->data.info.create_process.process ); + close_handle( debugger, event->data.create_process.process ); return 0; } - event->data.info.create_process.thread = handle; + event->data.create_process.thread = handle; handle = 0; if (exe_module->file && /* the doc says write access too, but this doesn't seem a good idea */ !(handle = alloc_handle( debugger, exe_module->file, GENERIC_READ, 0 ))) { - close_handle( debugger, event->data.info.create_process.process ); - close_handle( debugger, event->data.info.create_process.thread ); + close_handle( debugger, event->data.create_process.process ); + close_handle( debugger, event->data.create_process.thread ); return 0; } - event->data.info.create_process.file = handle; - event->data.info.create_process.teb = thread->teb; - event->data.info.create_process.base = exe_module->base; - event->data.info.create_process.start = arg; - event->data.info.create_process.dbg_offset = exe_module->dbg_offset; - event->data.info.create_process.dbg_size = exe_module->dbg_size; - event->data.info.create_process.name = exe_module->name; - event->data.info.create_process.unicode = 1; + event->data.create_process.file = handle; + event->data.create_process.teb = thread->teb; + event->data.create_process.base = exe_module->base; + event->data.create_process.start = *entry; + event->data.create_process.dbg_offset = exe_module->dbg_offset; + event->data.create_process.dbg_size = exe_module->dbg_size; + event->data.create_process.name = exe_module->name; + event->data.create_process.unicode = 1; return 1; } -static int fill_exit_thread_event( struct debug_event *event, void *arg ) +static int fill_exit_thread_event( struct debug_event *event, const void *arg ) { - struct thread *thread = arg; - event->data.info.exit.exit_code = thread->exit_code; + const struct thread *thread = arg; + event->data.exit.exit_code = thread->exit_code; return 1; } -static int fill_exit_process_event( struct debug_event *event, void *arg ) +static int fill_exit_process_event( struct debug_event *event, const void *arg ) { - struct process *process = arg; - event->data.info.exit.exit_code = process->exit_code; + const struct process *process = arg; + event->data.exit.exit_code = process->exit_code; return 1; } -static int fill_load_dll_event( struct debug_event *event, void *arg ) +static int fill_load_dll_event( struct debug_event *event, const void *arg ) { struct process *debugger = event->debugger->process; - struct process_dll *dll = arg; + const struct process_dll *dll = arg; obj_handle_t handle = 0; if (dll->file && !(handle = alloc_handle( debugger, dll->file, GENERIC_READ, 0 ))) return 0; - event->data.info.load_dll.handle = handle; - event->data.info.load_dll.base = dll->base; - event->data.info.load_dll.dbg_offset = dll->dbg_offset; - event->data.info.load_dll.dbg_size = dll->dbg_size; - event->data.info.load_dll.name = dll->name; - event->data.info.load_dll.unicode = 1; + event->data.load_dll.handle = handle; + event->data.load_dll.base = dll->base; + event->data.load_dll.dbg_offset = dll->dbg_offset; + event->data.load_dll.dbg_size = dll->dbg_size; + event->data.load_dll.name = dll->name; + event->data.load_dll.unicode = 1; return 1; } -static int fill_unload_dll_event( struct debug_event *event, void *arg ) +static int fill_unload_dll_event( struct debug_event *event, const void *arg ) { - event->data.info.unload_dll.base = arg; + const mod_handle_t *base = arg; + event->data.unload_dll.base = *base; return 1; } -static int fill_output_debug_string_event( struct debug_event *event, void *arg ) +static int fill_output_debug_string_event( struct debug_event *event, const void *arg ) { - struct debug_event_output_string *data = arg; - event->data.info.output_string = *data; + const debug_event_t *data = arg; + event->data.output_string = data->output_string; return 1; } -typedef int (*fill_event_func)( struct debug_event *event, void *arg ); +typedef int (*fill_event_func)( struct debug_event *event, const void *arg ); #define NB_DEBUG_EVENTS OUTPUT_DEBUG_STRING_EVENT /* RIP_EVENT not supported */ @@ -294,17 +299,17 @@ static void debug_event_destroy( struct object *obj ) switch(event->data.code) { case CREATE_THREAD_DEBUG_EVENT: - close_handle( debugger, event->data.info.create_thread.handle ); + close_handle( debugger, event->data.create_thread.handle ); break; case CREATE_PROCESS_DEBUG_EVENT: - if (event->data.info.create_process.file) - close_handle( debugger, event->data.info.create_process.file ); - close_handle( debugger, event->data.info.create_process.thread ); - close_handle( debugger, event->data.info.create_process.process ); + if (event->data.create_process.file) + close_handle( debugger, event->data.create_process.file ); + close_handle( debugger, event->data.create_process.thread ); + close_handle( debugger, event->data.create_process.process ); break; case LOAD_DLL_DEBUG_EVENT: - if (event->data.info.load_dll.handle) - close_handle( debugger, event->data.info.load_dll.handle ); + if (event->data.load_dll.handle) + close_handle( debugger, event->data.load_dll.handle ); break; } } @@ -371,8 +376,7 @@ static int continue_debug_event( struct process *process, struct thread *thread, } /* alloc a debug event for a debugger */ -static struct debug_event *alloc_debug_event( struct thread *thread, int code, - void *arg, const CONTEXT *context ) +static struct debug_event *alloc_debug_event( struct thread *thread, int code, const void *arg ) { struct thread *debugger = thread->process->debugger; struct debug_event *event; @@ -386,7 +390,7 @@ static struct debug_event *alloc_debug_event( struct thread *thread, int code, event->state = EVENT_QUEUED; event->sender = (struct thread *)grab_object( thread ); event->debugger = (struct thread *)grab_object( debugger ); - event->data.code = code; + memset( &event->data, 0, sizeof(event->data) ); if (!fill_debug_event[code-1]( event, arg )) { @@ -394,20 +398,16 @@ static struct debug_event *alloc_debug_event( struct thread *thread, int code, release_object( event ); return NULL; } - if (context) - { - memcpy( &event->context, context, sizeof(event->context) ); - thread->context = &event->context; - } + event->data.code = code; return event; } /* generate a debug event from inside the server and queue it */ -void generate_debug_event( struct thread *thread, int code, void *arg ) +void generate_debug_event( struct thread *thread, int code, const void *arg ) { if (thread->process->debugger) { - struct debug_event *event = alloc_debug_event( thread, code, arg, NULL ); + struct debug_event *event = alloc_debug_event( thread, code, arg ); if (event) { link_event( event ); @@ -498,7 +498,7 @@ int debugger_detach( struct process *process, struct thread *debugger ) } /* generate all startup events of a given process */ -void generate_startup_debug_events( struct process *process, void *entry ) +void generate_startup_debug_events( struct process *process, client_ptr_t entry ) { struct list *ptr; struct thread *thread, *first_thread = get_process_first_thread( process ); @@ -507,7 +507,7 @@ void generate_startup_debug_events( struct process *process, void *entry ) LIST_FOR_EACH_ENTRY( thread, &process->thread_list, struct thread, proc_entry ) { if (thread == first_thread) - generate_debug_event( thread, CREATE_PROCESS_DEBUG_EVENT, entry ); + generate_debug_event( thread, CREATE_PROCESS_DEBUG_EVENT, &entry ); else generate_debug_event( thread, CREATE_THREAD_DEBUG_EVENT, NULL ); } @@ -618,7 +618,7 @@ DECL_HANDLER(debug_process) } else if (debugger_attach( process, current )) { - generate_startup_debug_events( process, NULL ); + generate_startup_debug_events( process, 0 ); break_process( process ); resume_process( process ); } @@ -631,20 +631,34 @@ DECL_HANDLER(queue_exception_event) reply->handle = 0; if (current->process->debugger) { - struct debug_event_exception data; + debug_event_t data; struct debug_event *event; - const CONTEXT *context = get_req_data(); - const EXCEPTION_RECORD *rec = (const EXCEPTION_RECORD *)(context + 1); - if (get_req_data_size() < sizeof(*rec) + sizeof(*context)) + if ((req->len % sizeof(client_ptr_t)) != 0 || + req->len > get_req_data_size() || + req->len > EXCEPTION_MAXIMUM_PARAMETERS * sizeof(client_ptr_t)) { set_error( STATUS_INVALID_PARAMETER ); return; } - data.record = *rec; - data.first = req->first; - if ((event = alloc_debug_event( current, EXCEPTION_DEBUG_EVENT, &data, context ))) + memset( &data, 0, sizeof(data) ); + data.exception.first = req->first; + data.exception.exc_code = req->code; + data.exception.flags = req->flags; + data.exception.record = req->record; + data.exception.address = req->address; + data.exception.nb_params = req->len / sizeof(client_ptr_t); + memcpy( data.exception.params, get_req_data(), req->len ); + + if ((event = alloc_debug_event( current, EXCEPTION_DEBUG_EVENT, &data ))) { + const CONTEXT *context = (const CONTEXT *)((char *)get_req_data() + req->len); + data_size_t size = get_req_data_size() - req->len; + + memset( &event->context, 0, sizeof(event->context) ); + memcpy( &event->context, context, size ); + current->context = &event->context; + if ((reply->handle = alloc_handle( current->process, event, SYNCHRONIZE, 0 ))) { link_event( event ); @@ -682,11 +696,11 @@ DECL_HANDLER(get_exception_status) /* send an output string to the debugger */ DECL_HANDLER(output_debug_string) { - struct debug_event_output_string data; + debug_event_t data; - data.string = req->string; - data.unicode = req->unicode; - data.length = req->length; + data.output_string.string = req->string; + data.output_string.unicode = req->unicode; + data.output_string.length = req->length; generate_debug_event( current, OUTPUT_DEBUG_STRING_EVENT, &data ); } diff --git a/server/device.c b/server/device.c index abf0ac54170..4d134a30a3a 100644 --- a/server/device.c +++ b/server/device.c @@ -40,7 +40,7 @@ struct ioctl_call struct list mgr_entry; /* entry in manager queue */ struct device *device; /* device containing this ioctl */ struct thread *thread; /* thread that queued the ioctl */ - void *user_arg; /* user arg used to identify the request */ + client_ptr_t user_arg; /* user arg used to identify the request */ struct async *async; /* pending async op */ ioctl_code_t code; /* ioctl code */ unsigned int status; /* resulting status (or STATUS_PENDING) */ @@ -112,7 +112,7 @@ struct device struct object obj; /* object header */ struct device_manager *manager; /* manager for this device (or NULL if deleted) */ struct fd *fd; /* file descriptor for ioctl */ - void *user_ptr; /* opaque ptr for client side */ + client_ptr_t user_ptr; /* opaque ptr for client side */ struct list entry; /* entry in device manager list */ struct list requests; /* list of pending ioctl requests */ }; @@ -125,7 +125,7 @@ static struct object *device_open_file( struct object *obj, unsigned int access, unsigned int sharing, unsigned int options ); static enum server_fd_type device_get_fd_type( struct fd *fd ); static obj_handle_t device_ioctl( struct fd *fd, ioctl_code_t code, const async_data_t *async_data, - const void *data, data_size_t size ); + int blocking, const void *data, data_size_t size ); static const struct object_ops device_ops = { @@ -296,7 +296,7 @@ static enum server_fd_type device_get_fd_type( struct fd *fd ) } static struct ioctl_call *find_ioctl_call( struct device *device, struct thread *thread, - void *user_arg ) + client_ptr_t user_arg ) { struct ioctl_call *ioctl; @@ -308,7 +308,7 @@ static struct ioctl_call *find_ioctl_call( struct device *device, struct thread } static obj_handle_t device_ioctl( struct fd *fd, ioctl_code_t code, const async_data_t *async_data, - const void *data, data_size_t size ) + int blocking, const void *data, data_size_t size ) { struct device *device = get_fd_user( fd ); struct ioctl_call *ioctl; @@ -332,7 +332,7 @@ static obj_handle_t device_ioctl( struct fd *fd, ioctl_code_t code, const async_ return 0; } - if (!(ioctl->async = fd_queue_async( device->fd, async_data, ASYNC_TYPE_WAIT, 0 ))) + if (!(ioctl->async = fd_queue_async( device->fd, async_data, ASYNC_TYPE_WAIT ))) { close_handle( current->process, handle ); release_object( ioctl ); diff --git a/server/fd.c b/server/fd.c index 052e12c3f2c..c8b6f7aa702 100644 --- a/server/fd.c +++ b/server/fd.c @@ -1769,7 +1769,7 @@ void default_poll_event( struct fd *fd, int event ) else if (!fd->inode) set_fd_events( fd, fd->fd_ops->get_poll_events( fd ) ); } -struct async *fd_queue_async( struct fd *fd, const async_data_t *data, int type, int count ) +struct async *fd_queue_async( struct fd *fd, const async_data_t *data, int type ) { struct async_queue *queue; struct async *async; @@ -1830,7 +1830,7 @@ void default_fd_queue_async( struct fd *fd, const async_data_t *data, int type, { struct async *async; - if ((async = fd_queue_async( fd, data, type, count ))) + if ((async = fd_queue_async( fd, data, type ))) { release_object( async ); set_error( STATUS_PENDING ); @@ -1912,7 +1912,7 @@ static void unmount_device( struct fd *device_fd ) /* default ioctl() routine */ obj_handle_t default_fd_ioctl( struct fd *fd, ioctl_code_t code, const async_data_t *async, - const void *data, data_size_t size ) + int blocking, const void *data, data_size_t size ) { switch(code) { @@ -2011,11 +2011,11 @@ DECL_HANDLER(get_handle_fd) DECL_HANDLER(ioctl) { unsigned int access = (req->code >> 14) & (FILE_READ_DATA|FILE_WRITE_DATA); - struct fd *fd = get_handle_fd_obj( current->process, req->handle, access ); + struct fd *fd = get_handle_fd_obj( current->process, req->async.handle, access ); if (fd) { - reply->wait = fd->fd_ops->ioctl( fd, req->code, &req->async, + reply->wait = fd->fd_ops->ioctl( fd, req->code, &req->async, req->blocking, get_req_data(), get_req_data_size() ); reply->options = fd->options; release_object( fd ); @@ -2041,7 +2041,7 @@ DECL_HANDLER(register_async) return; } - if ((fd = get_handle_fd_obj( current->process, req->handle, access ))) + if ((fd = get_handle_fd_obj( current->process, req->async.handle, access ))) { if (get_unix_fd( fd ) != -1) fd->fd_ops->queue_async( fd, &req->async, req->type, req->count ); release_object( fd ); diff --git a/server/file.h b/server/file.h index 00b1fa7a4e0..0eac537ac96 100644 --- a/server/file.h +++ b/server/file.h @@ -39,7 +39,7 @@ struct fd_ops /* get file information */ enum server_fd_type (*get_fd_type)(struct fd *fd); /* perform an ioctl on the file */ - obj_handle_t (*ioctl)(struct fd *fd, ioctl_code_t code, const async_data_t *async, + obj_handle_t (*ioctl)(struct fd *fd, ioctl_code_t code, const async_data_t *async, int blocking, const void *data, data_size_t size); /* queue an async operation */ void (*queue_async)(struct fd *, const async_data_t *data, int type, int count); @@ -75,11 +75,11 @@ extern int default_fd_signaled( struct object *obj, struct thread *thread ); extern unsigned int default_fd_map_access( struct object *obj, unsigned int access ); extern int default_fd_get_poll_events( struct fd *fd ); extern void default_poll_event( struct fd *fd, int event ); -extern struct async *fd_queue_async( struct fd *fd, const async_data_t *data, int type, int count ); +extern struct async *fd_queue_async( struct fd *fd, const async_data_t *data, int type ); extern void fd_async_wake_up( struct fd *fd, int type, unsigned int status ); extern void fd_reselect_async( struct fd *fd, struct async_queue *queue ); extern obj_handle_t default_fd_ioctl( struct fd *fd, ioctl_code_t code, const async_data_t *async, - const void *data, data_size_t size ); + int blocking, const void *data, data_size_t size ); extern void default_fd_queue_async( struct fd *fd, const async_data_t *data, int type, int count ); extern void default_fd_reselect_async( struct fd *fd, struct async_queue *queue ); extern void default_fd_cancel_async( struct fd *fd ); @@ -138,7 +138,8 @@ extern void free_async_queue( struct async_queue *queue ); extern struct async *create_async( struct thread *thread, struct async_queue *queue, const async_data_t *data ); extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned int status ); -extern void async_set_result( struct object *obj, unsigned int status, unsigned int total ); +extern void async_set_result( struct object *obj, unsigned int status, + unsigned int total, client_ptr_t apc ); extern int async_waiting( struct async_queue *queue ); extern void async_terminate( struct async *async, unsigned int status ); extern void async_wake_up( struct async_queue *queue, unsigned int status ); diff --git a/server/hook.c b/server/hook.c index 4c168a34df6..f5ebc2b4df0 100644 --- a/server/hook.c +++ b/server/hook.c @@ -52,7 +52,7 @@ struct hook int event_min; int event_max; int flags; - void *proc; /* hook function */ + client_ptr_t proc; /* hook function */ int unicode; /* is it a unicode hook? */ WCHAR *module; /* module name for global hooks */ data_size_t module_size; @@ -167,7 +167,7 @@ static void free_hook( struct hook *hook ) } /* find a hook from its index and proc */ -static struct hook *find_hook( struct thread *thread, int index, void *proc ) +static struct hook *find_hook( struct thread *thread, int index, client_ptr_t proc ) { struct list *p; struct hook_table *table = get_queue_hooks( thread ); @@ -292,7 +292,7 @@ static void hook_table_destroy( struct object *obj ) static void remove_hook( struct hook *hook ) { if (hook->table->counts[hook->index]) - hook->proc = NULL; /* chain is in use, just mark it and return */ + hook->proc = 0; /* chain is in use, just mark it and return */ else free_hook( hook ); } diff --git a/server/mach.c b/server/mach.c index 345fb27b2bc..fcc87a3830b 100644 --- a/server/mach.c +++ b/server/mach.c @@ -292,7 +292,7 @@ int send_thread_signal( struct thread *thread, int sig ) } /* read data from a process memory space */ -int read_process_memory( struct process *process, const void *ptr, data_size_t size, char *dest ) +int read_process_memory( struct process *process, client_ptr_t ptr, data_size_t size, char *dest ) { kern_return_t ret; mach_msg_type_number_t bytes_read; @@ -307,6 +307,11 @@ int read_process_memory( struct process *process, const void *ptr, data_size_t s set_error( STATUS_ACCESS_DENIED ); return 0; } + if ((vm_address_t)ptr != ptr) + { + set_error( STATUS_ACCESS_DENIED ); + return 0; + } if ((ret = task_suspend( process_port )) != KERN_SUCCESS) { @@ -314,8 +319,8 @@ int read_process_memory( struct process *process, const void *ptr, data_size_t s return 0; } - offset = (unsigned long)ptr % page_size; - aligned_address = (vm_address_t)((char *)ptr - offset); + offset = ptr % page_size; + aligned_address = (vm_address_t)(ptr - offset); aligned_size = (size + offset + page_size - 1) / page_size * page_size; ret = vm_read( process_port, aligned_address, aligned_size, &data, &bytes_read ); @@ -330,7 +335,7 @@ int read_process_memory( struct process *process, const void *ptr, data_size_t s } /* write data to a process memory space */ -int write_process_memory( struct process *process, void *ptr, data_size_t size, const char *src ) +int write_process_memory( struct process *process, client_ptr_t ptr, data_size_t size, const char *src ) { kern_return_t ret; vm_address_t aligned_address, region_address; @@ -347,9 +352,14 @@ int write_process_memory( struct process *process, void *ptr, data_size_t size, set_error( STATUS_ACCESS_DENIED ); return 0; } + if ((vm_address_t)ptr != ptr) + { + set_error( STATUS_ACCESS_DENIED ); + return 0; + } - offset = (unsigned long)ptr % page_size; - aligned_address = (vm_address_t)((char *)ptr - offset); + offset = ptr % page_size; + aligned_address = (vm_address_t)(ptr - offset); aligned_size = (size + offset + page_size - 1) / page_size * page_size; if ((ret = task_suspend( process_port )) != KERN_SUCCESS) @@ -436,9 +446,8 @@ void get_selector_entry( struct thread *thread, int entry, unsigned int *base, if ((ret = task_suspend( process_port )) == KERN_SUCCESS) { - void *ptr = process->ldt_copy; - vm_offset_t offset = (unsigned long)ptr % page_size; - vm_address_t aligned_address = (vm_address_t)((char *)ptr - offset); + vm_offset_t offset = process->ldt_copy % page_size; + vm_address_t aligned_address = (vm_address_t)(process->ldt_copy - offset); vm_size_t aligned_size = (total_size + offset + page_size - 1) / page_size * page_size; ret = vm_read( process_port, aligned_address, aligned_size, &data, &bytes_read ); diff --git a/server/mailslot.c b/server/mailslot.c index e223b8373e1..97da8d2df83 100644 --- a/server/mailslot.c +++ b/server/mailslot.c @@ -307,7 +307,7 @@ static void mailslot_queue_async( struct fd *fd, const async_data_t *data, int t assert(mailslot->obj.ops == &mailslot_ops); - if ((async = fd_queue_async( fd, data, type, count ))) + if ((async = fd_queue_async( fd, data, type ))) { async_set_timeout( async, mailslot->read_timeout ? mailslot->read_timeout : -1, STATUS_IO_TIMEOUT ); diff --git a/server/mapping.c b/server/mapping.c index 0982b8659aa..81c50962007 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -58,7 +58,7 @@ struct mapping int protect; /* protection flags */ struct file *file; /* file mapped */ int header_size; /* size of headers (for PE image mapping) */ - void *base; /* default base addr (for PE image mapping) */ + client_ptr_t base; /* default base addr (for PE image mapping) */ struct ranges *committed; /* list of committed ranges in this mapping */ struct file *shared_file; /* temp file for shared PE mapping */ struct list shared_entry; /* entry in global shared PE mappings list */ @@ -341,7 +341,7 @@ static int get_image_params( struct mapping *mapping ) if (mapping->shared_file) list_add_head( &shared_list, &mapping->shared_entry ); mapping->size = ROUND_SIZE( nt.OptionalHeader.SizeOfImage ); - mapping->base = (void *)nt.OptionalHeader.ImageBase; + mapping->base = nt.OptionalHeader.ImageBase; mapping->header_size = max( pos + size, nt.OptionalHeader.SizeOfHeaders ); mapping->protect = VPROT_IMAGE; @@ -389,7 +389,7 @@ static struct object *create_mapping( struct directory *root, const struct unico DACL_SECURITY_INFORMATION| SACL_SECURITY_INFORMATION ); mapping->header_size = 0; - mapping->base = NULL; + mapping->base = 0; mapping->file = NULL; mapping->shared_file = NULL; mapping->committed = NULL; @@ -453,11 +453,11 @@ static void mapping_dump( struct object *obj, int verbose ) { struct mapping *mapping = (struct mapping *)obj; assert( obj->ops == &mapping_ops ); - fprintf( stderr, "Mapping size=%08x%08x prot=%08x file=%p header_size=%08x base=%p " + fprintf( stderr, "Mapping size=%08x%08x prot=%08x file=%p header_size=%08x base=%08lx " "shared_file=%p ", (unsigned int)(mapping->size >> 32), (unsigned int)mapping->size, mapping->protect, mapping->file, mapping->header_size, - mapping->base, mapping->shared_file ); + (unsigned long)mapping->base, mapping->shared_file ); dump_object_name( &mapping->obj ); fputc( '\n', stderr ); } diff --git a/server/named_pipe.c b/server/named_pipe.c index 6db9a7a05c2..1651a67ff46 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -140,7 +140,7 @@ static void pipe_server_destroy( struct object *obj); static void pipe_server_flush( struct fd *fd, struct event **event ); static enum server_fd_type pipe_server_get_fd_type( struct fd *fd ); static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, const async_data_t *async, - const void *data, data_size_t size ); + int blocking, const void *data, data_size_t size ); static const struct object_ops pipe_server_ops = { @@ -223,7 +223,7 @@ static struct object *named_pipe_device_open_file( struct object *obj, unsigned static void named_pipe_device_destroy( struct object *obj ); static enum server_fd_type named_pipe_device_get_fd_type( struct fd *fd ); static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code, const async_data_t *async_data, - const void *data, data_size_t size ); + int blocking, const void *data, data_size_t size ); static const struct object_ops named_pipe_device_ops = { @@ -592,7 +592,7 @@ static obj_handle_t alloc_wait_event( struct process *process ) } static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, const async_data_t *async_data, - const void *data, data_size_t size ) + int blocking, const void *data, data_size_t size ) { struct pipe_server *server = get_fd_user( fd ); struct async *async; @@ -605,18 +605,18 @@ static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, const a { case ps_idle_server: case ps_wait_connect: - if (!async_data->event && !async_data->apc) + if (blocking) { async_data_t new_data = *async_data; if (!(wait_handle = alloc_wait_event( current->process ))) break; new_data.event = wait_handle; - if (!(async = fd_queue_async( server->ioctl_fd, &new_data, ASYNC_TYPE_WAIT, 0 ))) + if (!(async = fd_queue_async( server->ioctl_fd, &new_data, ASYNC_TYPE_WAIT ))) { close_handle( current->process, wait_handle ); break; } } - else async = fd_queue_async( server->ioctl_fd, async_data, ASYNC_TYPE_WAIT, 0 ); + else async = fd_queue_async( server->ioctl_fd, async_data, ASYNC_TYPE_WAIT ); if (async) { @@ -673,7 +673,7 @@ static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, const a return 0; default: - return default_fd_ioctl( fd, code, async_data, data, size ); + return default_fd_ioctl( fd, code, async_data, blocking, data, size ); } } @@ -854,7 +854,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc } static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code, const async_data_t *async_data, - const void *data, data_size_t size ) + int blocking, const void *data, data_size_t size ) { struct named_pipe_device *device = get_fd_user( fd ); @@ -887,7 +887,7 @@ static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code, c if (!pipe->waiters && !(pipe->waiters = create_async_queue( NULL ))) goto done; - if (!async_data->event && !async_data->apc) + if (blocking) { async_data_t new_data = *async_data; if (!(wait_handle = alloc_wait_event( current->process ))) goto done; @@ -916,7 +916,7 @@ static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code, c } default: - return default_fd_ioctl( fd, code, async_data, data, size ); + return default_fd_ioctl( fd, code, async_data, blocking, data, size ); } } diff --git a/server/object.h b/server/object.h index cd46f5b8179..a5d0ffd304c 100644 --- a/server/object.h +++ b/server/object.h @@ -175,8 +175,8 @@ extern void sock_init(void); /* debugger functions */ extern int set_process_debugger( struct process *process, struct thread *debugger ); -extern void generate_debug_event( struct thread *thread, int code, void *arg ); -extern void generate_startup_debug_events( struct process *process, void *entry ); +extern void generate_debug_event( struct thread *thread, int code, const void *arg ); +extern void generate_startup_debug_events( struct process *process, client_ptr_t entry ); extern void debug_exit_thread( struct thread *thread ); /* mapping functions */ diff --git a/server/process.c b/server/process.c index 136389f0893..8a4fb15a711 100644 --- a/server/process.c +++ b/server/process.c @@ -331,8 +331,8 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit process->startup_info = NULL; process->idle_event = NULL; process->queue = NULL; - process->peb = NULL; - process->ldt_copy = NULL; + process->peb = 0; + process->ldt_copy = 0; process->winstation = 0; process->desktop = 0; process->token = NULL; @@ -377,7 +377,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit file_set_error(); goto error; } - if (send_client_fd( process, request_pipe[1], 0 ) == -1) + if (send_client_fd( process, request_pipe[1], SERVER_PROTOCOL_VERSION ) == -1) { close( request_pipe[0] ); close( request_pipe[1] ); @@ -505,7 +505,7 @@ struct process *get_process_from_handle( obj_handle_t handle, unsigned int acces } /* find a dll from its base address */ -static inline struct process_dll *find_process_dll( struct process *process, void *base ) +static inline struct process_dll *find_process_dll( struct process *process, mod_handle_t base ) { struct process_dll *dll; @@ -518,7 +518,8 @@ static inline struct process_dll *find_process_dll( struct process *process, voi /* add a dll to a process list */ static struct process_dll *process_load_dll( struct process *process, struct file *file, - void *base, const WCHAR *filename, data_size_t name_len ) + mod_handle_t base, const WCHAR *filename, + data_size_t name_len ) { struct process_dll *dll; @@ -547,7 +548,7 @@ static struct process_dll *process_load_dll( struct process *process, struct fil } /* remove a dll from a process list */ -static void process_unload_dll( struct process *process, void *base ) +static void process_unload_dll( struct process *process, mod_handle_t base ) { struct process_dll *dll = find_process_dll( process, base ); @@ -557,7 +558,7 @@ static void process_unload_dll( struct process *process, void *base ) free( dll->filename ); list_remove( &dll->entry ); free( dll ); - generate_debug_event( current, UNLOAD_DLL_DEBUG_EVENT, base ); + generate_debug_event( current, UNLOAD_DLL_DEBUG_EVENT, &base ); } else set_error( STATUS_INVALID_PARAMETER ); } @@ -828,7 +829,7 @@ int set_process_debug_flag( struct process *process, int flag ) char data = (flag != 0); /* BeingDebugged flag is the byte at offset 2 in the PEB */ - return write_process_memory( process, (char *)process->peb + 2, 1, &data ); + return write_process_memory( process, process->peb + 2, 1, &data ); } /* take a snapshot of currently running processes */ @@ -1017,6 +1018,8 @@ DECL_HANDLER(init_process_done) list_remove( &dll->entry ); list_add_head( &process->dlls, &dll->entry ); + process->ldt_copy = req->ldt_copy; + generate_startup_debug_events( process, req->entry ); set_process_startup_state( process, STARTUP_DONE ); @@ -1165,7 +1168,7 @@ DECL_HANDLER(get_dll_info) if (dll) { reply->size = dll->size; - reply->entry_point = NULL; /* FIXME */ + reply->entry_point = 0; /* FIXME */ reply->filename_len = dll->namelen; if (dll->filename) { diff --git a/server/process.h b/server/process.h index c2bb8c338e4..5311ae31399 100644 --- a/server/process.h +++ b/server/process.h @@ -37,8 +37,8 @@ struct process_dll { struct list entry; /* entry in per-process dll list */ struct file *file; /* dll file */ - void *base; /* dll base address (in process addr space) */ - void *name; /* ptr to ptr to name (in process addr space) */ + mod_handle_t base; /* dll base address (in process addr space) */ + client_ptr_t name; /* ptr to ptr to name (in process addr space) */ data_size_t size; /* dll size */ int dbg_offset; /* debug info offset */ int dbg_size; /* debug info size */ @@ -79,8 +79,8 @@ struct process obj_handle_t desktop; /* handle to desktop to use for new threads */ struct token *token; /* security token associated with this process */ struct list dlls; /* list of loaded dlls */ - void *peb; /* PEB address in client address space */ - void *ldt_copy; /* pointer to LDT copy in client addr space */ + client_ptr_t peb; /* PEB address in client address space */ + client_ptr_t ldt_copy; /* pointer to LDT copy in client addr space */ unsigned int trace_data; /* opaque data used by the process tracing mechanism */ }; @@ -138,8 +138,8 @@ extern struct thread *console_get_renderer( struct console_input *console ); extern void init_tracing_mechanism(void); extern void init_process_tracing( struct process *process ); extern void finish_process_tracing( struct process *process ); -extern int read_process_memory( struct process *process, const void *ptr, data_size_t size, char *dest ); -extern int write_process_memory( struct process *process, void *ptr, data_size_t size, const char *src ); +extern int read_process_memory( struct process *process, client_ptr_t ptr, data_size_t size, char *dest ); +extern int write_process_memory( struct process *process, client_ptr_t ptr, data_size_t size, const char *src ); static inline process_id_t get_process_id( struct process *process ) { return process->id; } diff --git a/server/procfs.c b/server/procfs.c index da22af30c44..28777d879ba 100644 --- a/server/procfs.c +++ b/server/procfs.c @@ -124,12 +124,18 @@ int send_thread_signal( struct thread *thread, int sig ) } /* read data from a process memory space */ -int read_process_memory( struct process *process, const void *ptr, size_t size, char *dest ) +int read_process_memory( struct process *process, client_ptr_t ptr, size_t size, char *dest ) { ssize_t ret; - int fd = open_proc_as( process, O_RDONLY ); + int fd; - if (fd == -1) return 0; + if ((off_t)ptr != ptr) + { + set_error( STATUS_ACCESS_DENIED ); + return 0; + } + + if ((fd = open_proc_as( process, O_RDONLY )) == -1) return 0; ret = pread( fd, dest, size, (off_t)ptr ); close( fd ); @@ -141,12 +147,18 @@ int read_process_memory( struct process *process, const void *ptr, size_t size, } /* write data to a process memory space */ -int write_process_memory( struct process *process, void *ptr, size_t size, const char *src ) +int write_process_memory( struct process *process, client_ptr_t ptr, size_t size, const char *src ) { ssize_t ret; - int fd = open_proc_as( process, O_WRONLY ); + int fd; - if (fd == -1) return 0; + if ((off_t)ptr != ptr) + { + set_error( STATUS_ACCESS_DENIED ); + return 0; + } + + if ((fd = open_proc_as( process, O_RDONLY )) == -1) return 0; ret = pwrite( fd, src, size, (off_t)ptr ); close( fd ); @@ -162,10 +174,15 @@ void get_selector_entry( struct thread *thread, int entry, unsigned int *base, unsigned int *limit, unsigned char *flags ) { ssize_t ret; - off_t pos = (off_t)thread->process->ldt_copy; - int fd = open_proc_as( thread->process, O_RDONLY ); + off_t pos = thread->process->ldt_copy; + int fd; - if (fd == -1) return; + if (!pos) + { + set_error( STATUS_ACCESS_DENIED ); + return 0; + } + if ((fd = open_proc_as( thread->process, O_RDONLY )) == -1) return; ret = pread( fd, base, sizeof(*base), pos + entry*sizeof(int) ); if (ret != sizeof(*base)) goto error; diff --git a/server/protocol.def b/server/protocol.def index e80d3024c39..6d6be5bdc5c 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -33,15 +33,17 @@ typedef unsigned int obj_handle_t; typedef unsigned int user_handle_t; -typedef unsigned short atom_t; +typedef unsigned int atom_t; typedef unsigned int process_id_t; typedef unsigned int thread_id_t; typedef unsigned int data_size_t; typedef unsigned int ioctl_code_t; -typedef unsigned long lparam_t; +typedef unsigned __int64 lparam_t; typedef unsigned __int64 apc_param_t; typedef unsigned __int64 mem_size_t; typedef unsigned __int64 file_pos_t; +typedef unsigned __int64 client_ptr_t; +typedef client_ptr_t mod_handle_t; struct request_header { @@ -67,76 +69,77 @@ struct request_max_size #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */ -/* definitions of the event data depending on the event code */ -struct debug_event_exception -{ - EXCEPTION_RECORD record; /* exception record */ - int first; /* first chance exception? */ -}; -struct debug_event_create_thread -{ - obj_handle_t handle; /* handle to the new thread */ - void *teb; /* thread teb (in debugged process address space) */ - void *start; /* thread startup routine */ -}; -struct debug_event_create_process -{ - obj_handle_t file; /* handle to the process exe file */ - obj_handle_t process; /* handle to the new process */ - obj_handle_t thread; /* handle to the new thread */ - void *base; /* base of executable image */ - int dbg_offset; /* offset of debug info in file */ - int dbg_size; /* size of debug info */ - void *teb; /* thread teb (in debugged process address space) */ - void *start; /* thread startup routine */ - void *name; /* image name (optional) */ - int unicode; /* is it Unicode? */ -}; -struct debug_event_exit -{ - int exit_code; /* thread or process exit code */ -}; -struct debug_event_load_dll -{ - obj_handle_t handle; /* file handle for the dll */ - void *base; /* base address of the dll */ - int dbg_offset; /* offset of debug info in file */ - int dbg_size; /* size of debug info */ - void *name; /* image name (optional) */ - int unicode; /* is it Unicode? */ -}; -struct debug_event_unload_dll -{ - void *base; /* base address of the dll */ -}; -struct debug_event_output_string -{ - void *string; /* string to display (in debugged process address space) */ - int unicode; /* is it Unicode? */ - int length; /* string length */ -}; -struct debug_event_rip_info -{ - int error; /* ??? */ - int type; /* ??? */ -}; -union debug_event_data -{ - struct debug_event_exception exception; - struct debug_event_create_thread create_thread; - struct debug_event_create_process create_process; - struct debug_event_exit exit; - struct debug_event_load_dll load_dll; - struct debug_event_unload_dll unload_dll; - struct debug_event_output_string output_string; - struct debug_event_rip_info rip_info; -}; - /* debug event data */ -typedef struct +typedef union { - int code; /* event code */ - union debug_event_data info; /* event information */ + int code; /* event code */ + struct + { + int code; /* EXCEPTION_DEBUG_EVENT */ + int first; /* first chance exception? */ + unsigned int exc_code; /* exception code */ + unsigned int flags; /* exception flags */ + client_ptr_t record; /* exception record */ + client_ptr_t address; /* exception address */ + int nb_params; /* number of parameters */ + int __pad; + client_ptr_t params[15]; /* parameters */ + } exception; + struct + { + int code; /* CREATE_THREAD_DEBUG_EVENT */ + obj_handle_t handle; /* handle to the new thread */ + client_ptr_t teb; /* thread teb (in debugged process address space) */ + client_ptr_t start; /* thread startup routine */ + } create_thread; + struct + { + int code; /* CREATE_PROCESS_DEBUG_EVENT */ + obj_handle_t file; /* handle to the process exe file */ + obj_handle_t process; /* handle to the new process */ + obj_handle_t thread; /* handle to the new thread */ + mod_handle_t base; /* base of executable image */ + int dbg_offset; /* offset of debug info in file */ + int dbg_size; /* size of debug info */ + client_ptr_t teb; /* thread teb (in debugged process address space) */ + client_ptr_t start; /* thread startup routine */ + client_ptr_t name; /* image name (optional) */ + int unicode; /* is it Unicode? */ + } create_process; + struct + { + int code; /* EXIT_THREAD_DEBUG_EVENT/EXIT_PROCESS_DEBUG_EVENT */ + int exit_code; /* thread or process exit code */ + } exit; + struct + { + int code; /* LOAD_DLL_DEBUG_EVENT */ + obj_handle_t handle; /* file handle for the dll */ + mod_handle_t base; /* base address of the dll */ + int dbg_offset; /* offset of debug info in file */ + int dbg_size; /* size of debug info */ + client_ptr_t name; /* image name (optional) */ + int unicode; /* is it Unicode? */ + } load_dll; + struct + { + int code; /* UNLOAD_DLL_DEBUG_EVENT */ + int __pad; + mod_handle_t base; /* base address of the dll */ + } unload_dll; + struct + { + int code; /* OUTPUT_DEBUG_STRING_EVENT */ + int unicode; /* is it Unicode? */ + client_ptr_t string; /* string to display (in debugged process address space) */ + data_size_t length; /* string length */ + } output_string; + struct + { + int code; /* RIP_EVENT */ + int error; /* ??? */ + int type; /* ??? */ + } rip_info; } debug_event_t; /* structure used in sending an fd from client to server */ @@ -149,8 +152,9 @@ struct send_fd /* structure sent by the server on the wait fifo */ struct wake_up_reply { - void *cookie; /* magic cookie that was passed in select_request */ - int signaled; /* wait result */ + client_ptr_t cookie; /* magic cookie that was passed in select_request */ + int signaled; /* wait result */ + int __pad; }; /* NT-style timeout, in 100ns units, negative means relative timeout */ @@ -161,7 +165,7 @@ typedef __int64 timeout_t; typedef struct { atom_t atom; /* property atom */ - short string; /* was atom a string originally? */ + int string; /* was atom a string originally? */ lparam_t data; /* data stored in property */ } property_data_t; @@ -177,19 +181,28 @@ typedef struct /* structure for parameters of async I/O calls */ typedef struct { - void *callback; /* client-side callback to call upon end of async */ - void *iosb; /* I/O status block in client addr space */ - void *arg; /* opaque user data to pass to callback */ - void *apc; /* user apc to call */ + obj_handle_t handle; /* object to perform I/O on */ obj_handle_t event; /* event to signal when done */ + client_ptr_t callback; /* client-side callback to call upon end of async */ + client_ptr_t iosb; /* I/O status block in client addr space */ + client_ptr_t arg; /* opaque user data to pass to callback */ apc_param_t cvalue; /* completion value to use for completion events */ } async_data_t; /* structures for extra message data */ +struct hardware_msg_data +{ + lparam_t info; /* extra info */ + int x; /* x position */ + int y; /* y position */ + unsigned int hw_id; /* unique id */ + int __pad; +}; + struct callback_msg_data { - void *callback; /* callback function */ + client_ptr_t callback; /* callback function */ lparam_t data; /* user data for callback */ lparam_t result; /* message result */ }; @@ -198,7 +211,7 @@ struct winevent_msg_data { user_handle_t hook; /* hook handle */ thread_id_t tid; /* thread id */ - void *hook_proc; /* hook proc address */ + client_ptr_t hook_proc; /* hook proc address */ /* followed by module name if any */ }; @@ -277,94 +290,101 @@ typedef union struct { enum apc_type type; /* APC_USER */ - void (__stdcall *func)(unsigned long,unsigned long,unsigned long); + int __pad; + client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */ apc_param_t args[3]; /* arguments for user function */ } user; struct { - enum apc_type type; /* APC_TIMER */ - void (__stdcall *func)(void*, unsigned int, unsigned int); + enum apc_type type; /* APC_TIMER */ + int __pad; + client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */ timeout_t time; /* absolute time of expiration */ - void *arg; /* user argument */ + client_ptr_t arg; /* user argument */ } timer; struct { enum apc_type type; /* APC_ASYNC_IO */ - unsigned int (*func)(void*, void*, unsigned int, unsigned int *); - void *user; /* user pointer */ - void *sb; /* status block */ unsigned int status; /* I/O status */ + client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void **); */ + client_ptr_t user; /* user pointer */ + client_ptr_t sb; /* status block */ } async_io; struct { enum apc_type type; /* APC_VIRTUAL_ALLOC */ - void *addr; /* requested address */ + unsigned int op_type; /* type of operation */ + client_ptr_t addr; /* requested address */ mem_size_t size; /* allocation size */ unsigned int zero_bits; /* allocation alignment */ - unsigned int op_type; /* type of operation */ unsigned int prot; /* memory protection flags */ } virtual_alloc; struct { enum apc_type type; /* APC_VIRTUAL_FREE */ - void *addr; /* requested address */ - mem_size_t size; /* allocation size */ unsigned int op_type; /* type of operation */ + client_ptr_t addr; /* requested address */ + mem_size_t size; /* allocation size */ } virtual_free; struct { enum apc_type type; /* APC_VIRTUAL_QUERY */ - const void *addr; /* requested address */ + int __pad; + client_ptr_t addr; /* requested address */ } virtual_query; struct { enum apc_type type; /* APC_VIRTUAL_PROTECT */ - void *addr; /* requested address */ - mem_size_t size; /* requested size */ unsigned int prot; /* new protection flags */ + client_ptr_t addr; /* requested address */ + mem_size_t size; /* requested size */ } virtual_protect; struct { enum apc_type type; /* APC_VIRTUAL_FLUSH */ - const void *addr; /* requested address */ + int __pad; + client_ptr_t addr; /* requested address */ mem_size_t size; /* requested size */ } virtual_flush; struct { enum apc_type type; /* APC_VIRTUAL_LOCK */ - void *addr; /* requested address */ + int __pad; + client_ptr_t addr; /* requested address */ mem_size_t size; /* requested size */ } virtual_lock; struct { enum apc_type type; /* APC_VIRTUAL_UNLOCK */ - void *addr; /* requested address */ + int __pad; + client_ptr_t addr; /* requested address */ mem_size_t size; /* requested size */ } virtual_unlock; struct { enum apc_type type; /* APC_MAP_VIEW */ obj_handle_t handle; /* mapping handle */ - void *addr; /* requested address */ + client_ptr_t addr; /* requested address */ mem_size_t size; /* allocation size */ file_pos_t offset; /* file offset */ - unsigned int zero_bits; /* allocation alignment */ unsigned int alloc_type;/* allocation type */ - unsigned int prot; /* memory protection flags */ + unsigned short zero_bits; /* allocation alignment */ + unsigned short prot; /* memory protection flags */ } map_view; struct { enum apc_type type; /* APC_UNMAP_VIEW */ - void *addr; /* view address */ + int __pad; + client_ptr_t addr; /* view address */ } unmap_view; struct { enum apc_type type; /* APC_CREATE_THREAD */ - void (__stdcall *func)(void*); /* start function */ - void *arg; /* argument for start function */ + int suspend; /* suspended thread? */ + client_ptr_t func; /* void (__stdcall *func)(void*); start function */ + client_ptr_t arg; /* argument for start function */ mem_size_t reserve; /* reserve size for thread stack */ mem_size_t commit; /* commit size for thread stack */ - int suspend; /* suspended thread? */ } create_thread; } apc_call_t; @@ -375,39 +395,40 @@ typedef union { enum apc_type type; /* APC_ASYNC_IO */ unsigned int status; /* new status of async operation */ + client_ptr_t apc; /* user APC to call */ unsigned int total; /* bytes transferred */ } async_io; struct { enum apc_type type; /* APC_VIRTUAL_ALLOC */ unsigned int status; /* status returned by call */ - void *addr; /* resulting address */ + client_ptr_t addr; /* resulting address */ mem_size_t size; /* resulting size */ } virtual_alloc; struct { enum apc_type type; /* APC_VIRTUAL_FREE */ unsigned int status; /* status returned by call */ - void *addr; /* resulting address */ + client_ptr_t addr; /* resulting address */ mem_size_t size; /* resulting size */ } virtual_free; struct { enum apc_type type; /* APC_VIRTUAL_QUERY */ unsigned int status; /* status returned by call */ - void *base; /* resulting base address */ - void *alloc_base;/* resulting allocation base */ + client_ptr_t base; /* resulting base address */ + client_ptr_t alloc_base;/* resulting allocation base */ mem_size_t size; /* resulting region size */ - unsigned int state; /* resulting region state */ - unsigned int prot; /* resulting region protection */ - unsigned int alloc_prot;/* resulting allocation protection */ - unsigned int alloc_type;/* resulting region allocation type */ + unsigned short state; /* resulting region state */ + unsigned short prot; /* resulting region protection */ + unsigned short alloc_prot;/* resulting allocation protection */ + unsigned short alloc_type;/* resulting region allocation type */ } virtual_query; struct { enum apc_type type; /* APC_VIRTUAL_PROTECT */ unsigned int status; /* status returned by call */ - void *addr; /* resulting address */ + client_ptr_t addr; /* resulting address */ mem_size_t size; /* resulting size */ unsigned int prot; /* old protection flags */ } virtual_protect; @@ -415,28 +436,28 @@ typedef union { enum apc_type type; /* APC_VIRTUAL_FLUSH */ unsigned int status; /* status returned by call */ - const void *addr; /* resulting address */ + client_ptr_t addr; /* resulting address */ mem_size_t size; /* resulting size */ } virtual_flush; struct { enum apc_type type; /* APC_VIRTUAL_LOCK */ unsigned int status; /* status returned by call */ - void *addr; /* resulting address */ + client_ptr_t addr; /* resulting address */ mem_size_t size; /* resulting size */ } virtual_lock; struct { enum apc_type type; /* APC_VIRTUAL_UNLOCK */ unsigned int status; /* status returned by call */ - void *addr; /* resulting address */ + client_ptr_t addr; /* resulting address */ mem_size_t size; /* resulting size */ } virtual_unlock; struct { enum apc_type type; /* APC_MAP_VIEW */ unsigned int status; /* status returned by call */ - void *addr; /* resulting address */ + client_ptr_t addr; /* resulting address */ mem_size_t size; /* resulting size */ } map_view; struct @@ -515,9 +536,10 @@ typedef union /* Signal the end of the process initialization */ @REQ(init_process_done) - void* module; /* main module base address */ - void* entry; /* process entry point */ int gui; /* is it a GUI process? */ + mod_handle_t module; /* main module base address */ + client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */ + client_ptr_t entry; /* process entry point */ @END @@ -526,17 +548,16 @@ typedef union int unix_pid; /* Unix pid of new thread */ int unix_tid; /* Unix tid of new thread */ int debug_level; /* new debug level */ - void* teb; /* TEB of new thread (in thread address space) */ - void* peb; /* address of PEB (in thread address space) */ - void* entry; /* thread entry point (in thread address space) */ - void* ldt_copy; /* address of LDT copy (in thread address space) */ + client_ptr_t teb; /* TEB of new thread (in thread address space) */ + client_ptr_t entry; /* thread entry point (in thread address space) */ int reply_fd; /* fd for reply pipe */ int wait_fd; /* fd for blocking calls pipe */ + client_ptr_t peb; /* address of PEB (in thread address space) */ @REPLY process_id_t pid; /* process id of the new thread's process */ thread_id_t tid; /* thread id of the new thread */ - data_size_t info_size; /* total size of startup info */ timeout_t server_start; /* server start time */ + data_size_t info_size; /* total size of startup info */ int version; /* protocol version */ @END @@ -566,12 +587,12 @@ typedef union @REPLY process_id_t pid; /* server process id */ process_id_t ppid; /* server process id of parent */ - int exit_code; /* process exit code */ int priority; /* priority class */ unsigned int affinity; /* process affinity mask */ - void* peb; /* PEB address in process address space */ + client_ptr_t peb; /* PEB address in process address space */ timeout_t start_time; /* process start time */ timeout_t end_time; /* process end time */ + int exit_code; /* process exit code */ @END @@ -593,12 +614,12 @@ typedef union @REPLY process_id_t pid; /* server process id */ thread_id_t tid; /* server thread id */ - void* teb; /* thread teb pointer */ - int exit_code; /* thread exit code */ + client_ptr_t teb; /* thread teb pointer */ int priority; /* thread priority level */ unsigned int affinity; /* thread affinity mask */ timeout_t creation_time; /* thread creation time */ timeout_t exit_time; /* thread exit time */ + int exit_code; /* thread exit code */ int last; /* last thread in process */ @END @@ -619,9 +640,9 @@ typedef union /* Retrieve information about a module */ @REQ(get_dll_info) obj_handle_t handle; /* process handle */ - void* base_address; /* base address of module */ + mod_handle_t base_address; /* base address of module */ @REPLY - void* entry_point; + client_ptr_t entry_point; data_size_t size; /* module size */ data_size_t filename_len; /* buffer len in bytes required to store filename */ VARARG(filename,unicode_str); /* file name of module */ @@ -647,8 +668,8 @@ typedef union /* Notify the server that a dll has been loaded */ @REQ(load_dll) obj_handle_t handle; /* file handle */ - void* base; /* base address */ - void* name; /* ptr to ptr to name (in process addr space) */ + mod_handle_t base; /* base address */ + client_ptr_t name; /* ptr to ptr to name (in process addr space) */ data_size_t size; /* dll size */ int dbg_offset; /* debug info offset */ int dbg_size; /* debug info size */ @@ -658,14 +679,14 @@ typedef union /* Notify the server that a dll is being unloaded */ @REQ(unload_dll) - void* base; /* base address */ + int __pad; + mod_handle_t base; /* base address */ @END /* Queue an APC for a thread or process */ @REQ(queue_apc) - obj_handle_t thread; /* thread handle */ - obj_handle_t process; /* process handle */ + obj_handle_t handle; /* thread or process handle */ apc_call_t call; /* call arguments */ @REPLY obj_handle_t handle; /* APC handle */ @@ -738,16 +759,16 @@ typedef union /* Wait for handles */ @REQ(select) int flags; /* wait flags (see below) */ - void* cookie; /* magic cookie to return to client */ + client_ptr_t cookie; /* magic cookie to return to client */ obj_handle_t signal; /* object to signal (0 if none) */ obj_handle_t prev_apc; /* handle to previous APC */ timeout_t timeout; /* timeout */ VARARG(result,apc_result); /* result of previous APC */ VARARG(handles,handles); /* handles to select on */ @REPLY - obj_handle_t apc_handle; /* handle to next APC */ timeout_t timeout; /* timeout converted to absolute */ apc_call_t call; /* APC call arguments */ + obj_handle_t apc_handle; /* handle to next APC */ @END #define SELECT_ALL 1 #define SELECT_ALERTABLE 2 @@ -1299,7 +1320,6 @@ enum char_info_mode /* enable directory change notifications */ @REQ(read_directory_changes) unsigned int filter; /* notification filter */ - obj_handle_t handle; /* handle to the directory */ int subtree; /* watch the subtree? */ int want_data; /* flag indicating whether change data should be collected */ async_data_t async; /* async I/O parameters */ @@ -1318,8 +1338,8 @@ enum char_info_mode @REQ(create_mapping) unsigned int access; /* wanted access rights */ unsigned int attributes; /* object attributes */ - mem_size_t size; /* mapping size */ unsigned int protect; /* protection flags (see below) */ + mem_size_t size; /* mapping size */ obj_handle_t file_handle; /* file handle */ VARARG(objattr,object_attributes); /* object attributes */ @REPLY @@ -1360,7 +1380,7 @@ enum char_info_mode mem_size_t size; /* mapping size */ int protect; /* protection flags */ int header_size; /* header size (for VPROT_IMAGE mapping) */ - void* base; /* default base addr (for VPROT_IMAGE mapping) */ + client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */ obj_handle_t mapping; /* duplicate mapping handle unless removable */ obj_handle_t shared_file; /* shared mapping file handle */ @END @@ -1436,8 +1456,14 @@ enum char_info_mode /* Queue an exception event */ @REQ(queue_exception_event) - int first; /* first chance exception? */ - VARARG(record,exc_event); /* thread context followed by exception record */ + int first; /* first chance exception? */ + unsigned int code; /* exception code */ + unsigned int flags; /* exception flags */ + client_ptr_t record; /* exception record */ + client_ptr_t address; /* exception address */ + data_size_t len; /* size of parameters */ + VARARG(params,uints64,len);/* exception parameters */ + VARARG(context,context); /* thread context */ @REPLY obj_handle_t handle; /* handle to the queued event */ @END @@ -1453,9 +1479,9 @@ enum char_info_mode /* Send an output string to the debugger */ @REQ(output_debug_string) - void* string; /* string to display (in debugged process address space) */ + data_size_t length; /* string length */ + client_ptr_t string; /* string to display (in debugged process address space) */ int unicode; /* is it Unicode? */ - int length; /* string length */ @END @@ -1491,7 +1517,7 @@ enum char_info_mode /* Read data from a process address space */ @REQ(read_process_memory) obj_handle_t handle; /* process handle */ - void* addr; /* addr to read from */ + client_ptr_t addr; /* addr to read from */ @REPLY VARARG(data,bytes); /* result data */ @END @@ -1500,7 +1526,7 @@ enum char_info_mode /* Write data to a process address space */ @REQ(write_process_memory) obj_handle_t handle; /* process handle */ - void* addr; /* addr to write to */ + client_ptr_t addr; /* addr to write to */ VARARG(data,bytes); /* data to write */ @END @@ -1660,9 +1686,9 @@ enum char_info_mode @REQ(set_timer) obj_handle_t handle; /* handle to the timer */ timeout_t expire; /* next expiration absolute time */ + client_ptr_t callback; /* callback function */ + client_ptr_t arg; /* callback argument */ int period; /* timer period in ms */ - void* callback; /* callback function */ - void* arg; /* callback argument */ @REPLY int signaled; /* was the timer signaled before this call ? */ @END @@ -1854,12 +1880,12 @@ enum message_type thread_id_t id; /* thread id */ user_handle_t win; /* window handle */ unsigned int msg; /* message code */ - unsigned int time; /* message time */ lparam_t wparam; /* parameters */ lparam_t lparam; /* parameters */ lparam_t info; /* extra info */ int x; /* x position */ int y; /* y position */ + unsigned int time; /* message time */ @END @@ -1874,15 +1900,11 @@ enum message_type unsigned int changed_mask; /* changed bits mask */ @REPLY user_handle_t win; /* window handle */ - int type; /* message type */ unsigned int msg; /* message code */ lparam_t wparam; /* parameters */ lparam_t lparam; /* parameters */ - lparam_t info; /* extra info */ - int x; /* x position */ - int y; /* y position */ + int type; /* message type */ unsigned int time; /* message time */ - unsigned int hw_id; /* id if hardware message */ unsigned int active_hooks; /* active hooks bitmap */ data_size_t total; /* total size of extra data */ VARARG(data,message_data); /* message data for sent messages */ @@ -1891,8 +1913,8 @@ enum message_type /* Reply to a sent message */ @REQ(reply_message) - lparam_t result; /* message result */ int remove; /* should we remove the message? */ + lparam_t result; /* message result */ VARARG(data,bytes); /* message data for sent messages */ @END @@ -1929,8 +1951,8 @@ enum message_type /* Kill a window timer */ @REQ(kill_win_timer) user_handle_t win; /* window handle */ - unsigned int msg; /* message to post */ lparam_t id; /* timer id */ + unsigned int msg; /* message to post */ @END @@ -1972,10 +1994,9 @@ enum message_type /* Create an async I/O */ @REQ(register_async) - obj_handle_t handle; /* handle to comm port, socket or file */ int type; /* type of queue to look after */ - int count; /* count - usually # of bytes to be read/written */ async_data_t async; /* async I/O parameters */ + int count; /* count - usually # of bytes to be read/written */ @END #define ASYNC_TYPE_READ 0x01 #define ASYNC_TYPE_WRITE 0x02 @@ -1990,9 +2011,9 @@ enum message_type /* Perform an ioctl on a file */ @REQ(ioctl) - obj_handle_t handle; /* handle to the device */ ioctl_code_t code; /* ioctl code */ async_data_t async; /* async I/O parameters */ + int blocking; /* whether it's a blocking ioctl */ VARARG(in_data,bytes); /* ioctl input data */ @REPLY obj_handle_t wait; /* handle to wait on for blocking ioctl */ @@ -2004,7 +2025,7 @@ enum message_type /* Retrieve results of an async ioctl */ @REQ(get_ioctl_result) obj_handle_t handle; /* handle to the device */ - void* user_arg; /* user arg used to identify the request */ + client_ptr_t user_arg; /* user arg used to identify the request */ @REPLY VARARG(out_data,bytes); /* ioctl output data */ @END @@ -2016,11 +2037,11 @@ enum message_type unsigned int attributes; /* object attributes */ obj_handle_t rootdir; /* root directory */ unsigned int options; - unsigned int flags; unsigned int maxinstances; unsigned int outsize; unsigned int insize; timeout_t timeout; + unsigned int flags; VARARG(name,unicode_str); /* pipe name */ @REPLY obj_handle_t handle; /* handle to the pipe */ @@ -2049,14 +2070,14 @@ enum message_type user_handle_t parent; /* parent window */ user_handle_t owner; /* owner window */ atom_t atom; /* class atom */ - void* instance; /* module instance */ + mod_handle_t instance; /* module instance */ VARARG(class,unicode_str); /* class name */ @REPLY user_handle_t handle; /* created window */ user_handle_t parent; /* full handle of parent */ user_handle_t owner; /* full handle of owner */ int extra; /* number of extra bytes */ - void* class_ptr; /* pointer to class in client address space */ + client_ptr_t class_ptr; /* pointer to class in client address space */ @END @@ -2100,13 +2121,13 @@ enum message_type /* Set some information in a window */ @REQ(set_window_info) - unsigned int flags; /* flags for fields to set (see below) */ + unsigned short flags; /* flags for fields to set (see below) */ + short int is_unicode; /* ANSI or unicode */ user_handle_t handle; /* handle to the window */ unsigned int style; /* window style */ unsigned int ex_style; /* window extended style */ unsigned int id; /* window id */ - int is_unicode; /* ANSI or unicode */ - void* instance; /* creator instance */ + mod_handle_t instance; /* creator instance */ lparam_t user_data; /* user-specific data */ int extra_offset; /* offset to set in extra bytes */ data_size_t extra_size; /* size to set in extra bytes */ @@ -2114,10 +2135,10 @@ enum message_type @REPLY unsigned int old_style; /* old window style */ unsigned int old_ex_style; /* old window extended style */ - unsigned int old_id; /* old window id */ - void* old_instance; /* old creator instance */ + mod_handle_t old_instance; /* old creator instance */ lparam_t old_user_data; /* old user-specific data */ lparam_t old_extra_value; /* old value in extra bytes */ + unsigned int old_id; /* old window id */ @END #define SET_WIN_STYLE 0x01 #define SET_WIN_EXSTYLE 0x02 @@ -2303,8 +2324,8 @@ enum message_type /* Set a window property */ @REQ(set_window_property) user_handle_t window; /* handle to the window */ - atom_t atom; /* property atom (if no name specified) */ lparam_t data; /* data to store */ + atom_t atom; /* property atom (if no name specified) */ VARARG(name,unicode_str); /* property name */ @END @@ -2572,8 +2593,8 @@ enum message_type thread_id_t tid; /* id of thread to set the hook into */ int event_min; int event_max; + client_ptr_t proc; /* hook procedure */ int flags; - void* proc; /* hook procedure */ int unicode; /* is it a unicode hook? */ VARARG(module,unicode_str); /* module name */ @REPLY @@ -2585,8 +2606,8 @@ enum message_type /* Remove a window hook */ @REQ(remove_hook) user_handle_t handle; /* handle to the hook */ + client_ptr_t proc; /* hook procedure if handle is 0 */ int id; /* id of the hook if handle is 0 */ - void* proc; /* hook procedure if handle is 0 */ @REPLY unsigned int active_hooks; /* active hooks bitmap */ @END @@ -2603,8 +2624,8 @@ enum message_type user_handle_t handle; /* handle to the next hook */ process_id_t pid; /* process id for low-level keyboard/mouse hooks */ thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */ - void* proc; /* hook procedure */ int unicode; /* is it a unicode hook? */ + client_ptr_t proc; /* hook procedure */ unsigned int active_hooks; /* active hooks bitmap */ VARARG(module,unicode_str); /* module name */ @END @@ -2629,7 +2650,7 @@ enum message_type int id; /* id of the hook */ process_id_t pid; /* process id for low-level keyboard/mouse hooks */ thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */ - void* proc; /* hook procedure */ + client_ptr_t proc; /* hook procedure */ int unicode; /* is it a unicode hook? */ VARARG(module,unicode_str); /* module name */ @END @@ -2640,10 +2661,10 @@ enum message_type int local; /* is it a local class? */ atom_t atom; /* class atom */ unsigned int style; /* class style */ - void* instance; /* module instance */ + mod_handle_t instance; /* module instance */ int extra; /* number of extra class bytes */ int win_extra; /* number of window extra bytes */ - void* client_ptr; /* pointer to class in client address space */ + client_ptr_t client_ptr; /* pointer to class in client address space */ VARARG(name,unicode_str); /* class name */ @REPLY atom_t atom; /* resulting class atom */ @@ -2653,10 +2674,10 @@ enum message_type /* Destroy a window class */ @REQ(destroy_class) atom_t atom; /* class atom */ - void* instance; /* module instance */ + mod_handle_t instance; /* module instance */ VARARG(name,unicode_str); /* class name */ @REPLY - void* client_ptr; /* pointer to class in client address space */ + client_ptr_t client_ptr; /* pointer to class in client address space */ @END @@ -2667,7 +2688,7 @@ enum message_type atom_t atom; /* class atom */ unsigned int style; /* class style */ int win_extra; /* number of window extra bytes */ - void* instance; /* module instance */ + mod_handle_t instance; /* module instance */ int extra_offset; /* offset to set in extra bytes */ data_size_t extra_size; /* size to set in extra bytes */ lparam_t extra_value; /* value to set in extra bytes */ @@ -2676,7 +2697,7 @@ enum message_type unsigned int old_style; /* previous class style */ int old_extra; /* previous number of class extra bytes */ int old_win_extra; /* previous number of window extra bytes */ - void* old_instance; /* previous module instance */ + mod_handle_t old_instance; /* previous module instance */ lparam_t old_extra_value; /* old value in extra bytes */ @END #define SET_CLASS_ATOM 0x0001 @@ -2829,8 +2850,8 @@ enum message_type unsigned int access; /* wanted access rights */ unsigned int attributes; /* object attributes */ obj_handle_t rootdir; /* root directory */ - unsigned int max_msgsize; timeout_t read_timeout; + unsigned int max_msgsize; VARARG(name,unicode_str); /* mailslot name */ @REPLY obj_handle_t handle; /* handle to the mailslot */ @@ -2840,11 +2861,11 @@ enum message_type /* Set mailslot information */ @REQ(set_mailslot_info) obj_handle_t handle; /* handle to the mailslot */ - unsigned int flags; timeout_t read_timeout; + unsigned int flags; @REPLY - unsigned int max_msgsize; timeout_t read_timeout; + unsigned int max_msgsize; @END #define MAILSLOT_SET_READ_TIMEOUT 1 @@ -2957,8 +2978,8 @@ enum message_type unsigned int access; /* wanted access rights */ unsigned int attributes; /* object attributes */ obj_handle_t rootdir; /* root directory */ + client_ptr_t user_ptr; /* opaque ptr for use by client */ obj_handle_t manager; /* device manager */ - void* user_ptr; /* opaque ptr for use by client */ VARARG(name,unicode_str); /* object name */ @REPLY obj_handle_t handle; /* handle to the device */ @@ -2980,7 +3001,7 @@ enum message_type @REPLY obj_handle_t next; /* handle to the next ioctl */ ioctl_code_t code; /* ioctl code */ - void* user_ptr; /* opaque ptr for the device */ + client_ptr_t user_ptr; /* opaque ptr for the device */ data_size_t in_size; /* total needed input size */ data_size_t out_size; /* needed output size */ VARARG(next_data,bytes); /* input data of the next ioctl */ @@ -3062,8 +3083,8 @@ enum message_type /* associate object with completion port */ @REQ(set_completion_info) obj_handle_t handle; /* object handle */ - obj_handle_t chandle; /* port handle */ apc_param_t ckey; /* completion key */ + obj_handle_t chandle; /* port handle */ @END diff --git a/server/ptrace.c b/server/ptrace.c index 343e38e54d7..b446de9aaac 100644 --- a/server/ptrace.c +++ b/server/ptrace.c @@ -354,7 +354,7 @@ static struct thread *get_ptrace_thread( struct process *process ) } /* read data from a process memory space */ -int read_process_memory( struct process *process, const void *ptr, data_size_t size, char *dest ) +int read_process_memory( struct process *process, client_ptr_t ptr, data_size_t size, char *dest ) { struct thread *thread = get_ptrace_thread( process ); unsigned int first_offset, last_offset, len; @@ -362,11 +362,17 @@ int read_process_memory( struct process *process, const void *ptr, data_size_t s if (!thread) return 0; - first_offset = (unsigned long)ptr % sizeof(int); + if ((unsigned long)ptr != ptr) + { + set_error( STATUS_ACCESS_DENIED ); + return 0; + } + + first_offset = ptr % sizeof(int); last_offset = (size + first_offset) % sizeof(int); if (!last_offset) last_offset = sizeof(int); - addr = (int *)((char *)ptr - first_offset); + addr = (int *)(unsigned long)(ptr - first_offset); len = (size + first_offset + sizeof(int) - 1) / sizeof(int); if (suspend_for_ptrace( thread )) @@ -415,7 +421,7 @@ static int check_process_write_access( struct thread *thread, int *addr, data_si } /* write data to a process memory space */ -int write_process_memory( struct process *process, void *ptr, data_size_t size, const char *src ) +int write_process_memory( struct process *process, client_ptr_t ptr, data_size_t size, const char *src ) { struct thread *thread = get_ptrace_thread( process ); int ret = 0, data = 0; @@ -425,9 +431,15 @@ int write_process_memory( struct process *process, void *ptr, data_size_t size, if (!thread) return 0; + if ((unsigned long)ptr != ptr) + { + set_error( STATUS_ACCESS_DENIED ); + return 0; + } + /* compute the mask for the first int */ first_mask = ~0; - first_offset = (unsigned long)ptr % sizeof(int); + first_offset = ptr % sizeof(int); memset( &first_mask, 0, first_offset ); /* compute the mask for the last int */ @@ -436,7 +448,7 @@ int write_process_memory( struct process *process, void *ptr, data_size_t size, last_mask = 0; memset( &last_mask, 0xff, last_offset ); - addr = (int *)((char *)ptr - first_offset); + addr = (int *)(unsigned long)(ptr - first_offset); len = (size + first_offset + sizeof(int) - 1) / sizeof(int); if (suspend_for_ptrace( thread )) @@ -493,10 +505,10 @@ void get_selector_entry( struct thread *thread, int entry, unsigned int *base, if (suspend_for_ptrace( thread )) { unsigned char flags_buf[4]; - int *addr = (int *)thread->process->ldt_copy + entry; + int *addr = (int *)(unsigned long)thread->process->ldt_copy + entry; if (read_thread_int( thread, addr, (int *)base ) == -1) goto done; if (read_thread_int( thread, addr + 8192, (int *)limit ) == -1) goto done; - addr = (int *)thread->process->ldt_copy + 2*8192 + (entry >> 2); + addr = (int *)(unsigned long)thread->process->ldt_copy + 2*8192 + (entry >> 2); if (read_thread_int( thread, addr, (int *)flags_buf ) == -1) goto done; *flags = flags_buf[entry & 3]; done: diff --git a/server/queue.c b/server/queue.c index 40ecb6b5602..ab524a7e1e4 100644 --- a/server/queue.c +++ b/server/queue.c @@ -72,9 +72,6 @@ struct message unsigned int msg; /* message code */ lparam_t wparam; /* parameters */ lparam_t lparam; /* parameters */ - lparam_t info; /* extra info */ - int x; /* x position */ - int y; /* y position */ unsigned int time; /* message time */ void *data; /* message data for sent messages */ unsigned int data_size; /* size of message data */ @@ -415,10 +412,15 @@ static int merge_message( struct thread_input *input, const struct message *msg /* now we can merge it */ prev->wparam = msg->wparam; prev->lparam = msg->lparam; - prev->x = msg->x; - prev->y = msg->y; prev->time = msg->time; - prev->info = msg->info; + if (msg->type == MSG_HARDWARE && prev->data && msg->data) + { + struct hardware_msg_data *prev_data = prev->data; + struct hardware_msg_data *msg_data = msg->data; + prev_data->x = msg_data->x; + prev_data->y = msg_data->y; + prev_data->info = msg_data->info; + } return 1; } @@ -568,9 +570,6 @@ static struct message_result *alloc_message_result( struct msg_queue *send_queue callback_msg->wparam = 0; callback_msg->lparam = 0; callback_msg->time = get_tick_count(); - callback_msg->x = 0; - callback_msg->y = 0; - callback_msg->info = 0; callback_msg->result = NULL; /* steal the data from the original message */ callback_msg->data = msg->data; @@ -610,10 +609,7 @@ static void receive_message( struct msg_queue *queue, struct message *msg, reply->msg = msg->msg; reply->wparam = msg->wparam; reply->lparam = msg->lparam; - reply->x = msg->x; - reply->y = msg->y; reply->time = msg->time; - reply->info = msg->info; if (msg->data) set_reply_data_ptr( msg->data, msg->data_size ); @@ -681,10 +677,7 @@ found: reply->msg = msg->msg; reply->wparam = msg->wparam; reply->lparam = msg->lparam; - reply->x = msg->x; - reply->y = msg->y; reply->time = msg->time; - reply->info = msg->info; if (flags & PM_REMOVE) { @@ -712,10 +705,7 @@ static int get_quit_message( struct msg_queue *queue, unsigned int flags, reply->msg = WM_QUIT; reply->wparam = queue->exit_code; reply->lparam = 0; - reply->x = 0; - reply->y = 0; reply->time = get_tick_count(); - reply->info = 0; if (flags & PM_REMOVE) { @@ -1243,7 +1233,7 @@ static void release_hardware_message( struct msg_queue *queue, unsigned int hw_i /* find the window that should receive a given hardware message */ static user_handle_t find_hardware_message_window( struct thread_input *input, struct message *msg, - unsigned int *msg_code ) + struct hardware_msg_data *data, unsigned int *msg_code ) { user_handle_t win = 0; @@ -1262,7 +1252,7 @@ static user_handle_t find_hardware_message_window( struct thread_input *input, s { if (!(win = msg->win) || !is_window_visible( win )) { - if (input) win = window_from_point( input->desktop, msg->x, msg->y ); + if (input) win = window_from_point( input->desktop, data->x, data->y ); } } } @@ -1270,7 +1260,8 @@ static user_handle_t find_hardware_message_window( struct thread_input *input, s } /* queue a hardware message into a given thread input */ -static void queue_hardware_message( struct msg_queue *queue, struct message *msg ) +static void queue_hardware_message( struct msg_queue *queue, struct message *msg, + struct hardware_msg_data *data ) { user_handle_t win; struct thread *thread; @@ -1278,7 +1269,7 @@ static void queue_hardware_message( struct msg_queue *queue, struct message *msg unsigned int msg_code; last_input_time = get_tick_count(); - win = find_hardware_message_window( input, msg, &msg_code ); + win = find_hardware_message_window( input, msg, data, &msg_code ); if (!win || !(thread = get_window_thread(win))) { if (input) update_input_key_state( input, msg ); @@ -1364,8 +1355,10 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user while (ptr) { struct message *msg = LIST_ENTRY( ptr, struct message, entry ); + struct hardware_msg_data *data = msg->data; + ptr = list_next( &input->msg_list, ptr ); - win = find_hardware_message_window( input, msg, &msg_code ); + win = find_hardware_message_window( input, msg, data, &msg_code ); if (!win || !(win_thread = get_window_thread( win ))) { /* no window at all, remove it */ @@ -1408,11 +1401,10 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user reply->msg = msg_code; reply->wparam = msg->wparam; reply->lparam = msg->lparam; - reply->x = msg->x; - reply->y = msg->y; reply->time = msg->time; - reply->info = msg->info; - reply->hw_id = msg->unique_id; + + data->hw_id = msg->unique_id; + set_reply_data( msg->data, msg->data_size ); return 1; } /* nothing found, clear the hardware queue bits */ @@ -1495,9 +1487,6 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa msg->wparam = wparam; msg->lparam = lparam; msg->time = get_tick_count(); - msg->x = 0; - msg->y = 0; - msg->info = 0; msg->result = NULL; msg->data = NULL; msg->data_size = 0; @@ -1511,7 +1500,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa /* post a win event */ void post_win_event( struct thread *thread, unsigned int event, user_handle_t win, unsigned int object_id, - unsigned int child_id, void *hook_proc, + unsigned int child_id, client_ptr_t hook_proc, const WCHAR *module, data_size_t module_size, user_handle_t hook) { @@ -1527,9 +1516,6 @@ void post_win_event( struct thread *thread, unsigned int event, msg->wparam = object_id; msg->lparam = child_id; msg->time = get_tick_count(); - msg->x = 0; - msg->y = 0; - msg->info = 0; msg->result = NULL; if ((data = malloc( sizeof(*data) + module_size ))) @@ -1670,9 +1656,6 @@ DECL_HANDLER(send_message) msg->wparam = req->wparam; msg->lparam = req->lparam; msg->time = get_tick_count(); - msg->x = 0; - msg->y = 0; - msg->info = 0; msg->result = NULL; msg->data = NULL; msg->data_size = get_req_data_size(); @@ -1721,6 +1704,7 @@ DECL_HANDLER(send_hardware_message) struct message *msg; struct msg_queue *recv_queue = NULL; struct thread *thread = NULL; + struct hardware_msg_data *data; if (req->id) { @@ -1734,6 +1718,16 @@ DECL_HANDLER(send_hardware_message) return; } + if (!(data = mem_alloc( sizeof(*data) ))) + { + release_object( thread ); + return; + } + memset( data, 0, sizeof(*data) ); + data->x = req->x; + data->y = req->y; + data->info = req->info; + if ((msg = mem_alloc( sizeof(*msg) ))) { msg->type = MSG_HARDWARE; @@ -1742,14 +1736,13 @@ DECL_HANDLER(send_hardware_message) msg->wparam = req->wparam; msg->lparam = req->lparam; msg->time = req->time; - msg->x = req->x; - msg->y = req->y; - msg->info = req->info; msg->result = NULL; - msg->data = NULL; - msg->data_size = 0; - queue_hardware_message( recv_queue, msg ); + msg->data = data; + msg->data_size = sizeof(*data); + queue_hardware_message( recv_queue, msg, data ); } + else free( data ); + if (thread) release_object( thread ); } @@ -1824,10 +1817,7 @@ DECL_HANDLER(get_message) reply->msg = WM_PAINT; reply->wparam = 0; reply->lparam = 0; - reply->x = 0; - reply->y = 0; reply->time = get_tick_count(); - reply->info = 0; return; } @@ -1841,10 +1831,7 @@ DECL_HANDLER(get_message) reply->msg = timer->msg; reply->wparam = timer->id; reply->lparam = timer->lparam; - reply->x = 0; - reply->y = 0; reply->time = get_tick_count(); - reply->info = 0; return; } diff --git a/server/serial.c b/server/serial.c index d1b3822f106..6fa60e58ace 100644 --- a/server/serial.c +++ b/server/serial.c @@ -188,7 +188,7 @@ static void serial_queue_async( struct fd *fd, const async_data_t *data, int typ break; } - if ((async = fd_queue_async( fd, data, type, count ))) + if ((async = fd_queue_async( fd, data, type ))) { if (timeout) async_set_timeout( async, timeout * -10000, STATUS_TIMEOUT ); release_object( async ); diff --git a/server/thread.c b/server/thread.c index 0c496db7103..397ad9b695d 100644 --- a/server/thread.c +++ b/server/thread.c @@ -58,7 +58,7 @@ struct thread_wait struct thread *thread; /* owner thread */ int count; /* count of objects */ int flags; - void *cookie; /* magic cookie to return to client */ + client_ptr_t cookie; /* magic cookie to return to client */ timeout_t timeout; struct timeout_user *user; struct wait_queue_entry queues[1]; @@ -154,7 +154,7 @@ static inline void init_thread_structure( struct thread *thread ) thread->unix_tid = -1; /* not known yet */ thread->context = NULL; thread->suspend_context = NULL; - thread->teb = NULL; + thread->teb = 0; thread->debug_ctx = NULL; thread->debug_event = NULL; thread->debug_break = 0; @@ -188,9 +188,9 @@ static inline void init_thread_structure( struct thread *thread ) } /* check if address looks valid for a client-side data structure (TEB etc.) */ -static inline int is_valid_address( void *addr ) +static inline int is_valid_address( client_ptr_t addr ) { - return addr && !((unsigned long)addr % sizeof(int)); + return addr && !(addr % sizeof(int)); } /* create a new thread */ @@ -291,8 +291,8 @@ static void dump_thread( struct object *obj, int verbose ) struct thread *thread = (struct thread *)obj; assert( obj->ops == &thread_ops ); - fprintf( stderr, "Thread id=%04x unix pid=%d unix tid=%d teb=%p state=%d\n", - thread->id, thread->unix_pid, thread->unix_tid, thread->teb, thread->state ); + fprintf( stderr, "Thread id=%04x unix pid=%d unix tid=%d state=%d\n", + thread->id, thread->unix_pid, thread->unix_tid, thread->state ); } static int thread_signaled( struct object *obj, struct thread *thread ) @@ -560,11 +560,12 @@ static int check_wait( struct thread *thread ) } /* send the wakeup signal to a thread */ -static int send_thread_wakeup( struct thread *thread, void *cookie, int signaled ) +static int send_thread_wakeup( struct thread *thread, client_ptr_t cookie, int signaled ) { struct wake_up_reply reply; int ret; + memset( &reply, 0, sizeof(reply) ); reply.cookie = cookie; reply.signaled = signaled; if ((ret = write( get_unix_fd( thread->wait_fd ), &reply, sizeof(reply) )) == sizeof(reply)) @@ -583,15 +584,14 @@ static int send_thread_wakeup( struct thread *thread, void *cookie, int signaled int wake_thread( struct thread *thread ) { int signaled, count; - void *cookie; + client_ptr_t cookie; for (count = 0; thread->wait; count++) { if ((signaled = check_wait( thread )) == -1) break; cookie = thread->wait->cookie; - if (debug_level) fprintf( stderr, "%04x: *wakeup* signaled=%d cookie=%p\n", - thread->id, signaled, cookie ); + if (debug_level) fprintf( stderr, "%04x: *wakeup* signaled=%d\n", thread->id, signaled ); end_wait( thread ); if (send_thread_wakeup( thread, cookie, signaled ) == -1) /* error */ break; @@ -604,14 +604,13 @@ static void thread_timeout( void *ptr ) { struct thread_wait *wait = ptr; struct thread *thread = wait->thread; - void *cookie = wait->cookie; + client_ptr_t cookie = wait->cookie; wait->user = NULL; if (thread->wait != wait) return; /* not the top-level wait, ignore it */ if (thread->suspend + thread->process->suspend > 0) return; /* suspended, ignore it */ - if (debug_level) fprintf( stderr, "%04x: *wakeup* signaled=%d cookie=%p\n", - thread->id, (int)STATUS_TIMEOUT, cookie ); + if (debug_level) fprintf( stderr, "%04x: *wakeup* signaled=TIMEOUT\n", thread->id ); end_wait( thread ); if (send_thread_wakeup( thread, cookie, STATUS_TIMEOUT ) == -1) return; /* check if other objects have become signaled in the meantime */ @@ -634,7 +633,7 @@ static int signal_object( obj_handle_t handle ) } /* select on a list of handles */ -static timeout_t select_on( unsigned int count, void *cookie, const obj_handle_t *handles, +static timeout_t select_on( unsigned int count, client_ptr_t cookie, const obj_handle_t *handles, int flags, timeout_t timeout, obj_handle_t signal_obj ) { int ret; @@ -916,7 +915,7 @@ void kill_thread( struct thread *thread, int violent_death ) if (thread->wait) { while (thread->wait) end_wait( thread ); - send_thread_wakeup( thread, NULL, STATUS_PENDING ); + send_thread_wakeup( thread, 0, STATUS_PENDING ); /* if it is waiting on the socket, we don't need to send a SIGQUIT */ violent_death = 0; } @@ -933,16 +932,15 @@ void kill_thread( struct thread *thread, int violent_death ) /* trigger a breakpoint event in a given thread */ void break_thread( struct thread *thread ) { - struct debug_event_exception data; + debug_event_t data; assert( thread->context ); - data.record.ExceptionCode = STATUS_BREAKPOINT; - data.record.ExceptionFlags = EXCEPTION_CONTINUABLE; - data.record.ExceptionRecord = NULL; - data.record.ExceptionAddress = get_context_ip( thread->context ); - data.record.NumberParameters = 0; - data.first = 1; + memset( &data, 0, sizeof(data) ); + data.exception.first = 1; + data.exception.exc_code = STATUS_BREAKPOINT; + data.exception.flags = EXCEPTION_CONTINUABLE; + data.exception.address = get_context_ip( thread->context ); generate_debug_event( thread, EXCEPTION_DEBUG_EVENT, &data ); thread->debug_break = 0; } @@ -1033,7 +1031,7 @@ DECL_HANDLER(init_thread) if (!(current->wait_fd = create_anonymous_fd( &thread_fd_ops, wait_fd, ¤t->obj, 0 ))) return; - if (!is_valid_address(req->teb) || !is_valid_address(req->peb) || !is_valid_address(req->ldt_copy)) + if (!is_valid_address(req->teb) || !is_valid_address(req->peb)) { set_error( STATUS_INVALID_PARAMETER ); return; @@ -1047,7 +1045,6 @@ DECL_HANDLER(init_thread) { process->unix_pid = current->unix_pid; process->peb = req->peb; - process->ldt_copy = req->ldt_copy; reply->info_size = init_process( current ); } else @@ -1055,7 +1052,7 @@ DECL_HANDLER(init_thread) if (process->unix_pid != current->unix_pid) process->unix_pid = -1; /* can happen with linuxthreads */ if (current->suspend + process->suspend > 0) stop_thread( current ); - generate_debug_event( current, CREATE_THREAD_DEBUG_EVENT, req->entry ); + generate_debug_event( current, CREATE_THREAD_DEBUG_EVENT, &req->entry ); } debug_level = max( debug_level, req->debug_level ); @@ -1197,7 +1194,9 @@ DECL_HANDLER(select) } else if (apc->result.type == APC_ASYNC_IO) { - if (apc->owner) async_set_result( apc->owner, apc->result.async_io.status, apc->result.async_io.total ); + if (apc->owner) + async_set_result( apc->owner, apc->result.async_io.status, + apc->result.async_io.total, apc->result.async_io.apc ); } wake_up( &apc->obj, 0 ); close_handle( current->process, req->prev_apc ); @@ -1242,7 +1241,7 @@ DECL_HANDLER(queue_apc) { case APC_NONE: case APC_USER: - thread = get_thread_from_handle( req->thread, THREAD_SET_CONTEXT ); + thread = get_thread_from_handle( req->handle, THREAD_SET_CONTEXT ); break; case APC_VIRTUAL_ALLOC: case APC_VIRTUAL_FREE: @@ -1251,13 +1250,13 @@ DECL_HANDLER(queue_apc) case APC_VIRTUAL_LOCK: case APC_VIRTUAL_UNLOCK: case APC_UNMAP_VIEW: - process = get_process_from_handle( req->process, PROCESS_VM_OPERATION ); + process = get_process_from_handle( req->handle, PROCESS_VM_OPERATION ); break; case APC_VIRTUAL_QUERY: - process = get_process_from_handle( req->process, PROCESS_QUERY_INFORMATION ); + process = get_process_from_handle( req->handle, PROCESS_QUERY_INFORMATION ); break; case APC_MAP_VIEW: - process = get_process_from_handle( req->process, PROCESS_VM_OPERATION ); + process = get_process_from_handle( req->handle, PROCESS_VM_OPERATION ); if (process && process != current->process) { /* duplicate the handle into the target process */ @@ -1272,7 +1271,7 @@ DECL_HANDLER(queue_apc) } break; case APC_CREATE_THREAD: - process = get_process_from_handle( req->process, PROCESS_CREATE_THREAD ); + process = get_process_from_handle( req->handle, PROCESS_CREATE_THREAD ); break; default: set_error( STATUS_INVALID_PARAMETER ); diff --git a/server/thread.h b/server/thread.h index b4ca5678e75..1815f0b1ff8 100644 --- a/server/thread.h +++ b/server/thread.h @@ -78,7 +78,7 @@ struct thread int unix_tid; /* Unix tid of client */ CONTEXT *context; /* current context if in an exception handler */ CONTEXT *suspend_context; /* current context if suspended */ - void *teb; /* TEB address (in client address space) */ + client_ptr_t teb; /* TEB address (in client address space) */ int priority; /* priority level */ unsigned int affinity; /* affinity mask */ int suspend; /* suspend count */ @@ -121,7 +121,7 @@ extern struct token *thread_get_impersonation_token( struct thread *thread ); /* CPU context functions */ extern void copy_context( CONTEXT *to, const CONTEXT *from, unsigned int flags ); -extern void *get_context_ip( const CONTEXT *context ); +extern client_ptr_t get_context_ip( const CONTEXT *context ); extern unsigned int get_context_cpu_flag(void); extern unsigned int get_context_system_regs( unsigned int flags ); diff --git a/server/timer.c b/server/timer.c index 5afe6630be6..b38eae71db1 100644 --- a/server/timer.c +++ b/server/timer.c @@ -46,8 +46,8 @@ struct timer timeout_t when; /* next expiration */ struct timeout_user *timeout; /* timeout user */ struct thread *thread; /* thread that set the APC function */ - void *callback; /* callback APC function */ - void *arg; /* callback argument */ + client_ptr_t callback; /* callback APC function */ + client_ptr_t arg; /* callback argument */ }; static void timer_dump( struct object *obj, int verbose ); @@ -160,7 +160,7 @@ static int cancel_timer( struct timer *timer ) /* set the timer expiration and period */ static int set_timer( struct timer *timer, timeout_t expire, unsigned int period, - void *callback, void *arg ) + client_ptr_t callback, client_ptr_t arg ) { int signaled = cancel_timer( timer ); if (timer->manual) diff --git a/server/trace.c b/server/trace.c index c446f63ff11..e30517d67f6 100644 --- a/server/trace.c +++ b/server/trace.c @@ -114,7 +114,9 @@ static void dump_apc_call( const apc_call_t *call ) fprintf( stderr, "APC_NONE" ); break; case APC_USER: - fprintf( stderr, "APC_USER,args={" ); + fprintf( stderr, "APC_USER,func=" ); + dump_uint64( &call->user.func ); + fprintf( stderr, ",args={" ); dump_uint64( &call->user.args[0] ); fputc( ',', stderr ); dump_uint64( &call->user.args[1] ); @@ -125,48 +127,67 @@ static void dump_apc_call( const apc_call_t *call ) case APC_TIMER: fprintf( stderr, "APC_TIMER,time=" ); dump_timeout( &call->timer.time ); - fprintf( stderr, ",arg=%p", call->timer.arg ); + fprintf( stderr, ",arg=" ); + dump_uint64( &call->timer.arg ); break; case APC_ASYNC_IO: - fprintf( stderr, "APC_ASYNC_IO,func=%p,user=%p,sb=%p,status=%s", - call->async_io.func, call->async_io.user, call->async_io.sb, - get_status_name(call->async_io.status) ); + fprintf( stderr, "APC_ASYNC_IO,func=" ); + dump_uint64( &call->async_io.func ); + fprintf( stderr, ",user=" ); + dump_uint64( &call->async_io.user ); + fprintf( stderr, ",sb=" ); + dump_uint64( &call->async_io.sb ); + fprintf( stderr, ",status=%s", get_status_name(call->async_io.status) ); break; case APC_VIRTUAL_ALLOC: - fprintf( stderr, "APC_VIRTUAL_ALLOC,addr=%p,size=", call->virtual_alloc.addr ); + fprintf( stderr, "APC_VIRTUAL_ALLOC,addr==" ); + dump_uint64( &call->virtual_alloc.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &call->virtual_alloc.size ); fprintf( stderr, ",zero_bits=%u,op_type=%x,prot=%x", call->virtual_alloc.zero_bits, call->virtual_alloc.op_type, call->virtual_alloc.prot ); break; case APC_VIRTUAL_FREE: - fprintf( stderr, "APC_VIRTUAL_FREE,addr=%p,size=", call->virtual_free.addr ); + fprintf( stderr, "APC_VIRTUAL_FREE,addr=" ); + dump_uint64( &call->virtual_free.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &call->virtual_free.size ); fprintf( stderr, ",op_type=%x", call->virtual_free.op_type ); break; case APC_VIRTUAL_QUERY: - fprintf( stderr, "APC_VIRTUAL_QUERY,addr=%p", call->virtual_query.addr ); + fprintf( stderr, "APC_VIRTUAL_QUERY,addr=" ); + dump_uint64( &call->virtual_query.addr ); break; case APC_VIRTUAL_PROTECT: - fprintf( stderr, "APC_VIRTUAL_PROTECT,addr=%p,size=", call->virtual_protect.addr ); + fprintf( stderr, "APC_VIRTUAL_PROTECT,addr=" ); + dump_uint64( &call->virtual_protect.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &call->virtual_protect.size ); fprintf( stderr, ",prot=%x", call->virtual_protect.prot ); break; case APC_VIRTUAL_FLUSH: - fprintf( stderr, "APC_VIRTUAL_FLUSH,addr=%p,size=", call->virtual_flush.addr ); + fprintf( stderr, "APC_VIRTUAL_FLUSH,addr=" ); + dump_uint64( &call->virtual_flush.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &call->virtual_flush.size ); break; case APC_VIRTUAL_LOCK: - fprintf( stderr, "APC_VIRTUAL_LOCK,addr=%p,size=", call->virtual_lock.addr ); + fprintf( stderr, "APC_VIRTUAL_LOCK,addr=" ); + dump_uint64( &call->virtual_lock.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &call->virtual_lock.size ); break; case APC_VIRTUAL_UNLOCK: - fprintf( stderr, "APC_VIRTUAL_UNLOCK,addr=%p,size=", call->virtual_unlock.addr ); + fprintf( stderr, "APC_VIRTUAL_UNLOCK,addr=" ); + dump_uint64( &call->virtual_unlock.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &call->virtual_unlock.size ); break; case APC_MAP_VIEW: - fprintf( stderr, "APC_MAP_VIEW,handle=%04x,addr=%p,size=", - call->map_view.handle, call->map_view.addr ); + fprintf( stderr, "APC_MAP_VIEW,handle=%04x,addr=", call->map_view.handle ); + dump_uint64( &call->map_view.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &call->map_view.size ); fprintf( stderr, ",offset=" ); dump_uint64( &call->map_view.offset ); @@ -174,11 +195,15 @@ static void dump_apc_call( const apc_call_t *call ) call->map_view.zero_bits, call->map_view.alloc_type, call->map_view.prot ); break; case APC_UNMAP_VIEW: - fprintf( stderr, "APC_UNMAP_VIEW,addr=%p", call->unmap_view.addr ); + fprintf( stderr, "APC_UNMAP_VIEW,addr=" ); + dump_uint64( &call->unmap_view.addr ); break; case APC_CREATE_THREAD: - fprintf( stderr, "APC_CREATE_THREAD,func=%p,arg=%p,reserve=", - call->create_thread.func, call->create_thread.arg ); + fprintf( stderr, "APC_CREATE_THREAD,func=" ); + dump_uint64( &call->create_thread.func ); + fprintf( stderr, ",arg=" ); + dump_uint64( &call->create_thread.arg ); + fprintf( stderr, ",reserve=" ); dump_uint64( &call->create_thread.reserve ); fprintf( stderr, ",commit=" ); dump_uint64( &call->create_thread.commit ); @@ -199,52 +224,70 @@ static void dump_apc_result( const apc_result_t *result ) case APC_NONE: break; case APC_ASYNC_IO: - fprintf( stderr, "APC_ASYNC_IO,status=%s", - get_status_name( result->async_io.status ) ); + fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u,apc=", + get_status_name( result->async_io.status ), result->async_io.total ); + dump_uint64( &result->async_io.apc ); break; case APC_VIRTUAL_ALLOC: - fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s,addr=%p,size=", - get_status_name( result->virtual_alloc.status ), result->virtual_alloc.addr ); + fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s,addr=", + get_status_name( result->virtual_alloc.status )); + dump_uint64( &result->virtual_alloc.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &result->virtual_alloc.size ); break; case APC_VIRTUAL_FREE: - fprintf( stderr, "APC_VIRTUAL_FREE,status=%s,addr=%p,size=", - get_status_name( result->virtual_free.status ), result->virtual_free.addr ); + fprintf( stderr, "APC_VIRTUAL_FREE,status=%s,addr=", + get_status_name( result->virtual_free.status )); + dump_uint64( &result->virtual_free.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &result->virtual_free.size ); break; case APC_VIRTUAL_QUERY: - fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s,base=%p,alloc_base=%p,size=", - get_status_name( result->virtual_query.status ), - result->virtual_query.base, result->virtual_query.alloc_base ); + fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s,base=", + get_status_name( result->virtual_query.status )); + dump_uint64( &result->virtual_query.base ); + fprintf( stderr, ",alloc_base=" ); + dump_uint64( &result->virtual_query.alloc_base ); + fprintf( stderr, ",size=" ); dump_uint64( &result->virtual_query.size ); fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x", result->virtual_query.state, result->virtual_query.prot, result->virtual_query.alloc_prot, result->virtual_query.alloc_type ); break; case APC_VIRTUAL_PROTECT: - fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s,addr=%p,size=", - get_status_name( result->virtual_protect.status ), result->virtual_protect.addr ); + fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s,addr=", + get_status_name( result->virtual_protect.status )); + dump_uint64( &result->virtual_protect.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &result->virtual_protect.size ); fprintf( stderr, ",prot=%x", result->virtual_protect.prot ); break; case APC_VIRTUAL_FLUSH: - fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s,addr=%p,size=", - get_status_name( result->virtual_flush.status ), result->virtual_flush.addr ); + fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s,addr=", + get_status_name( result->virtual_flush.status )); + dump_uint64( &result->virtual_flush.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &result->virtual_flush.size ); break; case APC_VIRTUAL_LOCK: - fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s,addr=%p,size=", - get_status_name( result->virtual_lock.status ), result->virtual_lock.addr ); + fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s,addr=", + get_status_name( result->virtual_lock.status )); + dump_uint64( &result->virtual_lock.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &result->virtual_lock.size ); break; case APC_VIRTUAL_UNLOCK: - fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s,addr=%p,size=", - get_status_name( result->virtual_unlock.status ), result->virtual_unlock.addr ); + fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s,addr=", + get_status_name( result->virtual_unlock.status )); + dump_uint64( &result->virtual_unlock.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &result->virtual_unlock.size ); break; case APC_MAP_VIEW: - fprintf( stderr, "APC_MAP_VIEW,status=%s,addr=%p,size=", - get_status_name( result->map_view.status ), result->map_view.addr ); + fprintf( stderr, "APC_MAP_VIEW,status=%s,addr=", + get_status_name( result->map_view.status )); + dump_uint64( &result->map_view.addr ); + fprintf( stderr, ",size=" ); dump_uint64( &result->map_view.size ); break; case APC_UNMAP_VIEW: @@ -265,8 +308,15 @@ static void dump_apc_result( const apc_result_t *result ) static void dump_async_data( const async_data_t *data ) { - fprintf( stderr, "{callback=%p,iosb=%p,arg=%p,apc=%p,event=%04x}", - data->callback, data->iosb, data->arg, data->apc, data->event ); + fprintf( stderr, "{handle=%04x,event=%04x,callback=", data->handle, data->event ); + dump_uint64( &data->callback ); + fprintf( stderr, ",iosb=" ); + dump_uint64( &data->iosb ); + fprintf( stderr, ",arg=" ); + dump_uint64( &data->arg ); + fprintf( stderr, ",cvalue=" ); + dump_uint64( &data->cvalue ); + fputc( '}', stderr ); } static void dump_luid( const luid_t *luid ) @@ -301,29 +351,30 @@ static void dump_context( const CONTEXT *context, data_size_t size ) #endif } -static void dump_exc_record( const EXCEPTION_RECORD *rec ) +static void dump_varargs_ints( data_size_t size ) { - unsigned int i; - fprintf( stderr, "{code=%x,flags=%x,rec=%p,addr=%p,params={", - rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionRecord, - rec->ExceptionAddress ); - for (i = 0; i < min(rec->NumberParameters,EXCEPTION_MAXIMUM_PARAMETERS); i++) + const int *data = cur_data; + data_size_t len = size / sizeof(*data); + + fputc( '{', stderr ); + while (len > 0) { - if (i) fputc( ',', stderr ); - fprintf( stderr, "%lx", rec->ExceptionInformation[i] ); + fprintf( stderr, "%d", *data++ ); + if (--len) fputc( ',', stderr ); } fputc( '}', stderr ); + remove_data( size ); } -static void dump_varargs_ints( data_size_t size ) +static void dump_varargs_uints64( data_size_t size ) { - const int *data = cur_data; + const unsigned __int64 *data = cur_data; data_size_t len = size / sizeof(*data); fputc( '{', stderr ); while (len > 0) { - fprintf( stderr, "%d", *data++ ); + dump_uint64( data++ ); if (--len) fputc( ',', stderr ); } fputc( '}', stderr ); @@ -412,85 +463,92 @@ static void dump_varargs_context( data_size_t size ) remove_data( min( size, sizeof(CONTEXT) )); } -static void dump_varargs_exc_event( data_size_t size ) -{ - const CONTEXT *ptr = cur_data; - - if (!size) - { - fprintf( stderr, "{}" ); - return; - } - fprintf( stderr, "{context=" ); - dump_context( ptr, size ); - if (size > sizeof(CONTEXT)) - { - fprintf( stderr, ",rec=" ); - dump_exc_record( (const EXCEPTION_RECORD *)(ptr + 1) ); - } - fputc( '}', stderr ); - remove_data( size ); -} - static void dump_varargs_debug_event( data_size_t size ) { - const debug_event_t *event = cur_data; + debug_event_t event; + unsigned int i; if (!size) { fprintf( stderr, "{}" ); return; } - switch(event->code) + size = min( size, sizeof(event) ); + memset( &event, 0, sizeof(event) ); + memcpy( &event, cur_data, size ); + + switch(event.code) { case EXCEPTION_DEBUG_EVENT: - fprintf( stderr, "{exception," ); - dump_exc_record( &event->info.exception.record ); - fprintf( stderr, ",first=%d}", event->info.exception.first ); + fprintf( stderr, "{exception,first=%d,exc_code=%08x,flags=%08x,record=", + event.exception.first, event.exception.exc_code, event.exception.flags ); + dump_uint64( &event.exception.record ); + fprintf( stderr, ",address=" ); + dump_uint64( &event.exception.address ); + fprintf( stderr, ",params={" ); + event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS ); + for (i = 0; i < event.exception.nb_params; i++) + { + dump_uint64( &event.exception.params[i] ); + if (i < event.exception.nb_params) fputc( ',', stderr ); + } + fprintf( stderr, "}}" ); break; case CREATE_THREAD_DEBUG_EVENT: - fprintf( stderr, "{create_thread,thread=%04x,teb=%p,start=%p}", - event->info.create_thread.handle, event->info.create_thread.teb, - event->info.create_thread.start ); + fprintf( stderr, "{create_thread,thread=%04x,teb=", event.create_thread.handle ); + dump_uint64( &event.create_thread.teb ); + fprintf( stderr, ",start=" ); + dump_uint64( &event.create_thread.start ); + fputc( '}', stderr ); break; case CREATE_PROCESS_DEBUG_EVENT: - fprintf( stderr, "{create_process,file=%04x,process=%04x,thread=%04x,base=%p,offset=%d," - "size=%d,teb=%p,start=%p,name=%p,unicode=%d}", - event->info.create_process.file, event->info.create_process.process, - event->info.create_process.thread, event->info.create_process.base, - event->info.create_process.dbg_offset, event->info.create_process.dbg_size, - event->info.create_process.teb, event->info.create_process.start, - event->info.create_process.name, event->info.create_process.unicode ); + fprintf( stderr, "{create_process,file=%04x,process=%04x,thread=%04x,base=", + event.create_process.file, event.create_process.process, + event.create_process.thread ); + dump_uint64( &event.create_process.base ); + fprintf( stderr, ",offset=%d,size=%d,teb=", + event.create_process.dbg_offset, event.create_process.dbg_size ); + dump_uint64( &event.create_process.teb ); + fprintf( stderr, ",start=" ); + dump_uint64( &event.create_process.start ); + fprintf( stderr, ",name=" ); + dump_uint64( &event.create_process.name ); + fprintf( stderr, ",unicode=%d}", event.create_process.unicode ); break; case EXIT_THREAD_DEBUG_EVENT: - fprintf( stderr, "{exit_thread,code=%d}", event->info.exit.exit_code ); + fprintf( stderr, "{exit_thread,code=%d}", event.exit.exit_code ); break; case EXIT_PROCESS_DEBUG_EVENT: - fprintf( stderr, "{exit_process,code=%d}", event->info.exit.exit_code ); + fprintf( stderr, "{exit_process,code=%d}", event.exit.exit_code ); break; case LOAD_DLL_DEBUG_EVENT: - fprintf( stderr, "{load_dll,file=%04x,base=%p,offset=%d,size=%d,name=%p,unicode=%d}", - event->info.load_dll.handle, event->info.load_dll.base, - event->info.load_dll.dbg_offset, event->info.load_dll.dbg_size, - event->info.load_dll.name, event->info.load_dll.unicode ); + fprintf( stderr, "{load_dll,file=%04x,base", event.load_dll.handle ); + dump_uint64( &event.load_dll.base ); + fprintf( stderr, ",offset=%d,size=%d,name=", + event.load_dll.dbg_offset, event.load_dll.dbg_size ); + dump_uint64( &event.load_dll.name ); + fprintf( stderr, ",unicode=%d}", event.load_dll.unicode ); break; case UNLOAD_DLL_DEBUG_EVENT: - fprintf( stderr, "{unload_dll,base=%p}", event->info.unload_dll.base ); + fputs( "{unload_dll,base=", stderr ); + dump_uint64( &event.unload_dll.base ); + fputc( '}', stderr ); break; case OUTPUT_DEBUG_STRING_EVENT: - fprintf( stderr, "{output_string,data=%p,unicode=%d,len=%d}", - event->info.output_string.string, event->info.output_string.unicode, - event->info.output_string.length ); + fprintf( stderr, "{output_string,string=" ); + dump_uint64( &event.output_string.string ); + fprintf( stderr, ",unicode=%d,len=%u}", + event.output_string.unicode, event.output_string.length ); break; case RIP_EVENT: fprintf( stderr, "{rip,err=%d,type=%d}", - event->info.rip_info.error, event->info.rip_info.type ); + event.rip_info.error, event.rip_info.type ); break; case 0: /* zero is the code returned on timeouts */ fprintf( stderr, "{}" ); break; default: - fprintf( stderr, "{code=??? (%d)}", event->code ); + fprintf( stderr, "{code=??? (%d)}", event.code ); break; } remove_data( size ); @@ -605,8 +663,9 @@ static void dump_varargs_properties( data_size_t size ) fputc( '{', stderr ); while (len > 0) { - fprintf( stderr, "{atom=%04x,str=%d,data=%lx}", - prop->atom, prop->string, prop->data ); + fprintf( stderr, "{atom=%04x,str=%d,data=", prop->atom, prop->string ); + dump_uint64( &prop->data ); + fputc( '}', stderr ); prop++; if (--len) fputc( ',', stderr ); } @@ -909,9 +968,15 @@ static void dump_get_startup_info_reply( const struct get_startup_info_reply *re static void dump_init_process_done_request( const struct init_process_done_request *req ) { - fprintf( stderr, " module=%p,", req->module ); - fprintf( stderr, " entry=%p,", req->entry ); - fprintf( stderr, " gui=%d", req->gui ); + fprintf( stderr, " gui=%d,", req->gui ); + fprintf( stderr, " module=" ); + dump_uint64( &req->module ); + fprintf( stderr, "," ); + fprintf( stderr, " ldt_copy=" ); + dump_uint64( &req->ldt_copy ); + fprintf( stderr, "," ); + fprintf( stderr, " entry=" ); + dump_uint64( &req->entry ); } static void dump_init_thread_request( const struct init_thread_request *req ) @@ -919,22 +984,26 @@ static void dump_init_thread_request( const struct init_thread_request *req ) fprintf( stderr, " unix_pid=%d,", req->unix_pid ); fprintf( stderr, " unix_tid=%d,", req->unix_tid ); fprintf( stderr, " debug_level=%d,", req->debug_level ); - fprintf( stderr, " teb=%p,", req->teb ); - fprintf( stderr, " peb=%p,", req->peb ); - fprintf( stderr, " entry=%p,", req->entry ); - fprintf( stderr, " ldt_copy=%p,", req->ldt_copy ); + fprintf( stderr, " teb=" ); + dump_uint64( &req->teb ); + fprintf( stderr, "," ); + fprintf( stderr, " entry=" ); + dump_uint64( &req->entry ); + fprintf( stderr, "," ); fprintf( stderr, " reply_fd=%d,", req->reply_fd ); - fprintf( stderr, " wait_fd=%d", req->wait_fd ); + fprintf( stderr, " wait_fd=%d,", req->wait_fd ); + fprintf( stderr, " peb=" ); + dump_uint64( &req->peb ); } static void dump_init_thread_reply( const struct init_thread_reply *req ) { fprintf( stderr, " pid=%04x,", req->pid ); fprintf( stderr, " tid=%04x,", req->tid ); - fprintf( stderr, " info_size=%u,", req->info_size ); fprintf( stderr, " server_start=" ); dump_timeout( &req->server_start ); fprintf( stderr, "," ); + fprintf( stderr, " info_size=%u,", req->info_size ); fprintf( stderr, " version=%d", req->version ); } @@ -970,15 +1039,18 @@ static void dump_get_process_info_reply( const struct get_process_info_reply *re { fprintf( stderr, " pid=%04x,", req->pid ); fprintf( stderr, " ppid=%04x,", req->ppid ); - fprintf( stderr, " exit_code=%d,", req->exit_code ); fprintf( stderr, " priority=%d,", req->priority ); fprintf( stderr, " affinity=%08x,", req->affinity ); - fprintf( stderr, " peb=%p,", req->peb ); + fprintf( stderr, " peb=" ); + dump_uint64( &req->peb ); + fprintf( stderr, "," ); fprintf( stderr, " start_time=" ); dump_timeout( &req->start_time ); fprintf( stderr, "," ); fprintf( stderr, " end_time=" ); dump_timeout( &req->end_time ); + fprintf( stderr, "," ); + fprintf( stderr, " exit_code=%d", req->exit_code ); } static void dump_set_process_info_request( const struct set_process_info_request *req ) @@ -999,8 +1071,9 @@ static void dump_get_thread_info_reply( const struct get_thread_info_reply *req { fprintf( stderr, " pid=%04x,", req->pid ); fprintf( stderr, " tid=%04x,", req->tid ); - fprintf( stderr, " teb=%p,", req->teb ); - fprintf( stderr, " exit_code=%d,", req->exit_code ); + fprintf( stderr, " teb=" ); + dump_uint64( &req->teb ); + fprintf( stderr, "," ); fprintf( stderr, " priority=%d,", req->priority ); fprintf( stderr, " affinity=%08x,", req->affinity ); fprintf( stderr, " creation_time=" ); @@ -1009,6 +1082,7 @@ static void dump_get_thread_info_reply( const struct get_thread_info_reply *req fprintf( stderr, " exit_time=" ); dump_timeout( &req->exit_time ); fprintf( stderr, "," ); + fprintf( stderr, " exit_code=%d,", req->exit_code ); fprintf( stderr, " last=%d", req->last ); } @@ -1024,12 +1098,15 @@ static void dump_set_thread_info_request( const struct set_thread_info_request * static void dump_get_dll_info_request( const struct get_dll_info_request *req ) { fprintf( stderr, " handle=%04x,", req->handle ); - fprintf( stderr, " base_address=%p", req->base_address ); + fprintf( stderr, " base_address=" ); + dump_uint64( &req->base_address ); } static void dump_get_dll_info_reply( const struct get_dll_info_reply *req ) { - fprintf( stderr, " entry_point=%p,", req->entry_point ); + fprintf( stderr, " entry_point=" ); + dump_uint64( &req->entry_point ); + fprintf( stderr, "," ); fprintf( stderr, " size=%u,", req->size ); fprintf( stderr, " filename_len=%u,", req->filename_len ); fprintf( stderr, " filename=" ); @@ -1059,8 +1136,12 @@ static void dump_resume_thread_reply( const struct resume_thread_reply *req ) static void dump_load_dll_request( const struct load_dll_request *req ) { fprintf( stderr, " handle=%04x,", req->handle ); - fprintf( stderr, " base=%p,", req->base ); - fprintf( stderr, " name=%p,", req->name ); + fprintf( stderr, " base=" ); + dump_uint64( &req->base ); + fprintf( stderr, "," ); + fprintf( stderr, " name=" ); + dump_uint64( &req->name ); + fprintf( stderr, "," ); fprintf( stderr, " size=%u,", req->size ); fprintf( stderr, " dbg_offset=%d,", req->dbg_offset ); fprintf( stderr, " dbg_size=%d,", req->dbg_size ); @@ -1070,13 +1151,13 @@ static void dump_load_dll_request( const struct load_dll_request *req ) static void dump_unload_dll_request( const struct unload_dll_request *req ) { - fprintf( stderr, " base=%p", req->base ); + fprintf( stderr, " base=" ); + dump_uint64( &req->base ); } static void dump_queue_apc_request( const struct queue_apc_request *req ) { - fprintf( stderr, " thread=%04x,", req->thread ); - fprintf( stderr, " process=%04x,", req->process ); + fprintf( stderr, " handle=%04x,", req->handle ); fprintf( stderr, " call=" ); dump_apc_call( &req->call ); } @@ -1159,7 +1240,9 @@ static void dump_open_thread_reply( const struct open_thread_reply *req ) static void dump_select_request( const struct select_request *req ) { fprintf( stderr, " flags=%d,", req->flags ); - fprintf( stderr, " cookie=%p,", req->cookie ); + fprintf( stderr, " cookie=" ); + dump_uint64( &req->cookie ); + fprintf( stderr, "," ); fprintf( stderr, " signal=%04x,", req->signal ); fprintf( stderr, " prev_apc=%04x,", req->prev_apc ); fprintf( stderr, " timeout=" ); @@ -1174,12 +1257,13 @@ static void dump_select_request( const struct select_request *req ) static void dump_select_reply( const struct select_reply *req ) { - fprintf( stderr, " apc_handle=%04x,", req->apc_handle ); fprintf( stderr, " timeout=" ); dump_timeout( &req->timeout ); fprintf( stderr, "," ); fprintf( stderr, " call=" ); dump_apc_call( &req->call ); + fprintf( stderr, "," ); + fprintf( stderr, " apc_handle=%04x", req->apc_handle ); } static void dump_create_event_request( const struct create_event_request *req ) @@ -1731,7 +1815,6 @@ static void dump_send_console_signal_request( const struct send_console_signal_r static void dump_read_directory_changes_request( const struct read_directory_changes_request *req ) { fprintf( stderr, " filter=%08x,", req->filter ); - fprintf( stderr, " handle=%04x,", req->handle ); fprintf( stderr, " subtree=%d,", req->subtree ); fprintf( stderr, " want_data=%d,", req->want_data ); fprintf( stderr, " async=" ); @@ -1754,10 +1837,10 @@ static void dump_create_mapping_request( const struct create_mapping_request *re { fprintf( stderr, " access=%08x,", req->access ); fprintf( stderr, " attributes=%08x,", req->attributes ); + fprintf( stderr, " protect=%08x,", req->protect ); fprintf( stderr, " size=" ); dump_uint64( &req->size ); fprintf( stderr, "," ); - fprintf( stderr, " protect=%08x,", req->protect ); fprintf( stderr, " file_handle=%04x,", req->file_handle ); fprintf( stderr, " objattr=" ); dump_varargs_object_attributes( cur_size ); @@ -1795,7 +1878,9 @@ static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *re fprintf( stderr, "," ); fprintf( stderr, " protect=%d,", req->protect ); fprintf( stderr, " header_size=%d,", req->header_size ); - fprintf( stderr, " base=%p,", req->base ); + fprintf( stderr, " base=" ); + dump_uint64( &req->base ); + fprintf( stderr, "," ); fprintf( stderr, " mapping=%04x,", req->mapping ); fprintf( stderr, " shared_file=%04x", req->shared_file ); } @@ -1886,8 +1971,20 @@ static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *re static void dump_queue_exception_event_request( const struct queue_exception_event_request *req ) { fprintf( stderr, " first=%d,", req->first ); + fprintf( stderr, " code=%08x,", req->code ); + fprintf( stderr, " flags=%08x,", req->flags ); fprintf( stderr, " record=" ); - dump_varargs_exc_event( cur_size ); + dump_uint64( &req->record ); + fprintf( stderr, "," ); + fprintf( stderr, " address=" ); + dump_uint64( &req->address ); + fprintf( stderr, "," ); + fprintf( stderr, " len=%u,", req->len ); + fprintf( stderr, " params=" ); + dump_varargs_uints64( min(cur_size,req->len) ); + fputc( ',', stderr ); + fprintf( stderr, " context=" ); + dump_varargs_context( cur_size ); } static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req ) @@ -1908,9 +2005,11 @@ static void dump_get_exception_status_reply( const struct get_exception_status_r static void dump_output_debug_string_request( const struct output_debug_string_request *req ) { - fprintf( stderr, " string=%p,", req->string ); - fprintf( stderr, " unicode=%d,", req->unicode ); - fprintf( stderr, " length=%d", req->length ); + fprintf( stderr, " length=%u,", req->length ); + fprintf( stderr, " string=" ); + dump_uint64( &req->string ); + fprintf( stderr, "," ); + fprintf( stderr, " unicode=%d", req->unicode ); } static void dump_continue_debug_event_request( const struct continue_debug_event_request *req ) @@ -1944,7 +2043,8 @@ static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_ki static void dump_read_process_memory_request( const struct read_process_memory_request *req ) { fprintf( stderr, " handle=%04x,", req->handle ); - fprintf( stderr, " addr=%p", req->addr ); + fprintf( stderr, " addr=" ); + dump_uint64( &req->addr ); } static void dump_read_process_memory_reply( const struct read_process_memory_reply *req ) @@ -1956,7 +2056,9 @@ static void dump_read_process_memory_reply( const struct read_process_memory_rep static void dump_write_process_memory_request( const struct write_process_memory_request *req ) { fprintf( stderr, " handle=%04x,", req->handle ); - fprintf( stderr, " addr=%p,", req->addr ); + fprintf( stderr, " addr=" ); + dump_uint64( &req->addr ); + fprintf( stderr, "," ); fprintf( stderr, " data=" ); dump_varargs_bytes( cur_size ); } @@ -2147,9 +2249,13 @@ static void dump_set_timer_request( const struct set_timer_request *req ) fprintf( stderr, " expire=" ); dump_timeout( &req->expire ); fprintf( stderr, "," ); - fprintf( stderr, " period=%d,", req->period ); - fprintf( stderr, " callback=%p,", req->callback ); - fprintf( stderr, " arg=%p", req->arg ); + fprintf( stderr, " callback=" ); + dump_uint64( &req->callback ); + fprintf( stderr, "," ); + fprintf( stderr, " arg=" ); + dump_uint64( &req->arg ); + fprintf( stderr, "," ); + fprintf( stderr, " period=%d", req->period ); } static void dump_set_timer_reply( const struct set_timer_reply *req ) @@ -2344,8 +2450,12 @@ static void dump_send_message_request( const struct send_message_request *req ) fprintf( stderr, " flags=%d,", req->flags ); fprintf( stderr, " win=%08x,", req->win ); fprintf( stderr, " msg=%08x,", req->msg ); - fprintf( stderr, " wparam=%lx,", req->wparam ); - fprintf( stderr, " lparam=%lx,", req->lparam ); + fprintf( stderr, " wparam=" ); + dump_uint64( &req->wparam ); + fprintf( stderr, "," ); + fprintf( stderr, " lparam=" ); + dump_uint64( &req->lparam ); + fprintf( stderr, "," ); fprintf( stderr, " timeout=" ); dump_timeout( &req->timeout ); fprintf( stderr, "," ); @@ -2363,12 +2473,18 @@ static void dump_send_hardware_message_request( const struct send_hardware_messa fprintf( stderr, " id=%04x,", req->id ); fprintf( stderr, " win=%08x,", req->win ); fprintf( stderr, " msg=%08x,", req->msg ); - fprintf( stderr, " time=%08x,", req->time ); - fprintf( stderr, " wparam=%lx,", req->wparam ); - fprintf( stderr, " lparam=%lx,", req->lparam ); - fprintf( stderr, " info=%lx,", req->info ); + fprintf( stderr, " wparam=" ); + dump_uint64( &req->wparam ); + fprintf( stderr, "," ); + fprintf( stderr, " lparam=" ); + dump_uint64( &req->lparam ); + fprintf( stderr, "," ); + fprintf( stderr, " info=" ); + dump_uint64( &req->info ); + fprintf( stderr, "," ); fprintf( stderr, " x=%d,", req->x ); - fprintf( stderr, " y=%d", req->y ); + fprintf( stderr, " y=%d,", req->y ); + fprintf( stderr, " time=%08x", req->time ); } static void dump_get_message_request( const struct get_message_request *req ) @@ -2385,15 +2501,15 @@ static void dump_get_message_request( const struct get_message_request *req ) static void dump_get_message_reply( const struct get_message_reply *req ) { fprintf( stderr, " win=%08x,", req->win ); - fprintf( stderr, " type=%d,", req->type ); fprintf( stderr, " msg=%08x,", req->msg ); - fprintf( stderr, " wparam=%lx,", req->wparam ); - fprintf( stderr, " lparam=%lx,", req->lparam ); - fprintf( stderr, " info=%lx,", req->info ); - fprintf( stderr, " x=%d,", req->x ); - fprintf( stderr, " y=%d,", req->y ); + fprintf( stderr, " wparam=" ); + dump_uint64( &req->wparam ); + fprintf( stderr, "," ); + fprintf( stderr, " lparam=" ); + dump_uint64( &req->lparam ); + fprintf( stderr, "," ); + fprintf( stderr, " type=%d,", req->type ); fprintf( stderr, " time=%08x,", req->time ); - fprintf( stderr, " hw_id=%08x,", req->hw_id ); fprintf( stderr, " active_hooks=%08x,", req->active_hooks ); fprintf( stderr, " total=%u,", req->total ); fprintf( stderr, " data=" ); @@ -2402,8 +2518,10 @@ static void dump_get_message_reply( const struct get_message_reply *req ) static void dump_reply_message_request( const struct reply_message_request *req ) { - fprintf( stderr, " result=%lx,", req->result ); fprintf( stderr, " remove=%d,", req->remove ); + fprintf( stderr, " result=" ); + dump_uint64( &req->result ); + fprintf( stderr, "," ); fprintf( stderr, " data=" ); dump_varargs_bytes( cur_size ); } @@ -2422,7 +2540,9 @@ static void dump_get_message_reply_request( const struct get_message_reply_reque static void dump_get_message_reply_reply( const struct get_message_reply_reply *req ) { - fprintf( stderr, " result=%lx,", req->result ); + fprintf( stderr, " result=" ); + dump_uint64( &req->result ); + fprintf( stderr, "," ); fprintf( stderr, " data=" ); dump_varargs_bytes( cur_size ); } @@ -2432,20 +2552,26 @@ static void dump_set_win_timer_request( const struct set_win_timer_request *req fprintf( stderr, " win=%08x,", req->win ); fprintf( stderr, " msg=%08x,", req->msg ); fprintf( stderr, " rate=%08x,", req->rate ); - fprintf( stderr, " id=%lx,", req->id ); - fprintf( stderr, " lparam=%lx", req->lparam ); + fprintf( stderr, " id=" ); + dump_uint64( &req->id ); + fprintf( stderr, "," ); + fprintf( stderr, " lparam=" ); + dump_uint64( &req->lparam ); } static void dump_set_win_timer_reply( const struct set_win_timer_reply *req ) { - fprintf( stderr, " id=%lx", req->id ); + fprintf( stderr, " id=" ); + dump_uint64( &req->id ); } static void dump_kill_win_timer_request( const struct kill_win_timer_request *req ) { fprintf( stderr, " win=%08x,", req->win ); - fprintf( stderr, " msg=%08x,", req->msg ); - fprintf( stderr, " id=%lx", req->id ); + fprintf( stderr, " id=" ); + dump_uint64( &req->id ); + fprintf( stderr, "," ); + fprintf( stderr, " msg=%08x", req->msg ); } static void dump_is_window_hung_request( const struct is_window_hung_request *req ) @@ -2487,11 +2613,11 @@ static void dump_set_serial_info_request( const struct set_serial_info_request * static void dump_register_async_request( const struct register_async_request *req ) { - fprintf( stderr, " handle=%04x,", req->handle ); fprintf( stderr, " type=%d,", req->type ); - fprintf( stderr, " count=%d,", req->count ); fprintf( stderr, " async=" ); dump_async_data( &req->async ); + fprintf( stderr, "," ); + fprintf( stderr, " count=%d", req->count ); } static void dump_cancel_async_request( const struct cancel_async_request *req ) @@ -2501,13 +2627,13 @@ static void dump_cancel_async_request( const struct cancel_async_request *req ) static void dump_ioctl_request( const struct ioctl_request *req ) { - fprintf( stderr, " handle=%04x,", req->handle ); fprintf( stderr, " code=" ); dump_ioctl_code( &req->code ); fprintf( stderr, "," ); fprintf( stderr, " async=" ); dump_async_data( &req->async ); fprintf( stderr, "," ); + fprintf( stderr, " blocking=%d,", req->blocking ); fprintf( stderr, " in_data=" ); dump_varargs_bytes( cur_size ); } @@ -2523,7 +2649,8 @@ static void dump_ioctl_reply( const struct ioctl_reply *req ) static void dump_get_ioctl_result_request( const struct get_ioctl_result_request *req ) { fprintf( stderr, " handle=%04x,", req->handle ); - fprintf( stderr, " user_arg=%p", req->user_arg ); + fprintf( stderr, " user_arg=" ); + dump_uint64( &req->user_arg ); } static void dump_get_ioctl_result_reply( const struct get_ioctl_result_reply *req ) @@ -2538,13 +2665,13 @@ static void dump_create_named_pipe_request( const struct create_named_pipe_reque fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " rootdir=%04x,", req->rootdir ); fprintf( stderr, " options=%08x,", req->options ); - fprintf( stderr, " flags=%08x,", req->flags ); fprintf( stderr, " maxinstances=%08x,", req->maxinstances ); fprintf( stderr, " outsize=%08x,", req->outsize ); fprintf( stderr, " insize=%08x,", req->insize ); fprintf( stderr, " timeout=" ); dump_timeout( &req->timeout ); fprintf( stderr, "," ); + fprintf( stderr, " flags=%08x,", req->flags ); fprintf( stderr, " name=" ); dump_varargs_unicode_str( cur_size ); } @@ -2573,7 +2700,9 @@ static void dump_create_window_request( const struct create_window_request *req fprintf( stderr, " parent=%08x,", req->parent ); fprintf( stderr, " owner=%08x,", req->owner ); fprintf( stderr, " atom=%04x,", req->atom ); - fprintf( stderr, " instance=%p,", req->instance ); + fprintf( stderr, " instance=" ); + dump_uint64( &req->instance ); + fprintf( stderr, "," ); fprintf( stderr, " class=" ); dump_varargs_unicode_str( cur_size ); } @@ -2584,7 +2713,8 @@ static void dump_create_window_reply( const struct create_window_reply *req ) fprintf( stderr, " parent=%08x,", req->parent ); fprintf( stderr, " owner=%08x,", req->owner ); fprintf( stderr, " extra=%d,", req->extra ); - fprintf( stderr, " class_ptr=%p", req->class_ptr ); + fprintf( stderr, " class_ptr=" ); + dump_uint64( &req->class_ptr ); } static void dump_destroy_window_request( const struct destroy_window_request *req ) @@ -2632,27 +2762,38 @@ static void dump_get_window_info_reply( const struct get_window_info_reply *req static void dump_set_window_info_request( const struct set_window_info_request *req ) { - fprintf( stderr, " flags=%08x,", req->flags ); + fprintf( stderr, " flags=%04x,", req->flags ); + fprintf( stderr, " is_unicode=%d,", req->is_unicode ); fprintf( stderr, " handle=%08x,", req->handle ); fprintf( stderr, " style=%08x,", req->style ); fprintf( stderr, " ex_style=%08x,", req->ex_style ); fprintf( stderr, " id=%08x,", req->id ); - fprintf( stderr, " is_unicode=%d,", req->is_unicode ); - fprintf( stderr, " instance=%p,", req->instance ); - fprintf( stderr, " user_data=%lx,", req->user_data ); + fprintf( stderr, " instance=" ); + dump_uint64( &req->instance ); + fprintf( stderr, "," ); + fprintf( stderr, " user_data=" ); + dump_uint64( &req->user_data ); + fprintf( stderr, "," ); fprintf( stderr, " extra_offset=%d,", req->extra_offset ); fprintf( stderr, " extra_size=%u,", req->extra_size ); - fprintf( stderr, " extra_value=%lx", req->extra_value ); + fprintf( stderr, " extra_value=" ); + dump_uint64( &req->extra_value ); } static void dump_set_window_info_reply( const struct set_window_info_reply *req ) { fprintf( stderr, " old_style=%08x,", req->old_style ); fprintf( stderr, " old_ex_style=%08x,", req->old_ex_style ); - fprintf( stderr, " old_id=%08x,", req->old_id ); - fprintf( stderr, " old_instance=%p,", req->old_instance ); - fprintf( stderr, " old_user_data=%lx,", req->old_user_data ); - fprintf( stderr, " old_extra_value=%lx", req->old_extra_value ); + fprintf( stderr, " old_instance=" ); + dump_uint64( &req->old_instance ); + fprintf( stderr, "," ); + fprintf( stderr, " old_user_data=" ); + dump_uint64( &req->old_user_data ); + fprintf( stderr, "," ); + fprintf( stderr, " old_extra_value=" ); + dump_uint64( &req->old_extra_value ); + fprintf( stderr, "," ); + fprintf( stderr, " old_id=%08x", req->old_id ); } static void dump_set_parent_request( const struct set_parent_request *req ) @@ -2869,8 +3010,10 @@ static void dump_redraw_window_request( const struct redraw_window_request *req static void dump_set_window_property_request( const struct set_window_property_request *req ) { fprintf( stderr, " window=%08x,", req->window ); + fprintf( stderr, " data=" ); + dump_uint64( &req->data ); + fprintf( stderr, "," ); fprintf( stderr, " atom=%04x,", req->atom ); - fprintf( stderr, " data=%lx,", req->data ); fprintf( stderr, " name=" ); dump_varargs_unicode_str( cur_size ); } @@ -2885,7 +3028,8 @@ static void dump_remove_window_property_request( const struct remove_window_prop static void dump_remove_window_property_reply( const struct remove_window_property_reply *req ) { - fprintf( stderr, " data=%lx", req->data ); + fprintf( stderr, " data=" ); + dump_uint64( &req->data ); } static void dump_get_window_property_request( const struct get_window_property_request *req ) @@ -2898,7 +3042,8 @@ static void dump_get_window_property_request( const struct get_window_property_r static void dump_get_window_property_reply( const struct get_window_property_reply *req ) { - fprintf( stderr, " data=%lx", req->data ); + fprintf( stderr, " data=" ); + dump_uint64( &req->data ); } static void dump_get_window_properties_request( const struct get_window_properties_request *req ) @@ -3190,8 +3335,10 @@ static void dump_set_hook_request( const struct set_hook_request *req ) fprintf( stderr, " tid=%04x,", req->tid ); fprintf( stderr, " event_min=%d,", req->event_min ); fprintf( stderr, " event_max=%d,", req->event_max ); + fprintf( stderr, " proc=" ); + dump_uint64( &req->proc ); + fprintf( stderr, "," ); fprintf( stderr, " flags=%d,", req->flags ); - fprintf( stderr, " proc=%p,", req->proc ); fprintf( stderr, " unicode=%d,", req->unicode ); fprintf( stderr, " module=" ); dump_varargs_unicode_str( cur_size ); @@ -3206,8 +3353,10 @@ static void dump_set_hook_reply( const struct set_hook_reply *req ) static void dump_remove_hook_request( const struct remove_hook_request *req ) { fprintf( stderr, " handle=%08x,", req->handle ); - fprintf( stderr, " id=%d,", req->id ); - fprintf( stderr, " proc=%p", req->proc ); + fprintf( stderr, " proc=" ); + dump_uint64( &req->proc ); + fprintf( stderr, "," ); + fprintf( stderr, " id=%d", req->id ); } static void dump_remove_hook_reply( const struct remove_hook_reply *req ) @@ -3229,8 +3378,10 @@ static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *re fprintf( stderr, " handle=%08x,", req->handle ); fprintf( stderr, " pid=%04x,", req->pid ); fprintf( stderr, " tid=%04x,", req->tid ); - fprintf( stderr, " proc=%p,", req->proc ); fprintf( stderr, " unicode=%d,", req->unicode ); + fprintf( stderr, " proc=" ); + dump_uint64( &req->proc ); + fprintf( stderr, "," ); fprintf( stderr, " active_hooks=%08x,", req->active_hooks ); fprintf( stderr, " module=" ); dump_varargs_unicode_str( cur_size ); @@ -3257,7 +3408,9 @@ static void dump_get_hook_info_reply( const struct get_hook_info_reply *req ) fprintf( stderr, " id=%d,", req->id ); fprintf( stderr, " pid=%04x,", req->pid ); fprintf( stderr, " tid=%04x,", req->tid ); - fprintf( stderr, " proc=%p,", req->proc ); + fprintf( stderr, " proc=" ); + dump_uint64( &req->proc ); + fprintf( stderr, "," ); fprintf( stderr, " unicode=%d,", req->unicode ); fprintf( stderr, " module=" ); dump_varargs_unicode_str( cur_size ); @@ -3268,10 +3421,14 @@ static void dump_create_class_request( const struct create_class_request *req ) fprintf( stderr, " local=%d,", req->local ); fprintf( stderr, " atom=%04x,", req->atom ); fprintf( stderr, " style=%08x,", req->style ); - fprintf( stderr, " instance=%p,", req->instance ); + fprintf( stderr, " instance=" ); + dump_uint64( &req->instance ); + fprintf( stderr, "," ); fprintf( stderr, " extra=%d,", req->extra ); fprintf( stderr, " win_extra=%d,", req->win_extra ); - fprintf( stderr, " client_ptr=%p,", req->client_ptr ); + fprintf( stderr, " client_ptr=" ); + dump_uint64( &req->client_ptr ); + fprintf( stderr, "," ); fprintf( stderr, " name=" ); dump_varargs_unicode_str( cur_size ); } @@ -3284,14 +3441,17 @@ static void dump_create_class_reply( const struct create_class_reply *req ) static void dump_destroy_class_request( const struct destroy_class_request *req ) { fprintf( stderr, " atom=%04x,", req->atom ); - fprintf( stderr, " instance=%p,", req->instance ); + fprintf( stderr, " instance=" ); + dump_uint64( &req->instance ); + fprintf( stderr, "," ); fprintf( stderr, " name=" ); dump_varargs_unicode_str( cur_size ); } static void dump_destroy_class_reply( const struct destroy_class_reply *req ) { - fprintf( stderr, " client_ptr=%p", req->client_ptr ); + fprintf( stderr, " client_ptr=" ); + dump_uint64( &req->client_ptr ); } static void dump_set_class_info_request( const struct set_class_info_request *req ) @@ -3301,10 +3461,13 @@ static void dump_set_class_info_request( const struct set_class_info_request *re fprintf( stderr, " atom=%04x,", req->atom ); fprintf( stderr, " style=%08x,", req->style ); fprintf( stderr, " win_extra=%d,", req->win_extra ); - fprintf( stderr, " instance=%p,", req->instance ); + fprintf( stderr, " instance=" ); + dump_uint64( &req->instance ); + fprintf( stderr, "," ); fprintf( stderr, " extra_offset=%d,", req->extra_offset ); fprintf( stderr, " extra_size=%u,", req->extra_size ); - fprintf( stderr, " extra_value=%lx", req->extra_value ); + fprintf( stderr, " extra_value=" ); + dump_uint64( &req->extra_value ); } static void dump_set_class_info_reply( const struct set_class_info_reply *req ) @@ -3313,8 +3476,11 @@ static void dump_set_class_info_reply( const struct set_class_info_reply *req ) fprintf( stderr, " old_style=%08x,", req->old_style ); fprintf( stderr, " old_extra=%d,", req->old_extra ); fprintf( stderr, " old_win_extra=%d,", req->old_win_extra ); - fprintf( stderr, " old_instance=%p,", req->old_instance ); - fprintf( stderr, " old_extra_value=%lx", req->old_extra_value ); + fprintf( stderr, " old_instance=" ); + dump_uint64( &req->old_instance ); + fprintf( stderr, "," ); + fprintf( stderr, " old_extra_value=" ); + dump_uint64( &req->old_extra_value ); } static void dump_set_clipboard_info_request( const struct set_clipboard_info_request *req ) @@ -3493,10 +3659,10 @@ static void dump_create_mailslot_request( const struct create_mailslot_request * fprintf( stderr, " access=%08x,", req->access ); fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " rootdir=%04x,", req->rootdir ); - fprintf( stderr, " max_msgsize=%08x,", req->max_msgsize ); fprintf( stderr, " read_timeout=" ); dump_timeout( &req->read_timeout ); fprintf( stderr, "," ); + fprintf( stderr, " max_msgsize=%08x,", req->max_msgsize ); fprintf( stderr, " name=" ); dump_varargs_unicode_str( cur_size ); } @@ -3509,16 +3675,18 @@ static void dump_create_mailslot_reply( const struct create_mailslot_reply *req static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req ) { fprintf( stderr, " handle=%04x,", req->handle ); - fprintf( stderr, " flags=%08x,", req->flags ); fprintf( stderr, " read_timeout=" ); dump_timeout( &req->read_timeout ); + fprintf( stderr, "," ); + fprintf( stderr, " flags=%08x", req->flags ); } static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req ) { - fprintf( stderr, " max_msgsize=%08x,", req->max_msgsize ); fprintf( stderr, " read_timeout=" ); dump_timeout( &req->read_timeout ); + fprintf( stderr, "," ); + fprintf( stderr, " max_msgsize=%08x", req->max_msgsize ); } static void dump_create_directory_request( const struct create_directory_request *req ) @@ -3660,8 +3828,10 @@ static void dump_create_device_request( const struct create_device_request *req fprintf( stderr, " access=%08x,", req->access ); fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " rootdir=%04x,", req->rootdir ); + fprintf( stderr, " user_ptr=" ); + dump_uint64( &req->user_ptr ); + fprintf( stderr, "," ); fprintf( stderr, " manager=%04x,", req->manager ); - fprintf( stderr, " user_ptr=%p,", req->user_ptr ); fprintf( stderr, " name=" ); dump_varargs_unicode_str( cur_size ); } @@ -3691,7 +3861,9 @@ static void dump_get_next_device_request_reply( const struct get_next_device_req fprintf( stderr, " code=" ); dump_ioctl_code( &req->code ); fprintf( stderr, "," ); - fprintf( stderr, " user_ptr=%p,", req->user_ptr ); + fprintf( stderr, " user_ptr=" ); + dump_uint64( &req->user_ptr ); + fprintf( stderr, "," ); fprintf( stderr, " in_size=%u,", req->in_size ); fprintf( stderr, " out_size=%u,", req->out_size ); fprintf( stderr, " next_data=" ); @@ -3798,9 +3970,10 @@ static void dump_query_completion_reply( const struct query_completion_reply *re static void dump_set_completion_info_request( const struct set_completion_info_request *req ) { fprintf( stderr, " handle=%04x,", req->handle ); - fprintf( stderr, " chandle=%04x,", req->chandle ); fprintf( stderr, " ckey=" ); dump_uint64( &req->ckey ); + fprintf( stderr, "," ); + fprintf( stderr, " chandle=%04x", req->chandle ); } static void dump_add_fd_completion_request( const struct add_fd_completion_request *req ) diff --git a/server/user.h b/server/user.h index 72d08e6b368..166d20b75b6 100644 --- a/server/user.h +++ b/server/user.h @@ -95,7 +95,7 @@ extern void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lparam_t lparam ); extern void post_win_event( struct thread *thread, unsigned int event, user_handle_t win, unsigned int object_id, - unsigned int child_id, void *proc, + unsigned int child_id, client_ptr_t proc, const WCHAR *module, data_size_t module_size, user_handle_t handle ); @@ -143,12 +143,12 @@ extern struct window_class *get_window_class( user_handle_t window ); extern void destroy_process_classes( struct process *process ); extern struct window_class *grab_class( struct process *process, atom_t atom, - void *instance, int *extra_bytes ); + mod_handle_t instance, int *extra_bytes ); extern void release_class( struct window_class *class ); extern int is_desktop_class( struct window_class *class ); extern int is_hwnd_message_class( struct window_class *class ); extern atom_t get_class_atom( struct window_class *class ); -extern void *get_class_client_ptr( struct window_class *class ); +extern client_ptr_t get_class_client_ptr( struct window_class *class ); /* windows station functions */ diff --git a/server/window.c b/server/window.c index 8f57a7a84e3..a24b2d64a97 100644 --- a/server/window.c +++ b/server/window.c @@ -76,7 +76,7 @@ struct window unsigned int style; /* window style */ unsigned int ex_style; /* window extended style */ unsigned int id; /* window id */ - void* instance; /* creator instance */ + mod_handle_t instance; /* creator instance */ unsigned int is_unicode : 1; /* ANSI or unicode */ unsigned int is_linked : 1; /* is it linked into the parent z-order list? */ unsigned int is_layered : 1; /* has layered info been set? */ @@ -428,7 +428,7 @@ void close_desktop_window( struct desktop *desktop ) /* create a new window structure (note: the window is not linked in the window tree) */ static struct window *create_window( struct window *parent, struct window *owner, - atom_t atom, void *instance ) + atom_t atom, mod_handle_t instance ) { static const rectangle_t empty_rect; int extra_bytes; @@ -480,7 +480,7 @@ static struct window *create_window( struct window *parent, struct window *owner win->style = 0; win->ex_style = 0; win->id = 0; - win->instance = NULL; + win->instance = 0; win->is_unicode = 1; win->is_linked = 0; win->is_layered = 0; diff --git a/tools/make_requests b/tools/make_requests index d21d79df837..00a34205064 100755 --- a/tools/make_requests +++ b/tools/make_requests @@ -29,14 +29,15 @@ my %formats = "unsigned char" => [ 1, 1, "%02x" ], "unsigned short"=> [ 2, 2, "%04x" ], "unsigned int" => [ 4, 4, "%08x" ], - "void*" => [ 4, 4, "%p" ], "data_size_t" => [ 4, 4, "%u" ], "obj_handle_t" => [ 4, 4, "%04x" ], - "atom_t" => [ 2, 2, "%04x" ], + "atom_t" => [ 4, 4, "%04x" ], "user_handle_t" => [ 4, 4, "%08x" ], "process_id_t" => [ 4, 4, "%04x" ], "thread_id_t" => [ 4, 4, "%04x" ], - "lparam_t" => [ 4, 4, "%lx" ], + "client_ptr_t" => [ 8, 8, "&dump_uint64" ], + "mod_handle_t" => [ 8, 8, "&dump_uint64" ], + "lparam_t" => [ 8, 8, "&dump_uint64" ], "apc_param_t" => [ 8, 8, "&dump_uint64" ], "file_pos_t" => [ 8, 8, "&dump_uint64" ], "mem_size_t" => [ 8, 8, "&dump_uint64" ], @@ -45,7 +46,7 @@ my %formats = "char_info_t" => [ 4, 2, "&dump_char_info" ], "apc_call_t" => [ 40, 8, "&dump_apc_call" ], "apc_result_t" => [ 40, 8, "&dump_apc_result" ], - "async_data_t" => [ 28, 8, "&dump_async_data" ], + "async_data_t" => [ 40, 8, "&dump_async_data" ], "luid_t" => [ 8, 4, "&dump_luid" ], "ioctl_code_t" => [ 4, 4, "&dump_ioctl_code" ], ); @@ -70,6 +71,7 @@ sub DO_DUMP_FUNC($$@) { my $type = shift; my $var = shift; + next if $var =~ /^__pad/; if (defined($formats{$type})) { my $fmt = ${$formats{$type}}[2]; diff --git a/tools/widl/Makefile.in b/tools/widl/Makefile.in index 358756cae57..453276c55d5 100644 --- a/tools/widl/Makefile.in +++ b/tools/widl/Makefile.in @@ -17,6 +17,7 @@ C_SRCS = \ server.c \ typegen.c \ typelib.c \ + typetree.c \ utils.c \ widl.c \ write_msft.c diff --git a/tools/widl/client.c b/tools/widl/client.c index 5221e26a621..673b9188357 100644 --- a/tools/widl/client.c +++ b/tools/widl/client.c @@ -483,7 +483,7 @@ static void write_client_ifaces(const statement_list_t *stmts, int expr_eval_rou write_stubdescdecl(iface); write_function_stubs(iface, proc_offset); - print_client("#if !defined(__RPC_WIN32__)\n"); + print_client("#if !defined(__RPC_WIN%u__)\n", pointer_size == 8 ? 64 : 32); print_client("#error Invalid build platform for this stub.\n"); print_client("#endif\n"); @@ -496,20 +496,11 @@ static void write_client_ifaces(const statement_list_t *stmts, int expr_eval_rou } } -void write_client(const statement_list_t *stmts) +static void write_client_routines(const statement_list_t *stmts) { unsigned int proc_offset = 0; int expr_eval_routines; - if (!do_client) - return; - if (do_everything && !need_stub_files(stmts)) - return; - - init_client(); - if (!client) - return; - write_formatstringsdecl(client, indent, stmts, need_stub); expr_eval_routines = write_expr_eval_routines(client, client_token); if (expr_eval_routines) @@ -522,6 +513,39 @@ void write_client(const statement_list_t *stmts) write_procformatstring(client, stmts, need_stub); write_typeformatstring(client, stmts, need_stub); +} + +void write_client(const statement_list_t *stmts) +{ + if (!do_client) + return; + if (do_everything && !need_stub_files(stmts)) + return; + + init_client(); + if (!client) + return; + + if (do_win32 && do_win64) + { + fprintf(client, "\n#ifndef _WIN64\n\n"); + pointer_size = 4; + write_client_routines( stmts ); + fprintf(client, "\n#else /* _WIN64 */\n\n"); + pointer_size = 8; + write_client_routines( stmts ); + fprintf(client, "\n#endif /* _WIN64 */\n"); + } + else if (do_win32) + { + pointer_size = 4; + write_client_routines( stmts ); + } + else if (do_win64) + { + pointer_size = 8; + write_client_routines( stmts ); + } fclose(client); } diff --git a/tools/widl/expr.c b/tools/widl/expr.c index 3b668ef07e7..efe1769e7b1 100644 --- a/tools/widl/expr.c +++ b/tools/widl/expr.c @@ -32,6 +32,7 @@ #include "utils.h" #include "expr.h" #include "header.h" +#include "typetree.h" expr_t *make_expr(enum expr_type type) { @@ -362,17 +363,14 @@ static type_t *find_identifier(const char *identifier, const type_t *cont_type, *found_in_cont_type = 0; - if (cont_type && (cont_type->type == RPC_FC_FUNCTION || is_struct(cont_type->type))) - fields = cont_type->fields_or_args; - else if (cont_type && is_union(cont_type->type)) + if (cont_type) { - if (cont_type->type == RPC_FC_ENCAPSULATED_UNION) - { - const var_t *uv = LIST_ENTRY(list_tail(cont_type->fields_or_args), const var_t, entry); - fields = uv->type->fields_or_args; - } - else - fields = cont_type->fields_or_args; + if (cont_type->type == RPC_FC_FUNCTION) + fields = type_function_get_args(cont_type); + else if (is_struct(cont_type->type)) + fields = type_struct_get_fields(cont_type); + else if (is_union(cont_type->type)) + fields = type_union_get_cases(cont_type); } if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) diff --git a/tools/widl/header.c b/tools/widl/header.c index 83fef7fcbdc..b7df77bb171 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -34,6 +34,7 @@ #include "parser.h" #include "header.h" #include "expr.h" +#include "typetree.h" typedef struct _user_type_t generic_handle_t; @@ -204,12 +205,12 @@ void write_type_left(FILE *h, type_t *t, int declonly) switch (t->type) { case RPC_FC_ENUM16: case RPC_FC_ENUM32: - if (!declonly && t->defined && !t->written && !t->ignore) { + if (!declonly && t->defined && !t->written) { if (t->name) fprintf(h, "enum %s {\n", t->name); else fprintf(h, "enum {\n"); t->written = TRUE; indentation++; - write_enums(h, t->fields_or_args); + write_enums(h, type_enum_get_values(t)); indent(h, -1); fprintf(h, "}"); } @@ -222,24 +223,27 @@ void write_type_left(FILE *h, type_t *t, int declonly) case RPC_FC_PSTRUCT: case RPC_FC_BOGUS_STRUCT: case RPC_FC_ENCAPSULATED_UNION: - if (!declonly && t->defined && !t->written && !t->ignore) { + if (!declonly && t->defined && !t->written) { if (t->name) fprintf(h, "struct %s {\n", t->name); else fprintf(h, "struct {\n"); t->written = TRUE; indentation++; - write_fields(h, t->fields_or_args); + if (t->type == RPC_FC_ENCAPSULATED_UNION) + write_fields(h, type_encapsulated_union_get_fields(t)); + else + write_fields(h, type_struct_get_fields(t)); indent(h, -1); fprintf(h, "}"); } else fprintf(h, "struct %s", t->name ? t->name : ""); break; case RPC_FC_NON_ENCAPSULATED_UNION: - if (!declonly && t->defined && !t->written && !t->ignore) { + if (!declonly && t->defined && !t->written) { if (t->name) fprintf(h, "union %s {\n", t->name); else fprintf(h, "union {\n"); t->written = TRUE; indentation++; - write_fields(h, t->fields_or_args); + write_fields(h, type_union_get_cases(t)); indent(h, -1); fprintf(h, "}"); } @@ -308,7 +312,7 @@ void write_type_v(FILE *h, type_t *t, int is_field, int declonly, if (pt->type == RPC_FC_FUNCTION) { if (ptr_level) fputc(')', h); fputc('(', h); - write_args(h, pt->fields_or_args, NULL, 0, FALSE); + write_args(h, type_function_get_args(pt), NULL, 0, FALSE); fputc(')', h); } else write_type_right(h, t, is_field); @@ -407,15 +411,22 @@ void check_for_additional_prototype_types(const var_list_t *list) * using a wire marshaled type */ break; } - else + else if (type_is_complete(type)) { - check_for_additional_prototype_types(type->fields_or_args); + var_list_t *vars = NULL; + if (type->type == RPC_FC_ENUM16 || type->type == RPC_FC_ENUM32) + vars = type_enum_get_values(type); + else if (is_struct(type->type)) + vars = type_struct_get_fields(type); + else if (is_union(type->type)) + vars = type_union_get_cases(type); + check_for_additional_prototype_types(vars); } } } } -void write_user_types(void) +static void write_user_types(FILE *header) { user_type_t *ut; LIST_FOR_EACH_ENTRY(ut, &user_type_list, user_type_t, entry) @@ -428,7 +439,7 @@ void write_user_types(void) } } -void write_context_handle_rundowns(void) +static void write_context_handle_rundowns(FILE *header) { context_handle_t *ch; LIST_FOR_EACH_ENTRY(ch, &context_handle_list, context_handle_t, entry) @@ -438,7 +449,7 @@ void write_context_handle_rundowns(void) } } -void write_generic_handle_routines(void) +static void write_generic_handle_routines(FILE *header) { generic_handle_t *gh; LIST_FOR_EACH_ENTRY(gh, &generic_handle_list, generic_handle_t, entry) @@ -449,7 +460,7 @@ void write_generic_handle_routines(void) } } -void write_typedef(type_t *type) +static void write_typedef(FILE *header, type_t *type) { fprintf(header, "typedef "); write_type_def_or_decl(header, type->orig, FALSE, "%s", type->name); @@ -474,7 +485,7 @@ int is_const_decl(const var_t *var) return FALSE; } -void write_declaration(const var_t *v, int is_in_interface) +static void write_declaration(FILE *header, const var_t *v) { if (is_const_decl(v) && v->eval) { @@ -482,7 +493,7 @@ void write_declaration(const var_t *v, int is_in_interface) write_expr(header, v->eval, 0, 1, NULL, NULL, ""); fprintf(header, ")\n\n"); } - else if (v->type->type != RPC_FC_FUNCTION || !is_in_interface) + else { switch (v->stgclass) { @@ -501,7 +512,7 @@ void write_declaration(const var_t *v, int is_in_interface) } } -void write_library(const typelib_t *typelib) +static void write_library(FILE *header, const typelib_t *typelib) { const UUID *uuid = get_attrp(typelib->attrs, ATTR_UUID); fprintf(header, "\n"); @@ -743,7 +754,7 @@ static void write_method_proto(FILE *header, const type_t *iface) } } -void write_locals(FILE *fp, const type_t *iface, int body) +static void write_locals(FILE *fp, const type_t *iface, int body) { static const char comment[] = "/* WIDL-generated stub. You must provide an implementation for this. */"; @@ -803,55 +814,60 @@ void write_locals(FILE *fp, const type_t *iface, int body) } } -static void write_function_proto(FILE *header, const type_t *iface, const func_t *fun, const char *prefix) +static void write_local_stubs_stmts(FILE *local_stubs, const statement_list_t *stmts) +{ + const statement_t *stmt; + if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) + { + if (stmt->type == STMT_TYPE && stmt->u.type->type == RPC_FC_IP) + write_locals(local_stubs, stmt->u.type, TRUE); + else if (stmt->type == STMT_LIBRARY) + write_local_stubs_stmts(local_stubs, stmt->u.lib->stmts); + } +} + +void write_local_stubs(const statement_list_t *stmts) { - var_t *def = fun->def; - const char *callconv = get_attrp(def->type->attrs, ATTR_CALLCONV); + FILE *local_stubs; + + if (!local_stubs_name) return; + + local_stubs = fopen(local_stubs_name, "w"); + if (!local_stubs) { + error("Could not open %s for output\n", local_stubs_name); + return; + } + fprintf(local_stubs, "/* call_as/local stubs for %s */\n\n", input_name); + fprintf(local_stubs, "#include \n"); + fprintf(local_stubs, "#include \"%s\"\n\n", header_name); + + write_local_stubs_stmts(local_stubs, stmts); + + fclose(local_stubs); +} + +static void write_function_proto(FILE *header, const type_t *iface, const var_t *fun, const char *prefix) +{ + const char *callconv = get_attrp(fun->type->attrs, ATTR_CALLCONV); /* FIXME: do we need to handle call_as? */ - write_type_decl_left(header, get_func_return_type(fun)); + write_type_decl_left(header, fun->type->ref); fprintf(header, " "); if (callconv) fprintf(header, "%s ", callconv); - fprintf(header, "%s%s(\n", prefix, get_name(def)); - if (fun->args) - write_args(header, fun->args, iface->name, 0, TRUE); + fprintf(header, "%s%s(\n", prefix, get_name(fun)); + if (fun->type->details.function->args) + write_args(header, fun->type->details.function->args, iface->name, 0, TRUE); else fprintf(header, " void"); fprintf(header, ");\n\n"); } -static void write_function_protos(FILE *header, const type_t *iface) +static void write_forward(FILE *header, type_t *iface) { - const func_t *cur; - int prefixes_differ = strcmp(prefix_client, prefix_server); - - if (!iface->funcs) return; - LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry ) - { - if (prefixes_differ) { - fprintf(header, "/* client prototype */\n"); - write_function_proto(header, iface, cur, prefix_client); - fprintf(header, "/* server prototype */\n"); - } - write_function_proto(header, iface, cur, prefix_server); - } -} - -void write_forward(type_t *iface) -{ - /* C/C++ forwards should only be written for object interfaces, so if we - * have a full definition we only write one if we find [object] among the - * attributes - however, if we don't have a full definition at this point - * (i.e. this is an IDL forward), then we also assume that it is an object - * interface, since non-object interfaces shouldn't need forwards */ - if ((!iface->defined || is_object(iface->attrs) || is_attr(iface->attrs, ATTR_DISPINTERFACE)) - && !iface->written) { - fprintf(header, "#ifndef __%s_FWD_DEFINED__\n", iface->name); - fprintf(header, "#define __%s_FWD_DEFINED__\n", iface->name); - fprintf(header, "typedef interface %s %s;\n", iface->name, iface->name); - fprintf(header, "#endif\n\n" ); - iface->written = TRUE; - } + fprintf(header, "#ifndef __%s_FWD_DEFINED__\n", iface->name); + fprintf(header, "#define __%s_FWD_DEFINED__\n", iface->name); + fprintf(header, "typedef interface %s %s;\n", iface->name, iface->name); + fprintf(header, "#endif\n\n" ); } static void write_iface_guid(FILE *header, const type_t *iface) @@ -988,22 +1004,7 @@ static void write_rpc_interface_end(FILE *header, const type_t *iface) fprintf(header,"\n#endif /* __%s_INTERFACE_DEFINED__ */\n\n", iface->name); } -void write_interface(type_t *iface) -{ - if (is_attr(iface->attrs, ATTR_DISPINTERFACE) || is_object(iface->attrs)) - { - write_com_interface_start(header, iface); - write_com_interface_end(header, iface); - } - else - { - write_rpc_interface_start(header, iface); - write_function_protos(header, iface); - write_rpc_interface_end(header, iface); - } -} - -void write_coclass(type_t *cocl) +static void write_coclass(FILE *header, type_t *cocl) { fprintf(header, "/*****************************************************************************\n"); fprintf(header, " * %s coclass\n", cocl->name); @@ -1012,7 +1013,7 @@ void write_coclass(type_t *cocl) fprintf(header, "\n"); } -void write_coclass_forward(type_t *cocl) +static void write_coclass_forward(FILE *header, type_t *cocl) { fprintf(header, "#ifndef __%s_FWD_DEFINED__\n", cocl->name); fprintf(header, "#define __%s_FWD_DEFINED__\n", cocl->name); @@ -1020,7 +1021,7 @@ void write_coclass_forward(type_t *cocl) fprintf(header, "#endif /* defined __%s_FWD_DEFINED__ */\n\n", cocl->name ); } -void write_import(const char *fname) +static void write_import(FILE *header, const char *fname) { char *hname, *p; @@ -1031,3 +1032,194 @@ void write_import(const char *fname) fprintf(header, "#include <%s>\n", hname); free(hname); } + +static void write_imports(FILE *header, const statement_list_t *stmts) +{ + const statement_t *stmt; + if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) + { + switch (stmt->type) + { + case STMT_TYPE: + if (stmt->u.type->type == RPC_FC_IP) + write_imports(header, stmt->u.type->stmts); + break; + case STMT_TYPEREF: + case STMT_IMPORTLIB: + /* not included in header */ + break; + case STMT_IMPORT: + write_import(header, stmt->u.str); + break; + case STMT_TYPEDEF: + case STMT_MODULE: + case STMT_CPPQUOTE: + case STMT_DECLARATION: + /* not processed here */ + break; + case STMT_LIBRARY: + write_imports(header, stmt->u.lib->stmts); + break; + } + } +} + +static void write_forward_decls(FILE *header, const statement_list_t *stmts) +{ + const statement_t *stmt; + if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) + { + switch (stmt->type) + { + case STMT_TYPE: + if (stmt->u.type->type == RPC_FC_IP) + { + if (is_object(stmt->u.type->attrs) || is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE)) + write_forward(header, stmt->u.type); + } + else if (stmt->u.type->type == RPC_FC_COCLASS) + write_coclass_forward(header, stmt->u.type); + break; + case STMT_TYPEREF: + case STMT_IMPORTLIB: + /* not included in header */ + break; + case STMT_IMPORT: + case STMT_TYPEDEF: + case STMT_MODULE: + case STMT_CPPQUOTE: + case STMT_DECLARATION: + /* not processed here */ + break; + case STMT_LIBRARY: + write_forward_decls(header, stmt->u.lib->stmts); + break; + } + } +} + +static void write_header_stmts(FILE *header, const statement_list_t *stmts, const type_t *iface, int ignore_funcs) +{ + const statement_t *stmt; + if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) + { + switch (stmt->type) + { + case STMT_TYPE: + if (stmt->u.type->type == RPC_FC_IP) + { + type_t *iface = stmt->u.type; + if (is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE) || is_object(stmt->u.type->attrs)) + { + write_com_interface_start(header, iface); + write_header_stmts(header, iface->stmts, stmt->u.type, TRUE); + write_com_interface_end(header, iface); + } + else + { + write_rpc_interface_start(header, iface); + write_header_stmts(header, iface->stmts, iface, FALSE); + write_rpc_interface_end(header, iface); + } + } + else if (stmt->u.type->type == RPC_FC_COCLASS) + write_coclass(header, stmt->u.type); + else + { + write_type_def_or_decl(header, stmt->u.type, FALSE, NULL); + fprintf(header, ";\n\n"); + } + break; + case STMT_TYPEREF: + /* FIXME: shouldn't write out forward declarations for undefined + * interfaces but a number of our IDL files depend on this */ + if (stmt->u.type->type == RPC_FC_IP && !stmt->u.type->written) + write_forward(header, stmt->u.type); + break; + case STMT_IMPORTLIB: + case STMT_MODULE: + /* not included in header */ + break; + case STMT_IMPORT: + /* not processed here */ + break; + case STMT_TYPEDEF: + { + const type_list_t *type_entry = stmt->u.type_list; + for (; type_entry; type_entry = type_entry->next) + write_typedef(header, type_entry->type); + break; + } + case STMT_LIBRARY: + write_library(header, stmt->u.lib); + write_header_stmts(header, stmt->u.lib->stmts, NULL, FALSE); + break; + case STMT_CPPQUOTE: + fprintf(header, "%s\n", stmt->u.str); + break; + case STMT_DECLARATION: + if (iface && stmt->u.var->type->type == RPC_FC_FUNCTION) + { + if (!ignore_funcs) + { + int prefixes_differ = strcmp(prefix_client, prefix_server); + + if (prefixes_differ) + { + fprintf(header, "/* client prototype */\n"); + write_function_proto(header, iface, stmt->u.var, prefix_client); + fprintf(header, "/* server prototype */\n"); + } + write_function_proto(header, iface, stmt->u.var, prefix_server); + } + } + else + write_declaration(header, stmt->u.var); + break; + } + } +} + +void write_header(const statement_list_t *stmts) +{ + FILE *header; + + if (!do_header) return; + + if(!(header = fopen(header_name, "w"))) { + error("Could not open %s for output\n", header_name); + return; + } + fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n\n", PACKAGE_VERSION, input_name); + fprintf(header, "#include \n" ); + fprintf(header, "#include \n\n" ); + + fprintf(header, "#ifndef __WIDL_%s\n", header_token); + fprintf(header, "#define __WIDL_%s\n\n", header_token); + start_cplusplus_guard(header); + + fprintf(header, "/* Headers for imported files */\n\n"); + write_imports(header, stmts); + fprintf(header, "\n"); + + /* FIXME: should be before imported file includes */ + fprintf(header, "/* Forward declarations */\n\n"); + write_forward_decls(header, stmts); + fprintf(header, "\n"); + + write_header_stmts(header, stmts, NULL, FALSE); + + fprintf(header, "/* Begin additional prototypes for all interfaces */\n"); + fprintf(header, "\n"); + write_user_types(header); + write_generic_handle_routines(header); + write_context_handle_rundowns(header); + fprintf(header, "\n"); + fprintf(header, "/* End additional prototypes */\n"); + fprintf(header, "\n"); + + end_cplusplus_guard(header); + fprintf(header, "#endif /* __WIDL_%s */\n", header_token); + + fclose(header); +} diff --git a/tools/widl/header.h b/tools/widl/header.h index d87ae165d71..23561ce37e6 100644 --- a/tools/widl/header.h +++ b/tools/widl/header.h @@ -47,18 +47,6 @@ extern int need_proxy_file(const statement_list_t *stmts); extern const var_t *is_callas(const attr_list_t *list); extern void write_args(FILE *h, const var_list_t *arg, const char *name, int obj, int do_indent); extern void write_array(FILE *h, array_dims_t *v, int field); -extern void write_import(const char *fname); -extern void write_forward(type_t *iface); -extern void write_interface(type_t *iface); -extern void write_locals(FILE *fp, const type_t *iface, int body); -extern void write_coclass(type_t *cocl); -extern void write_coclass_forward(type_t *cocl); -extern void write_typedef(type_t *type); -extern void write_declaration(const var_t *v, int is_in_interface); -extern void write_library(const typelib_t *typelib); -extern void write_user_types(void); -extern void write_context_handle_rundowns(void); -extern void write_generic_handle_routines(void); extern const var_t* get_explicit_handle_var(const func_t* func); extern const type_t* get_explicit_generic_handle_type(const var_t* var); extern const var_t* get_explicit_generic_handle_var(const func_t* func); diff --git a/tools/widl/parser.h b/tools/widl/parser.h index 71f08dc994a..85171f74b9f 100644 --- a/tools/widl/parser.h +++ b/tools/widl/parser.h @@ -45,4 +45,7 @@ void pop_import(void); int is_type(const char *name); +void check_functions(const type_t *iface); +func_list_t *gen_function_list(const statement_list_t *stmts); + #endif diff --git a/tools/widl/parser.y b/tools/widl/parser.y index cd92223d907..d9b5c3cbfdf 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -39,6 +39,7 @@ #include "typelib.h" #include "typegen.h" #include "expr.h" +#include "typetree.h" #if defined(YYBYACC) /* Berkeley yacc (byacc) doesn't seem to know about these */ @@ -68,7 +69,6 @@ #define YYERROR_VERBOSE unsigned char pointer_default = RPC_FC_UP; -static int is_in_interface = FALSE; static int is_object_interface = FALSE; /* are we inside a library block? */ static int is_inside_library = FALSE; @@ -96,6 +96,7 @@ typelist_t incomplete_types = LIST_INIT(incomplete_types); static void add_incomplete(type_t *t); static void fix_incomplete(void); +static void fix_incomplete_types(type_t *complete_type); static str_list_t *append_str(str_list_t *list, char *str); static attr_list_t *append_attr(attr_list_t *list, attr_t *attr); @@ -122,30 +123,23 @@ static type_t *make_safearray(type_t *type); static type_t *make_builtin(char *name); static type_t *make_int(int sign); static typelib_t *make_library(const char *name, const attr_list_t *attrs); -static type_t *make_func_type(var_list_t *args); -static type_t *make_pointer_type(type_t *ref, attr_list_t *attrs); static type_t *append_ptrchain_type(type_t *ptrchain, type_t *type); +static type_t *type_new_enum(char *name, var_list_t *enums); +static type_t *type_new_struct(char *name, int defined, var_list_t *fields); +static type_t *type_new_nonencapsulated_union(char *name, var_list_t *fields); +static type_t *type_new_encapsulated_union(char *name, var_t *switch_field, var_t *union_field, var_list_t *cases); + static type_t *reg_type(type_t *type, const char *name, int t); static type_t *reg_typedefs(decl_spec_t *decl_spec, var_list_t *names, attr_list_t *attrs); static type_t *find_type_or_error(const char *name, int t); static type_t *find_type_or_error2(char *name, int t); static type_t *get_type(unsigned char type, char *name, int t); -static type_t *get_typev(unsigned char type, var_t *name, int t); -static int get_struct_type(var_list_t *fields); static var_t *reg_const(var_t *var); -static void write_libid(const typelib_t *typelib); -static void write_clsid(type_t *cls); -static void write_diid(type_t *iface); -static void write_iid(type_t *iface); - -static int compute_method_indexes(type_t *iface); static char *gen_name(void); -static statement_t *process_typedefs(var_list_t *names); static void check_arg(var_t *arg); -static void check_functions(const type_t *iface); static void check_all_user_types(const statement_list_t *stmts); static attr_list_t *check_iface_attrs(const char *name, attr_list_t *attrs); static attr_list_t *check_function_attrs(const char *name, attr_list_t *attrs); @@ -170,9 +164,10 @@ static statement_t *make_statement_library(typelib_t *typelib); static statement_t *make_statement_cppquote(const char *str); static statement_t *make_statement_importlib(const char *str); static statement_t *make_statement_module(type_t *type); +static statement_t *make_statement_typedef(var_list_t *names); static statement_t *make_statement_import(const char *str); +static statement_t *make_statement_typedef(var_list_t *names); static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt); -static func_list_t *append_func_from_statement(func_list_t *list, statement_t *stmt); #define tsENUM 1 #define tsSTRUCT 2 @@ -320,19 +315,18 @@ static func_list_t *append_func_from_statement(func_list_t *list, statement_t *s %type coclass_ints %type arg ne_union_field union_field s_field case enum declaration %type m_args no_args args fields ne_union_fields cases enums enum_list dispint_props field -%type m_ident t_ident ident +%type m_ident ident %type declarator direct_declarator init_declarator %type declarator_list %type funcdef -%type int_statements dispint_meths %type coclass coclasshdr coclassdef %type pointer_type version -%type libraryhdr callconv cppquote importlib import +%type libraryhdr callconv cppquote importlib import t_ident %type uuid_string %type import_start %type library_start librarydef %type statement typedef -%type gbl_statements imp_statements +%type gbl_statements imp_statements int_statements dispint_meths %left ',' %right '?' ':' @@ -353,49 +347,45 @@ static func_list_t *append_func_from_statement(func_list_t *list, statement_t *s input: gbl_statements { fix_incomplete(); check_all_user_types($1); + write_header($1); + write_id_data($1); write_proxies($1); write_client($1); write_server($1); write_dlldata($1); + write_local_stubs($1); } ; gbl_statements: { $$ = NULL; } - | gbl_statements interfacedec { $$ = $1; } + | gbl_statements interfacedec { $$ = append_statement($1, make_statement_reference($2)); } | gbl_statements interfacedef { $$ = append_statement($1, make_statement_type_decl($2)); } | gbl_statements coclass ';' { $$ = $1; reg_type($2, $2->name, 0); - if (!parse_only && do_header) write_coclass_forward($2); } | gbl_statements coclassdef { $$ = append_statement($1, make_statement_type_decl($2)); - add_typelib_entry($2); reg_type($2, $2->name, 0); - if (!parse_only && do_header) write_coclass_forward($2); - } - | gbl_statements moduledef { $$ = append_statement($1, make_statement_module($2)); - add_typelib_entry($2); } + | gbl_statements moduledef { $$ = append_statement($1, make_statement_module($2)); } | gbl_statements librarydef { $$ = append_statement($1, make_statement_library($2)); } | gbl_statements statement { $$ = append_statement($1, $2); } ; imp_statements: { $$ = NULL; } - | imp_statements interfacedec { $$ = append_statement($1, make_statement_reference($2)); if (!parse_only) add_typelib_entry($2); } - | imp_statements interfacedef { $$ = append_statement($1, make_statement_type_decl($2)); if (!parse_only) add_typelib_entry($2); } - | imp_statements coclass ';' { $$ = $1; reg_type($2, $2->name, 0); if (!parse_only && do_header) write_coclass_forward($2); } + | imp_statements interfacedec { $$ = append_statement($1, make_statement_reference($2)); } + | imp_statements interfacedef { $$ = append_statement($1, make_statement_type_decl($2)); } + | imp_statements coclass ';' { $$ = $1; reg_type($2, $2->name, 0); } | imp_statements coclassdef { $$ = append_statement($1, make_statement_type_decl($2)); - if (!parse_only) add_typelib_entry($2); reg_type($2, $2->name, 0); - if (!parse_only && do_header) write_coclass_forward($2); } - | imp_statements moduledef { $$ = append_statement($1, make_statement_module($2)); if (!parse_only) add_typelib_entry($2); } + | imp_statements moduledef { $$ = append_statement($1, make_statement_module($2)); } | imp_statements statement { $$ = append_statement($1, $2); } | imp_statements importlib { $$ = append_statement($1, make_statement_importlib($2)); } | imp_statements librarydef { $$ = append_statement($1, make_statement_library($2)); } ; int_statements: { $$ = NULL; } - | int_statements statement { $$ = append_func_from_statement( $1, $2 ); } + | int_statements statement { $$ = append_statement($1, $2); } ; semicolon_opt: @@ -404,15 +394,8 @@ semicolon_opt: statement: cppquote { $$ = make_statement_cppquote($1); } - | typedecl ';' { $$ = make_statement_type_decl($1); - if (!parse_only && do_header) { - write_type_def_or_decl(header, $1, FALSE, NULL); - fprintf(header, ";\n\n"); - } - } - | declaration ';' { $$ = make_statement_declaration($1); - if (!parse_only && do_header) write_declaration($1, is_in_interface); - } + | typedecl ';' { $$ = make_statement_type_decl($1); } + | declaration ';' { $$ = make_statement_declaration($1); } | import { $$ = make_statement_import($1); } | typedef ';' { $$ = $1; } ; @@ -426,7 +409,7 @@ typedecl: | attributes uniondef { $$ = $2; $$->attrs = check_union_attrs($1); } ; -cppquote: tCPPQUOTE '(' aSTRING ')' { $$ = $3; if (!parse_only && do_header) fprintf(header, "%s\n", $3); } +cppquote: tCPPQUOTE '(' aSTRING ')' { $$ = $3; } ; import_start: tIMPORT aSTRING ';' { assert(yychar == YYEMPTY); $$ = xmalloc(sizeof(struct _import_t)); @@ -439,7 +422,6 @@ import_start: tIMPORT aSTRING ';' { assert(yychar == YYEMPTY); import: import_start imp_statements aEOF { $$ = $1->name; if ($1->import_performed) pop_import(); free($1); - if (!parse_only && do_header) write_import($$); } ; @@ -451,8 +433,6 @@ libraryhdr: tLIBRARY aIDENTIFIER { $$ = $2; } ; library_start: attributes libraryhdr '{' { $$ = make_library($2, check_library_attrs($2, $1)); if (!parse_only) start_typelib($$); - if (!parse_only && do_header) write_library($$); - if (!parse_only && do_idfile) write_libid($$); is_inside_library = TRUE; } ; @@ -643,13 +623,7 @@ enum: ident '=' expr_int_const { $$ = reg_const($1); } ; -enumdef: tENUM t_ident '{' enums '}' { $$ = get_typev(RPC_FC_ENUM16, $2, tsENUM); - $$->kind = TKIND_ENUM; - $$->fields_or_args = $4; - $$->defined = TRUE; - if(in_typelib) - add_typelib_entry($$); - } +enumdef: tENUM t_ident '{' enums '}' { $$ = type_new_enum($2, $4); } ; m_exprs: m_expr { $$ = append_expr( NULL, $1 ); } @@ -791,8 +765,8 @@ m_ident: { $$ = NULL; } ; t_ident: { $$ = NULL; } - | aIDENTIFIER { $$ = make_var($1); } - | aKNOWNTYPE { $$ = make_var($1); } + | aIDENTIFIER { $$ = $1; } + | aKNOWNTYPE { $$ = $1; } ; ident: aIDENTIFIER { $$ = make_var($1); } @@ -854,10 +828,6 @@ coclass: tCOCLASS aIDENTIFIER { $$ = make_class($2); } coclasshdr: attributes coclass { $$ = $2; check_def($$); $$->attrs = check_coclass_attrs($2->name, $1); - if (!parse_only && do_header) - write_coclass($$); - if (!parse_only && do_idfile) - write_clsid($$); } ; @@ -881,16 +851,12 @@ dispinterface: tDISPINTERFACE aIDENTIFIER { $$ = get_type(RPC_FC_IP, $2, 0); $$- ; dispinterfacehdr: attributes dispinterface { attr_t *attrs; - is_in_interface = TRUE; is_object_interface = TRUE; $$ = $2; check_def($$); attrs = make_attr(ATTR_DISPINTERFACE); $$->attrs = append_attr( check_dispiface_attrs($2->name, $1), attrs ); - $$->ref = find_type("IDispatch", 0); - if (!$$->ref) error_loc("IDispatch is undefined\n"); $$->defined = TRUE; - if (!parse_only && do_header) write_forward($$); } ; @@ -906,19 +872,11 @@ dispinterfacedef: dispinterfacehdr '{' dispint_props dispint_meths '}' { $$ = $1; - $$->fields_or_args = $3; - $$->funcs = $4; - if (!parse_only && do_header) write_interface($$); - if (!parse_only && do_idfile) write_diid($$); - is_in_interface = FALSE; + type_dispinterface_define($$, $3, $4); } | dispinterfacehdr '{' interface ';' '}' { $$ = $1; - $$->fields_or_args = $3->fields_or_args; - $$->funcs = $3->funcs; - if (!parse_only && do_header) write_interface($$); - if (!parse_only && do_idfile) write_diid($$); - is_in_interface = FALSE; + type_dispinterface_define_from_iface($$, $3); } ; @@ -935,47 +893,31 @@ interfacehdr: attributes interface { $$.interface = $2; if (is_attr($1, ATTR_POINTERDEFAULT)) pointer_default = get_attrv($1, ATTR_POINTERDEFAULT); is_object_interface = is_object($1); - is_in_interface = TRUE; check_def($2); $2->attrs = check_iface_attrs($2->name, $1); $2->defined = TRUE; - if (!parse_only && do_header) write_forward($2); } ; interfacedef: interfacehdr inherit '{' int_statements '}' semicolon_opt { $$ = $1.interface; - $$->ref = $2; - $$->funcs = $4; - check_functions($$); - compute_method_indexes($$); - if (!parse_only && do_header) write_interface($$); - if (!parse_only && local_stubs) write_locals(local_stubs, $$, TRUE); - if (!parse_only && do_idfile) write_iid($$); + type_interface_define($$, $2, $4); pointer_default = $1.old_pointer_default; - is_in_interface = FALSE; } /* MIDL is able to import the definition of a base class from inside the * definition of a derived class, I'll try to support it with this rule */ | interfacehdr ':' aIDENTIFIER '{' import int_statements '}' semicolon_opt { $$ = $1.interface; - $$->ref = find_type_or_error2($3, 0); - if (!$$->ref) error_loc("base class '%s' not found in import\n", $3); - $$->funcs = $6; - compute_method_indexes($$); - if (!parse_only && do_header) write_interface($$); - if (!parse_only && local_stubs) write_locals(local_stubs, $$, TRUE); - if (!parse_only && do_idfile) write_iid($$); + type_interface_define($$, find_type_or_error2($3, 0), $6); pointer_default = $1.old_pointer_default; - is_in_interface = FALSE; } | dispinterfacedef semicolon_opt { $$ = $1; } ; interfacedec: - interface ';' { $$ = $1; if (!parse_only && do_header) write_forward($$); } - | dispinterface ';' { $$ = $1; if (!parse_only && do_header) write_forward($$); } + interface ';' { $$ = $1; } + | dispinterface ';' { $$ = $1; } ; module: tMODULE aIDENTIFIER { $$ = make_type(0, NULL); $$->name = $2; $$->kind = TKIND_MODULE; } @@ -989,8 +931,8 @@ modulehdr: attributes module { $$ = $2; moduledef: modulehdr '{' int_statements '}' semicolon_opt { $$ = $1; - $$->funcs = $3; - /* FIXME: if (!parse_only && do_header) write_module($$); */ + $$->stmts = $3; + $$->funcs = gen_function_list($3); } ; @@ -1029,7 +971,7 @@ decl_spec_no_type: declarator: '*' m_type_qual_list declarator %prec PPTR - { $$ = $3; $$->type = append_ptrchain_type($$->type, make_pointer_type(NULL, $2)); } + { $$ = $3; $$->type = append_ptrchain_type($$->type, type_new_pointer(NULL, $2)); } | callconv declarator { $$ = $2; $$->type->attrs = append_attr($$->type->attrs, make_attrp(ATTR_CALLCONV, $1)); } | direct_declarator ; @@ -1039,7 +981,7 @@ direct_declarator: | '(' declarator ')' { $$ = $2; } | direct_declarator array { $$ = $1; $$->array = append_array($$->array, $2); } | direct_declarator '(' m_args ')' { $$ = $1; - $$->func_type = append_ptrchain_type($$->type, make_func_type($3)); + $$->func_type = append_ptrchain_type($$->type, type_new_function($3)); $$->type = NULL; } ; @@ -1060,16 +1002,7 @@ pointer_type: | tPTR { $$ = RPC_FC_FP; } ; -structdef: tSTRUCT t_ident '{' fields '}' { $$ = get_typev(RPC_FC_STRUCT, $2, tsSTRUCT); - /* overwrite RPC_FC_STRUCT with a more exact type */ - check_def($$); - $$->type = get_struct_type( $4 ); - $$->kind = TKIND_RECORD; - $$->fields_or_args = $4; - $$->defined = TRUE; - if(in_typelib) - add_typelib_entry($$); - } +structdef: tSTRUCT t_ident '{' fields '}' { $$ = type_new_struct($2, TRUE, $4); } ; type: tVOID { $$ = find_type_or_error("void", 0); } @@ -1078,7 +1011,7 @@ type: tVOID { $$ = find_type_or_error("void", 0); } | enumdef { $$ = $1; } | tENUM aIDENTIFIER { $$ = find_type_or_error2($2, tsENUM); } | structdef { $$ = $1; } - | tSTRUCT aIDENTIFIER { $$ = get_type(RPC_FC_STRUCT, $2, tsSTRUCT); } + | tSTRUCT aIDENTIFIER { $$ = type_new_struct($2, FALSE, NULL); } | uniondef { $$ = $1; } | tUNION aIDENTIFIER { $$ = find_type_or_error2($2, tsUNION); } | tSAFEARRAY '(' type ')' { $$ = make_safearray($3); } @@ -1086,32 +1019,15 @@ type: tVOID { $$ = find_type_or_error("void", 0); } typedef: tTYPEDEF m_attributes decl_spec declarator_list { reg_typedefs($3, $4, check_typedef_attrs($2)); - $$ = process_typedefs($4); + $$ = make_statement_typedef($4); } ; uniondef: tUNION t_ident '{' ne_union_fields '}' - { $$ = get_typev(RPC_FC_NON_ENCAPSULATED_UNION, $2, tsUNION); - check_def($$); - $$->kind = TKIND_UNION; - $$->fields_or_args = $4; - $$->defined = TRUE; - } + { $$ = type_new_nonencapsulated_union($2, $4); } | tUNION t_ident tSWITCH '(' s_field ')' - m_ident '{' cases '}' { var_t *u = $7; - $$ = get_typev(RPC_FC_ENCAPSULATED_UNION, $2, tsUNION); - check_def($$); - $$->kind = TKIND_UNION; - if (!u) u = make_var( xstrdup("tagged_union") ); - u->type = make_type(RPC_FC_NON_ENCAPSULATED_UNION, NULL); - u->type->kind = TKIND_UNION; - u->type->fields_or_args = $9; - u->type->defined = TRUE; - $$->fields_or_args = append_var( $$->fields_or_args, $5 ); - $$->fields_or_args = append_var( $$->fields_or_args, u ); - $$->defined = TRUE; - } + m_ident '{' cases '}' { $$ = type_new_encapsulated_union($2, $5, $7, $9); } ; version: @@ -1369,6 +1285,13 @@ void set_all_tfswrite(int val) node->data.tfswrite = val; } +void clear_all_offsets(void) +{ + type_pool_node_t *node; + LIST_FOR_EACH_ENTRY(node, &type_pool, type_pool_node_t, link) + node->data.typestring_offset = node->data.ptrdesc = 0; +} + type_t *make_type(unsigned char type, type_t *ref) { type_t *t = alloc_type(); @@ -1379,7 +1302,7 @@ type_t *make_type(unsigned char type, type_t *ref) t->attrs = NULL; t->orig = NULL; t->funcs = NULL; - t->fields_or_args = NULL; + memset(&t->details, 0, sizeof(t->details)); t->ifaces = NULL; t->dim = 0; t->size_is = NULL; @@ -1399,18 +1322,87 @@ type_t *make_type(unsigned char type, type_t *ref) return t; } -static type_t *make_func_type(var_list_t *args) +static type_t *type_new_enum(char *name, var_list_t *enums) +{ + type_t *t = get_type(RPC_FC_ENUM16, name, tsENUM); + t->kind = TKIND_ENUM; + if (enums) + { + t->details.enumeration = xmalloc(sizeof(*t->details.enumeration)); + t->details.enumeration->enums = enums; + } + else + t->details.enumeration = NULL; + t->defined = TRUE; + return t; +} + +static type_t *type_new_struct(char *name, int defined, var_list_t *fields) { - type_t *t = make_type(RPC_FC_FUNCTION, NULL); - t->fields_or_args = args; + type_t *tag_type = name ? find_type(name, tsSTRUCT) : NULL; + type_t *t = make_type(RPC_FC_STRUCT, NULL); + t->name = name; + t->kind = TKIND_RECORD; + if (defined || (tag_type && tag_type->details.structure)) + { + if (tag_type && tag_type->details.structure) + { + t->details.structure = tag_type->details.structure; + t->type = tag_type->type; + } + else if (defined) + { + t->details.structure = xmalloc(sizeof(*t->details.structure)); + t->details.structure->fields = fields; + t->defined = TRUE; + } + } + if (name) + { + if (fields) + reg_type(t, name, tsSTRUCT); + else + add_incomplete(t); + } return t; } -static type_t *make_pointer_type(type_t *ref, attr_list_t *attrs) +static type_t *type_new_nonencapsulated_union(char *name, var_list_t *fields) { - type_t *t = make_type(pointer_default, ref); - t->attrs = attrs; - return t; + type_t *t = get_type(RPC_FC_NON_ENCAPSULATED_UNION, name, tsUNION); + t->kind = TKIND_UNION; + t->details.structure = xmalloc(sizeof(*t->details.structure)); + t->details.structure->fields = fields; + t->defined = TRUE; + return t; +} + +static type_t *type_new_encapsulated_union(char *name, var_t *switch_field, var_t *union_field, var_list_t *cases) +{ + type_t *t = get_type(RPC_FC_ENCAPSULATED_UNION, name, tsUNION); + t->kind = TKIND_UNION; + if (!union_field) union_field = make_var( xstrdup("tagged_union") ); + union_field->type = make_type(RPC_FC_NON_ENCAPSULATED_UNION, NULL); + union_field->type->kind = TKIND_UNION; + union_field->type->details.structure = xmalloc(sizeof(*union_field->type->details.structure)); + union_field->type->details.structure->fields = cases; + union_field->type->defined = TRUE; + t->details.structure = xmalloc(sizeof(*t->details.structure)); + t->details.structure->fields = append_var( NULL, switch_field ); + t->details.structure->fields = append_var( t->details.structure->fields, union_field ); + t->defined = TRUE; + return t; +} + +static void function_add_head_arg(func_t *func, var_t *arg) +{ + if (!func->def->type->details.function->args) + { + func->def->type->details.function->args = xmalloc( sizeof(*func->def->type->details.function->args) ); + list_init( func->def->type->details.function->args ); + } + list_add_head( func->def->type->details.function->args, &arg->entry ); + func->args = func->def->type->details.function->args; } static type_t *append_ptrchain_type(type_t *ptrchain, type_t *type) @@ -1502,18 +1494,7 @@ static void set_type(var_t *v, decl_spec_t *decl_spec, const declarator_t *decl, if (dim->is_const) { - unsigned int align = 0; - size_t size = type_memsize(v->type, &align); - - if (dim->cval <= 0) - error_loc("%s: array dimension must be positive\n", v->name); - - if (0xffffffffuL / size < (unsigned long) dim->cval) - error_loc("%s: total array size is too large\n", v->name); - else if (0xffffuL < size * dim->cval) - v->type = make_type(RPC_FC_LGFARRAY, v->type); - else - v->type = make_type(RPC_FC_SMFARRAY, v->type); + v->type = make_type(RPC_FC_LGFARRAY, v->type); } else { @@ -1584,29 +1565,6 @@ static void set_type(var_t *v, decl_spec_t *decl_spec, const declarator_t *decl, } } - if (is_array(v->type)) - { - const type_t *rt = v->type->ref; - if (is_user_type(rt)) - v->type->type = RPC_FC_BOGUS_ARRAY; - else - switch (rt->type) - { - case RPC_FC_BOGUS_STRUCT: - case RPC_FC_NON_ENCAPSULATED_UNION: - case RPC_FC_ENCAPSULATED_UNION: - case RPC_FC_ENUM16: - v->type->type = RPC_FC_BOGUS_ARRAY; - break; - /* FC_RP should be above, but widl overuses these, and will break things. */ - case RPC_FC_UP: - case RPC_FC_RP: - if (rt->ref->type == RPC_FC_IP) - v->type->type = RPC_FC_BOGUS_ARRAY; - break; - } - } - /* v->type is currently pointing to the type on the left-side of the * declaration, so we need to fix this up so that it is the return type of the * function and make v->type point to the function side of the declaration */ @@ -1749,8 +1707,7 @@ static func_t *make_func(var_t *def) { func_t *f = xmalloc(sizeof(func_t)); f->def = def; - f->args = def->type->fields_or_args; - f->ignore = parse_only; + f->args = def->type->details.function->args; f->idx = -1; return f; } @@ -1776,7 +1733,6 @@ static typelib_t *make_library(const char *name, const attr_list_t *attrs) typelib->name = xstrdup(name); typelib->filename = NULL; typelib->attrs = attrs; - list_init( &typelib->entries ); list_init( &typelib->importlibs ); return typelib; } @@ -1821,6 +1777,8 @@ static type_t *reg_type(type_t *type, const char *name, int t) nt->t = t; nt->next = type_hash[hash]; type_hash[hash] = nt; + if ((t == tsSTRUCT || t == tsUNION)) + fix_incomplete_types(type); return type; } @@ -1841,7 +1799,8 @@ static void fix_type(type_t *t) if (t->kind == TKIND_ALIAS && is_incomplete(t)) { type_t *ot = t->orig; fix_type(ot); - t->fields_or_args = ot->fields_or_args; + if (is_struct(ot->type) || is_union(ot->type)) + t->details.structure = ot->details.structure; t->defined = ot->defined; } } @@ -1852,10 +1811,29 @@ static void fix_incomplete(void) LIST_FOR_EACH_ENTRY_SAFE(tn, next, &incomplete_types, struct typenode, entry) { fix_type(tn->type); + list_remove(&tn->entry); free(tn); } } +static void fix_incomplete_types(type_t *complete_type) +{ + struct typenode *tn, *next; + + LIST_FOR_EACH_ENTRY_SAFE(tn, next, &incomplete_types, struct typenode, entry) + { + if (((is_struct(complete_type->type) && is_struct(tn->type->type)) || + (is_union(complete_type->type) && is_union(tn->type->type))) && + !strcmp(complete_type->name, tn->type->name)) + { + tn->type->details.structure = complete_type->details.structure; + tn->type->type = complete_type->type; + list_remove(&tn->entry); + free(tn); + } + } +} + static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, attr_list_t *attrs) { const declarator_t *decl; @@ -1965,173 +1943,6 @@ static type_t *get_type(unsigned char type, char *name, int t) return reg_type(tp, name, t); } -static type_t *get_typev(unsigned char type, var_t *name, int t) -{ - char *sname = NULL; - if (name) { - sname = name->name; - free(name); - } - return get_type(type, sname, t); -} - -static int get_struct_type(var_list_t *fields) -{ - int has_pointer = 0; - int has_conformance = 0; - int has_variance = 0; - var_t *field; - - if (get_padding(fields)) - return RPC_FC_BOGUS_STRUCT; - - if (fields) LIST_FOR_EACH_ENTRY( field, fields, var_t, entry ) - { - type_t *t = field->type; - - if (is_user_type(t)) - return RPC_FC_BOGUS_STRUCT; - - if (is_ptr(t)) - { - do - t = t->ref; - while (is_ptr(t)); - - switch (t->type) - { - case RPC_FC_IP: - case RPC_FC_ENCAPSULATED_UNION: - case RPC_FC_NON_ENCAPSULATED_UNION: - case RPC_FC_BOGUS_STRUCT: - return RPC_FC_BOGUS_STRUCT; - } - - has_pointer = 1; - continue; - } - - if (field->type->declarray) - { - if (is_string_type(field->attrs, field->type)) - { - if (is_conformant_array(field->type)) - has_conformance = 1; - has_variance = 1; - continue; - } - - if (is_array(field->type->ref)) - return RPC_FC_BOGUS_STRUCT; - - if (is_conformant_array(field->type)) - { - has_conformance = 1; - if (field->type->declarray && list_next(fields, &field->entry)) - error_loc("field '%s' deriving from a conformant array must be the last field in the structure\n", - field->name); - } - if (field->type->length_is) - has_variance = 1; - - t = field->type->ref; - } - - switch (t->type) - { - /* - * RPC_FC_BYTE, RPC_FC_STRUCT, etc - * Simple types don't effect the type of struct. - * A struct containing a simple struct is still a simple struct. - * So long as we can block copy the data, we return RPC_FC_STRUCT. - */ - case 0: /* void pointer */ - case RPC_FC_BYTE: - case RPC_FC_CHAR: - case RPC_FC_SMALL: - case RPC_FC_USMALL: - case RPC_FC_WCHAR: - case RPC_FC_SHORT: - case RPC_FC_USHORT: - case RPC_FC_LONG: - case RPC_FC_ULONG: - case RPC_FC_INT3264: - case RPC_FC_UINT3264: - case RPC_FC_HYPER: - case RPC_FC_FLOAT: - case RPC_FC_DOUBLE: - case RPC_FC_STRUCT: - case RPC_FC_ENUM32: - break; - - case RPC_FC_RP: - case RPC_FC_UP: - case RPC_FC_FP: - case RPC_FC_OP: - case RPC_FC_CARRAY: - case RPC_FC_CVARRAY: - case RPC_FC_BOGUS_ARRAY: - has_pointer = 1; - break; - - /* - * Propagate member attributes - * a struct should be at least as complex as its member - */ - case RPC_FC_CVSTRUCT: - has_conformance = 1; - has_variance = 1; - has_pointer = 1; - break; - - case RPC_FC_CPSTRUCT: - has_conformance = 1; - if (list_next( fields, &field->entry )) - error_loc("field '%s' deriving from a conformant array must be the last field in the structure\n", - field->name); - has_pointer = 1; - break; - - case RPC_FC_CSTRUCT: - has_conformance = 1; - if (list_next( fields, &field->entry )) - error_loc("field '%s' deriving from a conformant array must be the last field in the structure\n", - field->name); - break; - - case RPC_FC_PSTRUCT: - has_pointer = 1; - break; - - default: - error_loc("Unknown struct member %s with type (0x%02x)\n", field->name, t->type); - /* fallthru - treat it as complex */ - - /* as soon as we see one of these these members, it's bogus... */ - case RPC_FC_ENCAPSULATED_UNION: - case RPC_FC_NON_ENCAPSULATED_UNION: - case RPC_FC_BOGUS_STRUCT: - case RPC_FC_ENUM16: - return RPC_FC_BOGUS_STRUCT; - } - } - - if( has_variance ) - { - if ( has_conformance ) - return RPC_FC_CVSTRUCT; - else - return RPC_FC_BOGUS_STRUCT; - } - if( has_conformance && has_pointer ) - return RPC_FC_CPSTRUCT; - if( has_conformance ) - return RPC_FC_CSTRUCT; - if( has_pointer ) - return RPC_FC_PSTRUCT; - return RPC_FC_STRUCT; -} - /***** constant repository *****/ struct rconst { @@ -2171,48 +1982,23 @@ var_t *find_const(const char *name, int f) return cur->var; } -static void write_libid(const typelib_t *typelib) +func_list_t *gen_function_list(const statement_list_t *stmts) { - const UUID *uuid = get_attrp(typelib->attrs, ATTR_UUID); - write_guid(idfile, "LIBID", typelib->name, uuid); -} - -static void write_clsid(type_t *cls) -{ - const UUID *uuid = get_attrp(cls->attrs, ATTR_UUID); - write_guid(idfile, "CLSID", cls->name, uuid); -} - -static void write_diid(type_t *iface) -{ - const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID); - write_guid(idfile, "DIID", iface->name, uuid); -} - -static void write_iid(type_t *iface) -{ - const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID); - write_guid(idfile, "IID", iface->name, uuid); -} - -static int compute_method_indexes(type_t *iface) -{ - int idx; - func_t *f; - - if (iface->ref) - idx = compute_method_indexes(iface->ref); - else - idx = 0; - - if (!iface->funcs) - return idx; - - LIST_FOR_EACH_ENTRY( f, iface->funcs, func_t, entry ) - if (! is_callas(f->def->attrs)) - f->idx = idx++; - - return idx; + func_list_t *func_list = NULL; + const statement_t *stmt; + if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) + { + if (stmt->type == STMT_DECLARATION) + { + var_t *var = stmt->u.var; + if (var->stgclass == STG_NONE && var->type->type == RPC_FC_FUNCTION) + { + check_function_attrs(var->name, var->type->attrs); + func_list = append_func(func_list, make_func(var)); + } + } + } + return func_list; } static char *gen_name(void) @@ -2658,6 +2444,10 @@ static void check_remoting_fields(const var_t *var, type_t *type) const var_t *field; const var_list_t *fields = NULL; + /* find the real type */ + while (type->kind == TKIND_ALIAS) + type = type->orig; + if (type->checked) return; @@ -2665,21 +2455,13 @@ static void check_remoting_fields(const var_t *var, type_t *type) if (is_struct(type->type)) { - if (type->defined) - fields = type->fields_or_args; + if (type_is_complete(type)) + fields = type_struct_get_fields(type); else error_loc_info(&var->loc_info, "undefined type declaration %s\n", type->name); } else if (is_union(type->type)) - { - if (type->type == RPC_FC_ENCAPSULATED_UNION) - { - const var_t *uv = LIST_ENTRY(list_tail(type->fields_or_args), const var_t, entry); - fields = uv->type->fields_or_args; - } - else - fields = type->fields_or_args; - } + fields = type_union_get_cases(type); if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) if (field->type) check_field_common(type, type->name, field); @@ -2752,19 +2534,13 @@ static void add_explicit_handle_if_necessary(func_t *func) var_t *idl_handle = make_var(xstrdup("IDL_handle")); idl_handle->attrs = append_attr(NULL, make_attr(ATTR_IN)); idl_handle->type = find_type_or_error("handle_t", 0); - if (!func->def->type->fields_or_args) - { - func->def->type->fields_or_args = xmalloc( sizeof(*func->def->type->fields_or_args) ); - list_init( func->def->type->fields_or_args ); - } - list_add_head( func->def->type->fields_or_args, &idl_handle->entry ); - func->args = func->def->type->fields_or_args; + function_add_head_arg(func, idl_handle); } } } } -static void check_functions(const type_t *iface) +void check_functions(const type_t *iface) { if (is_attr(iface->attrs, ATTR_EXPLICIT_HANDLE) && iface->funcs) { @@ -2791,7 +2567,8 @@ static void check_all_user_types(const statement_list_t *stmts) { if (stmt->type == STMT_LIBRARY) check_all_user_types(stmt->u.lib->stmts); - else if (stmt->type == STMT_TYPE && stmt->u.type->type == RPC_FC_IP) + else if (stmt->type == STMT_TYPE && stmt->u.type->type == RPC_FC_IP && + !is_local(stmt->u.type->attrs)) { const func_t *f; const func_list_t *fs = stmt->u.type->funcs; @@ -2891,7 +2668,7 @@ static statement_t *make_statement_module(type_t *type) return stmt; } -static statement_t *process_typedefs(declarator_list_t *decls) +static statement_t *make_statement_typedef(declarator_list_t *decls) { declarator_t *decl, *next; statement_t *stmt; @@ -2911,11 +2688,6 @@ static statement_t *process_typedefs(declarator_list_t *decls) (*type_list)->type = type; (*type_list)->next = NULL; - if (! parse_only && do_header) - write_typedef(type); - if (in_typelib && is_attr(type->attrs, ATTR_PUBLIC)) - add_typelib_entry(type); - type_list = &(*type_list)->next; free(decl); free(var); @@ -2936,20 +2708,6 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s return list; } -static func_list_t *append_func_from_statement(func_list_t *list, statement_t *stmt) -{ - if (stmt->type == STMT_DECLARATION) - { - var_t *var = stmt->u.var; - if (var->stgclass == STG_NONE && var->type->type == RPC_FC_FUNCTION) - { - check_function_attrs(var->name, var->type->attrs); - return append_func(list, make_func(stmt->u.var)); - } - } - return list; -} - void init_loc_info(loc_info_t *i) { i->input_name = input_name ? input_name : "stdin"; diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c index dc3c1ae2015..9585d2c6130 100644 --- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -127,8 +127,6 @@ static void init_proxy(const statement_list_t *stmts) print_proxy( " return (__frame->_StubMsg.dwStubPhase != PROXY_SENDRECEIVE);\n"); print_proxy( "}\n"); print_proxy( "\n"); - write_formatstringsdecl(proxy, indent, stmts, need_proxy); - write_stubdescproto(); } static void clear_output_vars( const var_list_t *args ) @@ -163,6 +161,9 @@ int cant_be_null(const var_t *v) if (is_aliaschain_attr(type, ATTR_CONTEXTHANDLE)) return 0; + if (is_user_type(type)) + return 0; + if (! attrs && type) { attrs = type->attrs; @@ -196,6 +197,24 @@ static int need_delegation(const type_t *iface) return iface->ref && iface->ref->ref && iface->ref->ignore; } +static int get_delegation_indirect(const type_t *iface, const type_t ** delegate_to) +{ + const type_t * cur_iface; + for (cur_iface = iface; cur_iface != NULL; cur_iface = cur_iface->ref) + if (need_delegation(cur_iface)) + { + if(delegate_to) + *delegate_to = cur_iface->ref; + return 1; + } + return 0; +} + +static int need_delegation_indirect(const type_t *iface) +{ + return get_delegation_indirect(iface, NULL); +} + static void proxy_check_pointers( const var_list_t *args ) { const var_t *arg; @@ -625,7 +644,7 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset) fprintf(proxy, "};\n"); print_proxy( "\n"); print_proxy( "static %sCInterfaceStubVtbl _%sStubVtbl =\n", - need_delegation(iface) ? "" : "const ", iface->name); + need_delegation_indirect(iface) ? "" : "const ", iface->name); print_proxy( "{\n"); indent++; print_proxy( "{\n"); @@ -638,7 +657,7 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset) print_proxy( "},\n", iface->name); print_proxy( "{\n"); indent++; - print_proxy( "CStdStubBuffer_%s\n", need_delegation(iface) ? "DELEGATING_METHODS" : "METHODS"); + print_proxy( "CStdStubBuffer_%s\n", need_delegation_indirect(iface) ? "DELEGATING_METHODS" : "METHODS"); indent--; print_proxy( "}\n"); indent--; @@ -743,20 +762,13 @@ static type_t **sort_interfaces( const statement_list_t *stmts, int *count ) return ifaces; } -void write_proxies(const statement_list_t *stmts) +static void write_proxy_routines(const statement_list_t *stmts) { int expr_eval_routines; - char *file_id = proxy_token; - int i, count, have_baseiid; unsigned int proc_offset = 0; - type_t **interfaces; - - if (!do_proxies) return; - if (do_everything && !need_proxy_file(stmts)) return; - - init_proxy(stmts); - if(!proxy) return; + write_formatstringsdecl(proxy, indent, stmts, need_proxy); + write_stubdescproto(); write_proxy_stmts(stmts, &proc_offset); expr_eval_routines = write_expr_eval_routines(proxy, proxy_token); @@ -765,13 +777,49 @@ void write_proxies(const statement_list_t *stmts) write_user_quad_list(proxy); write_stubdesc(expr_eval_routines); - print_proxy( "#if !defined(__RPC_WIN32__)\n"); + print_proxy( "#if !defined(__RPC_WIN%u__)\n", pointer_size == 8 ? 64 : 32); print_proxy( "#error Currently only Wine and WIN32 are supported.\n"); print_proxy( "#endif\n"); print_proxy( "\n"); write_procformatstring(proxy, stmts, need_proxy); write_typeformatstring(proxy, stmts, need_proxy); +} + +void write_proxies(const statement_list_t *stmts) +{ + char *file_id = proxy_token; + int i, count, have_baseiid; + type_t **interfaces; + const type_t * delegate_to; + + if (!do_proxies) return; + if (do_everything && !need_proxy_file(stmts)) return; + + init_proxy(stmts); + if(!proxy) return; + + if (do_win32 && do_win64) + { + fprintf(proxy, "\n#ifndef _WIN64\n\n"); + pointer_size = 4; + write_proxy_routines( stmts ); + fprintf(proxy, "\n#else /* _WIN64 */\n\n"); + pointer_size = 8; + write_proxy_routines( stmts ); + fprintf(proxy, "#endif /* _WIN64 */\n\n"); + } + else if (do_win32) + { + pointer_size = 4; + write_proxy_routines( stmts ); + } + else if (do_win64) + { + pointer_size = 8; + write_proxy_routines( stmts ); + } + interfaces = sort_interfaces(stmts, &count); fprintf(proxy, "static const CInterfaceProxyVtbl* const _%s_ProxyVtblList[] =\n", file_id); fprintf(proxy, "{\n"); @@ -797,14 +845,14 @@ void write_proxies(const statement_list_t *stmts) fprintf(proxy, "};\n"); fprintf(proxy, "\n"); - if ((have_baseiid = does_any_iface(stmts, need_delegation))) + if ((have_baseiid = does_any_iface(stmts, need_delegation_indirect))) { fprintf(proxy, "static const IID * _%s_BaseIIDList[] =\n", file_id); fprintf(proxy, "{\n"); for (i = 0; i < count; i++) { - if (need_delegation(interfaces[i])) - fprintf( proxy, " &IID_%s, /* %s */\n", interfaces[i]->ref->name, interfaces[i]->name ); + if (get_delegation_indirect(interfaces[i], &delegate_to)) + fprintf( proxy, " &IID_%s, /* %s */\n", delegate_to->name, interfaces[i]->name ); else fprintf( proxy, " 0,\n" ); } diff --git a/tools/widl/server.c b/tools/widl/server.c index 9b8edb7bcd6..20d0e7e43c7 100644 --- a/tools/widl/server.c +++ b/tools/widl/server.c @@ -424,7 +424,7 @@ static void write_server_stmts(const statement_list_t *stmts, int expr_eval_rout write_function_stubs(iface, proc_offset); - print_server("#if !defined(__RPC_WIN32__)\n"); + print_server("#if !defined(__RPC_WIN%u__)\n", pointer_size == 8 ? 64 : 32); print_server("#error Invalid build platform for this stub.\n"); print_server("#endif\n"); @@ -436,20 +436,11 @@ static void write_server_stmts(const statement_list_t *stmts, int expr_eval_rout } } -void write_server(const statement_list_t *stmts) +static void write_server_routines(const statement_list_t *stmts) { unsigned int proc_offset = 0; int expr_eval_routines; - if (!do_server) - return; - if (do_everything && !need_stub_files(stmts)) - return; - - init_server(); - if (!server) - return; - write_formatstringsdecl(server, indent, stmts, need_stub); expr_eval_routines = write_expr_eval_routines(server, server_token); if (expr_eval_routines) @@ -462,6 +453,39 @@ void write_server(const statement_list_t *stmts) write_procformatstring(server, stmts, need_stub); write_typeformatstring(server, stmts, need_stub); +} + +void write_server(const statement_list_t *stmts) +{ + if (!do_server) + return; + if (do_everything && !need_stub_files(stmts)) + return; + + init_server(); + if (!server) + return; + + if (do_win32 && do_win64) + { + fprintf(server, "\n#ifndef _WIN64\n\n"); + pointer_size = 4; + write_server_routines( stmts ); + fprintf(server, "\n#else /* _WIN64 */\n\n"); + pointer_size = 8; + write_server_routines( stmts ); + fprintf(server, "\n#endif /* _WIN64 */\n"); + } + else if (do_win32) + { + pointer_size = 4; + write_server_routines( stmts ); + } + else if (do_win64) + { + pointer_size = 8; + write_server_routines( stmts ); + } fclose(server); } diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 9d55d19a26f..7810f80d507 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -36,7 +36,7 @@ #include "utils.h" #include "parser.h" #include "header.h" -#include "wine/list.h" +#include "typetree.h" #include "typegen.h" #include "expr.h" @@ -120,6 +120,199 @@ const char *string_of_type(unsigned char type) } } +static int get_struct_type(const type_t *type) +{ + int has_pointer = 0; + int has_conformance = 0; + int has_variance = 0; + var_t *field; + var_list_t *fields; + + if (type->type != RPC_FC_STRUCT) return type->type; + + fields = type_struct_get_fields(type); + + if (get_padding(fields)) + return RPC_FC_BOGUS_STRUCT; + + if (fields) LIST_FOR_EACH_ENTRY( field, fields, var_t, entry ) + { + type_t *t = field->type; + + if (is_user_type(t)) + return RPC_FC_BOGUS_STRUCT; + + if (field->type->declarray) + { + if (is_string_type(field->attrs, field->type)) + { + if (is_conformant_array(field->type)) + has_conformance = 1; + has_variance = 1; + continue; + } + + if (is_array(field->type->ref)) + return RPC_FC_BOGUS_STRUCT; + + if (is_conformant_array(field->type)) + { + has_conformance = 1; + if (field->type->declarray && list_next(fields, &field->entry)) + error_loc("field '%s' deriving from a conformant array must be the last field in the structure\n", + field->name); + } + if (field->type->length_is) + has_variance = 1; + + t = field->type->ref; + } + + switch (get_struct_type(t)) + { + /* + * RPC_FC_BYTE, RPC_FC_STRUCT, etc + * Simple types don't effect the type of struct. + * A struct containing a simple struct is still a simple struct. + * So long as we can block copy the data, we return RPC_FC_STRUCT. + */ + case 0: /* void pointer */ + case RPC_FC_BYTE: + case RPC_FC_CHAR: + case RPC_FC_SMALL: + case RPC_FC_USMALL: + case RPC_FC_WCHAR: + case RPC_FC_SHORT: + case RPC_FC_USHORT: + case RPC_FC_LONG: + case RPC_FC_ULONG: + case RPC_FC_INT3264: + case RPC_FC_UINT3264: + case RPC_FC_HYPER: + case RPC_FC_FLOAT: + case RPC_FC_DOUBLE: + case RPC_FC_STRUCT: + case RPC_FC_ENUM32: + break; + + case RPC_FC_RP: + return RPC_FC_BOGUS_STRUCT; + + case RPC_FC_UP: + case RPC_FC_FP: + case RPC_FC_OP: + if (pointer_size != 4) + return RPC_FC_BOGUS_STRUCT; + /* pointers to interfaces aren't really pointers and have to be + * marshalled specially so they make the structure complex */ + if (t->ref->type == RPC_FC_IP) + return RPC_FC_BOGUS_STRUCT; + has_pointer = 1; + break; + + case RPC_FC_CARRAY: + case RPC_FC_CVARRAY: + case RPC_FC_BOGUS_ARRAY: + { + unsigned int ptr_type = get_attrv(field->attrs, ATTR_POINTERTYPE); + if (!ptr_type || ptr_type == RPC_FC_RP) + return RPC_FC_BOGUS_STRUCT; + else if (pointer_size != 4) + return RPC_FC_BOGUS_STRUCT; + has_pointer = 1; + break; + } + + /* + * Propagate member attributes + * a struct should be at least as complex as its member + */ + case RPC_FC_CVSTRUCT: + has_conformance = 1; + has_variance = 1; + has_pointer = 1; + break; + + case RPC_FC_CPSTRUCT: + has_conformance = 1; + if (list_next( fields, &field->entry )) + error_loc("field '%s' deriving from a conformant array must be the last field in the structure\n", + field->name); + has_pointer = 1; + break; + + case RPC_FC_CSTRUCT: + has_conformance = 1; + if (list_next( fields, &field->entry )) + error_loc("field '%s' deriving from a conformant array must be the last field in the structure\n", + field->name); + break; + + case RPC_FC_PSTRUCT: + has_pointer = 1; + break; + + default: + error_loc("Unknown struct member %s with type (0x%02x)\n", field->name, t->type); + /* fallthru - treat it as complex */ + + /* as soon as we see one of these these members, it's bogus... */ + case RPC_FC_ENCAPSULATED_UNION: + case RPC_FC_NON_ENCAPSULATED_UNION: + case RPC_FC_BOGUS_STRUCT: + case RPC_FC_ENUM16: + return RPC_FC_BOGUS_STRUCT; + } + } + + if( has_variance ) + { + if ( has_conformance ) + return RPC_FC_CVSTRUCT; + else + return RPC_FC_BOGUS_STRUCT; + } + if( has_conformance && has_pointer ) + return RPC_FC_CPSTRUCT; + if( has_conformance ) + return RPC_FC_CSTRUCT; + if( has_pointer ) + return RPC_FC_PSTRUCT; + return RPC_FC_STRUCT; +} + +static int get_array_type(const type_t *type) +{ + if (is_array(type)) + { + const type_t *rt = type->ref; + if (is_user_type(rt)) + return RPC_FC_BOGUS_ARRAY; + switch (get_struct_type(rt)) + { + case RPC_FC_BOGUS_STRUCT: + case RPC_FC_NON_ENCAPSULATED_UNION: + case RPC_FC_ENCAPSULATED_UNION: + case RPC_FC_ENUM16: + return RPC_FC_BOGUS_ARRAY; + /* FC_RP should be above, but widl overuses these, and will break things. */ + case RPC_FC_UP: + case RPC_FC_RP: + if (rt->ref->type == RPC_FC_IP) return RPC_FC_BOGUS_ARRAY; + break; + } + + if (type->type == RPC_FC_LGFARRAY || type->type == RPC_FC_LGVARRAY) + { + unsigned int align = 0; + size_t size = type_memsize(type, &align); + if (size * type->dim <= 0xffff) + return (type->type == RPC_FC_LGFARRAY) ? RPC_FC_SMFARRAY : RPC_FC_SMVARRAY; + } + } + return type->type; +} + int is_struct(unsigned char type) { switch (type) @@ -138,7 +331,7 @@ int is_struct(unsigned char type) static int is_non_complex_struct(const type_t *type) { - switch (type->type) + switch (get_struct_type(type)) { case RPC_FC_STRUCT: case RPC_FC_PSTRUCT: @@ -173,8 +366,9 @@ static int type_has_pointers(const type_t *type) return type_has_pointers(type->ref); else if (is_struct(type->type)) { + var_list_t *fields = type_struct_get_fields(type); const var_t *field; - if (type->fields_or_args) LIST_FOR_EACH_ENTRY( field, type->fields_or_args, const var_t, entry ) + if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) { if (type_has_pointers(field->type)) return TRUE; @@ -184,13 +378,7 @@ static int type_has_pointers(const type_t *type) { var_list_t *fields; const var_t *field; - if (type->type == RPC_FC_ENCAPSULATED_UNION) - { - const var_t *uv = LIST_ENTRY(list_tail(type->fields_or_args), const var_t, entry); - fields = uv->type->fields_or_args; - } - else - fields = type->fields_or_args; + fields = type_union_get_cases(type); if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) { if (field->type && type_has_pointers(field->type)) @@ -213,8 +401,9 @@ static int type_has_full_pointer(const type_t *type) return type_has_full_pointer(type->ref); else if (is_struct(type->type)) { + var_list_t *fields = type_struct_get_fields(type); const var_t *field; - if (type->fields_or_args) LIST_FOR_EACH_ENTRY( field, type->fields_or_args, const var_t, entry ) + if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) { if (type_has_full_pointer(field->type)) return TRUE; @@ -224,13 +413,7 @@ static int type_has_full_pointer(const type_t *type) { var_list_t *fields; const var_t *field; - if (type->type == RPC_FC_ENCAPSULATED_UNION) - { - const var_t *uv = LIST_ENTRY(list_tail(type->fields_or_args), const var_t, entry); - fields = uv->type->fields_or_args; - } - else - fields = type->fields_or_args; + fields = type_union_get_cases(type); if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) { if (field->type && type_has_full_pointer(field->type)) @@ -381,6 +564,8 @@ static void write_formatdesc(FILE *f, int indent, const char *str) void write_formatstringsdecl(FILE *f, int indent, const statement_list_t *stmts, type_pred_t pred) { + clear_all_offsets(); + print_file(f, indent, "#define TYPE_FORMAT_STRING_SIZE %d\n", get_size_typeformatstring(stmts, pred)); @@ -654,8 +839,9 @@ static size_t write_conf_or_var_desc(FILE *file, const type_t *structure, unsigned char param_type = 0; size_t offset = 0; const var_t *var; + var_list_t *fields = type_struct_get_fields(structure); - if (structure->fields_or_args) LIST_FOR_EACH_ENTRY( var, structure->fields_or_args, const var_t, entry ) + if (fields) LIST_FOR_EACH_ENTRY( var, fields, const var_t, entry ) { unsigned int align = 0; /* FIXME: take alignment into account */ @@ -827,7 +1013,8 @@ size_t type_memsize(const type_t *t, unsigned int *align) } else if (is_ptr(t) || is_conformant_array(t)) { - size = sizeof(void *); + assert( pointer_size ); + size = pointer_size; if (size > *align) *align = size; } else switch (t->type) @@ -865,11 +1052,13 @@ size_t type_memsize(const type_t *t, unsigned int *align) case RPC_FC_CSTRUCT: case RPC_FC_PSTRUCT: case RPC_FC_BOGUS_STRUCT: - size = fields_memsize(t->fields_or_args, align); + size = fields_memsize(type_struct_get_fields(t), align); break; case RPC_FC_ENCAPSULATED_UNION: + size = fields_memsize(type_encapsulated_union_get_fields(t), align); + break; case RPC_FC_NON_ENCAPSULATED_UNION: - size = union_memsize(t->fields_or_args, align); + size = union_memsize(type_union_get_cases(t), align); break; case RPC_FC_SMFARRAY: case RPC_FC_LGFARRAY: @@ -971,7 +1160,7 @@ static int user_type_has_variable_size(const type_t *t) if (is_ptr(t)) return TRUE; else - switch (t->type) + switch (get_struct_type(t)) { case RPC_FC_PSTRUCT: case RPC_FC_CSTRUCT: @@ -1063,7 +1252,7 @@ static void write_member_type(FILE *file, const type_t *cont, } else if (is_ptr(type) || is_conformant_array(type)) { - unsigned char fc = (cont->type == RPC_FC_BOGUS_STRUCT + unsigned char fc = (get_struct_type(cont) == RPC_FC_BOGUS_STRUCT ? RPC_FC_POINTER : RPC_FC_LONG); print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc)); @@ -1087,7 +1276,7 @@ static void write_end(FILE *file, unsigned int *tfsoff) static void write_descriptors(FILE *file, type_t *type, unsigned int *tfsoff) { unsigned int offset = 0; - var_list_t *fs = type->fields_or_args; + var_list_t *fs = type_struct_get_fields(type); var_t *f; if (fs) LIST_FOR_EACH_ENTRY(f, fs, var_t, entry) @@ -1164,7 +1353,7 @@ static int write_no_repeat_pointer_descriptions( if (is_non_complex_struct(type)) { const var_t *v; - LIST_FOR_EACH_ENTRY( v, type->fields_or_args, const var_t, entry ) + LIST_FOR_EACH_ENTRY( v, type_struct_get_fields(type), const var_t, entry ) { if (offset_in_memory && offset_in_buffer) { @@ -1242,7 +1431,7 @@ static int write_pointer_description_offsets( { /* otherwise search for interesting fields to parse */ const var_t *v; - LIST_FOR_EACH_ENTRY( v, type->fields_or_args, const var_t, entry ) + LIST_FOR_EACH_ENTRY( v, type_struct_get_fields(type), const var_t, entry ) { if (offset_in_memory && offset_in_buffer) { @@ -1284,8 +1473,9 @@ static int write_fixed_array_pointer_descriptions( { unsigned int align; int pointer_count = 0; + int real_type = get_array_type( type ); - if (type->type == RPC_FC_SMFARRAY || type->type == RPC_FC_LGFARRAY) + if (real_type == RPC_FC_SMFARRAY || real_type == RPC_FC_LGFARRAY) { unsigned int temp = 0; /* unfortunately, this needs to be done in two passes to avoid @@ -1317,7 +1507,7 @@ static int write_fixed_array_pointer_descriptions( else if (is_struct(type->type)) { const var_t *v; - LIST_FOR_EACH_ENTRY( v, type->fields_or_args, const var_t, entry ) + LIST_FOR_EACH_ENTRY( v, type_struct_get_fields(type), const var_t, entry ) { if (offset_in_memory && offset_in_buffer) { @@ -1436,7 +1626,7 @@ static int write_varying_array_pointer_descriptions( else if (is_struct(type->type)) { const var_t *v; - LIST_FOR_EACH_ENTRY( v, type->fields_or_args, const var_t, entry ) + LIST_FOR_EACH_ENTRY( v, type_struct_get_fields(type), const var_t, entry ) { if (offset_in_memory && offset_in_buffer) { @@ -1506,7 +1696,7 @@ static void write_pointer_description(FILE *file, type_t *type, if ((!type->declarray || !current_structure) && is_conformant_array(type)) write_conformant_array_pointer_descriptions( file, NULL, type, 0, typestring_offset); - else if (type->type == RPC_FC_CPSTRUCT) + else if (get_struct_type(type) == RPC_FC_CPSTRUCT) { unsigned int align = 0; type_t *carray = find_array_or_string_in_struct(type)->type; @@ -1625,6 +1815,7 @@ static size_t write_array_tfs(FILE *file, const attr_list_t *attrs, type_t *type unsigned int align = 0; size_t size; size_t start_offset; + int real_type; int has_pointer; int pointer_type = get_attrv(attrs, ATTR_POINTERTYPE); unsigned int baseoff @@ -1642,20 +1833,19 @@ static size_t write_array_tfs(FILE *file, const attr_list_t *attrs, type_t *type align = 0; size = type_memsize((is_conformant_array(type) ? type->ref : type), &align); + real_type = get_array_type( type ); start_offset = *typestring_offset; update_tfsoff(type, start_offset, file); print_start_tfs_comment(file, type, start_offset); - print_file(file, 2, "0x%02x,\t/* %s */\n", type->type, string_of_type(type->type)); + print_file(file, 2, "0x%02x,\t/* %s */\n", real_type, string_of_type(real_type)); print_file(file, 2, "0x%x,\t/* %d */\n", align - 1, align - 1); *typestring_offset += 2; align = 0; - if (type->type != RPC_FC_BOGUS_ARRAY) + if (real_type != RPC_FC_BOGUS_ARRAY) { - unsigned char tc = type->type; - - if (tc == RPC_FC_LGFARRAY || tc == RPC_FC_LGVARRAY) + if (real_type == RPC_FC_LGFARRAY || real_type == RPC_FC_LGVARRAY) { print_file(file, 2, "NdrFcLong(0x%x),\t/* %lu */\n", size, size); *typestring_offset += 4; @@ -1671,12 +1861,12 @@ static size_t write_array_tfs(FILE *file, const attr_list_t *attrs, type_t *type += write_conf_or_var_desc(file, current_structure, baseoff, type, size_is); - if (type->type == RPC_FC_SMVARRAY || type->type == RPC_FC_LGVARRAY) + if (real_type == RPC_FC_SMVARRAY || real_type == RPC_FC_LGVARRAY) { unsigned int elalign = 0; size_t elsize = type_memsize(type->ref, &elalign); - if (type->type == RPC_FC_LGVARRAY) + if (real_type == RPC_FC_LGVARRAY) { print_file(file, 2, "NdrFcLong(0x%x),\t/* %lu */\n", type->dim, type->dim); *typestring_offset += 4; @@ -1729,19 +1919,22 @@ static size_t write_array_tfs(FILE *file, const attr_list_t *attrs, type_t *type static const var_t *find_array_or_string_in_struct(const type_t *type) { + const var_list_t *fields = type_struct_get_fields(type); const var_t *last_field; const type_t *ft; + int real_type; - if (!type->fields_or_args || list_empty(type->fields_or_args)) + if (!fields || list_empty(fields)) return NULL; - last_field = LIST_ENTRY( list_tail(type->fields_or_args), const var_t, entry ); + last_field = LIST_ENTRY( list_tail(fields), const var_t, entry ); ft = last_field->type; if (ft->declarray && is_conformant_array(ft)) return last_field; - if (ft->type == RPC_FC_CSTRUCT || ft->type == RPC_FC_CPSTRUCT || ft->type == RPC_FC_CVSTRUCT) + real_type = get_struct_type( type ); + if (real_type == RPC_FC_CSTRUCT || real_type == RPC_FC_CPSTRUCT || real_type == RPC_FC_CVSTRUCT) return find_array_or_string_in_struct(ft); else return NULL; @@ -1754,8 +1947,9 @@ static void write_struct_members(FILE *file, const type_t *type, unsigned short offset = 0; int salign = -1; int padding; + var_list_t *fields = type_struct_get_fields(type); - if (type->fields_or_args) LIST_FOR_EACH_ENTRY( field, type->fields_or_args, const var_t, entry ) + if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) { type_t *ft = field->type; if (!ft->declarray || !is_conformant_array(ft)) @@ -1812,6 +2006,8 @@ static size_t write_struct_tfs(FILE *file, type_t *type, unsigned int align = 0; unsigned int corroff; var_t *f; + int real_type = get_struct_type( type ); + var_list_t *fields = type_struct_get_fields(type); guard_rec(type); current_structure = type; @@ -1821,7 +2017,7 @@ static size_t write_struct_tfs(FILE *file, type_t *type, error("structure size for %s exceeds %d bytes by %d bytes\n", name, USHRT_MAX, total_size - USHRT_MAX); - if (type->fields_or_args) LIST_FOR_EACH_ENTRY(f, type->fields_or_args, var_t, entry) + if (fields) LIST_FOR_EACH_ENTRY(f, fields, var_t, entry) has_pointers |= write_embedded_types(file, f->attrs, f->type, f->name, FALSE, tfsoff); if (!has_pointers) has_pointers = type_has_pointers(type); @@ -1829,7 +2025,7 @@ static size_t write_struct_tfs(FILE *file, type_t *type, array = find_array_or_string_in_struct(type); if (array && !processed(array->type)) array_offset - = is_attr(array->attrs, ATTR_STRING) + = is_string_type(array->attrs, array->type) ? write_string_tfs(file, array->attrs, array->type, array->name, tfsoff) : write_array_tfs(file, array->attrs, array->type, array->name, tfsoff); @@ -1839,7 +2035,7 @@ static size_t write_struct_tfs(FILE *file, type_t *type, start_offset = *tfsoff; update_tfsoff(type, start_offset, file); print_start_tfs_comment(file, type, start_offset); - print_file(file, 2, "0x%x,\t/* %s */\n", type->type, string_of_type(type->type)); + print_file(file, 2, "0x%x,\t/* %s */\n", real_type, string_of_type(real_type)); print_file(file, 2, "0x%x,\t/* %d */\n", align - 1, align - 1); print_file(file, 2, "NdrFcShort(0x%x),\t/* %d */\n", total_size, total_size); *tfsoff += 4; @@ -1852,13 +2048,13 @@ static size_t write_struct_tfs(FILE *file, type_t *type, reloff, reloff, absoff); *tfsoff += 2; } - else if (type->type == RPC_FC_BOGUS_STRUCT) + else if (real_type == RPC_FC_BOGUS_STRUCT) { print_file(file, 2, "NdrFcShort(0x0),\n"); *tfsoff += 2; } - if (type->type == RPC_FC_BOGUS_STRUCT) + if (real_type == RPC_FC_BOGUS_STRUCT) { /* On the sizing pass, type->ptrdesc may be zero, but it's ok as nothing is written to file yet. On the actual writing pass, @@ -1870,9 +2066,9 @@ static size_t write_struct_tfs(FILE *file, type_t *type, reloff, reloff, absoff); *tfsoff += 2; } - else if ((type->type == RPC_FC_PSTRUCT) || - (type->type == RPC_FC_CPSTRUCT) || - (type->type == RPC_FC_CVSTRUCT && has_pointers)) + else if ((real_type == RPC_FC_PSTRUCT) || + (real_type == RPC_FC_CPSTRUCT) || + (real_type == RPC_FC_CVSTRUCT && has_pointers)) { print_file(file, 2, "0x%x, /* FC_PP */\n", RPC_FC_PP); print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); @@ -1884,13 +2080,12 @@ static size_t write_struct_tfs(FILE *file, type_t *type, write_struct_members(file, type, &corroff, tfsoff); - if (type->type == RPC_FC_BOGUS_STRUCT) + if (real_type == RPC_FC_BOGUS_STRUCT) { - const var_list_t *fs = type->fields_or_args; const var_t *f; type->ptrdesc = *tfsoff; - if (fs) LIST_FOR_EACH_ENTRY(f, fs, const var_t, entry) + if (fields) LIST_FOR_EACH_ENTRY(f, fields, const var_t, entry) { type_t *ft = f->type; if (is_ptr(ft)) @@ -1994,13 +2189,7 @@ static size_t write_union_tfs(FILE *file, type_t *type, unsigned int *tfsoff) guard_rec(type); - if (type->type == RPC_FC_ENCAPSULATED_UNION) - { - const var_t *uv = LIST_ENTRY(list_tail(type->fields_or_args), const var_t, entry); - fields = uv->type->fields_or_args; - } - else - fields = type->fields_or_args; + fields = type_union_get_cases(type); if (fields) LIST_FOR_EACH_ENTRY(f, fields, var_t, entry) { @@ -2016,7 +2205,7 @@ static size_t write_union_tfs(FILE *file, type_t *type, unsigned int *tfsoff) print_start_tfs_comment(file, type, start_offset); if (type->type == RPC_FC_ENCAPSULATED_UNION) { - const var_t *sv = LIST_ENTRY(list_head(type->fields_or_args), const var_t, entry); + const var_t *sv = type_union_get_switch_value(type); const type_t *st = sv->type; switch (st->type) @@ -2474,7 +2663,7 @@ static unsigned int get_required_buffer_size_type( } else { - switch (type->type) + switch (get_struct_type(type)) { case RPC_FC_BYTE: case RPC_FC_CHAR: @@ -2508,12 +2697,12 @@ static unsigned int get_required_buffer_size_type( return 0; case RPC_FC_STRUCT: - if (!type->fields_or_args) return 0; - return fields_memsize(type->fields_or_args, alignment); + if (!type_struct_get_fields(type)) return 0; + return fields_memsize(type_struct_get_fields(type), alignment); case RPC_FC_RP: return - is_base_type( type->ref->type ) || type->ref->type == RPC_FC_STRUCT + is_base_type( type->ref->type ) || get_struct_type(type->ref) == RPC_FC_STRUCT ? get_required_buffer_size_type( type->ref, name, alignment ) : 0; @@ -2833,7 +3022,7 @@ static void write_remoting_arg(FILE *file, int indent, const func_t *func, const } write_parameter_conf_or_var_exprs(file, indent, local_var_prefix, phase, var); - rtype = type->type; + rtype = get_struct_type(type); if (is_context_handle(type)) { @@ -2899,7 +3088,7 @@ static void write_remoting_arg(FILE *file, int indent, const func_t *func, const } else if (is_array(type)) { - unsigned char tc = type->type; + unsigned char tc = get_array_type( type ); const char *array_type = "FixedArray"; /* We already have the size_is expression since it's at the @@ -2929,10 +3118,10 @@ static void write_remoting_arg(FILE *file, int indent, const func_t *func, const if (phase == PHASE_FREE && pointer_type == RPC_FC_RP) { /* these are all unmarshalled by allocating memory */ - if (type->type == RPC_FC_BOGUS_ARRAY || - type->type == RPC_FC_CVARRAY || - ((type->type == RPC_FC_SMVARRAY || type->type == RPC_FC_LGVARRAY) && in_attr) || - (type->type == RPC_FC_CARRAY && !in_attr)) + if (tc == RPC_FC_BOGUS_ARRAY || + tc == RPC_FC_CVARRAY || + ((tc == RPC_FC_SMVARRAY || tc == RPC_FC_LGVARRAY) && in_attr) || + (tc == RPC_FC_CARRAY && !in_attr)) { print_file(file, indent, "if (%s%s)\n", local_var_prefix, var->name); indent++; @@ -2975,7 +3164,7 @@ static void write_remoting_arg(FILE *file, int indent, const func_t *func, const if (phase != PHASE_FREE) print_phase_basetype(file, indent, local_var_prefix, phase, pass, var, var->name); } - else if (type->type == RPC_FC_RP && ref->type == RPC_FC_STRUCT && + else if (type->type == RPC_FC_RP && get_struct_type(ref) == RPC_FC_STRUCT && !is_user_type(ref)) { if (phase != PHASE_BUFFERSIZE && phase != PHASE_FREE) @@ -3102,7 +3291,7 @@ void declare_stub_args( FILE *file, int indent, const func_t *func ) LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) { - int is_string = is_attr(var->attrs, ATTR_STRING); + int is_string = is_string_type(var->attrs, var->type); in_attr = is_attr(var->attrs, ATTR_IN); out_attr = is_attr(var->attrs, ATTR_OUT); @@ -3149,7 +3338,7 @@ void assign_stub_out_args( FILE *file, int indent, const func_t *func, const cha LIST_FOR_EACH_ENTRY( var, func->args, const var_t, entry ) { - int is_string = is_attr(var->attrs, ATTR_STRING); + int is_string = is_string_type(var->attrs, var->type); in_attr = is_attr(var->attrs, ATTR_IN); out_attr = is_attr(var->attrs, ATTR_OUT); if (!out_attr && !in_attr) diff --git a/tools/widl/typelib.c b/tools/widl/typelib.c index 27068705d30..446f9a5ae98 100644 --- a/tools/widl/typelib.c +++ b/tools/widl/typelib.c @@ -46,8 +46,6 @@ #include "widltypes.h" #include "typelib_struct.h" -int in_typelib = 0; - static typelib_t *typelib; type_t *duptype(type_t *t, int dupname) @@ -246,7 +244,6 @@ unsigned short get_type_vt(type_t *t) void start_typelib(typelib_t *typelib_type) { - in_typelib++; if (!do_typelib) return; typelib = typelib_type; @@ -255,23 +252,11 @@ void start_typelib(typelib_t *typelib_type) void end_typelib(void) { - in_typelib--; if (!typelib) return; create_msft_typelib(typelib); } -void add_typelib_entry(type_t *t) -{ - typelib_entry_t *entry; - if (!typelib) return; - - chat("add kind %i: %s\n", t->kind, t->name); - entry = xmalloc(sizeof(*entry)); - entry->type = t; - list_add_tail( &typelib->entries, &entry->entry ); -} - static void tlb_read(int fd, void *buf, int count) { if(read(fd, buf, count) < count) diff --git a/tools/widl/typelib.h b/tools/widl/typelib.h index 486dbb49e3e..58bad43f2e3 100644 --- a/tools/widl/typelib.h +++ b/tools/widl/typelib.h @@ -21,10 +21,8 @@ #ifndef __WIDL_TYPELIB_H #define __WIDL_TYPELIB_H -extern int in_typelib; extern void start_typelib(typelib_t *typelib_type); extern void end_typelib(void); -extern void add_typelib_entry(type_t *t); extern void add_importlib(const char *name); /* Copied from wtypes.h. Not included directly because that would create a diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c new file mode 100644 index 00000000000..2b56bb8e6ff --- /dev/null +++ b/tools/widl/typetree.c @@ -0,0 +1,98 @@ +/* + * IDL Type Tree + * + * Copyright 2008 Robert Shearman + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" + +#include +#include + +#include "widl.h" +#include "utils.h" +#include "parser.h" +#include "typetree.h" +#include "header.h" + +type_t *type_new_function(var_list_t *args) +{ + type_t *t = make_type(RPC_FC_FUNCTION, NULL); + t->details.function = xmalloc(sizeof(*t->details.function)); + t->details.function->args = args; + return t; +} + +type_t *type_new_pointer(type_t *ref, attr_list_t *attrs) +{ + type_t *t = make_type(pointer_default, ref); + t->attrs = attrs; + return t; +} + +static int compute_method_indexes(type_t *iface) +{ + int idx; + func_t *f; + + if (iface->ref) + idx = compute_method_indexes(iface->ref); + else + idx = 0; + + if (!iface->funcs) + return idx; + + LIST_FOR_EACH_ENTRY( f, iface->funcs, func_t, entry ) + if (! is_callas(f->def->attrs)) + f->idx = idx++; + + return idx; +} + +void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stmts) +{ + iface->ref = inherit; + iface->details.iface = xmalloc(sizeof(*iface->details.iface)); + iface->funcs = gen_function_list(stmts); + iface->details.iface->disp_props = NULL; + iface->details.iface->disp_methods = NULL; + iface->stmts = stmts; + iface->defined = TRUE; + check_functions(iface); + compute_method_indexes(iface); +} + +void type_dispinterface_define(type_t *iface, var_list_t *props, func_list_t *methods) +{ + iface->ref = find_type("IDispatch", 0); + if (!iface->ref) error_loc("IDispatch is undefined\n"); + iface->details.iface = xmalloc(sizeof(*iface->details.iface)); + iface->funcs = NULL; + iface->details.iface->disp_props = props; + iface->details.iface->disp_methods = methods; + iface->stmts = NULL; + iface->defined = TRUE; + check_functions(iface); + compute_method_indexes(iface); +} + +void type_dispinterface_define_from_iface(type_t *dispiface, type_t *iface) +{ + type_dispinterface_define(dispiface, iface->details.iface->disp_props, + iface->details.iface->disp_methods); +} diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h new file mode 100644 index 00000000000..99c0d2f911d --- /dev/null +++ b/tools/widl/typetree.h @@ -0,0 +1,107 @@ +/* + * IDL Type Tree + * + * Copyright 2008 Robert Shearman + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "widltypes.h" +#include + +#ifndef WIDL_TYPE_TREE_H +#define WIDL_TYPE_TREE_H + +type_t *type_new_function(var_list_t *args); +type_t *type_new_pointer(type_t *ref, attr_list_t *attrs); +void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stmts); +void type_dispinterface_define(type_t *iface, var_list_t *props, func_list_t *methods); +void type_dispinterface_define_from_iface(type_t *dispiface, type_t *iface); + +static inline var_list_t *type_struct_get_fields(const type_t *type) +{ + assert(is_struct(type->type)); + return type->details.structure->fields; +} + +static inline var_list_t *type_function_get_args(const type_t *type) +{ + assert(type->type == RPC_FC_FUNCTION); + return type->details.function->args; +} + +static inline var_list_t *type_enum_get_values(const type_t *type) +{ + assert(type->type == RPC_FC_ENUM16 || type->type == RPC_FC_ENUM32); + return type->details.enumeration->enums; +} + +static inline var_t *type_union_get_switch_value(const type_t *type) +{ + assert(type->type == RPC_FC_ENCAPSULATED_UNION); + return LIST_ENTRY(list_head(type->details.structure->fields), var_t, entry); +} + +static inline var_list_t *type_encapsulated_union_get_fields(const type_t *type) +{ + assert(type->type == RPC_FC_ENCAPSULATED_UNION); + return type->details.structure->fields; +} + +static inline var_list_t *type_union_get_cases(const type_t *type) +{ + assert(type->type == RPC_FC_ENCAPSULATED_UNION || + type->type == RPC_FC_NON_ENCAPSULATED_UNION); + if (type->type == RPC_FC_ENCAPSULATED_UNION) + { + const var_t *uv = LIST_ENTRY(list_tail(type->details.structure->fields), const var_t, entry); + return uv->type->details.structure->fields; + } + else + return type->details.structure->fields; +} + +static inline var_list_t *type_dispiface_get_props(const type_t *type) +{ + assert(type->type == RPC_FC_IP); + return type->details.iface->disp_props; +} + +static inline var_list_t *type_dispiface_get_methods(const type_t *type) +{ + assert(type->type == RPC_FC_IP); + return type->details.iface->disp_methods; +} + +static inline int type_is_defined(const type_t *type) +{ + return type->defined; +} + +static inline int type_is_complete(const type_t *type) +{ + if (type->type == RPC_FC_FUNCTION) + return (type->details.function != NULL); + else if (type->type == RPC_FC_IP) + return (type->details.iface != NULL); + else if (type->type == RPC_FC_ENUM16 || type->type == RPC_FC_ENUM32) + return (type->details.enumeration != NULL); + else if (is_struct(type->type) || is_union(type->type)) + return (type->details.structure != NULL); + else + return TRUE; +} + +#endif /* WIDL_TYPE_TREE_H */ diff --git a/tools/widl/widl.c b/tools/widl/widl.c index 9b14de20fe4..ab1572611b3 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -78,6 +78,8 @@ static const char usage[] = " -U file Name of interface identifiers file (default is infile_i.c)\n" " -V Print version and exit\n" " -W Enable pedantic warnings\n" +" --win32 Only generate 32-bit code\n" +" --win64 Only generate 64-bit code\n" "Debug level 'n' is a bitmask with following meaning:\n" " * 0x01 Tell which resource is parsed (verbose mode)\n" " * 0x02 Dump internal structures\n" @@ -106,6 +108,8 @@ int do_idfile = 0; int do_dlldata = 0; int no_preprocess = 0; int old_names = 0; +int do_win32 = 1; +int do_win64 = 1; char *input_name; char *header_name; @@ -128,10 +132,10 @@ const char *prefix_server = ""; int line_number = 1; FILE *header; -FILE *local_stubs; -FILE *proxy; FILE *idfile; +size_t pointer_size = 0; + time_t now; enum { @@ -141,7 +145,9 @@ enum { LOCAL_STUBS_OPTION, PREFIX_ALL_OPTION, PREFIX_CLIENT_OPTION, - PREFIX_SERVER_OPTION + PREFIX_SERVER_OPTION, + WIN32_OPTION, + WIN64_OPTION }; static const char short_options[] = @@ -154,6 +160,8 @@ static const struct option long_options[] = { { "prefix-all", 1, 0, PREFIX_ALL_OPTION }, { "prefix-client", 1, 0, PREFIX_CLIENT_OPTION }, { "prefix-server", 1, 0, PREFIX_SERVER_OPTION }, + { "win32", 0, 0, WIN32_OPTION }, + { "win64", 0, 0, WIN64_OPTION }, { 0, 0, 0, 0 } }; @@ -205,14 +213,14 @@ static void set_everything(int x) do_dlldata = x; } -static void start_cplusplus_guard(FILE *fp) +void start_cplusplus_guard(FILE *fp) { fprintf(fp, "#ifdef __cplusplus\n"); fprintf(fp, "extern \"C\" {\n"); fprintf(fp, "#endif\n\n"); } -static void end_cplusplus_guard(FILE *fp) +void end_cplusplus_guard(FILE *fp) { fprintf(fp, "#ifdef __cplusplus\n"); fprintf(fp, "}\n"); @@ -333,6 +341,65 @@ void write_dlldata(const statement_list_t *stmts) free_filename_nodes(&filenames); } +static void write_id_data_stmts(const statement_list_t *stmts) +{ + const statement_t *stmt; + if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) + { + if (stmt->type == STMT_TYPE) + { + const type_t *type = stmt->u.type; + if (type->type == RPC_FC_IP) + { + const UUID *uuid; + if (!is_object(type->attrs) && !is_attr(type->attrs, ATTR_DISPINTERFACE)) + continue; + uuid = get_attrp(type->attrs, ATTR_UUID); + write_guid(idfile, is_attr(type->attrs, ATTR_DISPINTERFACE) ? "DIID" : "IID", + type->name, uuid); + } + else if (type->type == RPC_FC_COCLASS) + { + const UUID *uuid = get_attrp(type->attrs, ATTR_UUID); + write_guid(idfile, "CLSID", type->name, uuid); + } + } + else if (stmt->type == STMT_LIBRARY) + { + const UUID *uuid = get_attrp(stmt->u.lib->attrs, ATTR_UUID); + write_guid(idfile, "LIBID", stmt->u.lib->name, uuid); + write_id_data_stmts(stmt->u.lib->stmts); + } + } +} + +void write_id_data(const statement_list_t *stmts) +{ + if (!do_idfile) return; + + idfile_token = make_token(idfile_name); + + idfile = fopen(idfile_name, "w"); + if (! idfile) { + error("Could not open %s for output\n", idfile_name); + return; + } + + fprintf(idfile, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION); + fprintf(idfile, "from %s - Do not edit ***/\n\n", input_name); + fprintf(idfile, "#include \n"); + fprintf(idfile, "#include \n\n"); + fprintf(idfile, "#include \n\n"); + start_cplusplus_guard(idfile); + + write_id_data_stmts(stmts); + + fprintf(idfile, "\n"); + end_cplusplus_guard(idfile); + + fclose(idfile); +} + int main(int argc,char *argv[]) { extern char* optarg; @@ -375,6 +442,14 @@ int main(int argc,char *argv[]) case PREFIX_SERVER_OPTION: prefix_server = xstrdup(optarg); break; + case WIN32_OPTION: + do_win32 = 1; + do_win64 = 0; + break; + case WIN64_OPTION: + do_win32 = 0; + do_win64 = 1; + break; case 'c': do_everything = 0; do_client = 1; @@ -551,77 +626,11 @@ int main(int argc,char *argv[]) } } - if(do_header) { - header_token = make_token(header_name); - - if(!(header = fopen(header_name, "w"))) { - fprintf(stderr, "Could not open %s for output\n", header_name); - return 1; - } - fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", PACKAGE_VERSION, input_name); - fprintf(header, "#include \n" ); - fprintf(header, "#include \n\n" ); - fprintf(header, "#ifndef __WIDL_%s\n", header_token); - fprintf(header, "#define __WIDL_%s\n", header_token); - start_cplusplus_guard(header); - } - - if (local_stubs_name) { - local_stubs = fopen(local_stubs_name, "w"); - if (!local_stubs) { - fprintf(stderr, "Could not open %s for output\n", local_stubs_name); - return 1; - } - fprintf(local_stubs, "/* call_as/local stubs for %s */\n\n", input_name); - fprintf(local_stubs, "#include \n"); - fprintf(local_stubs, "#include \"%s\"\n\n", header_name); - } - - if (do_idfile) { - idfile_token = make_token(idfile_name); - - idfile = fopen(idfile_name, "w"); - if (! idfile) { - fprintf(stderr, "Could not open %s for output\n", idfile_name); - return 1; - } - - fprintf(idfile, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION); - fprintf(idfile, "from %s - Do not edit ***/\n\n", input_name); - fprintf(idfile, "#include \n"); - fprintf(idfile, "#include \n\n"); - fprintf(idfile, "#include \n\n"); - start_cplusplus_guard(idfile); - } + header_token = make_token(header_name); init_types(); ret = parser_parse(); - if(do_header) { - fprintf(header, "/* Begin additional prototypes for all interfaces */\n"); - fprintf(header, "\n"); - write_user_types(); - write_generic_handle_routines(); - write_context_handle_rundowns(); - fprintf(header, "\n"); - fprintf(header, "/* End additional prototypes */\n"); - fprintf(header, "\n"); - end_cplusplus_guard(header); - fprintf(header, "#endif /* __WIDL_%s */\n", header_token); - fclose(header); - } - - if (local_stubs) { - fclose(local_stubs); - } - - if (do_idfile) { - fprintf(idfile, "\n"); - end_cplusplus_guard(idfile); - - fclose(idfile); - } - fclose(parser_in); if(ret) { diff --git a/tools/widl/widl.h b/tools/widl/widl.h index f08a9ae326a..d8c945ff524 100644 --- a/tools/widl/widl.h +++ b/tools/widl/widl.h @@ -45,9 +45,12 @@ extern int do_server; extern int do_idfile; extern int do_dlldata; extern int old_names; +extern int do_win32; +extern int do_win64; extern char *input_name; extern char *header_name; +extern char *header_token; extern char *local_stubs_name; extern char *typelib_name; extern char *dlldata_name; @@ -59,18 +62,21 @@ extern char *server_name; extern char *server_token; extern const char *prefix_client; extern const char *prefix_server; +extern size_t pointer_size; extern time_t now; extern int line_number; extern int char_number; -extern FILE* header; -extern FILE* local_stubs; -extern FILE* idfile; - +extern void write_header(const statement_list_t *stmts); +extern void write_id_data(const statement_list_t *stmts); extern void write_proxies(const statement_list_t *stmts); extern void write_client(const statement_list_t *stmts); extern void write_server(const statement_list_t *stmts); +extern void write_local_stubs(const statement_list_t *stmts); extern void write_dlldata(const statement_list_t *stmts); +extern void start_cplusplus_guard(FILE *fp); +extern void end_cplusplus_guard(FILE *fp); + #endif diff --git a/tools/widl/widl.man.in b/tools/widl/widl.man.in index df7d1c0724a..e2752929c7d 100644 --- a/tools/widl/widl.man.in +++ b/tools/widl/widl.man.in @@ -74,6 +74,10 @@ Prefix to put on the name of server stubs. Generate server stub. .IP "\fB-S \fIfile\fR" Name of server stub file (default is \fIinfile\fR_s.c) +.IP "\fB--win32, --win64\fR" +Only generate 32-bit, respectively 64-bit code (the default is to +generate both 32-bit and 64-bit versions into the same destination +file). .PP .B Dlldata file options: .IP "\fB--dlldata=\fIfile\fR" diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index d00a73255ca..2ae856c827e 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -22,6 +22,7 @@ #define __WIDL_WIDLTYPES_H #include +#include #include "guiddef.h" #include "wine/rpcfc.h" #include "wine/list.h" @@ -259,14 +260,42 @@ struct _expr_t { struct list entry; }; +struct struct_details +{ + var_list_t *fields; +}; + +struct enumeration_details +{ + var_list_t *enums; +}; + +struct func_details +{ + var_list_t *args; +}; + +struct iface_details +{ + func_list_t *disp_methods; + var_list_t *disp_props; +}; + struct _type_t { const char *name; enum type_kind kind; unsigned char type; struct _type_t *ref; attr_list_t *attrs; + union + { + struct struct_details *structure; + struct enumeration_details *enumeration; + struct func_details *function; + struct iface_details *iface; + } details; func_list_t *funcs; /* interfaces and modules */ - var_list_t *fields_or_args; /* interfaces, structures, enumerations and functions (for args) */ + statement_list_t *stmts; /* interfaces and modules */ ifref_list_t *ifaces; /* coclasses */ unsigned long dim; /* array dimension */ expr_t *size_is, *length_is; @@ -311,7 +340,7 @@ struct _declarator_t { struct _func_t { var_t *def; var_list_t *args; - int ignore, idx; + int idx; /* parser-internal */ struct list entry; @@ -359,7 +388,6 @@ struct _typelib_t { char *name; char *filename; const attr_list_t *attrs; - struct list entries; struct list importlibs; statement_list_t *stmts; }; @@ -396,6 +424,7 @@ void check_for_additional_prototype_types(const var_list_t *list); void init_types(void); type_t *alloc_type(void); void set_all_tfswrite(int val); +void clear_all_offsets(void); type_t *duptype(type_t *t, int dupname); type_t *alias(type_t *t, const char *name); diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 30ed2510a36..fd237dcfc17 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -51,6 +51,7 @@ #include "utils.h" #include "header.h" #include "hash.h" +#include "typetree.h" enum MSFT_segment_index { MSFT_SEG_TYPEINFO = 0, /* type information */ @@ -1968,14 +1969,14 @@ static void add_dispinterface_typeinfo(msft_typelib_t *typelib, type_t *dispinte if (dispinterface->funcs) LIST_FOR_EACH_ENTRY( func, dispinterface->funcs, const func_t, entry ) idx++; - if (dispinterface->fields_or_args) - LIST_FOR_EACH_ENTRY( var, dispinterface->fields_or_args, var_t, entry ) + if (type_dispiface_get_props(dispinterface)) + LIST_FOR_EACH_ENTRY( var, type_dispiface_get_props(dispinterface), var_t, entry ) add_var_desc(msft_typeinfo, idx++, var); - if (dispinterface->funcs) + if (type_dispiface_get_methods(dispinterface)) { idx = 0; - LIST_FOR_EACH_ENTRY( func, dispinterface->funcs, const func_t, entry ) + LIST_FOR_EACH_ENTRY( func, type_dispiface_get_methods(dispinterface), const func_t, entry ) if(add_func_desc(msft_typeinfo, func, idx) == S_OK) idx++; } @@ -2052,8 +2053,8 @@ static void add_structure_typeinfo(msft_typelib_t *typelib, type_t *structure) msft_typeinfo = create_msft_typeinfo(typelib, TKIND_RECORD, structure->name, structure->attrs); msft_typeinfo->typeinfo->size = 0; - if (structure->fields_or_args) - LIST_FOR_EACH_ENTRY( cur, structure->fields_or_args, var_t, entry ) + if (type_struct_get_fields(structure)) + LIST_FOR_EACH_ENTRY( cur, type_struct_get_fields(structure), var_t, entry ) add_var_desc(msft_typeinfo, idx++, cur); } @@ -2067,8 +2068,8 @@ static void add_enum_typeinfo(msft_typelib_t *typelib, type_t *enumeration) msft_typeinfo = create_msft_typeinfo(typelib, TKIND_ENUM, enumeration->name, enumeration->attrs); msft_typeinfo->typeinfo->size = 0; - if (enumeration->fields_or_args) - LIST_FOR_EACH_ENTRY( cur, enumeration->fields_or_args, var_t, entry ) + if (type_enum_get_values(enumeration)) + LIST_FOR_EACH_ENTRY( cur, type_enum_get_values(enumeration), var_t, entry ) add_var_desc(msft_typeinfo, idx++, cur); } @@ -2190,37 +2191,65 @@ static void add_module_typeinfo(msft_typelib_t *typelib, type_t *module) msft_typeinfo->typeinfo->size = idx; } -static void add_entry(msft_typelib_t *typelib, typelib_entry_t *entry) +static void add_type_typeinfo(msft_typelib_t *typelib, type_t *type) { - switch(entry->type->kind) { + switch (type->kind) { case TKIND_INTERFACE: case TKIND_DISPATCH: - add_interface_typeinfo(typelib, entry->type); + add_interface_typeinfo(typelib, type); break; - case TKIND_RECORD: - add_structure_typeinfo(typelib, entry->type); + add_structure_typeinfo(typelib, type); break; - case TKIND_ENUM: - add_enum_typeinfo(typelib, entry->type); + add_enum_typeinfo(typelib, type); break; - - case TKIND_ALIAS: - add_typedef_typeinfo(typelib, entry->type); - break; - case TKIND_COCLASS: - add_coclass_typeinfo(typelib, entry->type); + add_coclass_typeinfo(typelib, type); break; - - case TKIND_MODULE: - add_module_typeinfo(typelib, entry->type); + case TKIND_PRIMITIVE: break; - default: - error("add_entry: unhandled type %d\n", entry->type->kind); + error("add_entry: unhandled type %d for %s\n", type->kind, type->name); + break; + } +} + +static void add_entry(msft_typelib_t *typelib, const statement_t *stmt) +{ + switch(stmt->type) { + case STMT_LIBRARY: + case STMT_IMPORT: + case STMT_CPPQUOTE: + case STMT_DECLARATION: + /* not included in typelib */ + break; + case STMT_IMPORTLIB: + /* not processed here */ + break; + case STMT_TYPEDEF: + { + const type_list_t *type_entry = stmt->u.type_list; + for (; type_entry; type_entry = type_entry->next) { + /* if the type is public then add the typedef, otherwise attempt + * to add the aliased type */ + if (is_attr(type_entry->type->attrs, ATTR_PUBLIC)) + add_typedef_typeinfo(typelib, type_entry->type); + else + add_type_typeinfo(typelib, type_entry->type->orig); + } + break; + } + case STMT_MODULE: + add_module_typeinfo(typelib, stmt->u.type); break; + case STMT_TYPE: + case STMT_TYPEREF: + { + type_t *type = stmt->u.type; + add_type_typeinfo(typelib, type); + break; + } } } @@ -2496,7 +2525,7 @@ int create_msft_typelib(typelib_t *typelib) { msft_typelib_t *msft; int failed = 0; - typelib_entry_t *entry; + const statement_t *stmt; time_t cur_time; char *time_override; unsigned int version = 5 << 24 | 1 << 16 | 164; /* 5.01.0164 */ @@ -2549,8 +2578,9 @@ int create_msft_typelib(typelib_t *typelib) set_custdata(msft, &midl_time_guid, VT_UI4, &cur_time, &msft->typelib_header.CustomDataOffset); set_custdata(msft, &midl_version_guid, VT_UI4, &version, &msft->typelib_header.CustomDataOffset); - LIST_FOR_EACH_ENTRY( entry, &typelib->entries, typelib_entry_t, entry ) - add_entry(msft, entry); + if (typelib->stmts) + LIST_FOR_EACH_ENTRY( stmt, typelib->stmts, const statement_t, entry ) + add_entry(msft, stmt); save_all_changes(msft); free(msft); diff --git a/tools/wine.inf.in b/tools/wine.inf.in index a95f1a8119f..5b1d99034ff 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -2262,6 +2262,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,dosx.exe 11,,dsound.dll 11,,dsound.vxd +11,,dxdiagn.dll 11,,gdi32.dll 11,,glu32.dll 11,,hal.dll diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 4d52626c747..dca18abefe5 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -971,22 +971,22 @@ static void output_delayed_import_thunks( const DLLSPEC *spec ) output( "\tjmp *%%eax\n" ); break; case CPU_x86_64: - output( "\tpushq %%rdi\n" ); - output( "\tpushq %%rsi\n" ); output( "\tpushq %%rdx\n" ); output( "\tpushq %%rcx\n" ); output( "\tpushq %%r8\n" ); output( "\tpushq %%r9\n" ); - output( "\tsubq $32,%%rsp\n" ); - output( "\tmovq %%r11,%%rcx\n" ); + output( "\tpushq %%r10\n" ); + output( "\tpushq %%r11\n" ); + output( "\tsubq $40,%%rsp\n" ); + output( "\tmovq %%rax,%%rcx\n" ); output( "\tcall %s\n", asm_name("__wine_spec_delay_load") ); - output( "\taddq $32,%%rsp\n" ); + output( "\taddq $40,%%rsp\n" ); + output( "\tpopq %%r11\n" ); + output( "\tpopq %%r10\n" ); output( "\tpopq %%r9\n" ); output( "\tpopq %%r8\n" ); output( "\tpopq %%rcx\n" ); output( "\tpopq %%rdx\n" ); - output( "\tpopq %%rsi\n" ); - output( "\tpopq %%rdi\n" ); output( "\tjmp *%%rax\n" ); break; case CPU_SPARC: @@ -1069,7 +1069,7 @@ static void output_delayed_import_thunks( const DLLSPEC *spec ) output( "\tjmp %s\n", asm_name("__wine_delay_load_asm") ); break; case CPU_x86_64: - output( "\tmovq $%d,%%r11\n", (idx << 16) | j ); + output( "\tmovq $%d,%%rax\n", (idx << 16) | j ); output( "\tjmp %s\n", asm_name("__wine_delay_load_asm") ); break; case CPU_SPARC: diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c index 4ec0dbfb2f3..a1c7970520f 100644 --- a/tools/winebuild/relay.c +++ b/tools/winebuild/relay.c @@ -975,6 +975,12 @@ void BuildRelays16(void) output( "%s\n\t.long 0\n", asm_globl("CallTo16_DataSelector") ); output( "%s\n\t.long 0\n", asm_globl("CallTo16_TebSelector") ); if (UsePIC) output( "wine_ldt_copy_ptr:\t.long %s\n", asm_name("wine_ldt_copy") ); + + output( "\t.text\n" ); + output( "%s:\n\n", asm_name("__wine_spec_thunk_text_32") ); + BuildCallFrom32Regs(); + output_function_size( "__wine_spec_thunk_text_32" ); + output_gnu_stack_note(); } diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 276639e4f00..9cf60c3f15c 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -53,7 +53,7 @@ int has_relays( DLLSPEC *spec ) { int i; - if (target_cpu != CPU_x86) return 0; + if (target_cpu != CPU_x86 && target_cpu != CPU_x86_64) return 0; for (i = spec->base; i <= spec->limit; i++) { @@ -125,36 +125,59 @@ static void output_relay_debug( DLLSPEC *spec ) output( "\t.align %d\n", get_alignment(4) ); output( ".L__wine_spec_relay_entry_point_%d:\n", i ); - if (odp->flags & FLAG_REGISTER) - output( "\tpushl %%eax\n" ); - else - output( "\tpushl %%esp\n" ); - args = strlen(odp->u.func.arg_types); flags = 0; - if (odp->flags & FLAG_RET64) flags |= 1; - if (odp->type == TYPE_STDCALL) flags |= 2; - output( "\tpushl $%u\n", (flags << 24) | (args << 16) | (i - spec->base) ); - if (UsePIC) + switch (target_cpu) { - output( "\tcall %s\n", asm_name("__wine_spec_get_pc_thunk_eax") ); - output( "1:\tleal .L__wine_spec_relay_descr-1b(%%eax),%%eax\n" ); - } - else output( "\tmovl $.L__wine_spec_relay_descr,%%eax\n" ); - output( "\tpushl %%eax\n" ); + case CPU_x86: + if (odp->flags & FLAG_REGISTER) + output( "\tpushl %%eax\n" ); + else + output( "\tpushl %%esp\n" ); - if (odp->flags & FLAG_REGISTER) - { - output( "\tcall *8(%%eax)\n" ); - } - else - { - output( "\tcall *4(%%eax)\n" ); - if (odp->type == TYPE_STDCALL) - output( "\tret $%u\n", args * get_ptr_size() ); + if (odp->flags & FLAG_RET64) flags |= 1; + if (odp->type == TYPE_STDCALL) flags |= 2; + output( "\tpushl $%u\n", (flags << 24) | (args << 16) | (i - spec->base) ); + + if (UsePIC) + { + output( "\tcall %s\n", asm_name("__wine_spec_get_pc_thunk_eax") ); + output( "1:\tleal .L__wine_spec_relay_descr-1b(%%eax),%%eax\n" ); + } + else output( "\tmovl $.L__wine_spec_relay_descr,%%eax\n" ); + output( "\tpushl %%eax\n" ); + + if (odp->flags & FLAG_REGISTER) + { + output( "\tcall *8(%%eax)\n" ); + } else - output( "\tret\n" ); + { + output( "\tcall *4(%%eax)\n" ); + if (odp->type == TYPE_STDCALL) + output( "\tret $%u\n", args * get_ptr_size() ); + else + output( "\tret\n" ); + } + break; + + case CPU_x86_64: + output( "\tmovq %%rcx,8(%%rsp)\n" ); + output( "\tmovq %%rdx,16(%%rsp)\n" ); + output( "\tmovq %%r8,24(%%rsp)\n" ); + output( "\tmovq %%r9,32(%%rsp)\n" ); + output( "\tmovq %%rsp,%%r8\n" ); + output( "\tmovq $%u,%%rdx\n", (flags << 24) | (args << 16) | (i - spec->base) ); + output( "\tleaq .L__wine_spec_relay_descr(%%rip),%%rcx\n" ); + output( "\tsubq $40,%%rsp\n" ); + output( "\tcallq *8(%%rcx)\n" ); + output( "\taddq $40,%%rsp\n" ); + output( "\tret\n" ); + break; + + default: + assert(0); } } } @@ -286,8 +309,8 @@ static void output_exports( DLLSPEC *spec ) /* output relays */ - /* we only support relay debugging on i386 */ - if (target_cpu != CPU_x86) + /* we only support relay debugging on i386 and x86_64 */ + if (target_cpu != CPU_x86 && target_cpu != CPU_x86_64) { output( "\t%s 0\n", get_asm_ptr_keyword() ); return; diff --git a/tools/wineinstall b/tools/wineinstall index fe48505c03b..17e86a95eee 100755 --- a/tools/wineinstall +++ b/tools/wineinstall @@ -41,7 +41,7 @@ conf_yesno_answer() { echo "Wine Installer v1.0" echo -if ! [ -f configure ] +if [ ! -f configure ] then if [ -f ../configure ] then { @@ -55,7 +55,7 @@ then fi fi -if [ `whoami` = 'root' ] +if [ -w / ] then echo "You are running wineinstall as root, this is not advisable. Please rerun as a user." echo "Aborting." @@ -70,9 +70,7 @@ then fi # check whether RPM installed, and if it is, remove any old wine rpm. -hash rpm &>/dev/null -RET=$? -if [ $RET -eq 0 ]; then +if [ -x `which rpm 2>/dev/null` ]; then if [ -n "`rpm -qi wine 2>/dev/null|grep "^Name"`" ]; then echo "Warning: Old Wine RPM install detected. Do you want to remove it first?" conf_yesno_answer "(yes/no) " @@ -98,7 +96,7 @@ if [ $RET -eq 0 ]; then fi # check whether wine binary still available -if [ -n "`wine --version 2>/dev/null`" ] +if [ -x `which wine 2>/dev/null` ] && [ -n "`wine --version 2>/dev/null`" ] then echo "Warning !! wine binary (still) found, which may indicate" echo "a (conflicting) previous installation." -- 2.11.4.GIT