From 829fe323e4e521706bff7e1f075be014bdefadfe Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sun, 26 Jul 1998 14:27:39 +0000 Subject: [PATCH] Release 980726 Sat Jul 25 19:45:45 1998 Juergen Schmied * [include/shlobj.h][misc/shell.c][misc/shellord.c][ole/folders.c] [shell32.spec] Added SHFILEOPSTRUCT32[A|W] and constants, prototypes. Implemented SHGetSpecialFolderLocation, SHGetPathFromIDList32[A]. Many IShellFolder, pidl, shell -related changes. SHChangeNotifyRegister, SHChangeNotifyDeregister, SHShellFolderView_Message, SHMapPIDLToSystemImageListIndex, SHAddToRecentDocs32, SHFileOperation, SHChangeNotify, SHCreateShellFolderViewEx stubs. Sat Jul 25 17:16:25 1998 Huw D M Davies * [files/profile.c] Fix return value of PROFILE_GetSection(). Fri Jul 24 22:45:19 1998 Ove Kaaven * [controls/edit.c] Killed the modified flag on WM_SETTEXT. Eudora should no longer bother asking whether you want to save an unchanged message. Fri Jul 24 21:21:35 1998 Andreas Mohr <100.30936@germany.net> * [controls/menu.c] Fixed bug in GetMenuState32. Doesn't fix Free Agent 32 :(( * [documentation/debugging] Hints added. * [files/dos_fs.c] [include/msdos.h] [msdos/int21.c] Enhanced DOS device support. * [if1632/Makefile.in] [if1632/builtin.c] [if1632/rasapi16.spec] [relay32/Makefile.in] [relay32/builtin32.c] [relay32/rasapi32.spec] Added RASAPI16/32.DLL. * [misc/aspi.c] [relay32/wnaspi32.spec] Implemented GetASPI32SupportInfo. * [multimedia/mmsystem.c] Implemented mmTaskCreate. Fri Jul 24 20:55:31 1998 Eric Kohl * [controls/toolbar.c] Fixed some bugs and added new features. * [controls/tooltips.c][include/tooltips.h] Added more messages and started display code. * [misc/shell.c][misc/shellord.c][relay32/shell.spec] Fixed StrToOleStrN (SHELL32_79) and added OleStrToStrN (SHELL32_78). Added some new stubs. * [objects/cursoricon.c][misc/imagelist.c][include/windows.h] Fixed GetIconInfo and removed the GetIconInfo hack from the image list code. * [controls/pager.c][include/pager.h][controls/treeview.c] [include/treeview.h] Added some messages. * [misc/tweak.c][winows/nonclient.c][documentation/win95look] Removed unused tweak variables. * [documentation/common_controls] Updated. Fri Jul 24 18:36:32 1998 James Moody <013263m@dragon.acadiau.ca> * [objects/font.c] Fixed a bug in GetTextFace. Fri Jul 24 17:09:33 1998 Marcus Meissner * [misc/commdlg.c] Fixed stacksmashing bug due to invalid specified function pointers. * [files/dos_fs.c] Small change in case handling... be able to create files with uppercase in them (like Program Files/). * [graphics/ddraw.c] XF86DGA support made threadsafe, added more Xlib dependent stuff (create Window using CreateWindow(), draw into it). xlib support is not satisfying. * [scheduler/critsection.c] Don't recurse on HeapLock with semaphore id 0. * [win32/user32.c][windows/message.c][windows/event.c] Moved win32 *Message functions where they belong. Removed some potential races between XPending and XNextEvent by a bit more locking. Fri Jul 24 13:58:19 1998 Alexandre Julliard * [loader/pe_image.c] [loader/ne/segment.c] Use bogus pointer value instead of NULL for unresolved externals. * [memory/selector.c] Clear saved_fs on selector free. * [msdos/cdrom.c] [configure.in] Added check for linux/ucdrom.h. * [scheduler/client.c] [server/socket.c] Fix for missing struct cmsghdr. Attempt to support msg_accrights fd passing (completely untested). * [windows/event.c] Do not grab the pointer in SetCapture (Win32 behavior). Tue Jul 21 22:28:13 1998 James Juran * [Make.rules.in] Changed $(MKDIR) macro to use -p option (make parent directories if they don't already exist. This fixes an error in 'make install' if /usr/local/include doesn't already exist. Tue Jul 21 13:37:04 Rein Klazes * [include/heap.h] Replaced macro SEGPTR_GET by inline function to avoid *lots* of wrong use of this macro. * [relay32/comdlg32.spec] Corrected GetSaveFileNameW entry. * [relay32/advapi32.spec] [win32/advapi.c] [relay32/ole32.spec] [ ole/moniker.c] Added stubs for SetFileSecurity[AW] and CreateFileMoniker32 * [graphics/x11drv/graphics.c] Finished implementation of bezier drawing code. Tue Jul 21 11:00:51 1998 Claus Fischer * [files/drive.c] Remove label trailing blanks in GetVolumeInformation32A. * [documentation/cdrom-labels] Added documentation on how to find out a CD-ROM label. Sun Jul 19 23:16:41 1998 Pascal Cuoq * [include/windows.h] Added some DM_* and DISP_CHANGE_* flags. * [relay32/user32.spec] [windows/user.c] Added stub for ChangeDisplaySettingA. * [ole/ole2nls.c] is_punctuation: reuse information from another table. Sun Jul 19 22:04:46 1998 Douglas Ridgway * [Make.rules.in] Updated automatic documentation rules. * [graphics/path.c] [misc/aspi.c] [misc/ntdll.c] [misc/winsock_dns.c] [ole/ole2dsp.c] [relay32/user32.spec] Comment format futzing to keep c2man happy. * [documentation/README.documentation] Updated description of automatic documentation. Wed Jul 15 19:10:09 1998 Andrew M. Bishop * [files/profile.c] Cache the 10 most recently used .ini files. Tue May 20 19:20:23 1997 Pablo Saratxaga * [misc/commdlg.c] Makes PrintDlg32A() return TRUE even if it is an empty stub, so most programs are happy and run anyway instead of aborting at startup. * [graphics/x11drv/xfont.c] Increased the maximum font families as (X11) font aliases eated up a lot of families causing wine to stop reading fonts. --- ANNOUNCE | 19 +- ChangeLog | 189 ++++ Make.rules.in | 21 +- configure | 129 ++- configure.in | 22 +- controls/comctl32undoc.c | 85 +- controls/commctrl.c | 63 +- controls/edit.c | 4 +- controls/listview.c | 3 +- controls/menu.c | 10 +- controls/pager.c | 187 +++- controls/status.c | 10 +- controls/toolbar.c | 222 +++-- controls/tooltips.c | 539 ++++++++++-- controls/treeview.c | 115 ++- debugger/dbg.y | 1 - debugger/dbgmain.c | 6 - documentation/README.documentation | 103 +-- documentation/cdrom-labels | 42 + documentation/common_controls | 20 +- documentation/debugging | 79 ++ documentation/win95look | 3 - files/directory.c | 4 +- files/dos_fs.c | 57 +- files/drive.c | 9 +- files/file.c | 8 +- files/profile.c | 169 ++-- graphics/ddraw.c | 1280 ++++++++-------------------- graphics/painting.c | 8 +- graphics/path.c | 20 +- graphics/win16drv/init.c | 2 +- graphics/wing.c | 2 +- graphics/x11drv/graphics.c | 152 ++-- graphics/x11drv/xfont.c | 6 +- if1632/Makefile.in | 1 + if1632/builtin.c | 2 + if1632/rasapi16.spec | 12 + if1632/snoop.c | 11 +- include/acconfig.h | 3 + include/commctrl.h | 90 +- include/config.h.in | 6 + include/ddraw.h | 15 +- include/file.h | 10 +- include/heap.h | 7 +- include/pager.h | 6 +- include/peexe.h | 6 +- include/server.h | 9 + include/shlobj.h | 159 +++- include/toolbar.h | 1 + include/tooltips.h | 14 +- include/treeview.h | 7 +- include/ts_xf86dga.h | 25 + include/ts_xlib.h | 3 +- include/version.h | 2 +- include/windows.h | 17 + loader/ne/segment.c | 8 +- loader/pe_image.c | 20 +- memory/selector.c | 2 + misc/aspi.c | 19 +- misc/commdlg.c | 22 +- misc/debugstr.c | 1 - misc/imagelist.c | 175 ++-- misc/main.c | 3 +- misc/ntdll.c | 42 +- misc/shell.c | 240 +++++- misc/shellord.c | 288 +++++-- misc/tweak.c | 14 - misc/winsock_dns.c | 6 +- msdos/cdrom.c | 13 +- msdos/int21.c | 23 +- multimedia/dsound.c | 3 + multimedia/mmsystem.c | 57 +- objects/cursoricon.c | 28 +- objects/font.c | 8 +- objects/palette.c | 26 +- ole/folders.c | 505 ++++++----- ole/moniker.c | 12 + ole/nls/cat.nls | 4 +- ole/nls/cze.nls | 10 +- ole/nls/dea.nls | 12 +- ole/nls/deu.nls | 4 +- ole/nls/esa.nls | 32 +- ole/nls/esb.nls | 28 +- ole/nls/esc.nls | 30 +- ole/nls/esd.nls | 32 +- ole/nls/ese.nls | 32 +- ole/nls/esf.nls | 30 +- ole/nls/esg.nls | 30 +- ole/nls/esh.nls | 6 +- ole/nls/esi.nls | 6 +- ole/nls/fos.nls | 18 +- ole/nls/fra.nls | 4 +- ole/nls/frb.nls | 2 +- ole/nls/frc.nls | 18 +- ole/nls/frl.nls | 22 +- ole/nls/frs.nls | 4 +- ole/nls/grc.nls | 83 +- ole/nls/hrv.nls | 80 +- ole/nls/hun.nls | 1 + ole/nls/irl.nls | 6 +- ole/nls/isl.nls | 57 +- ole/nls/ita.nls | 12 +- ole/nls/its.nls | 12 +- ole/nls/jpn.nls | 95 ++- ole/nls/lth.nls | 89 +- ole/nls/lvi.nls | 85 +- ole/nls/nlb.nls | 16 +- ole/nls/nld.nls | 10 +- ole/nls/nls.nls | 4 +- ole/nls/non.nls | 12 +- ole/nls/nor.nls | 25 +- ole/nls/plk.nls | 11 +- ole/nls/ptb.nls | 4 +- ole/nls/ptg.nls | 4 +- ole/nls/rom.nls | 27 +- ole/nls/rus.nls | 94 +- ole/nls/sky.nls | 15 +- ole/nls/slv.nls | 90 +- ole/nls/sve.nls | 6 +- ole/nls/trk.nls | 98 +-- ole/nls/ukr.nls | 4 +- ole/ole2disp.c | 6 +- ole/ole2nls.c | 45 +- relay32/Makefile.in | 1 + relay32/advapi32.spec | 4 +- relay32/builtin32.c | 2 + relay32/comctl32.spec | 2 +- relay32/comdlg32.spec | 2 +- relay32/ole32.spec | 2 +- relay32/rasapi32.spec | 73 ++ relay32/shell32.spec | 61 +- relay32/snoop.c | 8 +- relay32/user32.spec | 8 +- relay32/wnaspi32.spec | 2 +- scheduler/client.c | 66 +- scheduler/critsection.c | 4 +- server/socket.c | 37 +- tools/make_X11wrappers | 63 +- tsx11/Makefile.in | 1 + tsx11/X11_calls | 12 +- tsx11/ts_xf86dga.c | 112 +++ tsx11/ts_xlib.c | 34 +- tsx11/ts_xpm.c | 1 + tsx11/ts_xresource.c | 1 + tsx11/ts_xshm.c | 1 + tsx11/ts_xutil.c | 1 + win32/Makefile.in | 3 +- win32/advapi.c | 26 + win32/user32.c | 71 -- windows/event.c | 36 +- windows/keyboard.c | 8 +- windows/mdi.c | 7 +- windows/message.c | 54 ++ windows/nonclient.c | 16 +- windows/user.c | 27 + 155 files changed, 4702 insertions(+), 2869 deletions(-) create mode 100644 documentation/cdrom-labels create mode 100644 if1632/rasapi16.spec create mode 100644 include/ts_xf86dga.h create mode 100644 relay32/rasapi32.spec create mode 100644 tsx11/ts_xf86dga.c delete mode 100644 win32/user32.c diff --git a/ANNOUNCE b/ANNOUNCE index 3c55f20bdf0..d5b81f6d19e 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,15 +1,14 @@ -This is release 980712 of Wine, the MS Windows emulator. This is still a +This is release 980726 of Wine, the MS Windows emulator. This is still a developer's only release. There are many bugs and many unimplemented API features. Most applications still do not work correctly. Patches should be submitted to "julliard@lrc.epfl.ch". Please don't forget to include a ChangeLog entry. -WHAT'S NEW with Wine-980712: (see ChangeLog for details) - - More common controls stuff. - - Win32s VxD support. - - Beginnings of client/server architecture. - - More NLS support. +WHAT'S NEW with Wine-980726: (see ChangeLog for details) + - Still more common controls stuff. + - More DirectDraw support. + - Compilation problems should be gone. - Lots of bug fixes. See the README file in the distribution for installation instructions. @@ -18,10 +17,10 @@ Because of lags created by using mirror, this message may reach you before the release is available at the ftp sites. The sources will be available from the following locations: - ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-980712.tar.gz - ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980712.tar.gz - ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/Wine-980712.tar.gz - ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980712.tar.gz + ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-980726.tar.gz + ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980726.tar.gz + ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/Wine-980726.tar.gz + ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980726.tar.gz It should also be available from any site that mirrors tsx-11 or sunsite. diff --git a/ChangeLog b/ChangeLog index f65a7e0e7e7..955ee956976 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,192 @@ +---------------------------------------------------------------------- +Sat Jul 25 19:45:45 1998 Juergen Schmied + + * [include/shlobj.h][misc/shell.c][misc/shellord.c][ole/folders.c] + [shell32.spec] + Added SHFILEOPSTRUCT32[A|W] and constants, prototypes. + Implemented SHGetSpecialFolderLocation, SHGetPathFromIDList32[A]. + Many IShellFolder, pidl, shell -related changes. + + SHChangeNotifyRegister, SHChangeNotifyDeregister, + SHShellFolderView_Message, SHMapPIDLToSystemImageListIndex, + SHAddToRecentDocs32, SHFileOperation, SHChangeNotify, + SHCreateShellFolderViewEx stubs. + +Sat Jul 25 17:16:25 1998 Huw D M Davies + + * [files/profile.c] + Fix return value of PROFILE_GetSection(). + +Fri Jul 24 22:45:19 1998 Ove Kaaven + + * [controls/edit.c] + Killed the modified flag on WM_SETTEXT. Eudora should no longer + bother asking whether you want to save an unchanged message. + +Fri Jul 24 21:21:35 1998 Andreas Mohr <100.30936@germany.net> + + * [controls/menu.c] + Fixed bug in GetMenuState32. + Doesn't fix Free Agent 32 :(( + + * [documentation/debugging] + Hints added. + + * [files/dos_fs.c] [include/msdos.h] [msdos/int21.c] + Enhanced DOS device support. + + * [if1632/Makefile.in] [if1632/builtin.c] [if1632/rasapi16.spec] + [relay32/Makefile.in] [relay32/builtin32.c] [relay32/rasapi32.spec] + Added RASAPI16/32.DLL. + + * [misc/aspi.c] [relay32/wnaspi32.spec] + Implemented GetASPI32SupportInfo. + + * [multimedia/mmsystem.c] + Implemented mmTaskCreate. + +Fri Jul 24 20:55:31 1998 Eric Kohl + + * [controls/toolbar.c] + Fixed some bugs and added new features. + + * [controls/tooltips.c][include/tooltips.h] + Added more messages and started display code. + + * [misc/shell.c][misc/shellord.c][relay32/shell.spec] + Fixed StrToOleStrN (SHELL32_79) and added OleStrToStrN (SHELL32_78). + Added some new stubs. + + * [objects/cursoricon.c][misc/imagelist.c][include/windows.h] + Fixed GetIconInfo and removed the GetIconInfo hack from the + image list code. + + * [controls/pager.c][include/pager.h][controls/treeview.c] + [include/treeview.h] + Added some messages. + + * [misc/tweak.c][winows/nonclient.c][documentation/win95look] + Removed unused tweak variables. + + * [documentation/common_controls] + Updated. + +Fri Jul 24 18:36:32 1998 James Moody <013263m@dragon.acadiau.ca> + + * [objects/font.c] + Fixed a bug in GetTextFace. + +Fri Jul 24 17:09:33 1998 Marcus Meissner + + * [misc/commdlg.c] + Fixed stacksmashing bug due to invalid specified function + pointers. + + * [files/dos_fs.c] + Small change in case handling... be able to create files with + uppercase in them (like Program Files/). + + * [graphics/ddraw.c] + XF86DGA support made threadsafe, added more Xlib dependent stuff + (create Window using CreateWindow(), draw into it). xlib support + is not satisfying. + + * [scheduler/critsection.c] + Don't recurse on HeapLock with semaphore id 0. + + * [win32/user32.c][windows/message.c][windows/event.c] + Moved win32 *Message functions where they belong. + Removed some potential races between XPending and XNextEvent by + a bit more locking. + +Fri Jul 24 13:58:19 1998 Alexandre Julliard + + * [loader/pe_image.c] [loader/ne/segment.c] + Use bogus pointer value instead of NULL for unresolved externals. + + * [memory/selector.c] + Clear saved_fs on selector free. + + * [msdos/cdrom.c] [configure.in] + Added check for linux/ucdrom.h. + + * [scheduler/client.c] [server/socket.c] + Fix for missing struct cmsghdr. + Attempt to support msg_accrights fd passing (completely untested). + + * [windows/event.c] + Do not grab the pointer in SetCapture (Win32 behavior). + +Tue Jul 21 22:28:13 1998 James Juran + + * [Make.rules.in] + Changed $(MKDIR) macro to use -p option (make parent directories + if they don't already exist. This fixes an error in 'make install' + if /usr/local/include doesn't already exist. + +Tue Jul 21 13:37:04 Rein Klazes + + * [include/heap.h] + Replaced macro SEGPTR_GET by inline function to avoid *lots* + of wrong use of this macro. + + * [relay32/comdlg32.spec] + Corrected GetSaveFileNameW entry. + + * [relay32/advapi32.spec] [win32/advapi.c] + [relay32/ole32.spec] [ ole/moniker.c] + Added stubs for SetFileSecurity[AW] and CreateFileMoniker32 + + * [graphics/x11drv/graphics.c] + Finished implementation of bezier drawing code. + +Tue Jul 21 11:00:51 1998 Claus Fischer + + * [files/drive.c] + Remove label trailing blanks in GetVolumeInformation32A. + + * [documentation/cdrom-labels] + Added documentation on how to find out a CD-ROM label. + +Sun Jul 19 23:16:41 1998 Pascal Cuoq + + * [include/windows.h] + Added some DM_* and DISP_CHANGE_* flags. + + * [relay32/user32.spec] [windows/user.c] + Added stub for ChangeDisplaySettingA. + + * [ole/ole2nls.c] + is_punctuation: reuse information from another table. + +Sun Jul 19 22:04:46 1998 Douglas Ridgway + + * [Make.rules.in] + Updated automatic documentation rules. + + * [graphics/path.c] [misc/aspi.c] [misc/ntdll.c] [misc/winsock_dns.c] + [ole/ole2dsp.c] [relay32/user32.spec] + Comment format futzing to keep c2man happy. + + * [documentation/README.documentation] + Updated description of automatic documentation. + +Wed Jul 15 19:10:09 1998 Andrew M. Bishop + + * [files/profile.c] + Cache the 10 most recently used .ini files. + +Tue May 20 19:20:23 1997 Pablo Saratxaga + + * [misc/commdlg.c] + Makes PrintDlg32A() return TRUE even if it is an empty + stub, so most programs are happy and run anyway instead of + aborting at startup. + + * [graphics/x11drv/xfont.c] + Increased the maximum font families as (X11) font aliases + eated up a lot of families causing wine to stop reading fonts. + ---------------------------------------------------------------------- Sun Jul 12 16:23:36 1998 Alexandre Julliard diff --git a/Make.rules.in b/Make.rules.in index 4fc1b6c8cfa..37e78c98916 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -36,8 +36,13 @@ ALLCFLAGS = $(CFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL) $(X_CFLAGS) LDCOMBINE = ld -r AR = ar rc RM = rm -f -MKDIR = mkdir +MKDIR = mkdir -p C2MAN = @C2MAN@ +MANSPECS = -w $(TOPSRCDIR)/relay32/gdi32.spec \ + -w $(TOPSRCDIR)/relay32/user32.spec \ + -w $(TOPSRCDIR)/relay32/comctl32.spec \ + -w $(TOPSRCDIR)/relay32/comdlg32.spec \ + -w $(TOPSRCDIR)/relay32/kernel32.spec LINT = lclint LINTFLAGS = +posixlib +gnuextensions +trytorecover BUILD = $(TOPOBJDIR)/tools/build@PROGEXT@ @@ -134,21 +139,21 @@ $(BUILD) checkbuild: $(MODULE).o: $(OBJS) $(LDCOMBINE) $(OBJS) -o $(MODULE).o -# Rule for man pages +# Rules for auto documentation man: $(C_SRCS) - for i in $(C_SRCS); do $(C2MAN) -L -o$(TOPOBJDIR)/documentation/man3w -S3w $(DIVINCL) $$i; done + for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/man3w -S3w $(DIVINCL) -D__WINE__ $(MANSPECS) $$i; done + +html: $(C_SRCS) + for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/html -Th -iwindows.h $(DIVINCL) -D__WINE__ $(MANSPECS) $$i; done + + # Rule for linting lint: for i in $(C_SRCS); do $(LINT) $(LINTFLAGS) -D__WINE__ $(OPTIONS) $(DIVINCL) $(X_CFLAGS) $$i; done -# Rule for html pages - -html: $(C_SRCS) - for i in $(C_SRCS); do $(C2MAN) -L -o$(TOPOBJDIR)/documentation/html -Th -iwindows.h $(DIVINCL) $$i; done - # Misc. rules depend:: $(MAKEDEP) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS) diff --git a/configure b/configure index cbde259ca3c..04695b2f4fd 100755 --- a/configure +++ b/configure @@ -581,7 +581,7 @@ fi # Check whether --enable-lib or --disable-lib was given. if test "${enable_lib+set}" = set; then enableval="$enable_lib" - if test "$enableval" = "no"; then LIB_TARGET="\$LIBOBJS"; fi + if test "$enableval" = "no"; then LIB_TARGET="\$(LIBOBJS)"; fi fi @@ -2425,17 +2425,18 @@ else else libX11_ckeck=none for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do - if test -e $dir/libX11.so; then + if test -r $dir/libX11.so; then libX11_check="-D $dir/libX11.so" break 1 fi - if test -e $dir/libX11.a; then + if test -r $dir/libX11.a; then libX11_check="$dir/libX11.a" break 1 fi done if test "$libX11_check" != "none"; then - if nm $libX11_check | grep -q __errno_location; then + if nm $libX11_check | grep __errno_location >/dev/null 2>&1 + then wine_cv_x_reentrant=yes else wine_cv_x_reentrant=no @@ -2459,12 +2460,12 @@ fi for ac_func in clone getpagesize memmove sigaltstack strerror stricmp tcgetattr timegm usleep wait4 waitpid vfscanf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2463: checking for $ac_func" >&5 +echo "configure:2464: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2511,21 +2512,21 @@ else fi done -for ac_hdr in wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h +for ac_hdr in wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2519: checking for $ac_hdr" >&5 +echo "configure:2520: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2552,12 +2553,12 @@ fi done echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:2556: checking whether stat file-mode macros are broken" >&5 +echo "configure:2557: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2608,12 +2609,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2612: checking for working const" >&5 +echo "configure:2613: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2683,12 +2684,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2687: checking for ANSI C header files" >&5 +echo "configure:2688: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2696,7 +2697,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2713,7 +2714,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2731,7 +2732,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2752,7 +2753,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2763,7 +2764,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2787,12 +2788,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2791: checking for size_t" >&5 +echo "configure:2792: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2820,7 +2821,7 @@ EOF fi echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:2824: checking size of long long" >&5 +echo "configure:2825: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2828,7 +2829,7 @@ else ac_cv_sizeof_long_long=0 else cat > conftest.$ac_ext < main() @@ -2839,7 +2840,7 @@ main() exit(0); } EOF -if { (eval echo configure:2843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -2863,12 +2864,12 @@ EOF if test "$ac_cv_header_sys_vfs_h" = "yes" then echo $ac_n "checking "whether sys/vfs.h defines statfs"""... $ac_c" 1>&6 -echo "configure:2867: checking "whether sys/vfs.h defines statfs"" >&5 +echo "configure:2868: checking "whether sys/vfs.h defines statfs"" >&5 if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2885,7 +2886,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_sys_vfs_has_statfs=yes else @@ -2912,12 +2913,12 @@ fi if test "$ac_cv_header_sys_statfs_h" = "yes" then echo $ac_n "checking "whether sys/statfs.h defines statfs"""... $ac_c" 1>&6 -echo "configure:2916: checking "whether sys/statfs.h defines statfs"" >&5 +echo "configure:2917: checking "whether sys/statfs.h defines statfs"" >&5 if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2932,7 +2933,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_sys_statfs_has_statfs=yes else @@ -2959,12 +2960,12 @@ fi if test "$ac_cv_header_sys_mount_h" = "yes" then echo $ac_n "checking "whether sys/mount.h defines statfs"""... $ac_c" 1>&6 -echo "configure:2963: checking "whether sys/mount.h defines statfs"" >&5 +echo "configure:2964: checking "whether sys/mount.h defines statfs"" >&5 if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2979,7 +2980,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_sys_mount_has_statfs=yes else @@ -3005,7 +3006,7 @@ fi echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6 -echo "configure:3009: checking "for statfs.f_bfree"" >&5 +echo "configure:3010: checking "for statfs.f_bfree"" >&5 if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3014,7 +3015,7 @@ else wine_cv_statfs_bfree=no else cat > conftest.$ac_ext < @@ -3041,7 +3042,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_statfs_bfree=yes else @@ -3065,7 +3066,7 @@ EOF fi echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6 -echo "configure:3069: checking "for statfs.f_bavail"" >&5 +echo "configure:3070: checking "for statfs.f_bavail"" >&5 if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3074,7 +3075,7 @@ else wine_cv_statfs_bavail=no else cat > conftest.$ac_ext < @@ -3101,7 +3102,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wine_cv_statfs_bavail=yes else @@ -3126,7 +3127,7 @@ fi echo $ac_n "checking "for working sigaltstack"""... $ac_c" 1>&6 -echo "configure:3130: checking "for working sigaltstack"" >&5 +echo "configure:3131: checking "for working sigaltstack"" >&5 if eval "test \"`echo '$''{'ac_cv_c_working_sigaltstack'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3135,7 +3136,7 @@ else else cat > conftest.$ac_ext < @@ -3173,7 +3174,7 @@ else } EOF -if { (eval echo configure:3177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_working_sigaltstack="yes" else @@ -3199,6 +3200,42 @@ fi +echo $ac_n "checking "for msg_accrights in struct msghdr"""... $ac_c" 1>&6 +echo "configure:3205: checking "for msg_accrights in struct msghdr"" >&5 +if eval "test \"`echo '$''{'ac_cv_c_msg_accrights'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct msghdr hdr; hdr.msg_accrights=0 +; return 0; } +EOF +if { (eval echo configure:3218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_msg_accrights="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_msg_accrights="no" +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_msg_accrights" 1>&6 +if test "$ac_cv_c_msg_accrights" = "yes" +then + cat >> confdefs.h <<\EOF +#define HAVE_MSGHDR_ACCRIGHTS 1 +EOF + +fi + + MAKE_RULES=Make.rules diff --git a/configure.in b/configure.in index 553ea5f4ac9..5256e258a35 100644 --- a/configure.in +++ b/configure.in @@ -28,7 +28,7 @@ AC_ARG_ENABLE(dll, AC_ARG_ENABLE(lib, [ --disable-lib build the Wine without building libwine.a], -[if test "$enableval" = "no"; then LIB_TARGET="\$LIBOBJS"; fi]) +[if test "$enableval" = "no"; then LIB_TARGET="\$(LIBOBJS)"; fi]) dnl AC_ARG_WITH(ipc, dnl [ --enable-ipc use inter-process communication for DDE], @@ -213,17 +213,18 @@ AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant, else libX11_ckeck=none for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do - if test -e $dir/libX11.so; then + if test -r $dir/libX11.so; then libX11_check="-D $dir/libX11.so" break 1 fi - if test -e $dir/libX11.a; then + if test -r $dir/libX11.a; then libX11_check="$dir/libX11.a" break 1 fi done if test "$libX11_check" != "none"; then - if nm $libX11_check | grep -q __errno_location; then + if nm $libX11_check | grep __errno_location >/dev/null 2>&1 + then wine_cv_x_reentrant=yes else wine_cv_x_reentrant=no @@ -240,7 +241,7 @@ fi dnl **** Check for functions and header files **** AC_CHECK_FUNCS(clone getpagesize memmove sigaltstack strerror stricmp tcgetattr timegm usleep wait4 waitpid vfscanf) -AC_CHECK_HEADERS(wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h) +AC_CHECK_HEADERS(wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h) AC_HEADER_STAT() AC_C_CONST() AC_TYPE_SIZE_T() @@ -432,6 +433,17 @@ then fi +dnl *** check for file descriptor passing with msg_accrights + +AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights, + AC_TRY_COMPILE([#include +#include ],[struct msghdr hdr; hdr.msg_accrights=0], + ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no")) +if test "$ac_cv_c_msg_accrights" = "yes" +then + AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS) +fi + dnl **** Generate output files **** MAKE_RULES=Make.rules diff --git a/controls/comctl32undoc.c b/controls/comctl32undoc.c index baa7a71ed98..7cc24aae4a0 100644 --- a/controls/comctl32undoc.c +++ b/controls/comctl32undoc.c @@ -17,6 +17,7 @@ #include #include +#include #include "windows.h" #include "heap.h" #include "debug.h" @@ -121,6 +122,44 @@ COMCTL32_GetSize (LPVOID dwParam) } + +/************************************************************************** + * Str_SetPtrA [COMCTL32.234] + * + * PARAMS + * dwParam1 [I] + * dwParam2 [I] + */ + +BOOL32 WINAPI +COMCTL32_Str_SetPtrA (LPSTR lpStr, LPVOID *lpPtr) +{ + INT32 len; + LPSTR ptr; + + FIXME (commctrl, "(0x%08lx 0x%08lx)\n", (DWORD)lpStr, (DWORD)lpPtr); + FIXME (commctrl, "(\"%s\" \"%s\")\n", lpStr, (LPSTR)*lpPtr); + + if (lpStr) { + len = lstrlen32A (lpStr); + ptr = COMCTL32_ReAlloc (lpPtr, len + 1); + if (!(ptr)) + return FALSE; + lstrcpy32A (ptr, lpStr); + *lpPtr = ptr; + return TRUE; + } + + if (*lpPtr) { + COMCTL32_Free (*lpPtr); + return TRUE; + } + + return FALSE; +} + + + /************************************************************************** * DSA_Create [COMCTL32.320] Creates a dynamic string array * @@ -146,6 +185,13 @@ DSA_Create (DWORD dwParam1, DWORD dwParam2) } +/************************************************************************** + * DSA_Destroy [COMCTL32.321] Destroys a dynamic string array + * + * PARAMS + * dwParam1 [I] + */ + DWORD WINAPI DSA_Destroy (DWORD dwParam1) { @@ -184,9 +230,7 @@ DSA_GetItem (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3) // FIXME (commctrl, "\"%s\"\n", (LPSTR)dsaPtr->ptrs[dwParam2]); - return lstrcpy32A ((LPSTR)dwParam3, (LPSTR)dsaPtr->ptrs[dwParam2]); - -// return 0; + return (DWORD)lstrcpy32A ((LPSTR)dwParam3, (LPSTR)dsaPtr->ptrs[dwParam2]); } @@ -431,28 +475,47 @@ COMCTL32_SendNotify (DWORD dw1, DWORD dw2, DWORD dw3, DWORD dw4) */ LPSTR WINAPI -COMCTL32_StrChrA (LPSTR lpString, CHAR cChar) +COMCTL32_StrChrA (LPCSTR lpString, CHAR cChar) { return strchr (lpString, cChar); } /************************************************************************** - * StrStrIA [COMCTL32.350] - * - * BUGS - * This implementation is case sensitive, but it mustn't. + * StrStrIA [COMCTL32.355] */ LPSTR WINAPI -COMCTL32_StrStrIA (LPSTR lpStr1, LPSTR lpStr2) +COMCTL32_StrStrIA (LPCSTR lpStr1, LPCSTR lpStr2) { - return strstr (lpStr1, lpStr2); + INT32 len1, len2, i; + CHAR first; + + if (*lpStr2 == 0) + return ((LPSTR)lpStr1); + len1 = 0; + while (lpStr1[len1] != 0) ++len1; + len2 = 0; + while (lpStr2[len2] != 0) ++len2; + if (len2 == 0) + return ((LPSTR)(lpStr1 + len1)); + first = tolower (*lpStr2); + while (len1 >= len2) { + if (tolower(*lpStr1) == first) { + for (i = 1; i < len2; ++i) + if (tolower (lpStr1[i]) != tolower(lpStr2[i])) + break; + if (i >= len2) + return ((LPSTR)lpStr1); + } + ++lpStr1; --len1; + } + return (NULL); } /************************************************************************** - * StrToIntA [COMCTL32.357] + * StrToIntA [COMCTL32.357] Converts a string to a signed integer. */ INT32 WINAPI diff --git a/controls/commctrl.c b/controls/commctrl.c index 2838976e245..728f123ea22 100644 --- a/controls/commctrl.c +++ b/controls/commctrl.c @@ -222,7 +222,7 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls) break; case ICC_INTERNET_CLASSES: - TRACE (commctrl, "No internet classes implemented!\n"); + TRACE (commctrl, "No IPAddress class implemented!\n"); break; case ICC_PAGESCROLLER_CLASS: @@ -320,25 +320,36 @@ CreateToolbarEx (HWND32 hwnd, DWORD style, UINT32 wID, INT32 nBitmaps, (WPARAM32)uStructSize, 0); /* set bitmap and button size */ - SendMessage32A (hwndTB, TB_SETBITMAPSIZE, 0, - MAKELPARAM((WORD)dyBitmap, (WORD)dxBitmap)); -#if 0 - SendMessage32A (hwndTB, TB_SETBUTTONSIZE, 0, - MAKELONG((WORD)dyButton, (WORD)dxButton)); -#endif - - /* add bitmaps */ - if (nBitmaps > 0) { - tbab.hInst = hBMInst; - tbab.nID = wBMID; - SendMessage32A (hwndTB, TB_ADDBITMAP, - (WPARAM32)nBitmaps, (LPARAM)&tbab); + if (hBMInst == HINST_COMMCTRL) { + if (wBMID & 1) { + SendMessage32A (hwndTB, TB_SETBITMAPSIZE, 0, + MAKELPARAM(26, 25)); + SendMessage32A (hwndTB, TB_SETBUTTONSIZE, 0, + MAKELPARAM(33, 32)); + } + else { + SendMessage32A (hwndTB, TB_SETBITMAPSIZE, 0, + MAKELPARAM(16, 15)); + SendMessage32A (hwndTB, TB_SETBUTTONSIZE, 0, + MAKELPARAM(23, 22)); + } + } + else { + SendMessage32A (hwndTB, TB_SETBITMAPSIZE, 0, + MAKELPARAM((WORD)dyBitmap, (WORD)dxBitmap)); + SendMessage32A (hwndTB, TB_SETBUTTONSIZE, 0, + MAKELPARAM((WORD)dyButton, (WORD)dxButton)); } + /* add bitmaps */ + tbab.hInst = hBMInst; + tbab.nID = wBMID; + SendMessage32A (hwndTB, TB_ADDBITMAP, + (WPARAM32)nBitmaps, (LPARAM)&tbab); + /* add buttons */ - if (iNumButtons > 0) - SendMessage32A (hwndTB, TB_ADDBUTTONS32A, - (WPARAM32)iNumButtons, (LPARAM)lpButtons); + SendMessage32A (hwndTB, TB_ADDBUTTONS32A, + (WPARAM32)iNumButtons, (LPARAM)lpButtons); } return hwndTB; @@ -387,20 +398,20 @@ CreateMappedBitmap (HINSTANCE32 hInstance, INT32 idBitmap, UINT32 wFlags, } hRsrc = FindResource32A (hInstance, (LPSTR)idBitmap, RT_BITMAP32A); - if (hRsrc == NULL) - return NULL; + if (hRsrc == 0) + return 0; hglb = LoadResource32 (hInstance, hRsrc); - if (hglb == NULL) - return NULL; + if (hglb == 0) + return 0; lpBitmap = (LPBITMAPINFOHEADER)LockResource32 (hglb); if (lpBitmap == NULL) - return NULL; + return 0; nColorTableSize = (1 << lpBitmap->biBitCount); nSize = lpBitmap->biSize + nColorTableSize * sizeof(RGBQUAD); lpBitmapInfo = (LPBITMAPINFOHEADER)GlobalAlloc32 (GMEM_FIXED, nSize); if (lpBitmapInfo == NULL) - return NULL; + return 0; RtlMoveMemory (lpBitmapInfo, lpBitmap, nSize); pColorTable = (DWORD*)(((LPBYTE)lpBitmapInfo)+(UINT32)lpBitmapInfo->biSize); @@ -423,7 +434,7 @@ CreateMappedBitmap (HINSTANCE32 hInstance, INT32 idBitmap, UINT32 wFlags, nWidth = (INT32)lpBitmapInfo->biWidth; nHeight = (INT32)lpBitmapInfo->biHeight; - hdcScreen = GetDC32 (NULL); + hdcScreen = GetDC32 ((HWND32)0); hbm = CreateCompatibleBitmap32 (hdcScreen, nWidth, nHeight); if (hbm) { HDC32 hdcDst = CreateCompatibleDC32 (hdcScreen); @@ -436,7 +447,7 @@ CreateMappedBitmap (HINSTANCE32 hInstance, INT32 idBitmap, UINT32 wFlags, SelectObject32 (hdcDst, hbmOld); DeleteDC32 (hdcDst); } - ReleaseDC32 (NULL, hdcScreen); + ReleaseDC32 ((HWND32)0, hdcScreen); GlobalFree32 ((HGLOBAL32)lpBitmapInfo); FreeResource32 (hglb); @@ -495,7 +506,7 @@ GetEffectiveClientRect (HWND32 hwnd, LPRECT32 lpRect, LPINT32 lpInfo) if (GetWindowLong32A (hwndCtrl, GWL_STYLE) & WS_VISIBLE) { TRACE (commctrl, "control id 0x%x\n", *lpRun); GetWindowRect32 (hwndCtrl, &rcCtrl); - MapWindowPoints32 (NULL, hwnd, (LPPOINT32)&rcCtrl, 2); + MapWindowPoints32 ((HWND32)0, hwnd, (LPPOINT32)&rcCtrl, 2); SubtractRect32 (lpRect, lpRect, &rcCtrl); } lpRun++; diff --git a/controls/edit.c b/controls/edit.c index acfef5765da..bfb724a5311 100644 --- a/controls/edit.c +++ b/controls/edit.c @@ -3793,8 +3793,8 @@ static void EDIT_WM_SetText(WND *wnd, EDITSTATE *es, LPCSTR text) EDIT_EM_ReplaceSel(wnd, es, FALSE, ""); } es->x_offset = 0; - es->flags |= EF_MODIFIED; - es->flags |= EF_UPDATE; + es->flags &= ~EF_MODIFIED; + es->flags &= ~EF_UPDATE; EDIT_EM_SetSel(wnd, es, 0, 0, FALSE); EDIT_EM_ScrollCaret(wnd, es); } diff --git a/controls/listview.c b/controls/listview.c index d2d4622636e..1c600c5155d 100644 --- a/controls/listview.c +++ b/controls/listview.c @@ -54,8 +54,7 @@ LISTVIEW_SetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { LISTVIEW_INFO *infoPtr = LISTVIEW_GetInfoPtr(wndPtr); - fprintf (stderr, "LISTVIEW: SetImageList (0x%08x 0x%08lx)\n", - wParam, lParam); + FIXME (listview, "(0x%08x 0x%08lx)\n", wParam, lParam); return 0; } diff --git a/controls/menu.c b/controls/menu.c index 6e6085813af..fc01e53de94 100644 --- a/controls/menu.c +++ b/controls/menu.c @@ -2907,14 +2907,14 @@ UINT32 WINAPI GetMenuState32( HMENU32 hMenu, UINT32 wItemID, UINT32 wFlags ) { POPUPMENU *menu = (POPUPMENU *) USER_HEAP_LIN_ADDR( item->hSubMenu ); if (!menu) return -1; - else return (menu->nItems << 8) | (menu->wFlags & 0xff); + else return (menu->nItems << 8) | ((item->fState|item->fType) & 0xff); } else { - /* We used to (from way back then) mask the result to 0xff. */ - /* I don't know why and it seems wrong as the documented */ - /* return flag MF_SEPARATOR is outside that mask. */ - return (item->fType | item->fState); + /* We used to (from way back then) mask the result to 0xff. */ + /* I don't know why and it seems wrong as the documented */ + /* return flag MF_SEPARATOR is outside that mask. */ + return (item->fType | item->fState); } } diff --git a/controls/pager.c b/controls/pager.c index e85e60aaf70..2e335c08df2 100644 --- a/controls/pager.c +++ b/controls/pager.c @@ -24,6 +24,152 @@ #define PAGER_GetInfoPtr(wndPtr) ((PAGER_INFO *)wndPtr->wExtra[0]) +static __inline__ LRESULT +PAGER_GetBkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr); + + return (LRESULT)infoPtr->clrBk; +} + + +static __inline__ LRESULT +PAGER_GetBorder (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr); + + return (LRESULT)infoPtr->iBorder; +} + + +static __inline__ LRESULT +PAGER_GetButtonSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr); + + return (LRESULT)infoPtr->iButtonSize; +} + + + + +static __inline__ LRESULT +PAGER_SetBkColor (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr); + COLORREF clrTemp = infoPtr->clrBk; + + infoPtr->clrBk = (COLORREF)lParam; + + /* FIXME: redraw */ + + return (LRESULT)clrTemp; +} + + +static __inline__ LRESULT +PAGER_SetBorder (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr); + INT32 nTemp = infoPtr->iBorder; + + infoPtr->iBorder = (INT32)lParam; + + /* FIXME: redraw */ + + return (LRESULT)nTemp; +} + + +static __inline__ LRESULT +PAGER_SetButtonSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr); + INT32 nTemp = infoPtr->iButtonSize; + + infoPtr->iButtonSize = (INT32)lParam; + + /* FIXME: redraw */ + + return (LRESULT)nTemp; +} + + +static __inline__ LRESULT +PAGER_SetChild (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr); + + infoPtr->hwndChild = (HWND32)lParam; + + /* FIXME: redraw */ + + return 0; +} + + + +static LRESULT +PAGER_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + PAGER_INFO *infoPtr; + + /* allocate memory for info structure */ + infoPtr = (PAGER_INFO *)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, + sizeof(PAGER_INFO)); + wndPtr->wExtra[0] = (DWORD)infoPtr; + + if (infoPtr == NULL) { + ERR (treeview, "could not allocate info memory!\n"); + return 0; + } + + if ((PAGER_INFO*)wndPtr->wExtra[0] != infoPtr) { + ERR (pager, "pointer assignment error!\n"); + return 0; + } + + /* set default settings */ + infoPtr->hwndChild = 0; + infoPtr->clrBk = GetSysColor32 (COLOR_BTNFACE); + infoPtr->iBorder = 0; + infoPtr->iButtonSize = 0; + + + return 0; +} + + +static LRESULT +PAGER_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr); + + + + + /* free tree view info data */ + HeapFree (GetProcessHeap (), 0, infoPtr); + + return 0; +} + + +static LRESULT +PAGER_EraseBackground (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + PAGER_INFO *infoPtr = PAGER_GetInfoPtr(wndPtr); + HBRUSH32 hBrush = CreateSolidBrush32 (infoPtr->clrBk); + RECT32 rect; + + GetClientRect32 (wndPtr->hwndSelf, &rect); + FillRect32 ((HDC32)wParam, &rect, hBrush); + DeleteObject32 (hBrush); + return TRUE; +} + + + LRESULT WINAPI PagerWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam) { @@ -31,11 +177,44 @@ PagerWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam) switch (uMsg) { -// case WM_CREATE: -// return PAGER_Create (wndPtr, wParam, lParam); +// case PGM_FORWARDMOUSE: -// case WM_DESTROY: -// return PAGER_Destroy (wndPtr, wParam, lParam); + case PGM_GETBKCOLOR: + return PAGER_GetBkColor (wndPtr, wParam, lParam); + + case PGM_GETBORDER: + return PAGER_GetBorder (wndPtr, wParam, lParam); + + case PGM_GETBUTTONSIZE: + return PAGER_GetButtonSize (wndPtr, wParam, lParam); + +// case PGM_GETBUTTONSTATE: +// case PGM_GETDROPTARGET: +// case PGM_GETPOS: +// case PGM_RECALCSIZE: + + case PGM_SETBKCOLOR: + return PAGER_SetBkColor (wndPtr, wParam, lParam); + + case PGM_SETBORDER: + return PAGER_SetBorder (wndPtr, wParam, lParam); + + case PGM_SETBUTTONSIZE: + return PAGER_SetButtonSize (wndPtr, wParam, lParam); + + case PGM_SETCHILD: + return PAGER_SetChild (wndPtr, wParam, lParam); + +// case PGM_SETPOS: + + case WM_CREATE: + return PAGER_Create (wndPtr, wParam, lParam); + + case WM_DESTROY: + return PAGER_Destroy (wndPtr, wParam, lParam); + + case WM_ERASEBKGND: + return PAGER_EraseBackground (wndPtr, wParam, lParam); // case WM_MOUSEMOVE: // return PAGER_MouseMove (wndPtr, wParam, lParam); diff --git a/controls/status.c b/controls/status.c index 93113e1ad60..f0bcd28ce0a 100644 --- a/controls/status.c +++ b/controls/status.c @@ -190,15 +190,15 @@ SW_Refresh( HWND32 hwnd, HDC32 hdc, STATUSWINDOWINFO *self ) } -static LRESULT -SW_GetBorders(STATUSWINDOWINFO *self, HWND32 hwnd, WPARAM32 wParam, LPARAM lParam) +__inline__ static LRESULT +SW_GetBorders (LPARAM lParam) { - LPINT32 out; + LPINT32 out = (LPINT32) lParam; - out = (LPINT32) lParam; out[0] = HORZ_BORDER; /* horizontal border width */ out[1] = VERT_BORDER; /* vertical border width */ out[2] = HORZ_GAP; /* width of border between rectangles */ + return TRUE; } @@ -766,7 +766,7 @@ StatusWindowProc (HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam) switch (msg) { case SB_GETBORDERS: - return SW_GetBorders(self, hwnd, wParam, lParam); + return SW_GetBorders (lParam); case SB_GETICON: return SW_GetIcon(self, hwnd, wParam, lParam); case SB_GETPARTS: diff --git a/controls/toolbar.c b/controls/toolbar.c index b562df11fff..c604954ae16 100644 --- a/controls/toolbar.c +++ b/controls/toolbar.c @@ -325,6 +325,9 @@ TOOLBAR_InternalHitTest (WND *wndPtr, LPPOINT32 lpPt) btnPtr = infoPtr->buttons; for (i = 0; i < infoPtr->nNumButtons; i++, btnPtr++) { + if (btnPtr->fsState & TBSTATE_HIDDEN) + continue; + if (btnPtr->fsStyle & TBSTYLE_SEP) { if (PtInRect32 (&btnPtr->rect, *lpPt)) { TRACE (toolbar, " ON SEPARATOR %d!\n", i); @@ -611,37 +614,24 @@ TOOLBAR_AutoSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) FIXME (toolbar, "auto size!\n"); - parent = GetParent32 (wndPtr->hwndSelf); - GetClientRect32(parent, &parent_rect); + parent = GetParent32 (wndPtr->hwndSelf); + GetClientRect32(parent, &parent_rect); - if (wndPtr->dwStyle & CCS_NORESIZE) - uPosFlags |= SWP_NOSIZE; - else { - infoPtr->nWidth = parent_rect.right - parent_rect.left; - TOOLBAR_CalcToolbar (wndPtr); - cy = infoPtr->nHeight; - cx = infoPtr->nWidth; - } + if (wndPtr->dwStyle & CCS_NORESIZE) { + uPosFlags |= SWP_NOSIZE; + cx = 0; + cy = 0; + } + else { + infoPtr->nWidth = parent_rect.right - parent_rect.left; + TOOLBAR_CalcToolbar (wndPtr); + cy = infoPtr->nHeight; + cx = infoPtr->nWidth; + } - if (wndPtr->dwStyle & CCS_NOPARENTALIGN) { - uPosFlags |= SWP_NOMOVE; -// if (wndPtr->dwStyle & (CCS_TOP | CCS_BOTTOM)) -// cy = (INT32)HIWORD(lParam); - } -#if 0 - if (wndPtr->dwStyle & CCS_NORESIZE) { - uPosFlags |= SWP_NOSIZE; -// cx = (INT32)LOWORD(lParam); -// cy = (INT32)HIWORD(lParam); - } - else { - /* FIXME: handle CCS_NOMOVEX and CCS_NOMOVEY */ + if (wndPtr->dwStyle & CCS_NOPARENTALIGN) + uPosFlags |= SWP_NOMOVE; - } - - infoPtr->nWidth = cx; - infoPtr->nHeight = cy; -#endif if (!(wndPtr->dwStyle & CCS_NODIVIDER)) cy += 2; @@ -925,9 +915,35 @@ TOOLBAR_GetButtonText32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) // << TOOLBAR_GetButtonText32W >> // << TOOLBAR_GetColorScheme >> -// << TOOLBAR_GetDisabledImageList >> + + +static LRESULT +TOOLBAR_GetDisabledImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr); + + if (wndPtr->dwStyle & TBSTYLE_FLAT) + return (LRESULT)infoPtr->himlDis; + else + return 0; +} + + // << TOOLBAR_GetExtendedStyle >> -// << TOOLBAR_GetHotImageList >> + + +static LRESULT +TOOLBAR_GetHotImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr); + + if (wndPtr->dwStyle & TBSTYLE_FLAT) + return (LRESULT)infoPtr->himlHot; + else + return 0; +} + + // << TOOLBAR_GetHotItem >> @@ -935,7 +951,11 @@ static LRESULT TOOLBAR_GetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr); - return (LRESULT)infoPtr->himlDef; + + if (wndPtr->dwStyle & TBSTYLE_FLAT) + return (LRESULT)infoPtr->himlDef; + else + return 0; } @@ -969,7 +989,18 @@ TOOLBAR_GetItemRect (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) } -// << TOOLBAR_GetMaxSize >> +static LRESULT +TOOLBAR_GetMaxSize (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr); + LPSIZE32 lpSize = (LPSIZE32)lParam; + + + + return TRUE; +} + + // << TOOLBAR_GetObject >> // << TOOLBAR_GetPadding >> // << TOOLBAR_GetRect >> @@ -1349,10 +1380,60 @@ TOOLBAR_SetCmdId (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) // << TOOLBAR_SetColorScheme >> -// << TOOLBAR_SetDisabledImageList >> + + +static LRESULT +TOOLBAR_SetDisabledImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr); + HIMAGELIST himlTemp; + + if (!(wndPtr->dwStyle & TBSTYLE_FLAT)) + return 0; + + himlTemp = infoPtr->himlDis; + infoPtr->himlDis = (HIMAGELIST)lParam; + + /* FIXME: redraw ? */ + + return (LRESULT)himlTemp; +} + + // << TOOLBAR_SetDrawTextFlags >> -// << TOOLBAR_SetExtendedStyle >> -// << TOOLBAR_SetHotImageList >> + + +static LRESULT +TOOLBAR_SetExtendedStyle (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr); + DWORD dwTemp; + + dwTemp = infoPtr->dwExStyle; + infoPtr->dwExStyle = (DWORD)lParam; + + return (LRESULT)dwTemp; +} + + +static LRESULT +TOOLBAR_SetHotImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr); + HIMAGELIST himlTemp; + + if (!(wndPtr->dwStyle & TBSTYLE_FLAT)) + return 0; + + himlTemp = infoPtr->himlHot; + infoPtr->himlHot = (HIMAGELIST)lParam; + + /* FIXME: redraw ? */ + + return (LRESULT)himlTemp; +} + + // << TOOLBAR_SetHotItem >> @@ -1362,6 +1443,9 @@ TOOLBAR_SetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr); HIMAGELIST himlTemp; + if (!(wndPtr->dwStyle & TBSTYLE_FLAT)) + return 0; + himlTemp = infoPtr->himlDef; infoPtr->himlDef = (HIMAGELIST)lParam; @@ -1526,6 +1610,14 @@ TOOLBAR_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) SystemParametersInfo32A (SPI_GETICONTITLELOGFONT, 0, &logFont, 0); infoPtr->hFont = CreateFontIndirect32A (&logFont); + if (wndPtr->dwStyle & TBSTYLE_TOOLTIPS) { + /* Create tooltip control */ +// infoPtr->hwndToolTip = CreateWindowEx32A (....); + + /* Send NM_TOOLTIPSCREATED notification */ + + } + return 0; } @@ -1535,7 +1627,7 @@ TOOLBAR_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(wndPtr); - /* delete tool tip */ + /* delete tooltip control */ if (infoPtr->hwndToolTip) DestroyWindow32 (infoPtr->hwndToolTip); @@ -1871,6 +1963,7 @@ TOOLBAR_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) INT32 flags; UINT32 uPosFlags = 0; + /* Resize deadlock check */ if (infoPtr->bAutoSize) { infoPtr->bAutoSize = FALSE; return 0; @@ -1889,8 +1982,17 @@ TOOLBAR_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) parent = GetParent32 (wndPtr->hwndSelf); GetClientRect32(parent, &parent_rect); - if (wndPtr->dwStyle & CCS_NORESIZE) + if (wndPtr->dwStyle & CCS_NORESIZE) { uPosFlags |= SWP_NOSIZE; + + /* FIXME */ +// infoPtr->nWidth = parent_rect.right - parent_rect.left; + cy = infoPtr->nHeight; + cx = infoPtr->nWidth; + TOOLBAR_CalcToolbar (wndPtr); + infoPtr->nWidth = cx; + infoPtr->nHeight = cy; + } else { infoPtr->nWidth = parent_rect.right - parent_rect.left; TOOLBAR_CalcToolbar (wndPtr); @@ -1900,23 +2002,10 @@ TOOLBAR_Size (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) if (wndPtr->dwStyle & CCS_NOPARENTALIGN) { uPosFlags |= SWP_NOMOVE; -// if (wndPtr->dwStyle & (CCS_TOP | CCS_BOTTOM)) -// cy = (INT32)HIWORD(lParam); - } -#if 0 - if (wndPtr->dwStyle & CCS_NORESIZE) { - uPosFlags |= SWP_NOSIZE; -// cx = (INT32)LOWORD(lParam); -// cy = (INT32)HIWORD(lParam); - } - else { - /* FIXME: handle CCS_NOMOVEX and CCS_NOMOVEY */ - + cy = infoPtr->nHeight; + cx = infoPtr->nWidth; } - infoPtr->nWidth = cx; - infoPtr->nHeight = cy; -#endif if (!(wndPtr->dwStyle & CCS_NODIVIDER)) cy += 2; @@ -2000,9 +2089,15 @@ ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam) // case TB_GETBUTTONTEXT32W: // case TB_GETCOLORSCHEME: /* 4.71 */ -// case TB_GETDISABLEDIMAGELIST: /* 4.70 */ + + case TB_GETDISABLEDIMAGELIST: + return TOOLBAR_GetDisabledImageList (wndPtr, wParam, lParam); + // case TB_GETEXTENDEDSTYLE: /* 4.71 */ -// case TB_GETHOTIMAGELIST: /* 4.70 */ + + case TB_GETHOTIMAGELIST: + return TOOLBAR_GetHotImageList (wndPtr, wParam, lParam); + // case TB_GETHOTITEM: /* 4.71 */ case TB_GETIMAGELIST: @@ -2014,7 +2109,9 @@ ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam) case TB_GETITEMRECT: return TOOLBAR_GetItemRect (wndPtr, wParam, lParam); -// case TB_GETMAXSIZE: /* 4.71 */ + case TB_GETMAXSIZE: + return TOOLBAR_GetMaxSize (wndPtr, wParam, lParam); + // case TB_GETOBJECT: /* 4.71 */ // case TB_GETPADDING: /* 4.71 */ // case TB_GETRECT: /* 4.70 */ @@ -2099,10 +2196,18 @@ ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam) return TOOLBAR_SetCmdId (wndPtr, wParam, lParam); // case TB_SETCOLORSCHEME: /* 4.71 */ -// case TB_SETDISABLEDIMAGELIST: /* 4.70 */ + + case TB_SETDISABLEDIMAGELIST: + return TOOLBAR_SetDisabledImageList (wndPtr, wParam, lParam); + // case TB_SETDRAWTEXTFLAGS: /* 4.71 */ -// case TB_SETEXTENDEDSTYLE: /* 4.71 */ -// case TB_SETHOTIMAGELIST: /* 4.70 */ + + case TB_SETEXTENDEDSTYLE: + return TOOLBAR_SetExtendedStyle (wndPtr, wParam, lParam); + + case TB_SETHOTIMAGELIST: + return TOOLBAR_SetHotImageList (wndPtr, wParam, lParam); + // case TB_SETHOTITEM: /* 4.71 */ case TB_SETIMAGELIST: @@ -2137,6 +2242,7 @@ ToolbarWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam) case TB_SETUNICODEFORMAT: return TOOLBAR_SetUnicodeFormat (wndPtr, wParam, lParam); + case WM_CREATE: return TOOLBAR_Create (wndPtr, wParam, lParam); diff --git a/controls/tooltips.c b/controls/tooltips.c index 3efcf87c032..69a00ef7e9f 100644 --- a/controls/tooltips.c +++ b/controls/tooltips.c @@ -3,15 +3,8 @@ * * Copyright 1998 Eric Kohl * - * NOTES - * PLEASE don't try to improve or change this code right now. Many - * features are still missing, but I'm working on it. I want to avoid - * any confusion. This note will be removed as soon as most of the - * features are implemented. - * Eric - * * TODO: - * - Most messages. + * - Some messages. * - All notifications. * * Testing: @@ -20,8 +13,8 @@ * - additional features. * * FIXME: - * - DelTool32A incomplete. - * - GetCurrentTool32A incomplete. + * - Display code. + * - Missing Unicode support. */ #include "windows.h" @@ -32,11 +25,118 @@ #include "debug.h" +#define ID_TIMER1 1 +#define ID_TIMER2 2 + #define TOOLTIPS_GetInfoPtr(wndPtr) ((TOOLTIPS_INFO *)wndPtr->wExtra[0]) +static VOID +TOOLTIPS_Refresh (WND *wndPtr, HDC32 hdc) +{ + TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); + RECT32 rc; + INT32 oldBkMode; + HFONT32 hOldFont; + + GetClientRect32 (wndPtr->hwndSelf, &rc); + oldBkMode = SetBkMode32 (hdc, TRANSPARENT); + SetTextColor32 (hdc, infoPtr->clrText); + hOldFont = SelectObject32 (hdc, infoPtr->hFont); + DrawText32A (hdc, infoPtr->szTipText, -1, &rc, DT_EXTERNALLEADING); + SelectObject32 (hdc, hOldFont); + if (oldBkMode != TRANSPARENT) + SetBkMode32 (hdc, oldBkMode); +} + + +static VOID +TOOLTIPS_GetTipText (WND *wndPtr, TOOLTIPS_INFO *infoPtr) +{ + TTTOOL_INFO *toolPtr = &infoPtr->tools[infoPtr->nCurrentTool]; + + if (toolPtr->hinst) { + LoadString32A (toolPtr->hinst, (UINT32)toolPtr->lpszText, + infoPtr->szTipText, INFOTIPSIZE); + } + else if (toolPtr->lpszText) { + if (toolPtr->lpszText == LPSTR_TEXTCALLBACK32A) { + NMTTDISPINFOA ttnmdi; + + /* fill NMHDR struct */ + ttnmdi.hdr.hwndFrom = wndPtr->hwndSelf; + ttnmdi.hdr.idFrom = infoPtr->nCurrentTool; + ttnmdi.hdr.code = TTN_GETDISPINFOA; + + SendMessage32A (GetParent32 (wndPtr->hwndSelf), WM_NOTIFY, + (WPARAM32)wndPtr->wIDmenu, (LPARAM)&ttnmdi); + + /* FIXME: partial */ + lstrcpyn32A (infoPtr->szTipText, ttnmdi.szText, INFOTIPSIZE); + + } + else + lstrcpyn32A (infoPtr->szTipText, toolPtr->lpszText, INFOTIPSIZE); + } +} + + +static VOID +TOOLTIPS_CalcTipSize (WND *wndPtr, TOOLTIPS_INFO *infoPtr, LPSIZE32 lpSize) +{ + HDC32 hdc; + HFONT32 hOldFont; + RECT32 rc; + + hdc = GetDC32 (wndPtr->hwndSelf); + hOldFont = SelectObject32 (hdc, infoPtr->hFont); + DrawText32A (hdc, infoPtr->szTipText, -1, &rc, DT_EXTERNALLEADING | DT_CALCRECT); + SelectObject32 (hdc, hOldFont); + ReleaseDC32 (hdc, wndPtr->hwndSelf); + + lpSize->cx = rc.right - rc.left + 4; + lpSize->cy = rc.bottom - rc.top + 4; +} + + +static VOID +TOOLTIPS_Show (WND *wndPtr, TOOLTIPS_INFO *infoPtr) +{ + POINT32 pt; + SIZE32 size; + + infoPtr->nCurrentTool = infoPtr->nTool; + FIXME (tooltips, "Show tooltip %d!\n", infoPtr->nCurrentTool); + + GetCursorPos32 (&pt); + + TOOLTIPS_GetTipText (wndPtr, infoPtr); + TRACE (tooltips, "\"%s\"\n", infoPtr->szTipText); + + TOOLTIPS_CalcTipSize (wndPtr, infoPtr, &size); + + SetWindowPos32 (wndPtr->hwndSelf, HWND_TOP, pt.x, pt.y + 20, + size.cx, size.cy, SWP_SHOWWINDOW); + + SetTimer32 (wndPtr->hwndSelf, ID_TIMER2, infoPtr->nAutoPopTime, 0); +} + + +static VOID +TOOLTIPS_Hide (WND *wndPtr, TOOLTIPS_INFO *infoPtr) +{ + if (infoPtr->nCurrentTool == -1) + return; + + FIXME (tooltips, "Hide tooltip %d!\n", infoPtr->nCurrentTool); + KillTimer32 (wndPtr->hwndSelf, ID_TIMER2); + infoPtr->nCurrentTool = -1; + SetWindowPos32 (wndPtr->hwndSelf, HWND_TOP, 0, 0, 0, 0, SWP_HIDEWINDOW); +} + + static INT32 -TOOLTIPS_GetIndexFromInfoA (TOOLTIPS_INFO *infoPtr, LPTOOLINFOA lpToolInfo) +TOOLTIPS_GetIndexFromInfoA (TOOLTIPS_INFO *infoPtr, LPTTTOOLINFOA lpToolInfo) { TTTOOL_INFO *toolPtr; INT32 nIndex; @@ -52,28 +152,32 @@ TOOLTIPS_GetIndexFromInfoA (TOOLTIPS_INFO *infoPtr, LPTOOLINFOA lpToolInfo) return -1; } -/* + static INT32 -TOOLTIPS_GetIndexFromPoint (TOOLTIPS_INFO *infoPtr, LPPOINT32 lpPt) +TOOLTIPS_GetIndexFromPoint (TOOLTIPS_INFO *infoPtr, HWND32 hwnd, LPPOINT32 lpPt) { TTTOOL_INFO *toolPtr; - INT32 nIndex; + INT32 nIndex; for (nIndex = 0; nIndex < infoPtr->uNumTools; nIndex++) { toolPtr = &infoPtr->tools[nIndex]; - if (lpToolInfo->uFlags & TTF_IDISHWND) { - if (PtInRect ( + if (toolPtr->uFlags & TTF_IDISHWND) { + if ((HWND32)toolPtr->uId == hwnd) + return nIndex; } else { - + if (hwnd != toolPtr->hwnd) + continue; + if (!PtInRect32 (&toolPtr->rect, *lpPt)) + continue; return nIndex; } } return -1; } -*/ + static LRESULT TOOLTIPS_Activate (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) @@ -97,7 +201,7 @@ static LRESULT TOOLTIPS_AddTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); - LPTOOLINFOA lpToolInfo = (LPTOOLINFOA)lParam; + LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam; TTTOOL_INFO *toolPtr; if (lpToolInfo == NULL) return FALSE; @@ -142,10 +246,9 @@ TOOLTIPS_AddTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) } } - if (lpToolInfo->cbSize >= sizeof(TOOLINFOA)) + if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOA)) toolPtr->lParam = lpToolInfo->lParam; - return TRUE; } @@ -157,7 +260,7 @@ static LRESULT TOOLTIPS_DelTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); - LPTOOLINFOA lpToolInfo = (LPTOOLINFOA)lParam; + LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam; TTTOOL_INFO *toolPtr; INT32 nIndex; @@ -169,19 +272,37 @@ TOOLTIPS_DelTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) TRACE (tooltips, "index=%d\n", nIndex); - -/* delete tool from tool list */ -/* + /* delete text string */ toolPtr = &infoPtr->tools[nIndex]; - - // delete text string if ((toolPtr->hinst) && (toolPtr->lpszText)) { if (toolPtr->lpszText != LPSTR_TEXTCALLBACK32A) HeapFree (GetProcessHeap (), 0, toolPtr->lpszText); } + /* delete tool from tool list */ + if (infoPtr->uNumTools == 1) { + HeapFree (GetProcessHeap (), 0, infoPtr->tools); + infoPtr->tools = NULL; + } + else { + TTTOOL_INFO *oldTools = infoPtr->tools; + infoPtr->tools = + HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, + sizeof(TTTOOL_INFO) * (infoPtr->uNumTools - 1)); + + if (nIndex > 0) + memcpy (&infoPtr->tools[0], &oldTools[0], + nIndex * sizeof(TTTOOL_INFO)); + + if (nIndex < infoPtr->uNumTools - 1) + memcpy (&infoPtr->tools[nIndex], &oldTools[nIndex + 1], + (infoPtr->uNumTools - nIndex - 1) * sizeof(TTTOOL_INFO)); + + HeapFree (GetProcessHeap (), 0, oldTools); + } + + infoPtr->uNumTools--; -*/ return 0; } @@ -194,7 +315,7 @@ TOOLTIPS_EnumTools32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); UINT32 uIndex = (UINT32)wParam; - LPTOOLINFOA lpToolInfo = (LPTOOLINFOA)lParam; + LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam; TTTOOL_INFO *toolPtr; if (uIndex >= infoPtr->uNumTools) return FALSE; @@ -212,7 +333,7 @@ TOOLTIPS_EnumTools32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) lpToolInfo->hinst = toolPtr->hinst; lpToolInfo->lpszText = toolPtr->lpszText; - if (lpToolInfo->cbSize >= sizeof(TOOLINFOA)) + if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOA)) lpToolInfo->lParam = toolPtr->lParam; return TRUE; @@ -226,11 +347,21 @@ static LRESULT TOOLTIPS_GetCurrentTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); - LPTOOLINFOA lpti = (LPTOOLINFOA)lParam; + LPTTTOOLINFOA lpti = (LPTTTOOLINFOA)lParam; + TTTOOL_INFO *toolPtr; if (lpti) { - if (infoPtr->iCurrentTool > -1) { - /* FIXME */ + if (infoPtr->nCurrentTool > -1) { + toolPtr = &infoPtr->tools[infoPtr->nCurrentTool]; + + /* copy tool data */ + lpti->uFlags = toolPtr->uFlags; + lpti->rect = toolPtr->rect; + lpti->hinst = toolPtr->hinst; + lpti->lpszText = toolPtr->lpszText; + + if (lpti->cbSize >= sizeof(TTTOOLINFOA)) + lpti->lParam = toolPtr->lParam; return TRUE; } @@ -238,15 +369,51 @@ TOOLTIPS_GetCurrentTool32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) return FALSE; } else - return (infoPtr->iCurrentTool != -1); + return (infoPtr->nCurrentTool != -1); return FALSE; } // << TOOLTIPS_GetCurrentTool32W >> -// << TOOLTIPS_GetDelayTime >> -// << TOOLTIPS_GetMargin >> + + +static LRESULT +TOOLTIPS_GetDelayTime (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); + + switch (wParam) { + case TTDT_AUTOMATIC: + return infoPtr->nAutomaticTime; + + case TTDT_RESHOW: + return infoPtr->nReshowTime; + + case TTDT_AUTOPOP: + return infoPtr->nAutoPopTime; + + case TTDT_INITIAL: + return infoPtr->nInitialTime; + } + + return 0; +} + + +static LRESULT +TOOLTIPS_GetMargin (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); + LPRECT32 lpRect = (LPRECT32)lParam; + + lpRect->left = infoPtr->rcMargin.left; + lpRect->right = infoPtr->rcMargin.right; + lpRect->bottom = infoPtr->rcMargin.bottom; + lpRect->top = infoPtr->rcMargin.top; + + return 0; +} static LRESULT @@ -254,7 +421,7 @@ TOOLTIPS_GetMaxTipWidth (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); - return infoPtr->iMaxTipWidth; + return infoPtr->nMaxTipWidth; } @@ -262,11 +429,11 @@ static LRESULT TOOLTIPS_GetText32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); - LPTOOLINFOA lpti = (LPTOOLINFOA)lParam; + LPTTTOOLINFOA lpti = (LPTTTOOLINFOA)lParam; INT32 nIndex; if (!(lpti)) return 0; - if (lpti->cbSize < sizeof(TOOLINFOA)) return 0; + if (lpti->cbSize < sizeof(TTTOOLINFOA)) return 0; nIndex = TOOLTIPS_GetIndexFromInfoA (infoPtr, lpti); if (nIndex == -1) return 0; @@ -308,7 +475,7 @@ static LRESULT TOOLTIPS_GetToolInfo32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); - LPTOOLINFOA lpToolInfo = (LPTOOLINFOA)lParam; + LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam; TTTOOL_INFO *toolPtr; INT32 nIndex; @@ -328,7 +495,7 @@ TOOLTIPS_GetToolInfo32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) lpToolInfo->hinst = toolPtr->hinst; lpToolInfo->lpszText = toolPtr->lpszText; - if (lpToolInfo->cbSize >= sizeof(TOOLINFOA)) + if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOA)) lpToolInfo->lParam = toolPtr->lParam; return TRUE; @@ -336,7 +503,40 @@ TOOLTIPS_GetToolInfo32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) // << TOOLTIPS_GetToolInfo32W >> -// << TOOLTIPS_HitTest32A >> + + +static LRESULT +TOOLTIPS_HitTest32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); + LPTTHITTESTINFOA lptthit = (LPTTHITTESTINFOA)lParam; + TTTOOL_INFO *toolPtr; + INT32 nTool; + + if (lptthit == 0) + return FALSE; + + nTool = TOOLTIPS_GetIndexFromPoint (infoPtr, lptthit->hwnd, &lptthit->pt); + if (nTool == -1) + return FALSE; + + TRACE (tooltips, "nTool = %d!\n", nTool); + + /* copy tool data */ + toolPtr = &infoPtr->tools[nTool]; + lptthit->ti.cbSize = sizeof(TTTOOLINFOA); + lptthit->ti.uFlags = toolPtr->uFlags; + lptthit->ti.hwnd = toolPtr->hwnd; + lptthit->ti.uId = toolPtr->uId; + lptthit->ti.rect = toolPtr->rect; + lptthit->ti.hinst = toolPtr->hinst; + lptthit->ti.lpszText = toolPtr->lpszText; + lptthit->ti.lParam = toolPtr->lParam; + + return TRUE; +} + + // << TOOLTIPS_HitTest32W >> @@ -344,11 +544,11 @@ static LRESULT TOOLTIPS_NewToolRect32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); - LPTOOLINFOA lpti = (LPTOOLINFOA)lParam; + LPTTTOOLINFOA lpti = (LPTTTOOLINFOA)lParam; INT32 nIndex; if (!(lpti)) return 0; - if (lpti->cbSize < sizeof(TOOLINFOA)) return 0; + if (lpti->cbSize < sizeof(TTTOOLINFOA)) return 0; nIndex = TOOLTIPS_GetIndexFromInfoA (infoPtr, lpti); if (nIndex == -1) return 0; @@ -360,40 +560,126 @@ TOOLTIPS_NewToolRect32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) // << TOOLTIPS_NewToolRect32W >> -// << TOOLTIPS_Pop >> + + +static LRESULT +TOOLTIPS_Pop (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); + + TOOLTIPS_Hide (wndPtr, infoPtr); + + return 0; +} static LRESULT TOOLTIPS_RelayEvent (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); - LPMSG16 lpMsg = (LPMSG16)lParam; + LPMSG32 lpMsg = (LPMSG32)lParam; + POINT32 pt; - if (lpMsg == NULL) return 0; - - if (lpMsg->message == WM_MOUSEMOVE) { - FIXME (tooltips, "WM_MOUSEMOVE (%d %d)\n", lpMsg->pt.x, lpMsg->pt.y); + if (lpMsg == NULL) { + WARN (tooltips, "lpMsg == NULL!\n"); + return 0; } -// FIXME (tooltips, "empty stub!\n"); + pt = lpMsg->pt; + ScreenToClient32 (lpMsg->hwnd, &pt); + infoPtr->nOldTool = infoPtr->nTool; + infoPtr->nTool = TOOLTIPS_GetIndexFromPoint (infoPtr, lpMsg->hwnd, &pt); + TRACE (tooltips, "nTool = %d\n", infoPtr->nTool); + + switch (lpMsg->message) { + case WM_LBUTTONDOWN: + case WM_LBUTTONUP: + case WM_MBUTTONDOWN: + case WM_MBUTTONUP: + case WM_RBUTTONDOWN: + case WM_RBUTTONUP: + TOOLTIPS_Hide (wndPtr, infoPtr); + break; + + case WM_MOUSEMOVE: + TRACE (tooltips, "WM_MOUSEMOVE (%d %d)\n", pt.x, pt.y); + if (infoPtr->nTool != infoPtr->nOldTool) { + if (infoPtr->nOldTool == -1) + SetTimer32 (wndPtr->hwndSelf, ID_TIMER1, infoPtr->nInitialTime, 0); + else + TOOLTIPS_Hide (wndPtr, infoPtr); + SetTimer32 (wndPtr->hwndSelf, ID_TIMER1, infoPtr->nReshowTime, 0); + } + break; + } return 0; } -// << TOOLTIPS_SetDelayTime >> -// << TOOLTIPS_SetMargin >> +static LRESULT +TOOLTIPS_SetDelayTime (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); + INT32 nTime = (INT32)LOWORD(lParam); + + switch (wParam) { + case TTDT_AUTOMATIC: + if (nTime == 0) { + infoPtr->nAutomaticTime = 500; + infoPtr->nReshowTime = 100; + infoPtr->nAutoPopTime = 5000; + infoPtr->nInitialTime = 500; + } + else { + infoPtr->nAutomaticTime = nTime; + infoPtr->nReshowTime = nTime / 5; + infoPtr->nAutoPopTime = nTime * 10; + infoPtr->nInitialTime = nTime; + } + break; + + case TTDT_RESHOW: + infoPtr->nReshowTime = nTime; + break; + + case TTDT_AUTOPOP: + infoPtr->nAutoPopTime = nTime; + break; + + case TTDT_INITIAL: + infoPtr->nInitialTime = nTime; + break; + } + + return 0; +} + + +static LRESULT +TOOLTIPS_SetMargin (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); + LPRECT32 lpRect = (LPRECT32)lParam; + + infoPtr->rcMargin.left = lpRect->left; + infoPtr->rcMargin.right = lpRect->right; + infoPtr->rcMargin.bottom = lpRect->bottom; + infoPtr->rcMargin.top = lpRect->top; + + return 0; +} static LRESULT TOOLTIPS_SetMaxTipWidth (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); - INT32 iTemp = infoPtr->iMaxTipWidth; + INT32 nTemp = infoPtr->nMaxTipWidth; - infoPtr->iMaxTipWidth = (INT32)lParam; + infoPtr->nMaxTipWidth = (INT32)lParam; - return iTemp; + return nTemp; } @@ -423,7 +709,7 @@ static LRESULT TOOLTIPS_SetToolInfo32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); - LPTOOLINFOA lpToolInfo = (LPTOOLINFOA)lParam; + LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam; TTTOOL_INFO *toolPtr; INT32 nIndex; @@ -432,7 +718,7 @@ TOOLTIPS_SetToolInfo32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) nIndex = TOOLTIPS_GetIndexFromInfoA (infoPtr, lpToolInfo); if (nIndex == -1) return 0; - TRACE (tooltips, "index=%d\n", nIndex); + TRACE (tooltips, "nIndex=%d\n", nIndex); toolPtr = &infoPtr->tools[nIndex]; @@ -443,7 +729,10 @@ TOOLTIPS_SetToolInfo32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) toolPtr->rect = lpToolInfo->rect; toolPtr->hinst = lpToolInfo->hinst; - if (lpToolInfo->lpszText) { + if (lpToolInfo->hinst) { + toolPtr->lpszText = lpToolInfo->lpszText; + } + else if (lpToolInfo->lpszText) { if (lpToolInfo->lpszText == LPSTR_TEXTCALLBACK32A) toolPtr->lpszText = lpToolInfo->lpszText; else { @@ -455,7 +744,7 @@ TOOLTIPS_SetToolInfo32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) } } - if (lpToolInfo->cbSize >= sizeof(TOOLINFOA)) + if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOA)) toolPtr->lParam = lpToolInfo->lParam; return 0; @@ -475,6 +764,7 @@ static LRESULT TOOLTIPS_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr; + LOGFONT32A logFont; /* allocate memory for info structure */ infoPtr = (TOOLTIPS_INFO *)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, @@ -490,9 +780,19 @@ TOOLTIPS_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) infoPtr->bActive = TRUE; infoPtr->clrBk = GetSysColor32 (COLOR_INFOBK); infoPtr->clrText = GetSysColor32 (COLOR_INFOTEXT); - infoPtr->hFont = NULL; - infoPtr->iMaxTipWidth = -1; - infoPtr->iCurrentTool = -1; + + SystemParametersInfo32A( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 ); + infoPtr->hFont = CreateFontIndirect32A( &logFont ); + + infoPtr->nMaxTipWidth = -1; + infoPtr->nTool = -1; + infoPtr->nOldTool = -1; + infoPtr->nCurrentTool = -1; + + infoPtr->nAutomaticTime = 500; + infoPtr->nReshowTime = 100; + infoPtr->nAutoPopTime = 5000; + infoPtr->nInitialTime = 500; return 0; } @@ -523,6 +823,22 @@ TOOLTIPS_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) } +static LRESULT +TOOLTIPS_EraseBackground (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); + RECT32 rect; + HBRUSH32 hBrush; + + hBrush = CreateSolidBrush32 (infoPtr->clrBk); + GetClientRect32 (wndPtr->hwndSelf, &rect); + FillRect32 ((HDC32)wParam, &rect, hBrush); + DeleteObject32 (hBrush); + + return FALSE; +} + + static LRESULT TOOLTIPS_GetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) { @@ -532,8 +848,39 @@ TOOLTIPS_GetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) } -// << TOOLTIPS_MouseMove >> -// << TOOLTIPS_Paint >> +static LRESULT +TOOLTIPS_MouseMove (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); + + TOOLTIPS_Hide (wndPtr, infoPtr); + + return 0; +} + + +static LRESULT +TOOLTIPS_NcCreate (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + wndPtr->dwStyle &= 0x0000FFFF; + wndPtr->dwStyle |= (WS_POPUP | WS_BORDER); + + return TRUE; +} + + +static LRESULT +TOOLTIPS_Paint (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + HDC32 hdc; + PAINTSTRUCT32 ps; + + hdc = wParam==0 ? BeginPaint32 (wndPtr->hwndSelf, &ps) : (HDC32)wParam; + TOOLTIPS_Refresh (wndPtr, hdc); + if (!wParam) + EndPaint32 (wndPtr->hwndSelf, &ps); + return 0; +} static LRESULT @@ -552,7 +899,26 @@ TOOLTIPS_SetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) } -// << TOOLTIPS_Timer >> +static LRESULT +TOOLTIPS_Timer (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(wndPtr); + + switch (wParam) + { + case ID_TIMER1: + KillTimer32 (wndPtr->hwndSelf, ID_TIMER1); + TOOLTIPS_Show (wndPtr, infoPtr); + break; + + case ID_TIMER2: + TOOLTIPS_Hide (wndPtr, infoPtr); + break; + } + return 0; +} + + // << TOOLTIPS_WinIniChange >> @@ -585,8 +951,12 @@ ToolTipsWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam) return TOOLTIPS_GetCurrentTool32A (wndPtr, wParam, lParam); // case TTM_GETCURRENTTOOL32W: -// case TTM_GETDELAYTIME: /* 4.70 */ -// case TTM_GETMARGIN: /* 4.70 */ + + case TTM_GETDELAYTIME: + return TOOLTIPS_GetDelayTime (wndPtr, wParam, lParam); + + case TTM_GETMARGIN: + return TOOLTIPS_GetMargin (wndPtr, wParam, lParam); case TTM_GETMAXTIPWIDTH: return TOOLTIPS_GetMaxTipWidth (wndPtr, wParam, lParam); @@ -609,20 +979,28 @@ ToolTipsWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam) return TOOLTIPS_GetToolInfo32A (wndPtr, wParam, lParam); // case TTM_GETTOOLINFO32W: -// case TTM_HITTEST32A: + + case TTM_HITTEST32A: + return TOOLTIPS_HitTest32A (wndPtr, wParam, lParam); + // case TTM_HITTEST32W: case TTM_NEWTOOLRECT32A: return TOOLTIPS_NewToolRect32A (wndPtr, wParam, lParam); // case TTM_NEWTOOLRECT32W: -// case TTM_POP: /* 4.70 */ + + case TTM_POP: + return TOOLTIPS_Pop (wndPtr, wParam, lParam); case TTM_RELAYEVENT: return TOOLTIPS_RelayEvent (wndPtr, wParam, lParam); -// case TTM_SETDELAYTIME: /* 4.70 */ -// case TTM_SETMARGIN: /* 4.70 */ + case TTM_SETDELAYTIME: + return TOOLTIPS_SetDelayTime (wndPtr, wParam, lParam); + + case TTM_SETMARGIN: + return TOOLTIPS_SetMargin (wndPtr, wParam, lParam); case TTM_SETMAXTIPWIDTH: return TOOLTIPS_SetMaxTipWidth (wndPtr, wParam, lParam); @@ -651,19 +1029,26 @@ ToolTipsWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam) case WM_DESTROY: return TOOLTIPS_Destroy (wndPtr, wParam, lParam); + case WM_ERASEBKGND: + return TOOLTIPS_EraseBackground (wndPtr, wParam, lParam); + case WM_GETFONT: return TOOLTIPS_GetFont (wndPtr, wParam, lParam); -// case WM_MOUSEMOVE: -// return TOOLTIPS_MouseMove (wndPtr, wParam, lParam); + case WM_MOUSEMOVE: + return TOOLTIPS_MouseMove (wndPtr, wParam, lParam); -// case WM_PAINT: -// return TOOLTIPS_Paint (wndPtr, wParam); + case WM_NCCREATE: + return TOOLTIPS_NcCreate (wndPtr, wParam, lParam); + + case WM_PAINT: + return TOOLTIPS_Paint (wndPtr, wParam, lParam); case WM_SETFONT: return TOOLTIPS_SetFont (wndPtr, wParam, lParam); -// case WM_TIMER: + case WM_TIMER: + return TOOLTIPS_Timer (wndPtr, wParam, lParam); // case WM_WININICHANGE: diff --git a/controls/treeview.c b/controls/treeview.c index 65c1e6ec9b0..f04f40e27d1 100644 --- a/controls/treeview.c +++ b/controls/treeview.c @@ -24,6 +24,90 @@ #define TREEVIEW_GetInfoPtr(wndPtr) ((TREEVIEW_INFO *)wndPtr->wExtra[0]) + +static LRESULT +TREEVIEW_SetImageList (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(wndPtr); + HIMAGELIST himlTemp; + + if ((INT32)wParam == TVSIL_NORMAL) { + himlTemp = infoPtr->himlNormal; + infoPtr->himlNormal = (HIMAGELIST)lParam; + } + else if ((INT32)wParam == TVSIL_STATE) { + himlTemp = infoPtr->himlState; + infoPtr->himlState = (HIMAGELIST)lParam; + } + else + return NULL; + + return (LRESULT)himlTemp; +} + + + +static LRESULT +TREEVIEW_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TREEVIEW_INFO *infoPtr; + + /* allocate memory for info structure */ + infoPtr = (TREEVIEW_INFO *)HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, + sizeof(TREEVIEW_INFO)); + wndPtr->wExtra[0] = (DWORD)infoPtr; + + if (infoPtr == NULL) { + ERR (treeview, "could not allocate info memory!\n"); + return 0; + } + + if ((TREEVIEW_INFO*)wndPtr->wExtra[0] != infoPtr) { + ERR (treeview, "pointer assignment error!\n"); + return 0; + } + + /* set default settings */ + infoPtr->clrBk = GetSysColor32 (COLOR_WINDOW); + infoPtr->clrText = GetSysColor32 (COLOR_BTNTEXT); + infoPtr->himlNormal = NULL; + infoPtr->himlState = NULL; + + + return 0; +} + + +static LRESULT +TREEVIEW_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(wndPtr); + + + + + /* free tree view info data */ + HeapFree (GetProcessHeap (), 0, infoPtr); + + return 0; +} + + +static LRESULT +TREEVIEW_EraseBackground (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(wndPtr); + HBRUSH32 hBrush = CreateSolidBrush32 (infoPtr->clrBk); + RECT32 rect; + + GetClientRect32 (wndPtr->hwndSelf, &rect); + FillRect32 ((HDC32)wParam, &rect, hBrush); + DeleteObject32 (hBrush); + return TRUE; +} + + + LRESULT WINAPI TreeviewWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam) { @@ -31,11 +115,32 @@ TreeviewWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam) switch (uMsg) { -// case WM_CREATE: -// return TREEVIEW_Create (wndPtr, wParam, lParam); -// case WM_DESTROY: -// return TREEVIEW_Destroy (wndPtr, wParam, lParam); + +// case TVM_GETIMAGELIST: +// return TREEVIEW_GetImageList (wndPtr, wParam, lParam); + + + + case TVM_SETIMAGELIST: + return TREEVIEW_SetImageList (wndPtr, wParam, lParam); + + + + case WM_CREATE: + return TREEVIEW_Create (wndPtr, wParam, lParam); + + case WM_DESTROY: + return TREEVIEW_Destroy (wndPtr, wParam, lParam); + +// case EM_ENABLE: + + case WM_ERASEBKGND: + return TREEVIEW_EraseBackground (wndPtr, wParam, lParam); + + case WM_GETDLGCODE: + return DLGC_WANTARROWS | DLGC_WANTCHARS; + // case WM_PAINT: // return TREEVIEW_Paint (wndPtr, wParam); @@ -44,7 +149,7 @@ TreeviewWindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam) // case WM_TIMER: -// case WM_WININICHANGE: +// case WM_VSCROLL: default: if (uMsg >= WM_USER) diff --git a/debugger/dbg.y b/debugger/dbg.y index 14fd3b03ac8..40668245068 100644 --- a/debugger/dbg.y +++ b/debugger/dbg.y @@ -474,7 +474,6 @@ static void DEBUG_Main( int signal ) /* Put the display in a correct state */ - XUngrabPointer( display, CurrentTime ); XUngrabServer( display ); XFlush( display ); diff --git a/debugger/dbgmain.c b/debugger/dbgmain.c index 1785714dd30..e2b52a14e48 100644 --- a/debugger/dbgmain.c +++ b/debugger/dbgmain.c @@ -22,12 +22,6 @@ unsigned char ldt_flags_copy[LDT_SIZE]; Display * display; -int -XUngrabPointer( Display * d, Time t) -{ - return(0); -} - int XUngrabServer( Display * d ) { diff --git a/documentation/README.documentation b/documentation/README.documentation index 6a91dc698bd..a94d4b9fa7f 100644 --- a/documentation/README.documentation +++ b/documentation/README.documentation @@ -12,19 +12,23 @@ Wine Reference Manual Texinfo source for preliminary comprehensive documentation is in this directory. Use 'make info' in this directory to generate the GNU info version, 'make dvi' to generate the DVI version (hit 'r' to -ignore errors), or 'make all' for both. It is no longer installed by +ignore errors), or 'make all' for both. It is not installed by default. Wine API documentation Do a 'make manpages' in the Wine toplevel directory to generate the API manpages from the Wine source, or 'make man' in any source -subdirectory to generate manpages from only that directory. The -manpages will be deposited in [documentation/man3w]. You will need -c2man, available as source from http://www.debian.org/ and other -places. Apply the patch included at the end of this file for improved -terse description formatting. The man pages are not installed -automatically. +subdirectory to generate manpages from only that directory. Only +functions mentioned in Wine spec files will be documented; the +specific .spec files checked are set by the MANSPECS variable in +Make.rules. The manpages will be generated into +[documentation/man3w]. For HTML formatted manpages, do 'make +htmlpages' from the toplevel, or 'make html' from any +subdirectory. HTML formatted pages are generated into +[documentation/html]. You will need c2man as modified for Wine, +available as source or binary from ftp://ftp.winehq.com/pub/wine/. +The man pages are not installed by 'make install'. Other READMEs @@ -43,80 +47,59 @@ To improve the documentation of the Wine API, just add comments to the existing source. For example, /****************************************************************** - * PlayMetaFile32 (GDI32.265) Render metafile to device + * CopyMetaFile32A (GDI32.23) * - * The metafile is rendered in the device context specified by hdc. + * Copies the metafile corresponding to hSrcMetaFile to either + * a disk file, if a filename is given, or to a new memory based + * metafile, if lpFileName is NULL. * - * RETURNS + * RETURNS * - * Always returns TRUE. + * Handle to metafile copy on success, NULL on failure. * - * FIXME - * Wine metafiles are not 100% binary compatible with Microsoft Windows - * metafiles. + * BUGS + * + * Copying to disk returns NULL even if successful. */ -BOOL32 WINAPI PlayMetaFile32( - HDC32 hdc, /* handle of device context in which to render metafile */ - HMETAFILE32 hmf /* metafile handle */ -) { +HMETAFILE32 WINAPI CopyMetaFile32A( + HMETAFILE32 hSrcMetaFile, /* handle of metafile to copy */ + LPCSTR lpFilename /* filename if copying to a file */ +) { ... } becomes, after processing with c2man and nroff -man, - -PlayMetaFile32(3w) PlayMetaFile32(3w) +CopyMetaFileA(3w) CopyMetaFileA(3w) NAME - PlayMetaFile32 - PlayMetaFile32 (GDI32.265) Render - metafile to device + CopyMetaFileA - CopyMetaFile32A (GDI32.23) SYNOPSIS - BOOL32 PlayMetaFile32 + HMETAFILE32 CopyMetaFileA ( - HDC32 hdc, - HMETAFILE32 hmf + HMETAFILE32 hSrcMetaFile, + LPCSTR lpFilename ); PARAMETERS - HDC32 hdc - Handle of device context in which to render - metafile. + HMETAFILE32 hSrcMetaFile + Handle of metafile to copy. - HMETAFILE32 hmf - Metafile handle. + LPCSTR lpFilename + Filename if copying to a file. DESCRIPTION - The metafile is rendered in the device context specified - by hdc. + Copies the metafile corresponding to hSrcMetaFile to + either a disk file, if a filename is given, or to a new + memory based metafile, if lpFileName is NULL. RETURNS - Always returns TRUE. + Handle to metafile copy on success, NULL on failure. -FIXME - Wine metafiles are not 100% binary compatible with - Microsoft Windows metafiles. +BUGS + Copying to disk returns NULL even if successful. ----------------------------------------------------------------- -Patch for c2man: - -diff -u c2man-2.41.orig/manpage.c c2man-2.41/manpage.c ---- c2man-2.41.orig/manpage.c Tue Apr 23 21:13:44 1996 -+++ c2man-2.41/manpage.c Thu Dec 18 13:20:08 1997 -@@ -585,10 +585,15 @@ - const char *endterse, *afterdash = skipdash(start_line); - - /* find the end of the terse comment */ -- while (*c && *c != '.' && *c != '\n') -+ while (*c && *c != '\n') -+ { - c++; -+ /* '.' ends terse description only if it ends sentence */ -+ if (*(c-1)=='.' && *c && isspace(*c)) -+ break; -+ } - -- endterse = *c == '.' ? c+1 : c; -+ endterse = c; - *terse = alloc_string( - afterdash < endterse ? afterdash : start_line, - endterse); +SEE ALSO + GetMetaFileA(3w), GetMetaFileW(3w), CopyMetaFileW(3w), + PlayMetaFile(3w), SetMetaFileBitsEx(3w), GetMetaFileBit- + sEx(3w) diff --git a/documentation/cdrom-labels b/documentation/cdrom-labels new file mode 100644 index 00000000000..36297c5c81f --- /dev/null +++ b/documentation/cdrom-labels @@ -0,0 +1,42 @@ +If a program depends on the correct label and/or serial number for the +CD-Rom, you can use the following command to extract that information: + + dd if= bs=1 skip=32808 count=32 + +You need read access to the device, so perhaps you have to do it as root. +Put the resulting string (without trailing blanks) into your +wine.ini/.winerc file like: +Label= + +[FIXME: if someone knows how to get the serial number in Linux, please + put this information here]. + +If you have access to a Win32 system and C-compiler, you can compile the +following program to extract this information: + +------------------------- begin volinfo.c --------------------------- +#include +#include + +int main(int argc,char **argv[]) +{ + char drive, root[]="C:\\", label[1002], fsname[1002]; + DWORD serial, flags, filenamelen, labellen = 1000, fsnamelen = 1000; + + printf("Drive Serial Flags Filename-Length " + "Label Fsname\n"); + for (drive = 'C'; drive <= 'Z'; drive++) + { + root[0] = drive; + if (GetVolumeInformationA(root,label,labellen,&serial, + &filenamelen,&flags,fsname,fsnamelen)) + { + strcat(label,"\""); strcat (fsname,"\""); + printf("%c:\\ 0x%08lx 0x%08lx %15ld \"%-20s \"%-20s\n", + drive, (long) serial, (long) flags, (long) filenamelen, + label, fsname); + } + } + return 0; +} +------------------------- end volinfo.c ----------------------------- diff --git a/documentation/common_controls b/documentation/common_controls index 83ccdb8777b..722edec26dd 100644 --- a/documentation/common_controls +++ b/documentation/common_controls @@ -100,13 +100,10 @@ 3.10 List View Control ---------------------- Author: - Dummy written by Eric Kohl. + James Michael Mastros Status: - - Dummy control. No functionality. - - Notes: - This control is NEEDED in many places. Any volunteers?? + - Development in progress. 3.11 Month Calendar Control @@ -213,10 +210,10 @@ Eric Kohl Status: - - Development in progress. + - Development in progress. Almost done. Notes - The control does not show. + The control does not behave very well. This will be fixed 3.20 Trackbar Control @@ -233,9 +230,14 @@ 3.21 Tree View Control ---------------------- + Author: + Dummy written by Eric Kohl. + Status: - - Nothing done at all. - - needed. + - Dummy control. No functionality. + + Notes: + Author needed!! Any volunteers?? 3.22 Updown Control diff --git a/documentation/debugging b/documentation/debugging index dcc9de04d2c..b929c8ff505 100644 --- a/documentation/debugging +++ b/documentation/debugging @@ -257,3 +257,82 @@ Wine-dbg> Written by Marcus Meissner , additions welcome. +------- + +Here are some useful debugging tips, added by Andreas Mohr: + + +a) If you have a program crashing at such an early loader phase that you can't +use the Wine debugger normally, but Wine already executes the program's +start code, then you may use a special trick: +You should do a +wine -debugmsg +relay program +to get a listing of the functions the program calls in its start function. +Now you do a +wine -debug winfile.exe +This way, you get into Wine-dbg. Now you can set a breakpoint on any +function the program calls in the start function and just type "c" to bypass +the eventual calls of Winfile to this function until you are finally at the +place where this function gets called by the crashing start function. +Now you can proceed with your debugging as usual. + + +b) If you try to run a program and it quits after showing an error messagebox, +the problem can usually be identified in the return value of one of the +functions executed before MessageBox(). +That's why you should re-run the program with e.g. +wine -debugmsg +relay &>relmsg +Then do a "more relmsg" and search for the last occurrence of a call to the string "MESSAGEBOX". +This is a line like +Call USER.1: MESSAGEBOX(0x0000,0x01ff1246 "Runtime error 219 at 0004:1056.",0x00000000,0x1010) ret=01f7:2160 ds=01ff + +In my example the lines before the call to MessageBox() look like that: + +Call KERNEL.96: FREELIBRARY(0x0347) ret=01cf:1033 ds=01ff +CallTo16(func=033f:0072,ds=01ff,0x0000) +Ret KERNEL.96: FREELIBRARY() retval=0x0001 ret=01cf:1033 ds=01ff +Call KERNEL.96: FREELIBRARY(0x036f) ret=01cf:1043 ds=01ff +CallTo16(func=0367:0072,ds=01ff,0x0000) +Ret KERNEL.96: FREELIBRARY() retval=0x0001 ret=01cf:1043 ds=01ff +Call KERNEL.96: FREELIBRARY(0x031f) ret=01cf:105c ds=01ff +CallTo16(func=0317:0072,ds=01ff,0x0000) +Ret KERNEL.96: FREELIBRARY() retval=0x0001 ret=01cf:105c ds=01ff +Call USER.171: WINHELP(0x02ac,0x01ff05b4 "COMET.HLP",0x0002,0x00000000) ret=01cf:1070 ds=01ff +CallTo16(func=0117:0080,ds=01ff) +Call WPROCS.24: TASK_RESCHEDULE() ret=00a7:0a2d ds=002b +Ret WPROCS.24: TASK_RESCHEDULE() retval=0x0000 ret=00a7:0a2d ds=002b +Ret USER.171: WINHELP() retval=0x0001 ret=01cf:1070 ds=01ff +Call KERNEL.96: FREELIBRARY(0x01be) ret=01df:3e29 ds=01ff +Ret KERNEL.96: FREELIBRARY() retval=0x0000 ret=01df:3e29 ds=01ff +Call KERNEL.52: FREEPROCINSTANCE(0x02cf00ba) ret=01f7:1460 ds=01ff +Ret KERNEL.52: FREEPROCINSTANCE() retval=0x0001 ret=01f7:1460 ds=01ff +Call USER.1: MESSAGEBOX(0x0000,0x01ff1246 "Runtime error 219 at 0004:1056.",0x00000000,0x1010) ret=01f7:2160 ds=01ff + +I think that the call to MessageBox() in this example is _not_ caused by a wrong result value of some previously executed function (it's happening quite often like that), but instead the messagebox complains about a runtime error at 0x0004:0x1056. +As the segment value of the address is only "4", I think that that is only an internal program value. But the offset address reveals something quite interesting: +Offset 1056 is _very_ close to the return address of FREELIBRARY(): + +Call KERNEL.96: FREELIBRARY(0x031f) ret=01cf:105c ds=01ff + ^^^^ +Provided that segment 0x0004 is indeed segment 0x1cf, we now we can use IDA (available at ftp://ftp.uni-koeln.de/pc/msdos/programming/assembler/ida35bx.zip) to +disassemble the part that caused the error. We just have to find the address of +the call to FreeLibrary(). Some lines before that the runtime error occurred. +But be careful ! In some cases you don't have to disassemble the main program, but instead some DLL called by it in order to find the correct place where the runtime error occurred. That can be determined by finding the origin of the segment value (in this case 0x1cf). + +c) If you have created a relay file of some crashing program and want to set a +breakpoint at a certain location which is not yet available as the +program loads the breakpoint's segment during execution, +you may set a breakpoint to GetVersion16/32 as those functions are called +very often. +Then do a "c" until you are able to set this breakpoint without error message. + +d) Some useful programs: +IDA: ftp://ftp.uni-koeln.de/pc/msdos/programming/assembler/ida35bx.zip +*Very* good DOS disassembler ! It's badly needed for debugging Wine sometimes. + +XRAY: ftp://ftp.th-darmstadt.de/pub/machines/ms-dos/SimTel/msdos/asmutil/xray15.zip +Traces DOS calls (Int 21h, DPMI, ...). Use it with Windows to correct +file management problems etc. + +pedump: http://oak.oakland.edu/pub/simtelnet/win95/prog/pedump.zip +Dumps the imports and exports of a PE (Portable Executable) DLL. diff --git a/documentation/win95look b/documentation/win95look index c57e7aeb57c..bd04bf95021 100644 --- a/documentation/win95look +++ b/documentation/win95look @@ -30,9 +30,6 @@ MenuHighlightTopNudge= # Nudges the top of the highlight bar MenuHighlightLeftNudge= # Nudges the left side of the highlight bar MenuHighlightRightNudge= # Nudges the right side of the highlight bar MenuHighlightBottomNudge= # Nudges the bottom of the highlight bar -CaptionHeight= # Sets the height of window captions -CaptionLeftNudge= # Nudges the caption text of windows down/up -CaptionTopNudge= # Nudges the caption text of windows left/right CaptionAlignment=[left|right|center] # Sets the alignment of caption text SysControlNudge= # Nudges the system menu left/right MaxControlNudge= # Nudges the maximize control left/right diff --git a/files/directory.c b/files/directory.c index 26ded31df85..9835a7d01c6 100644 --- a/files/directory.c +++ b/files/directory.c @@ -285,7 +285,7 @@ BOOL32 WINAPI CreateDirectory32A( LPCSTR path, DOS_FULL_NAME full_name; TRACE(file, "(%s,%p)\n", path, lpsecattribs ); - if (DOSFS_IsDevice( path )) + if (DOSFS_GetDevice( path )) { TRACE(file, "cannot use device '%s'!\n",path); DOS_ERROR( ER_AccessDenied, EC_AccessDenied, SA_Abort, EL_Disk ); @@ -353,7 +353,7 @@ BOOL32 WINAPI RemoveDirectory32A( LPCSTR path ) TRACE(file, "'%s'\n", path ); - if (DOSFS_IsDevice( path )) + if (DOSFS_GetDevice( path )) { TRACE(file, "cannot remove device '%s'!\n", path); DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk ); diff --git a/files/dos_fs.c b/files/dos_fs.c index 8c1659df048..1204d09def1 100644 --- a/files/dos_fs.c +++ b/files/dos_fs.c @@ -46,11 +46,25 @@ typedef struct /* Chars we don't want to see in DOS file names */ #define INVALID_DOS_CHARS "*?<>|\"+=,;[] \345" -static const char *DOSFS_Devices[] = { -"CON","PRN","NUL","AUX","LPT1","LPT2","LPT3","LPT4","COM1","COM2","COM3","COM4","SCSIMGR$" +static const DOS_DEVICE DOSFS_Devices[] = +/* name, device flags (see Int 21/AX=0x4400) */ +{ + { "CON", 0xc0d3 }, + { "PRN", 0xa0c0 }, + { "NUL", 0x80c4 }, + { "AUX", 0x80c0 }, + { "LPT1", 0xa0c0 }, + { "LPT2", 0xa0c0 }, + { "LPT3", 0xa0c0 }, + { "LPT4", 0xc0d3 }, + { "COM1", 0x80c0 }, + { "COM2", 0x80c0 }, + { "COM3", 0x80c0 }, + { "COM4", 0x80c0 }, + { "SCSIMGR$", 0xc0c0 }, + { "HPSCAN", 0xc0c0 } }; - #define GET_DRIVE(path) \ (((path)[1] == ':') ? toupper((path)[0]) - 'A' : DOSFS_CurDrive) @@ -554,11 +568,11 @@ BOOL32 DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf, /*********************************************************************** - * DOSFS_IsDevice + * DOSFS_GetDevice * - * Check if a DOS file name represents a DOS device. + * Check if a DOS file name represents a DOS device and return the device. */ -BOOL32 DOSFS_IsDevice( const char *name ) +const DOS_DEVICE *DOSFS_GetDevice( const char *name ) { int i; const char *p; @@ -568,14 +582,14 @@ BOOL32 DOSFS_IsDevice( const char *name ) if ((p = strrchr( name, '\\' ))) name = p + 1; for (i = 0; i < sizeof(DOSFS_Devices)/sizeof(DOSFS_Devices[0]); i++) { - const char *dev = DOSFS_Devices[i]; + const char *dev = DOSFS_Devices[i].name; if (!lstrncmpi32A( dev, name, strlen(dev) )) { p = name + strlen( dev ); - if (!*p || (*p == '.')) return TRUE; + if (!*p || (*p == '.')) return &DOSFS_Devices[i]; } } - return FALSE; + return NULL; } /*********************************************************************** @@ -595,15 +609,15 @@ HFILE32 DOSFS_OpenDevice( const char *name, int unixmode ) if ((p = strrchr( name, '\\' ))) name = p + 1; for (i = 0; i < sizeof(DOSFS_Devices)/sizeof(DOSFS_Devices[0]); i++) { - const char *dev = DOSFS_Devices[i]; + const char *dev = DOSFS_Devices[i].name; if (!lstrncmpi32A( dev, name, strlen(dev) )) { p = name + strlen( dev ); if (!*p || (*p == '.')) { /* got it */ - if (!strcmp(DOSFS_Devices[i],"NUL")) + if (!strcmp(DOSFS_Devices[i].name,"NUL")) return FILE_OpenUnixFile("/dev/null",unixmode); - if (!strcmp(DOSFS_Devices[i],"CON")) { + if (!strcmp(DOSFS_Devices[i].name,"CON")) { switch (unixmode) { case O_RDONLY: return GetStdHandle( STD_INPUT_HANDLE ); @@ -617,7 +631,7 @@ HFILE32 DOSFS_OpenDevice( const char *name, int unixmode ) break; } } - if (!strcmp(DOSFS_Devices[i],"SCSIMGR$")) { + if (!strcmp(DOSFS_Devices[i].name,"SCSIMGR$")) { if ((handle = FILE_Alloc( &file )) == INVALID_HANDLE_VALUE32) return HFILE_ERROR32; else { @@ -625,7 +639,15 @@ HFILE32 DOSFS_OpenDevice( const char *name, int unixmode ) return handle; } } - FIXME(dosfs,"device open %s not supported (yet)\n",DOSFS_Devices[i]); + if (!strcmp(DOSFS_Devices[i].name,"HPSCAN")) { + if ((handle = FILE_Alloc( &file )) == INVALID_HANDLE_VALUE32) + return HFILE_ERROR32; + else { + file->unix_name = HEAP_strdupA( SystemHeap, 0, name ); + return handle; + } + } + FIXME(dosfs,"device open %s not supported (yet)\n",DOSFS_Devices[i].name); return HFILE_ERROR32; } } @@ -770,7 +792,12 @@ BOOL32 DOSFS_GetFullName( LPCSTR name, BOOL32 check_last, DOS_FULL_NAME *full ) (p_s < full->short_name + sizeof(full->short_name) - 1) && (p_l < full->long_name + sizeof(full->long_name) - 1)) { - *p_l++ = *p_s++ = tolower(*name); + *p_s++ = tolower(*name); + /* If the drive is case-sensitive we want to create new */ + /* files in lower-case otherwise we can't reopen them */ + /* under the same short name. */ + if (flags & DRIVE_CASE_SENSITIVE) *p_l++ = tolower(*name); + else *p_l++ = *name; name++; } *p_l = *p_s = '\0'; diff --git a/files/drive.c b/files/drive.c index de25491cd3d..8dcf69e63ba 100644 --- a/files/drive.c +++ b/files/drive.c @@ -971,6 +971,7 @@ BOOL32 WINAPI GetVolumeInformation32A( LPCSTR root, LPSTR label, LPSTR fsname, DWORD fsname_len ) { int drive; + char *cp; /* FIXME, SetLastErrors missing */ @@ -985,7 +986,13 @@ BOOL32 WINAPI GetVolumeInformation32A( LPCSTR root, LPSTR label, drive = toupper(root[0]) - 'A'; } if (!DRIVE_IsValid( drive )) return FALSE; - if (label) lstrcpyn32A( label, DOSDrives[drive].label, label_len ); + if (label) + { + lstrcpyn32A( label, DOSDrives[drive].label, label_len ); + for (cp = label; *cp; cp++); + while (cp != label && *(cp-1) == ' ') cp--; + *cp = '\0'; + } if (serial) *serial = DOSDrives[drive].serial; /* Set the filesystem information */ diff --git a/files/file.c b/files/file.c index c48bbc68336..d9ac9776202 100644 --- a/files/file.c +++ b/files/file.c @@ -197,7 +197,7 @@ FILE_OBJECT *FILE_GetFile( HFILE32 handle ) * * Release a DOS file obtained with FILE_GetFile. */ -static void FILE_ReleaseFile( FILE_OBJECT *file ) +void FILE_ReleaseFile( FILE_OBJECT *file ) { K32OBJ_DecCount( &file->header ); } @@ -350,7 +350,7 @@ HFILE32 FILE_Open( LPCSTR path, INT32 mode ) if (!path) return HFILE_ERROR32; - if (DOSFS_IsDevice( path )) + if (DOSFS_GetDevice( path )) { HFILE32 ret; @@ -388,7 +388,7 @@ static HFILE32 FILE_Create( LPCSTR path, int mode, int unique ) if (!path) return INVALID_HANDLE_VALUE32; - if (DOSFS_IsDevice( path )) + if (DOSFS_GetDevice( path )) { WARN(file, "cannot create DOS device '%s'!\n", path); DOS_ERROR( ER_AccessDenied, EC_NotFound, SA_Abort, EL_Disk ); @@ -1278,7 +1278,7 @@ BOOL32 WINAPI DeleteFile32A( LPCSTR path ) TRACE(file, "'%s'\n", path ); - if (DOSFS_IsDevice( path )) + if (DOSFS_GetDevice( path )) { WARN(file, "cannot remove DOS device '%s'!\n", path); DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk ); diff --git a/files/profile.c b/files/profile.c index 4110e7154ea..c1f0daf492e 100644 --- a/files/profile.c +++ b/files/profile.c @@ -9,6 +9,8 @@ #include #include +#include + #include "windows.h" #include "file.h" #include "heap.h" @@ -36,11 +38,16 @@ typedef struct char *dos_name; char *unix_name; char *filename; + time_t mtime; } PROFILE; -/* Cached profile file */ -static PROFILE CurProfile = { FALSE, NULL, NULL }; +#define N_CACHED_PROFILES 10 + +/* Cached profile files */ +static PROFILE *MRUProfile[N_CACHED_PROFILES]={NULL}; + +#define CurProfile (MRUProfile[0]) /* wine.ini profile content */ static PROFILESECTION *WineProfile; @@ -205,17 +212,22 @@ static PROFILESECTION *PROFILE_Load( FILE *file ) next_section = §ion->next; next_key = §ion->key; prev_key = NULL; + + TRACE(profile, "New section: '%s'\n",section->name); + continue; } } + + p2=p+strlen(p) - 1; + while ((p2 > p) && ((*p2 == '\n') || PROFILE_isspace(*p2))) *p2--='\0'; + if ((p2 = strchr( p, '=' )) != NULL) { char *p3 = p2 - 1; while ((p3 > p) && PROFILE_isspace(*p3)) *p3-- = '\0'; *p2++ = '\0'; while (*p2 && PROFILE_isspace(*p2)) p2++; - p3 = p2 + strlen(p2) - 1; - while ((p3 > p2) && ((*p3 == '\n') || PROFILE_isspace(*p3))) *p3--='\0'; } if(*p || !prev_key || *prev_key->name) @@ -341,9 +353,16 @@ static BOOL32 PROFILE_FlushFile(void) char *p, buffer[MAX_PATHNAME_LEN]; const char *unix_name; FILE *file = NULL; + struct stat buf; - if (!CurProfile.changed || !CurProfile.dos_name) return TRUE; - if (!(unix_name = CurProfile.unix_name) || !(file = fopen(unix_name, "w"))) + if(!CurProfile) + { + WARN(profile, "No current profile!\n"); + return FALSE; + } + + if (!CurProfile->changed || !CurProfile->dos_name) return TRUE; + if (!(unix_name = CurProfile->unix_name) || !(file = fopen(unix_name, "w"))) { /* Try to create it in $HOME/.wine */ /* FIXME: this will need a more general solution */ @@ -352,7 +371,7 @@ static BOOL32 PROFILE_FlushFile(void) strcpy( buffer, p ); strcat( buffer, "/.wine/" ); p = buffer + strlen(buffer); - strcpy( p, strrchr( CurProfile.dos_name, '\\' ) + 1 ); + strcpy( p, strrchr( CurProfile->dos_name, '\\' ) + 1 ); CharLower32A( p ); file = fopen( buffer, "w" ); unix_name = buffer; @@ -361,14 +380,16 @@ static BOOL32 PROFILE_FlushFile(void) if (!file) { - WARN(profile, "could not save profile file %s\n", CurProfile.dos_name); + WARN(profile, "could not save profile file %s\n", CurProfile->dos_name); return FALSE; } - TRACE(profile, "Saving '%s' into '%s'\n", CurProfile.dos_name, unix_name ); - PROFILE_Save( file, CurProfile.section ); + TRACE(profile, "Saving '%s' into '%s'\n", CurProfile->dos_name, unix_name ); + PROFILE_Save( file, CurProfile->section ); fclose( file ); - CurProfile.changed = FALSE; + CurProfile->changed = FALSE; + if(!stat(unix_name,&buf)) + CurProfile->mtime=buf.st_mtime; return TRUE; } @@ -384,13 +405,25 @@ static BOOL32 PROFILE_Open( LPCSTR filename ) char buffer[MAX_PATHNAME_LEN]; char *newdos_name, *p; FILE *file = NULL; + int i,j; + struct stat buf; + PROFILE *tempProfile; - if (CurProfile.filename && !strcmp( filename, CurProfile.filename )) - { - TRACE(profile, "(%s): already opened\n", - filename ); - return TRUE; - } + /* First time around */ + + if(!CurProfile) + for(i=0;ichanged=FALSE; + MRUProfile[i]->section=NULL; + MRUProfile[i]->dos_name=NULL; + MRUProfile[i]->unix_name=NULL; + MRUProfile[i]->filename=NULL; + MRUProfile[i]->mtime=0; + } + + /* Check for a match */ if (strchr( filename, '/' ) || strchr( filename, '\\' ) || strchr( filename, ':' )) @@ -404,25 +437,61 @@ static BOOL32 PROFILE_Open( LPCSTR filename ) strcat( buffer, filename ); if (!DOSFS_GetFullName( buffer, FALSE, &full_name )) return FALSE; } - if (CurProfile.dos_name && - !strcmp( full_name.short_name, CurProfile.dos_name )) - { - TRACE(profile, "(%s): already opened\n", - filename ); - return TRUE; - } - /* Flush the previous profile */ + for(i=0;ifilename && !strcmp( filename, MRUProfile[i]->filename )) || + (MRUProfile[i]->dos_name && !strcmp( full_name.short_name, MRUProfile[i]->dos_name ))) + { + if(i) + { + PROFILE_FlushFile(); + tempProfile=MRUProfile[i]; + for(j=i;j>0;j--) + MRUProfile[j]=MRUProfile[j-1]; + CurProfile=tempProfile; + } + if(!stat(CurProfile->unix_name,&buf) && CurProfile->mtime==buf.st_mtime) + { + TRACE(profile, "(%s): already opened (mru=%d)\n", + filename, i ); + return TRUE; + } + TRACE(profile, "(%s): already opened, needs refreshing (mru=%d)\n", + filename, i ); + } + } + + /* Rotate the oldest to the top to be replaced */ + + if(i==N_CACHED_PROFILES) + { + tempProfile=MRUProfile[N_CACHED_PROFILES-1]; + for(i=N_CACHED_PROFILES-1;i>0;i--) + MRUProfile[i]=MRUProfile[i-1]; + CurProfile=tempProfile; + } + + /* Flush the profile */ + + if(CurProfile->filename) + { + PROFILE_FlushFile(); + PROFILE_Free( CurProfile->section ); + if (CurProfile->dos_name) HeapFree( SystemHeap, 0, CurProfile->dos_name ); + if (CurProfile->unix_name) HeapFree( SystemHeap, 0, CurProfile->unix_name ); + if (CurProfile->filename) HeapFree( SystemHeap, 0, CurProfile->filename ); + CurProfile->changed=FALSE; + CurProfile->section=NULL; + CurProfile->dos_name=NULL; + CurProfile->unix_name=NULL; + CurProfile->filename=NULL; + CurProfile->mtime=0; + } newdos_name = HEAP_strdupA( SystemHeap, 0, full_name.short_name ); - PROFILE_FlushFile(); - PROFILE_Free( CurProfile.section ); - if (CurProfile.dos_name) HeapFree( SystemHeap, 0, CurProfile.dos_name ); - if (CurProfile.unix_name) HeapFree( SystemHeap, 0, CurProfile.unix_name ); - if (CurProfile.filename) HeapFree( SystemHeap, 0, CurProfile.filename ); - CurProfile.section = NULL; - CurProfile.dos_name = newdos_name; - CurProfile.filename = HEAP_strdupA( SystemHeap, 0, filename ); + CurProfile->dos_name = newdos_name; + CurProfile->filename = HEAP_strdupA( SystemHeap, 0, filename ); /* Try to open the profile file, first in $HOME/.wine */ @@ -438,13 +507,13 @@ static BOOL32 PROFILE_Open( LPCSTR filename ) { TRACE(profile, "(%s): found it in %s\n", filename, buffer ); - CurProfile.unix_name = HEAP_strdupA( SystemHeap, 0, buffer ); + CurProfile->unix_name = HEAP_strdupA( SystemHeap, 0, buffer ); } } if (!file) { - CurProfile.unix_name = HEAP_strdupA( SystemHeap, 0, + CurProfile->unix_name = HEAP_strdupA( SystemHeap, 0, full_name.long_name ); if ((file = fopen( full_name.long_name, "r" ))) TRACE(profile, "(%s): found it in %s\n", @@ -453,8 +522,10 @@ static BOOL32 PROFILE_Open( LPCSTR filename ) if (file) { - CurProfile.section = PROFILE_Load( file ); + CurProfile->section = PROFILE_Load( file ); fclose( file ); + if(!stat(CurProfile->unix_name,&buf)) + CurProfile->mtime=buf.st_mtime; } else { @@ -481,7 +552,7 @@ static INT32 PROFILE_GetSection( PROFILESECTION *section, LPCSTR section_name, if (section->name && !strcasecmp( section->name, section_name )) { UINT32 oldlen = len; - for (key = section->key; key; key = key->next) + for (key = section->key; key && *(key->name); key = key->next) { if (len <= 2) break; if (IS_ENTRY_COMMENT(key->name)) continue; /* Skip comments */ @@ -507,7 +578,7 @@ static INT32 PROFILE_GetSection( PROFILESECTION *section, LPCSTR section_name, buffer[-1] = '\0'; return oldlen - 2; } - return oldlen - len + 1; + return oldlen - len; } section = section->next; } @@ -529,14 +600,14 @@ static INT32 PROFILE_GetString( LPCSTR section, LPCSTR key_name, if (!def_val) def_val = ""; if (key_name && key_name[0]) { - key = PROFILE_Find( &CurProfile.section, section, key_name, FALSE ); + key = PROFILE_Find( &CurProfile->section, section, key_name, FALSE ); PROFILE_CopyEntry( buffer, (key && key->value) ? key->value : def_val, len, FALSE ); TRACE(profile, "('%s','%s','%s'): returning '%s'\n", section, key_name, def_val, buffer ); return strlen( buffer ); } - return PROFILE_GetSection(CurProfile.section, section, buffer, len, + return PROFILE_GetSection(CurProfile->section, section, buffer, len, FALSE, FALSE); } @@ -552,8 +623,8 @@ static BOOL32 PROFILE_SetString( LPCSTR section_name, LPCSTR key_name, if (!key_name) /* Delete a whole section */ { TRACE(profile, "('%s')\n", section_name); - CurProfile.changed |= PROFILE_DeleteSection( &CurProfile.section, - section_name ); + CurProfile->changed |= PROFILE_DeleteSection( &CurProfile->section, + section_name ); return TRUE; /* Even if PROFILE_DeleteSection() has failed, this is not an error on application's level.*/ } @@ -561,13 +632,13 @@ static BOOL32 PROFILE_SetString( LPCSTR section_name, LPCSTR key_name, { TRACE(profile, "('%s','%s')\n", section_name, key_name ); - CurProfile.changed |= PROFILE_DeleteKey( &CurProfile.section, - section_name, key_name ); + CurProfile->changed |= PROFILE_DeleteKey( &CurProfile->section, + section_name, key_name ); return TRUE; /* same error handling as above */ } else /* Set the key value */ { - PROFILEKEY *key = PROFILE_Find( &CurProfile.section, section_name, + PROFILEKEY *key = PROFILE_Find( &CurProfile->section, section_name, key_name, TRUE ); TRACE(profile, "('%s','%s','%s'): \n", section_name, key_name, value ); @@ -584,7 +655,7 @@ static BOOL32 PROFILE_SetString( LPCSTR section_name, LPCSTR key_name, } else TRACE(profile, " creating key\n" ); key->value = HEAP_strdupA( SystemHeap, 0, value ); - CurProfile.changed = TRUE; + CurProfile->changed = TRUE; } return TRUE; } @@ -1013,7 +1084,7 @@ INT32 WINAPI GetPrivateProfileSection32A( LPCSTR section, LPSTR buffer, UINT32 len, LPCSTR filename ) { if (PROFILE_Open( filename )) - return PROFILE_GetSection(CurProfile.section, section, buffer, len, + return PROFILE_GetSection(CurProfile->section, section, buffer, len, FALSE, TRUE); return 0; @@ -1092,7 +1163,7 @@ WORD WINAPI GetPrivateProfileSectionNames16( LPSTR buffer, WORD size, if (PROFILE_Open( filename )) { buf=buffer; cursize=0; - section=CurProfile.section; + section=CurProfile->section; for ( ; section; section = section->next) if (section->name) { l=strlen (section->name); @@ -1122,7 +1193,7 @@ WORD WINAPI GetPrivateProfileStruct32A (LPCSTR section, LPCSTR key, PROFILEKEY *k; if (PROFILE_Open( filename )) { - k=PROFILE_Find ( &CurProfile.section, section, key, FALSE); + k=PROFILE_Find ( &CurProfile->section, section, key, FALSE); if (!k) return FALSE; lstrcpyn32A( buf, k->value, strlen(k->value)); return TRUE; diff --git a/graphics/ddraw.c b/graphics/ddraw.c index 2c5add556e6..442089145b2 100644 --- a/graphics/ddraw.c +++ b/graphics/ddraw.c @@ -71,9 +71,11 @@ #include "d3d.h" #include "debug.h" #include "compobj.h" +#include "spy.h" +#include "message.h" #ifdef HAVE_LIBXXF86DGA -#include +#include "ts_xf86dga.h" #endif /* restore signal handlers overwritten by XF86DGA @@ -105,8 +107,6 @@ static GUID XLIB_DirectDraw_GUID = { /* 1574a740-dc61-11d1-8407-f7875a7d1879 */ }; static struct IDirectDrawSurface3_VTable dga_dds3vt, xshm_dds3vt, xlib_dds3vt; -static struct IDirectDrawSurface2_VTable dga_dds2vt, xshm_dds2vt, xlib_dds2vt; -static struct IDirectDrawSurface_VTable dga_ddsvt, xshm_ddsvt, xlib_ddsvt; static struct IDirectDraw_VTable dga_ddvt, xshm_ddvt, xlib_ddvt; static struct IDirectDraw2_VTable dga_dd2vt, xshm_dd2vt, xlib_dd2vt; static struct IDirectDrawClipper_VTable ddclipvt; @@ -114,12 +114,23 @@ static struct IDirectDrawPalette_VTable dga_ddpalvt, xshm_ddpalvt, xlib_ddpalvt; static struct IDirect3D_VTable d3dvt; static struct IDirect3D2_VTable d3d2vt; +void Xlib_MessagePump(HWND32 hwnd) { + MSG32 msg32; + + while (PeekMessage32A(&msg32,0,0,0,PM_NOYIELD)) { + GetMessage32A(&msg32,0,0,0); + TranslateMessage32(&msg32); + DispatchMessage32A(&msg32); + } +} + + BOOL32 DDRAW_DGA_Available() { #ifdef HAVE_LIBXXF86DGA int evbase, evret; - return (getuid() == 0) && XF86DGAQueryExtension(display,&evbase,&evret); + return (getuid() == 0)&&TSXF86DGAQueryExtension(display,&evbase,&evret); #else /* defined(HAVE_LIBXXF86DGA) */ return 0; #endif /* defined(HAVE_LIBXXF86DGA) */ @@ -138,12 +149,13 @@ DDRAW_XShm_Available() HRESULT WINAPI DirectDrawEnumerate32A(LPDDENUMCALLBACK32A ddenumproc,LPVOID data) { if (DDRAW_DGA_Available()) { - ddenumproc(&DGA_DirectDraw_GUID,"WINE with XFree86 DGA","wine-dga",data); + ddenumproc(&DGA_DirectDraw_GUID,"WINE with XFree86 DGA","display",data); } if (DDRAW_XShm_Available()) { - ddenumproc(&XSHM_DirectDraw_GUID,"WINE with MIT XShm","wine-xshm",data); + ddenumproc(&XSHM_DirectDraw_GUID,"WINE with MIT XShm","display",data); } - ddenumproc(&XLIB_DirectDraw_GUID,"WINE with Xlib","wine-xlib",data); + ddenumproc(&XLIB_DirectDraw_GUID,"WINE with Xlib","display",data); + ddenumproc(NULL,"WINE","display",data); return 0; } @@ -285,52 +297,6 @@ static void _dump_DDSCAPS(DWORD flagmask) { DUMP("\n"); } -static void _dump_DDCAPS(DWORD flagmask) { - int i; - const struct { - DWORD mask; - char *name; -} flags[] = { -#define FE(x) { x, #x}, - FE(DDCAPS_3D) - FE(DDCAPS_ALIGNBOUNDARYDEST) - FE(DDCAPS_ALIGNSIZEDEST) - FE(DDCAPS_ALIGNBOUNDARYSRC) - FE(DDCAPS_ALIGNSIZESRC) - FE(DDCAPS_ALIGNSTRIDE) - FE(DDCAPS_BLT) - FE(DDCAPS_BLTQUEUE) - FE(DDCAPS_BLTFOURCC) - FE(DDCAPS_BLTSTRETCH) - FE(DDCAPS_GDI) - FE(DDCAPS_OVERLAY) - FE(DDCAPS_OVERLAYCANTCLIP) - FE(DDCAPS_OVERLAYFOURCC) - FE(DDCAPS_OVERLAYSTRETCH) - FE(DDCAPS_PALETTE) - FE(DDCAPS_PALETTEVSYNC) - FE(DDCAPS_READSCANLINE) - FE(DDCAPS_STEREOVIEW) - FE(DDCAPS_VBI) - FE(DDCAPS_ZBLTS) - FE(DDCAPS_ZOVERLAYS) - FE(DDCAPS_COLORKEY) - FE(DDCAPS_ALPHA) - FE(DDCAPS_COLORKEYHWASSIST) - FE(DDCAPS_NOHARDWARE) - FE(DDCAPS_BLTCOLORFILL) - FE(DDCAPS_BANKSWITCHED) - FE(DDCAPS_BLTDEPTHFILL) - FE(DDCAPS_CANCLIP) - FE(DDCAPS_CANCLIPSTRETCHED) - FE(DDCAPS_CANBLTSYSMEM) - }; - for (i=0;iLock(%p,%p,%08lx,%08lx)\n", this,lprect,lpddsd,flags,(DWORD)hnd); @@ -412,6 +381,7 @@ static HRESULT WINAPI IDirectDrawSurface_Lock( (lprect->top*this->s.lpitch) + (lprect->left*(this->s.ddraw->d.depth/8)); } else { + assert(this->s.surface); lpddsd->y.lpSurface = this->s.surface; } lpddsd->dwFlags = DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT|DDSD_PITCH|DDSD_LPSURFACE; @@ -422,21 +392,18 @@ static HRESULT WINAPI IDirectDrawSurface_Lock( return 0; } -static HRESULT WINAPI DGA_IDirectDrawSurface_Unlock( - LPDIRECTDRAWSURFACE this,LPVOID surface +static HRESULT WINAPI DGA_IDirectDrawSurface3_Unlock( + LPDIRECTDRAWSURFACE3 this,LPVOID surface ) { TRACE(ddraw,"(%p)->Unlock(%p)\n",this,surface); return 0; } -static HRESULT WINAPI XShm_IDirectDrawSurface_Unlock( - LPDIRECTDRAWSURFACE this,LPVOID surface +static HRESULT WINAPI XShm_IDirectDrawSurface3_Unlock( + LPDIRECTDRAWSURFACE3 this,LPVOID surface ) { #ifdef HAVE_LIBXXSHM TRACE(ddraw,"(%p)->Unlock(%p)\n",this,surface); - if (!this->t.xshm.surface_is_image_data) { - FIXME(ddraw,"(%p)->Unlock(%p) needs an image copy!\n",this,surface); - } /* FIXME: is it really right to display the image on unlock? * or should it wait for a Flip()? */ TSXShmPutImage(display, @@ -447,41 +414,40 @@ static HRESULT WINAPI XShm_IDirectDrawSurface_Unlock( this->t.xshm.image->width, this->t.xshm.image->height, False); +/* if (this->s.palette && this->s.palette->cm) { TSXInstallColormap(display,this->s.palette->cm); } - TSXSync(display,False); +*/ + /*TSXSync(display,False);*/ + EVENT_Synchronize(); return 0; #else /* defined(HAVE_LIBXXSHM) */ return E_UNEXPECTED; #endif /* defined(HAVE_LIBXXSHM) */ } -static HRESULT WINAPI Xlib_IDirectDrawSurface_Unlock( - LPDIRECTDRAWSURFACE this,LPVOID surface +static HRESULT WINAPI Xlib_IDirectDrawSurface3_Unlock( + LPDIRECTDRAWSURFACE3 this,LPVOID surface ) { + Xlib_MessagePump(this->s.ddraw->e.xlib.window); + TRACE(ddraw,"(%p)->Unlock(%p)\n",this,surface); - if (!this->t.xshm.surface_is_image_data) { - FIXME(ddraw,"(%p)->Unlock(%p) needs an image copy!\n",this,surface); - } - /* FIXME: is it really right to display the image on unlock? - * or should it wait for a Flip()? */ - TSXPutImage(display, + TSXPutImage( display, this->s.ddraw->e.xlib.drawable, DefaultGCOfScreen(screen), this->t.xlib.image, 0, 0, 0, 0, this->t.xlib.image->width, - this->t.xlib.image->width); - if (this->s.palette && this->s.palette->cm) { - TSXInstallColormap(display,this->s.palette->cm); - } - TSXSync(display,False); + this->t.xlib.image->height + ); + /*TSXSetWindowColormap(display,this->s.ddraw->e.xlib.drawable,this->s.palette->cm);*/ + EVENT_Synchronize(); return 0; } -static HRESULT WINAPI DGA_IDirectDrawSurface_Flip( - LPDIRECTDRAWSURFACE this,LPDIRECTDRAWSURFACE flipto,DWORD dwFlags +static HRESULT WINAPI DGA_IDirectDrawSurface3_Flip( + LPDIRECTDRAWSURFACE3 this,LPDIRECTDRAWSURFACE3 flipto,DWORD dwFlags ) { #ifdef HAVE_LIBXXF86DGA TRACE(ddraw,"(%p)->Flip(%p,%08lx)\n",this,flipto,dwFlags); @@ -491,11 +457,12 @@ static HRESULT WINAPI DGA_IDirectDrawSurface_Flip( else flipto = this; } - XF86DGASetViewPort(display,DefaultScreen(display),0,flipto->t.dga.fb_height); + TSXF86DGASetViewPort(display,DefaultScreen(display),0,flipto->t.dga.fb_height); + if (flipto->s.palette && flipto->s.palette->cm) { - XF86DGAInstallColormap(display,DefaultScreen(display),flipto->s.palette->cm); + TSXF86DGAInstallColormap(display,DefaultScreen(display),flipto->s.palette->cm); } - while (!XF86DGAViewPortChanged(display,DefaultScreen(display),2)) { + while (!TSXF86DGAViewPortChanged(display,DefaultScreen(display),2)) { } if (flipto!=this) { int tmp; @@ -515,8 +482,8 @@ static HRESULT WINAPI DGA_IDirectDrawSurface_Flip( #endif /* defined(HAVE_LIBXXF86DGA) */ } -static HRESULT WINAPI XShm_IDirectDrawSurface_Flip( - LPDIRECTDRAWSURFACE this,LPDIRECTDRAWSURFACE flipto,DWORD dwFlags +static HRESULT WINAPI XShm_IDirectDrawSurface3_Flip( + LPDIRECTDRAWSURFACE3 this,LPDIRECTDRAWSURFACE3 flipto,DWORD dwFlags ) { #ifdef HAVE_LIBXXSHM TRACE(ddraw,"(%p)->Flip(%p,%08lx)\n",this,flipto,dwFlags); @@ -534,10 +501,12 @@ static HRESULT WINAPI XShm_IDirectDrawSurface_Flip( flipto->t.xshm.image->width, flipto->t.xshm.image->height, False); +/* if (flipto->s.palette && flipto->s.palette->cm) { TSXInstallColormap(display,flipto->s.palette->cm); } - TSXSync(display,False); +*/ + EVENT_Synchronize(); if (flipto!=this) { XImage *tmp; tmp = this->t.xshm.image; @@ -550,8 +519,8 @@ static HRESULT WINAPI XShm_IDirectDrawSurface_Flip( #endif /* defined(HAVE_LIBXXSHM) */ } -static HRESULT WINAPI Xlib_IDirectDrawSurface_Flip( - LPDIRECTDRAWSURFACE this,LPDIRECTDRAWSURFACE flipto,DWORD dwFlags +static HRESULT WINAPI Xlib_IDirectDrawSurface3_Flip( + LPDIRECTDRAWSURFACE3 this,LPDIRECTDRAWSURFACE3 flipto,DWORD dwFlags ) { TRACE(ddraw,"(%p)->Flip(%p,%08lx)\n",this,flipto,dwFlags); if (!flipto) { @@ -566,30 +535,32 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface_Flip( flipto->t.xlib.image, 0, 0, 0, 0, flipto->t.xlib.image->width, - flipto->t.xlib.image->width); - if (flipto->s.palette && flipto->s.palette->cm) { - TSXInstallColormap(display,flipto->s.palette->cm); - } - TSXSync(display,False); + flipto->t.xlib.image->height); + TSXSetWindowColormap(display,this->s.ddraw->e.xlib.drawable,this->s.palette->cm); + EVENT_Synchronize(); if (flipto!=this) { XImage *tmp; - tmp = this->t.xshm.image; - this->t.xshm.image = flipto->t.xshm.image; - flipto->t.xshm.image = tmp; + LPVOID *surf; + tmp = this->t.xlib.image; + this->t.xlib.image = flipto->t.xlib.image; + flipto->t.xlib.image = tmp; + surf = this->s.surface; + this->s.surface = flipto->s.surface; + flipto->s.surface = surf; } return 0; } -static HRESULT WINAPI IDirectDrawSurface_SetPalette( - LPDIRECTDRAWSURFACE this,LPDIRECTDRAWPALETTE pal +static HRESULT WINAPI IDirectDrawSurface3_SetPalette( + LPDIRECTDRAWSURFACE3 this,LPDIRECTDRAWPALETTE pal ) { TRACE(ddraw,"(%p)->SetPalette(%p)\n",this,pal); this->s.palette = pal; /* probably addref it too */ return 0; } -static HRESULT WINAPI IDirectDrawSurface_Blt( - LPDIRECTDRAWSURFACE this,LPRECT32 rdst,LPDIRECTDRAWSURFACE src,LPRECT32 rsrc,DWORD dwFlags,LPDDBLTFX lpbltfx +static HRESULT WINAPI IDirectDrawSurface3_Blt( + LPDIRECTDRAWSURFACE3 this,LPRECT32 rdst,LPDIRECTDRAWSURFACE3 src,LPRECT32 rsrc,DWORD dwFlags,LPDDBLTFX lpbltfx ) { RECT32 xdst,xsrc; int i,j; @@ -656,8 +627,8 @@ static HRESULT WINAPI IDirectDrawSurface_Blt( return 0; } -static HRESULT WINAPI IDirectDrawSurface_BltFast( - LPDIRECTDRAWSURFACE this,DWORD dstx,DWORD dsty,LPDIRECTDRAWSURFACE src,LPRECT32 rsrc,DWORD trans +static HRESULT WINAPI IDirectDrawSurface3_BltFast( + LPDIRECTDRAWSURFACE3 this,DWORD dstx,DWORD dsty,LPDIRECTDRAWSURFACE3 src,LPRECT32 rsrc,DWORD trans ) { int i,bpp; if (TRACE_ON(ddraw)) { @@ -677,8 +648,8 @@ static HRESULT WINAPI IDirectDrawSurface_BltFast( return 0; } -static HRESULT WINAPI IDirectDrawSurface_BltBatch( - LPDIRECTDRAWSURFACE this,LPDDBLTBATCH ddbltbatch,DWORD x,DWORD y +static HRESULT WINAPI IDirectDrawSurface3_BltBatch( + LPDIRECTDRAWSURFACE3 this,LPDDBLTBATCH ddbltbatch,DWORD x,DWORD y ) { TRACE(ddraw,"(%p)->BltBatch(%p,%08lx,%08lx),stub!\n", this,ddbltbatch,x,y @@ -686,16 +657,16 @@ static HRESULT WINAPI IDirectDrawSurface_BltBatch( return 0; } -static HRESULT WINAPI IDirectDrawSurface_GetCaps( - LPDIRECTDRAWSURFACE this,LPDDSCAPS caps +static HRESULT WINAPI IDirectDrawSurface3_GetCaps( + LPDIRECTDRAWSURFACE3 this,LPDDSCAPS caps ) { TRACE(ddraw,"(%p)->GetCaps(%p)\n",this,caps); caps->dwCaps = DDCAPS_PALETTE; /* probably more */ return 0; } -static HRESULT WINAPI IDirectDrawSurface_GetSurfaceDesc( - LPDIRECTDRAWSURFACE this,LPDDSURFACEDESC ddsd +static HRESULT WINAPI IDirectDrawSurface3_GetSurfaceDesc( + LPDIRECTDRAWSURFACE3 this,LPDDSURFACEDESC ddsd ) { if (TRACE_ON(ddraw)) { TRACE(ddraw, "(%p)->GetSurfaceDesc(%p)\n", @@ -718,12 +689,12 @@ static HRESULT WINAPI IDirectDrawSurface_GetSurfaceDesc( return 0; } -static ULONG WINAPI IDirectDrawSurface_AddRef(LPDIRECTDRAWSURFACE this) { +static ULONG WINAPI IDirectDrawSurface3_AddRef(LPDIRECTDRAWSURFACE3 this) { TRACE(ddraw,"(%p)->AddRef()\n",this); return ++(this->ref); } -static ULONG WINAPI DGA_IDirectDrawSurface_Release(LPDIRECTDRAWSURFACE this) { +static ULONG WINAPI DGA_IDirectDrawSurface3_Release(LPDIRECTDRAWSURFACE3 this) { TRACE(ddraw,"(%p)->Release()\n",this); #ifdef HAVE_LIBXXF86DGA if (!--(this->ref)) { @@ -741,16 +712,15 @@ static ULONG WINAPI DGA_IDirectDrawSurface_Release(LPDIRECTDRAWSURFACE this) { return this->ref; } -static ULONG WINAPI XShm_IDirectDrawSurface_Release(LPDIRECTDRAWSURFACE this) { +static ULONG WINAPI XShm_IDirectDrawSurface3_Release(LPDIRECTDRAWSURFACE3 this) { TRACE(ddraw,"(%p)->Release()\n",this); #ifdef HAVE_LIBXXSHM if (!--(this->ref)) { this->s.ddraw->lpvtbl->fnRelease(this->s.ddraw); - if (!this->t.xshm.surface_is_image_data) { - HeapFree(GetProcessHeap(),0,this->s.surface); - } - XShmDetach(display,&this->t.xshm.shminfo); - XDestroyImage(this->t.xshm.image); + HeapFree(GetProcessHeap(),0,this->s.surface); + this->t.xshm.image->data = NULL; + TSXShmDetach(display,&this->t.xshm.shminfo); + TSXDestroyImage(this->t.xshm.image); shmdt(this->t.xshm.shminfo.shmaddr); shmctl(this->t.xshm.shminfo.shmid, IPC_RMID, 0); HeapFree(GetProcessHeap(),0,this); @@ -760,22 +730,22 @@ static ULONG WINAPI XShm_IDirectDrawSurface_Release(LPDIRECTDRAWSURFACE this) { return this->ref; } -static ULONG WINAPI Xlib_IDirectDrawSurface_Release(LPDIRECTDRAWSURFACE this) { +static ULONG WINAPI Xlib_IDirectDrawSurface3_Release(LPDIRECTDRAWSURFACE3 this) { TRACE(ddraw,"(%p)->Release()\n",this); if (!--(this->ref)) { this->s.ddraw->lpvtbl->fnRelease(this->s.ddraw); - if (!this->t.xshm.surface_is_image_data) { - HeapFree(GetProcessHeap(),0,this->s.surface); - } - XDestroyImage(this->t.xshm.image); + HeapFree(GetProcessHeap(),0,this->s.surface); + this->t.xlib.image->data = NULL; + TSXDestroyImage(this->t.xlib.image); + this->t.xlib.image = 0; HeapFree(GetProcessHeap(),0,this); return 0; } return this->ref; } -static HRESULT WINAPI IDirectDrawSurface_GetAttachedSurface( - LPDIRECTDRAWSURFACE this,LPDDSCAPS lpddsd,LPDIRECTDRAWSURFACE *lpdsf +static HRESULT WINAPI IDirectDrawSurface3_GetAttachedSurface( + LPDIRECTDRAWSURFACE3 this,LPDDSCAPS lpddsd,LPDIRECTDRAWSURFACE3 *lpdsf ) { TRACE(ddraw, "(%p)->GetAttachedSurface(%p,%p)\n", this, lpddsd, lpdsf); @@ -792,674 +762,83 @@ static HRESULT WINAPI IDirectDrawSurface_GetAttachedSurface( return 0; } -static HRESULT WINAPI IDirectDrawSurface_Initialize( - LPDIRECTDRAWSURFACE this,LPDIRECTDRAW ddraw,LPDDSURFACEDESC lpdsfd +static HRESULT WINAPI IDirectDrawSurface3_Initialize( + LPDIRECTDRAWSURFACE3 this,LPDIRECTDRAW ddraw,LPDDSURFACEDESC lpdsfd ) { return DDERR_ALREADYINITIALIZED; } -static HRESULT WINAPI IDirectDrawSurface_GetPixelFormat( - LPDIRECTDRAWSURFACE this,LPDDPIXELFORMAT pf -) { - return _getpixelformat(this->s.ddraw,pf); -} - -static HRESULT WINAPI IDirectDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE this,DWORD dwFlags) { - FIXME(ddraw,"(%p)->(0x%08lx),stub!\n", - this,dwFlags - ); - return 0; -} - -static HRESULT WINAPI IDirectDrawSurface_GetOverlayPosition( - LPDIRECTDRAWSURFACE this,LPLONG x1,LPLONG x2 -) { - FIXME(ddraw,"(%p)->(%p,%p),stub!\n", - this,x1,x2 - ); - return 0; -} - -static HRESULT WINAPI IDirectDrawSurface_SetClipper( - LPDIRECTDRAWSURFACE this,LPDIRECTDRAWCLIPPER clipper -) { - FIXME(ddraw,"(%p)->(%p),stub!\n",this,clipper); - return 0; -} - -static HRESULT WINAPI IDirectDrawSurface_AddAttachedSurface( - LPDIRECTDRAWSURFACE this,LPDIRECTDRAWSURFACE surf -) { - FIXME(ddraw,"(%p)->(%p),stub!\n",this,surf); - this->s.backbuffer = surf; - return 0; -} - -static HRESULT WINAPI IDirectDrawSurface_GetDC(LPDIRECTDRAWSURFACE this,HDC32* lphdc) { - FIXME(ddraw,"(%p)->GetDC(%p),stub!\n",this,lphdc); - return 0; -} - -static HRESULT WINAPI DGA_IDirectDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE this,REFIID refiid,LPVOID *obj) { - char xrefiid[50]; - - WINE_StringFromCLSID((LPCLSID)refiid,xrefiid); - TRACE(ddraw,"(%p)->(%s,%p)\n",this,xrefiid,obj); - - /* thats version 3 (DirectX 5) */ - if (!memcmp(&IID_IDirectDrawSurface3,refiid,sizeof(IID_IDirectDrawSurface3))) { - this->lpvtbl = (LPDIRECTDRAWSURFACE_VTABLE)&dga_dds3vt; - this->lpvtbl->fnAddRef(this); - *obj = this; - return 0; - } - /* thats version 2 (DirectX 3) */ - if (!memcmp(&IID_IDirectDrawSurface2,refiid,sizeof(IID_IDirectDrawSurface2))) { - this->lpvtbl = (LPDIRECTDRAWSURFACE_VTABLE)&dga_dds2vt; - *obj = this; - return 0; - } - /* thats us */ - if (!memcmp(&IID_IDirectDrawSurface,refiid,sizeof(IID_IDirectDrawSurface))) { - this->lpvtbl->fnAddRef(this); - *obj = this; - return 0; - } - WARN(ddraw,"(%p):interface for IID %s _NOT_ found!\n",this,xrefiid); - return OLE_E_ENUM_NOMORE; -} - -static HRESULT WINAPI XShm_IDirectDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE this,REFIID refiid,LPVOID *obj) { - char xrefiid[50]; - - WINE_StringFromCLSID((LPCLSID)refiid,xrefiid); - TRACE(ddraw,"(%p)->(%s,%p)\n",this,xrefiid,obj); - - /* thats version 3 (DirectX 5) */ - if ( !memcmp(&IID_IDirectDrawSurface3,refiid,sizeof(IID_IDirectDrawSurface3))) { - this->lpvtbl->fnAddRef(this); - this->lpvtbl = (LPDIRECTDRAWSURFACE_VTABLE)&xshm_dds3vt; - *obj = this; - return 0; - } - /* thats version 2 (DirectX 3) */ - if (!memcmp(&IID_IDirectDrawSurface2,refiid,sizeof(IID_IDirectDrawSurface2))) { - this->lpvtbl = (LPDIRECTDRAWSURFACE_VTABLE)&xshm_dds2vt; - *obj = this; - return 0; - } - /* thats us */ - if (!memcmp(&IID_IDirectDrawSurface,refiid,sizeof(IID_IDirectDrawSurface))) { - this->lpvtbl->fnAddRef(this); - *obj = this; - return 0; - } - WARN(ddraw,"(%p):interface for IID %s _NOT_ found!\n",this,xrefiid); - return OLE_E_ENUM_NOMORE; -} - -static HRESULT WINAPI Xlib_IDirectDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE this,REFIID refiid,LPVOID *obj) { - char xrefiid[50]; - - WINE_StringFromCLSID((LPCLSID)refiid,xrefiid); - TRACE(ddraw,"(%p)->(%s,%p)\n",this,xrefiid,obj); - - /* thats version 3 (DirectX 5) */ - if (!memcmp(&IID_IDirectDrawSurface3,refiid,sizeof(IID_IDirectDrawSurface3))) { - this->lpvtbl = (LPDIRECTDRAWSURFACE_VTABLE)&xlib_dds3vt; - this->lpvtbl->fnAddRef(this); - *obj = this; - return 0; - } - /* thats version 2 (DirectX 3) */ - if (!memcmp(&IID_IDirectDrawSurface2,refiid,sizeof(IID_IDirectDrawSurface2))) { - this->lpvtbl = (LPDIRECTDRAWSURFACE_VTABLE)&xlib_dds2vt; - *obj = this; - return 0; - } - /* thats us */ - if (!memcmp(&IID_IDirectDrawSurface,refiid,sizeof(IID_IDirectDrawSurface))) { - this->lpvtbl->fnAddRef(this); - *obj = this; - return 0; - } - WARN(ddraw,"(%p):interface for IID %s _NOT_ found!\n",this,xrefiid); - return OLE_E_ENUM_NOMORE; -} - -static HRESULT WINAPI IDirectDrawSurface_IsLost(LPDIRECTDRAWSURFACE this) { - return 0; /* hmm */ -} - -static struct IDirectDrawSurface_VTable dga_ddsvt = { - DGA_IDirectDrawSurface_QueryInterface, - IDirectDrawSurface_AddRef, - DGA_IDirectDrawSurface_Release, - IDirectDrawSurface_AddAttachedSurface, - (void*)5, - IDirectDrawSurface_Blt, - IDirectDrawSurface_BltBatch, - IDirectDrawSurface_BltFast, - (void*)9, - (void*)10, - (void*)11, - DGA_IDirectDrawSurface_Flip, - IDirectDrawSurface_GetAttachedSurface, - IDirectDrawSurface_GetBltStatus, - IDirectDrawSurface_GetCaps, - (void*)16, - (void*)17, - IDirectDrawSurface_GetDC, - (void*)19, - IDirectDrawSurface_GetOverlayPosition, - (void*)21, - IDirectDrawSurface_GetPixelFormat, - IDirectDrawSurface_GetSurfaceDesc, - IDirectDrawSurface_Initialize, - IDirectDrawSurface_IsLost, - IDirectDrawSurface_Lock, - (void*)27, - (void*)28, - IDirectDrawSurface_SetClipper, - (void*)30, - (void*)31, - IDirectDrawSurface_SetPalette, - DGA_IDirectDrawSurface_Unlock, - (void*)34, - (void*)35, - (void*)36, -}; - -static struct IDirectDrawSurface_VTable xshm_ddsvt = { - XShm_IDirectDrawSurface_QueryInterface, - IDirectDrawSurface_AddRef, - XShm_IDirectDrawSurface_Release, - IDirectDrawSurface_AddAttachedSurface, - (void*)5, - IDirectDrawSurface_Blt, - IDirectDrawSurface_BltBatch, - IDirectDrawSurface_BltFast, - (void*)9, - (void*)10, - (void*)11, - XShm_IDirectDrawSurface_Flip, - IDirectDrawSurface_GetAttachedSurface, - IDirectDrawSurface_GetBltStatus, - IDirectDrawSurface_GetCaps, - (void*)16, - (void*)17, - IDirectDrawSurface_GetDC, - (void*)19, - IDirectDrawSurface_GetOverlayPosition, - (void*)21, - IDirectDrawSurface_GetPixelFormat, - IDirectDrawSurface_GetSurfaceDesc, - IDirectDrawSurface_Initialize, - IDirectDrawSurface_IsLost, - IDirectDrawSurface_Lock, - (void*)27, - (void*)28, - IDirectDrawSurface_SetClipper, - (void*)30, - (void*)31, - IDirectDrawSurface_SetPalette, - XShm_IDirectDrawSurface_Unlock, - (void*)34, - (void*)35, - (void*)36, -}; - -static struct IDirectDrawSurface_VTable xlib_ddsvt = { - Xlib_IDirectDrawSurface_QueryInterface, - IDirectDrawSurface_AddRef, - Xlib_IDirectDrawSurface_Release, - IDirectDrawSurface_AddAttachedSurface, - (void*)5, - IDirectDrawSurface_Blt, - IDirectDrawSurface_BltBatch, - IDirectDrawSurface_BltFast, - (void*)9, - (void*)10, - (void*)11, - Xlib_IDirectDrawSurface_Flip, - IDirectDrawSurface_GetAttachedSurface, - IDirectDrawSurface_GetBltStatus, - IDirectDrawSurface_GetCaps, - (void*)16, - (void*)17, - IDirectDrawSurface_GetDC, - (void*)19, - IDirectDrawSurface_GetOverlayPosition, - (void*)21, - IDirectDrawSurface_GetPixelFormat, - IDirectDrawSurface_GetSurfaceDesc, - IDirectDrawSurface_Initialize, - IDirectDrawSurface_IsLost, - IDirectDrawSurface_Lock, - (void*)27, - (void*)28, - IDirectDrawSurface_SetClipper, - (void*)30, - (void*)31, - IDirectDrawSurface_SetPalette, - Xlib_IDirectDrawSurface_Unlock, - (void*)34, - (void*)35, - (void*)36, -}; - -/****************************************************************************** - * IDirectDrawSurface2 - * - * calls IDirectDrawSurface methods where possible - */ -static HRESULT WINAPI IDirectDrawSurface2_Lock( - LPDIRECTDRAWSURFACE2 this,LPRECT32 lprect,LPDDSURFACEDESC lpddsd,DWORD flags, HANDLE32 hnd -) { - return IDirectDrawSurface_Lock((LPDIRECTDRAWSURFACE)this,lprect,lpddsd,flags,hnd); -} - -static HRESULT WINAPI DGA_IDirectDrawSurface2_Unlock( - LPDIRECTDRAWSURFACE2 this,LPVOID surface -) { - return DGA_IDirectDrawSurface_Unlock((LPDIRECTDRAWSURFACE)this,surface); -} - -static HRESULT WINAPI XShm_IDirectDrawSurface2_Unlock( - LPDIRECTDRAWSURFACE2 this,LPVOID surface -) { - return DGA_IDirectDrawSurface_Unlock((LPDIRECTDRAWSURFACE)this,surface); -} - -static HRESULT WINAPI Xlib_IDirectDrawSurface2_Unlock( - LPDIRECTDRAWSURFACE2 this,LPVOID surface -) { - return DGA_IDirectDrawSurface_Unlock((LPDIRECTDRAWSURFACE)this,surface); -} - -static HRESULT WINAPI IDirectDrawSurface2_SetPalette( - LPDIRECTDRAWSURFACE2 this,LPDIRECTDRAWPALETTE pal -) { - return IDirectDrawSurface_SetPalette((LPDIRECTDRAWSURFACE)this,pal); -} - -static ULONG WINAPI IDirectDrawSurface2_AddRef(LPDIRECTDRAWSURFACE2 this) { - TRACE(ddraw,"(%p)->AddRef()\n",this); - return ++(this->ref); -} - -static ULONG WINAPI DGA_IDirectDrawSurface2_Release(LPDIRECTDRAWSURFACE2 this) { - return DGA_IDirectDrawSurface_Release((LPDIRECTDRAWSURFACE)this); -} - -static ULONG WINAPI XShm_IDirectDrawSurface2_Release(LPDIRECTDRAWSURFACE2 this) { - return XShm_IDirectDrawSurface_Release((LPDIRECTDRAWSURFACE)this); -} - -static ULONG WINAPI Xlib_IDirectDrawSurface2_Release(LPDIRECTDRAWSURFACE2 this) { - return Xlib_IDirectDrawSurface_Release((LPDIRECTDRAWSURFACE)this); -} - -static HRESULT WINAPI IDirectDrawSurface2_Blt( - LPDIRECTDRAWSURFACE2 this,LPRECT32 rdst,LPDIRECTDRAWSURFACE2 src,LPRECT32 rsrc,DWORD dwFlags,LPDDBLTFX lpbltfx -) { - return IDirectDrawSurface_Blt((LPDIRECTDRAWSURFACE)this, rdst, (LPDIRECTDRAWSURFACE)src, rsrc, dwFlags,lpbltfx); -} - -static HRESULT WINAPI IDirectDrawSurface2_BltFast( - LPDIRECTDRAWSURFACE2 this,DWORD dstx,DWORD dsty,LPDIRECTDRAWSURFACE2 src,LPRECT32 rsrc,DWORD trans -) { - return IDirectDrawSurface_BltFast((LPDIRECTDRAWSURFACE)this,dstx,dsty,(LPDIRECTDRAWSURFACE)src,rsrc,trans); -} - -static HRESULT WINAPI IDirectDrawSurface2_BltBatch( - LPDIRECTDRAWSURFACE2 this,LPDDBLTBATCH ddbltbatch,DWORD x,DWORD y -) { - return IDirectDrawSurface_BltBatch((LPDIRECTDRAWSURFACE)this,ddbltbatch,x,y); -} - -static HRESULT WINAPI DGA_IDirectDrawSurface2_GetAttachedSurface( - LPDIRECTDRAWSURFACE2 this,LPDDSCAPS lpddsd,LPDIRECTDRAWSURFACE2 *lpdsf -) { - HRESULT ret; - - ret = IDirectDrawSurface_GetAttachedSurface((LPDIRECTDRAWSURFACE)this,lpddsd,(LPDIRECTDRAWSURFACE*)lpdsf); - - if (!ret) { - (*lpdsf)->lpvtbl = &dga_dds2vt; - } - return ret; -} - -static HRESULT WINAPI XShm_IDirectDrawSurface2_GetAttachedSurface( - LPDIRECTDRAWSURFACE2 this,LPDDSCAPS lpddsd,LPDIRECTDRAWSURFACE2 *lpdsf -) { - HRESULT ret; - - ret = IDirectDrawSurface_GetAttachedSurface((LPDIRECTDRAWSURFACE)this,lpddsd,(LPDIRECTDRAWSURFACE*)lpdsf); - - if (!ret) { - (*lpdsf)->lpvtbl = &xshm_dds2vt; - } - return ret; -} - -static HRESULT WINAPI Xlib_IDirectDrawSurface2_GetAttachedSurface( - LPDIRECTDRAWSURFACE2 this,LPDDSCAPS lpddsd,LPDIRECTDRAWSURFACE2 *lpdsf -) { - HRESULT ret; - - ret = IDirectDrawSurface_GetAttachedSurface((LPDIRECTDRAWSURFACE)this,lpddsd,(LPDIRECTDRAWSURFACE*)lpdsf); - - if (!ret) { - (*lpdsf)->lpvtbl = &xlib_dds2vt; - } - return ret; -} - -static HRESULT WINAPI DGA_IDirectDrawSurface2_Flip( - LPDIRECTDRAWSURFACE2 this,LPDIRECTDRAWSURFACE2 flipto,DWORD dwFlags -) { - return DGA_IDirectDrawSurface_Flip((LPDIRECTDRAWSURFACE)this,(LPDIRECTDRAWSURFACE)flipto,dwFlags); -} - -static HRESULT WINAPI XShm_IDirectDrawSurface2_Flip( - LPDIRECTDRAWSURFACE2 this,LPDIRECTDRAWSURFACE2 flipto,DWORD dwFlags -) { - return XShm_IDirectDrawSurface_Flip((LPDIRECTDRAWSURFACE)this,(LPDIRECTDRAWSURFACE)flipto,dwFlags); -} - -static HRESULT WINAPI Xlib_IDirectDrawSurface2_Flip( - LPDIRECTDRAWSURFACE2 this,LPDIRECTDRAWSURFACE2 flipto,DWORD dwFlags -) { - return Xlib_IDirectDrawSurface_Flip((LPDIRECTDRAWSURFACE)this,(LPDIRECTDRAWSURFACE)flipto,dwFlags); -} - -static HRESULT WINAPI IDirectDrawSurface2_EnumAttachedSurfaces(LPDIRECTDRAWSURFACE2 this,LPVOID context,LPDDENUMSURFACESCALLBACK esfcb) { - FIXME(ddraw,"(%p)->(%p,%p),stub!\n",this,context,esfcb); - return 0; -} - -static HRESULT WINAPI DGA_IDirectDrawSurface2_QueryInterface( - LPDIRECTDRAWSURFACE2 this,REFIID riid,LPVOID *ppobj -) { - return DGA_IDirectDrawSurface_QueryInterface((LPDIRECTDRAWSURFACE)this,riid,ppobj); -} - -static HRESULT WINAPI XShm_IDirectDrawSurface2_QueryInterface( - LPDIRECTDRAWSURFACE2 this,REFIID riid,LPVOID *ppobj -) { - return XShm_IDirectDrawSurface_QueryInterface((LPDIRECTDRAWSURFACE)this,riid,ppobj); -} - -static HRESULT WINAPI Xlib_IDirectDrawSurface2_QueryInterface( - LPDIRECTDRAWSURFACE2 this,REFIID riid,LPVOID *ppobj -) { - return Xlib_IDirectDrawSurface_QueryInterface((LPDIRECTDRAWSURFACE)this,riid,ppobj); -} - -static HRESULT WINAPI IDirectDrawSurface2_IsLost(LPDIRECTDRAWSURFACE2 this) { - return 0; /* hmm */ -} - -static struct IDirectDrawSurface2_VTable dga_dds2vt = { - DGA_IDirectDrawSurface2_QueryInterface, - IDirectDrawSurface2_AddRef, - DGA_IDirectDrawSurface2_Release, - (void*)4, - (void*)5, - IDirectDrawSurface2_Blt, - IDirectDrawSurface2_BltBatch, - IDirectDrawSurface2_BltFast, - (void*)9, - IDirectDrawSurface2_EnumAttachedSurfaces, - (void*)11, - DGA_IDirectDrawSurface2_Flip, - DGA_IDirectDrawSurface2_GetAttachedSurface, - (void*)14, - (void*)15/*IDirectDrawSurface_GetCaps*/, - (void*)16, - (void*)17, - (void*)18, - (void*)19, - (void*)20, - (void*)21, - (void*)22, - (void*)23/*IDirectDrawSurface_GetSurfaceDesc*/, - (void*)24, - IDirectDrawSurface2_IsLost, - IDirectDrawSurface2_Lock, - (void*)27, - (void*)28, - (void*)29, - (void*)30, - (void*)31, - IDirectDrawSurface2_SetPalette, - DGA_IDirectDrawSurface2_Unlock, - (void*)34, - (void*)35, - (void*)36, - (void*)37, - (void*)38, - (void*)39, -}; - -static struct IDirectDrawSurface2_VTable xshm_dds2vt = { - XShm_IDirectDrawSurface2_QueryInterface, - IDirectDrawSurface2_AddRef, - XShm_IDirectDrawSurface2_Release, - (void*)4, - (void*)5, - IDirectDrawSurface2_Blt, - IDirectDrawSurface2_BltBatch, - IDirectDrawSurface2_BltFast, - (void*)9, - IDirectDrawSurface2_EnumAttachedSurfaces, - (void*)11, - XShm_IDirectDrawSurface2_Flip, - XShm_IDirectDrawSurface2_GetAttachedSurface, - (void*)14, - (void*)15/*IDirectDrawSurface_GetCaps*/, - (void*)16, - (void*)17, - (void*)18, - (void*)19, - (void*)20, - (void*)21, - (void*)22, - (void*)23/*IDirectDrawSurface_GetSurfaceDesc*/, - (void*)24, - IDirectDrawSurface2_IsLost, - IDirectDrawSurface2_Lock, - (void*)27, - (void*)28, - (void*)29, - (void*)30, - (void*)31, - IDirectDrawSurface2_SetPalette, - XShm_IDirectDrawSurface2_Unlock, - (void*)34, - (void*)35, - (void*)36, - (void*)37, - (void*)38, - (void*)39, -}; - -static struct IDirectDrawSurface2_VTable xlib_dds2vt = { - Xlib_IDirectDrawSurface2_QueryInterface, - IDirectDrawSurface2_AddRef, - Xlib_IDirectDrawSurface2_Release, - (void*)4, - (void*)5, - IDirectDrawSurface2_Blt, - IDirectDrawSurface2_BltBatch, - IDirectDrawSurface2_BltFast, - (void*)9, - IDirectDrawSurface2_EnumAttachedSurfaces, - (void*)11, - Xlib_IDirectDrawSurface2_Flip, - Xlib_IDirectDrawSurface2_GetAttachedSurface, - (void*)14, - (void*)15/*IDirectDrawSurface_GetCaps*/, - (void*)16, - (void*)17, - (void*)18, - (void*)19, - (void*)20, - (void*)21, - (void*)22, - (void*)23/*IDirectDrawSurface_GetSurfaceDesc*/, - (void*)24, - IDirectDrawSurface2_IsLost, - IDirectDrawSurface2_Lock, - (void*)27, - (void*)28, - (void*)29, - (void*)30, - (void*)31, - IDirectDrawSurface2_SetPalette, - Xlib_IDirectDrawSurface2_Unlock, - (void*)34, - (void*)35, - (void*)36, - (void*)37, - (void*)38, - (void*)39, -}; - -/****************************************************************************** - * IDirectDrawSurface3 - */ -static HRESULT WINAPI IDirectDrawSurface3_SetPalette( - LPDIRECTDRAWSURFACE3 this,LPDIRECTDRAWPALETTE pal -) { - return IDirectDrawSurface_SetPalette((LPDIRECTDRAWSURFACE)this,pal); -} - static HRESULT WINAPI IDirectDrawSurface3_GetPixelFormat( LPDIRECTDRAWSURFACE3 this,LPDDPIXELFORMAT pf ) { return _getpixelformat(this->s.ddraw,pf); } -static HRESULT WINAPI DGA_IDirectDrawSurface3_GetAttachedSurface( - LPDIRECTDRAWSURFACE3 this,LPDDSCAPS lpddsd,LPDIRECTDRAWSURFACE3 *lpdsf -) { - HRESULT ret; - - ret = IDirectDrawSurface_GetAttachedSurface((LPDIRECTDRAWSURFACE)this,lpddsd,(LPDIRECTDRAWSURFACE*)lpdsf); - - if (!ret) { - (*lpdsf)->lpvtbl = &dga_dds3vt; - } - return ret; -} - -static HRESULT WINAPI XShm_IDirectDrawSurface3_GetAttachedSurface( - LPDIRECTDRAWSURFACE3 this,LPDDSCAPS lpddsd,LPDIRECTDRAWSURFACE3 *lpdsf -) { - HRESULT ret; - - ret = IDirectDrawSurface_GetAttachedSurface((LPDIRECTDRAWSURFACE)this,lpddsd,(LPDIRECTDRAWSURFACE*)lpdsf); - - if (!ret) { - (*lpdsf)->lpvtbl = &xshm_dds3vt; - } - return ret; -} - -static HRESULT WINAPI Xlib_IDirectDrawSurface3_GetAttachedSurface( - LPDIRECTDRAWSURFACE3 this,LPDDSCAPS lpddsd,LPDIRECTDRAWSURFACE3 *lpdsf -) { - HRESULT ret; - - ret = IDirectDrawSurface_GetAttachedSurface((LPDIRECTDRAWSURFACE)this,lpddsd,(LPDIRECTDRAWSURFACE*)lpdsf); - - if (!ret) { - (*lpdsf)->lpvtbl = &xlib_dds3vt; - } - return ret; -} - -static ULONG WINAPI IDirectDrawSurface3_AddRef(LPDIRECTDRAWSURFACE3 this) { - TRACE(ddraw,"(%p)->AddRef()\n",this); - return ++(this->ref); -} - -static ULONG WINAPI DGA_IDirectDrawSurface3_Release(LPDIRECTDRAWSURFACE3 this) { - return DGA_IDirectDrawSurface_Release((LPDIRECTDRAWSURFACE)this); -} - -static ULONG WINAPI XShm_IDirectDrawSurface3_Release(LPDIRECTDRAWSURFACE3 this) { - return XShm_IDirectDrawSurface_Release((LPDIRECTDRAWSURFACE)this); -} - -static ULONG WINAPI Xlib_IDirectDrawSurface3_Release(LPDIRECTDRAWSURFACE3 this) { - return Xlib_IDirectDrawSurface_Release((LPDIRECTDRAWSURFACE)this); -} - -static HRESULT WINAPI IDirectDrawSurface3_Blt( - LPDIRECTDRAWSURFACE3 this,LPRECT32 rdst,LPDIRECTDRAWSURFACE3 src, - LPRECT32 rsrc,DWORD dwFlags,LPDDBLTFX lpbltfx -) { - return IDirectDrawSurface_Blt((LPDIRECTDRAWSURFACE)this,rdst,(LPDIRECTDRAWSURFACE)src,rsrc,dwFlags,lpbltfx); -} - -static HRESULT WINAPI IDirectDrawSurface3_IsLost(LPDIRECTDRAWSURFACE3 this) { - return 0; /* hmm */ -} - -static HRESULT WINAPI IDirectDrawSurface3_Restore(LPDIRECTDRAWSURFACE3 this) { +static HRESULT WINAPI IDirectDrawSurface3_GetBltStatus(LPDIRECTDRAWSURFACE3 this,DWORD dwFlags) { + FIXME(ddraw,"(%p)->(0x%08lx),stub!\n",this,dwFlags); return 0; } -static HRESULT WINAPI IDirectDrawSurface3_GetBltStatus( - LPDIRECTDRAWSURFACE3 this,DWORD dwflags +static HRESULT WINAPI IDirectDrawSurface3_GetOverlayPosition( + LPDIRECTDRAWSURFACE3 this,LPLONG x1,LPLONG x2 ) { - return IDirectDrawSurface_GetBltStatus((LPDIRECTDRAWSURFACE)this,dwflags); + FIXME(ddraw,"(%p)->(%p,%p),stub!\n",this,x1,x2); + return 0; } -static HRESULT WINAPI DGA_IDirectDrawSurface3_Flip( - LPDIRECTDRAWSURFACE3 this,LPDIRECTDRAWSURFACE3 flipto,DWORD dwFlags +static HRESULT WINAPI IDirectDrawSurface3_SetClipper( + LPDIRECTDRAWSURFACE3 this,LPDIRECTDRAWCLIPPER clipper ) { - return DGA_IDirectDrawSurface_Flip((LPDIRECTDRAWSURFACE)this,(LPDIRECTDRAWSURFACE)flipto,dwFlags); + FIXME(ddraw,"(%p)->(%p),stub!\n",this,clipper); + return 0; } -static HRESULT WINAPI XShm_IDirectDrawSurface3_Flip( - LPDIRECTDRAWSURFACE3 this,LPDIRECTDRAWSURFACE3 flipto,DWORD dwFlags +static HRESULT WINAPI IDirectDrawSurface3_AddAttachedSurface( + LPDIRECTDRAWSURFACE3 this,LPDIRECTDRAWSURFACE3 surf ) { - return XShm_IDirectDrawSurface_Flip((LPDIRECTDRAWSURFACE)this,(LPDIRECTDRAWSURFACE)flipto,dwFlags); + FIXME(ddraw,"(%p)->(%p),stub!\n",this,surf); + this->s.backbuffer = surf; + return 0; } -static HRESULT WINAPI Xlib_IDirectDrawSurface3_Flip( - LPDIRECTDRAWSURFACE3 this,LPDIRECTDRAWSURFACE3 flipto,DWORD dwFlags -) { - return Xlib_IDirectDrawSurface_Flip((LPDIRECTDRAWSURFACE)this,(LPDIRECTDRAWSURFACE)flipto,dwFlags); +static HRESULT WINAPI IDirectDrawSurface3_GetDC(LPDIRECTDRAWSURFACE3 this,HDC32* lphdc) { + FIXME(ddraw,"(%p)->GetDC(%p)\n",this,lphdc); + *lphdc = GetDC32(this->s.ddraw->e.xlib.window); + return 0; } -static HRESULT WINAPI IDirectDrawSurface3_Lock( - LPDIRECTDRAWSURFACE3 this,LPRECT32 lprect,LPDDSURFACEDESC lpddsd,DWORD flags, HANDLE32 hnd -) { - return IDirectDrawSurface_Lock((LPDIRECTDRAWSURFACE)this,lprect,lpddsd,flags,hnd); +static HRESULT WINAPI IDirectDrawSurface3_ReleaseDC(LPDIRECTDRAWSURFACE3 this,HDC32 hdc) { + FIXME(ddraw,"(%p)->(0x%08lx),stub!\n",this,(long)hdc); + ReleaseDC32(this->s.ddraw->e.xlib.window,hdc); + return 0; } -static HRESULT WINAPI DGA_IDirectDrawSurface3_Unlock( - LPDIRECTDRAWSURFACE3 this,LPVOID surface -) { - return DGA_IDirectDrawSurface_Unlock((LPDIRECTDRAWSURFACE)this,surface); + +static HRESULT WINAPI IDirectDrawSurface3_QueryInterface(LPDIRECTDRAWSURFACE3 this,REFIID refiid,LPVOID *obj) { + char xrefiid[50]; + + WINE_StringFromCLSID((LPCLSID)refiid,xrefiid); + TRACE(ddraw,"(%p)->(%s,%p)\n",this,xrefiid,obj); + + /* DirectDrawSurface,DirectDrawSurface2 and DirectDrawSurface3 use + * the same interface. And IUnknown does that too of course. + */ + if ( !memcmp(&IID_IDirectDrawSurface3,refiid,sizeof(IID)) || + !memcmp(&IID_IDirectDrawSurface2,refiid,sizeof(IID)) || + !memcmp(&IID_IDirectDrawSurface,refiid,sizeof(IID)) || + !memcmp(&IID_IUnknown,refiid,sizeof(IID)) + ) { + *obj = this; + this->lpvtbl->fnAddRef(this); + return 0; + } + FIXME(ddraw,"(%p):interface for IID %s NOT found!\n",this,xrefiid); + return OLE_E_ENUM_NOMORE; } -static HRESULT WINAPI XShm_IDirectDrawSurface3_Unlock( - LPDIRECTDRAWSURFACE3 this,LPVOID surface -) { - return XShm_IDirectDrawSurface_Unlock((LPDIRECTDRAWSURFACE)this,surface); -} - -static HRESULT WINAPI Xlib_IDirectDrawSurface3_Unlock( - LPDIRECTDRAWSURFACE3 this,LPVOID surface -) { - return Xlib_IDirectDrawSurface_Unlock((LPDIRECTDRAWSURFACE)this,surface); +static HRESULT WINAPI IDirectDrawSurface3_IsLost(LPDIRECTDRAWSURFACE3 this) { + FIXME(ddraw,"(%p)->(), stub!\n",this); + return 0; /* hmm */ } static HRESULT WINAPI IDirectDrawSurface3_EnumAttachedSurfaces(LPDIRECTDRAWSURFACE3 this,LPVOID context,LPDDENUMSURFACESCALLBACK esfcb) { @@ -1467,61 +846,49 @@ static HRESULT WINAPI IDirectDrawSurface3_EnumAttachedSurfaces(LPDIRECTDRAWSURFA return 0; } -static HRESULT WINAPI IDirectDrawSurface3_SetClipper( - LPDIRECTDRAWSURFACE3 this,LPDIRECTDRAWCLIPPER clipper -) { - return IDirectDrawSurface_SetClipper((LPDIRECTDRAWSURFACE)this,clipper); +static HRESULT WINAPI IDirectDrawSurface3_Restore(LPDIRECTDRAWSURFACE3 this) { + FIXME(ddraw,"(%p)->(),stub!\n",this); + return 0; } -static HRESULT WINAPI DGA_IDirectDrawSurface3_QueryInterface( - LPDIRECTDRAWSURFACE3 this,REFIID riid,LPVOID *ppobj +static HRESULT WINAPI IDirectDrawSurface3_SetColorKey( + LPDIRECTDRAWSURFACE3 this,DWORD x,LPDDCOLORKEY ckey ) { - return DGA_IDirectDrawSurface_QueryInterface((LPDIRECTDRAWSURFACE)this,riid,ppobj); -} - -static HRESULT WINAPI XShm_IDirectDrawSurface3_QueryInterface( - LPDIRECTDRAWSURFACE3 this,REFIID riid,LPVOID *ppobj -) { - return XShm_IDirectDrawSurface_QueryInterface((LPDIRECTDRAWSURFACE)this,riid,ppobj); -} - -static HRESULT WINAPI Xlib_IDirectDrawSurface3_QueryInterface( - LPDIRECTDRAWSURFACE3 this,REFIID riid,LPVOID *ppobj -) { - return Xlib_IDirectDrawSurface_QueryInterface((LPDIRECTDRAWSURFACE)this,riid,ppobj); + FIXME(ddraw,"(%p)->(0x%08lx,%p),stub!\n",this,x,ckey); + return 0; } static struct IDirectDrawSurface3_VTable dga_dds3vt = { - DGA_IDirectDrawSurface3_QueryInterface, + IDirectDrawSurface3_QueryInterface, IDirectDrawSurface3_AddRef, DGA_IDirectDrawSurface3_Release, - (void*)4, + IDirectDrawSurface3_AddAttachedSurface, (void*)5, IDirectDrawSurface3_Blt, - (void*)7, - (void*)8, + IDirectDrawSurface3_BltBatch, + IDirectDrawSurface3_BltFast, (void*)9, IDirectDrawSurface3_EnumAttachedSurfaces, (void*)11, DGA_IDirectDrawSurface3_Flip, - DGA_IDirectDrawSurface3_GetAttachedSurface, + IDirectDrawSurface3_GetAttachedSurface, IDirectDrawSurface3_GetBltStatus, - (void*)15, + IDirectDrawSurface3_GetCaps, (void*)16, (void*)17, - (void*)18, + IDirectDrawSurface3_GetDC, (void*)19, - (void*)20, + IDirectDrawSurface3_GetOverlayPosition, (void*)21, IDirectDrawSurface3_GetPixelFormat, - (void*)23, - (void*)24, + IDirectDrawSurface3_GetSurfaceDesc, + IDirectDrawSurface3_Initialize, IDirectDrawSurface3_IsLost, IDirectDrawSurface3_Lock, - (void*)27, + IDirectDrawSurface3_ReleaseDC, IDirectDrawSurface3_Restore, IDirectDrawSurface3_SetClipper, - (void*)30, + IDirectDrawSurface3_SetColorKey, (void*)31, IDirectDrawSurface3_SetPalette, DGA_IDirectDrawSurface3_Unlock, @@ -1535,36 +902,36 @@ static struct IDirectDrawSurface3_VTable dga_dds3vt = { }; static struct IDirectDrawSurface3_VTable xshm_dds3vt = { - XShm_IDirectDrawSurface3_QueryInterface, + IDirectDrawSurface3_QueryInterface, IDirectDrawSurface3_AddRef, XShm_IDirectDrawSurface3_Release, - (void*)4, + IDirectDrawSurface3_AddAttachedSurface, (void*)5, IDirectDrawSurface3_Blt, - (void*)7, - (void*)8, + IDirectDrawSurface3_BltBatch, + IDirectDrawSurface3_BltFast, (void*)9, IDirectDrawSurface3_EnumAttachedSurfaces, (void*)11, XShm_IDirectDrawSurface3_Flip, - XShm_IDirectDrawSurface3_GetAttachedSurface, + IDirectDrawSurface3_GetAttachedSurface, IDirectDrawSurface3_GetBltStatus, - (void*)15, + IDirectDrawSurface3_GetCaps, (void*)16, (void*)17, - (void*)18, + IDirectDrawSurface3_GetDC, (void*)19, - (void*)20, + IDirectDrawSurface3_GetOverlayPosition, (void*)21, IDirectDrawSurface3_GetPixelFormat, - (void*)23, - (void*)24, + IDirectDrawSurface3_GetSurfaceDesc, + IDirectDrawSurface3_Initialize, IDirectDrawSurface3_IsLost, IDirectDrawSurface3_Lock, - (void*)27, + IDirectDrawSurface3_ReleaseDC, IDirectDrawSurface3_Restore, IDirectDrawSurface3_SetClipper, - (void*)30, + IDirectDrawSurface3_SetColorKey, (void*)31, IDirectDrawSurface3_SetPalette, XShm_IDirectDrawSurface3_Unlock, @@ -1578,36 +945,36 @@ static struct IDirectDrawSurface3_VTable xshm_dds3vt = { }; static struct IDirectDrawSurface3_VTable xlib_dds3vt = { - Xlib_IDirectDrawSurface3_QueryInterface, + IDirectDrawSurface3_QueryInterface, IDirectDrawSurface3_AddRef, Xlib_IDirectDrawSurface3_Release, - (void*)4, + IDirectDrawSurface3_AddAttachedSurface, (void*)5, IDirectDrawSurface3_Blt, - (void*)7, - (void*)8, + IDirectDrawSurface3_BltBatch, + IDirectDrawSurface3_BltFast, (void*)9, IDirectDrawSurface3_EnumAttachedSurfaces, (void*)11, Xlib_IDirectDrawSurface3_Flip, - Xlib_IDirectDrawSurface3_GetAttachedSurface, + IDirectDrawSurface3_GetAttachedSurface, IDirectDrawSurface3_GetBltStatus, - (void*)15, + IDirectDrawSurface3_GetCaps, (void*)16, (void*)17, - (void*)18, + IDirectDrawSurface3_GetDC, (void*)19, - (void*)20, + IDirectDrawSurface3_GetOverlayPosition, (void*)21, IDirectDrawSurface3_GetPixelFormat, - (void*)23, - (void*)24, + IDirectDrawSurface3_GetSurfaceDesc, + IDirectDrawSurface3_Initialize, IDirectDrawSurface3_IsLost, IDirectDrawSurface3_Lock, - (void*)27, + IDirectDrawSurface3_ReleaseDC, IDirectDrawSurface3_Restore, IDirectDrawSurface3_SetClipper, - (void*)30, + IDirectDrawSurface3_SetColorKey, (void*)31, IDirectDrawSurface3_SetPalette, Xlib_IDirectDrawSurface3_Unlock, @@ -1646,6 +1013,13 @@ static HRESULT WINAPI IDirectDrawClipper_GetClipList( return 0; } +static HRESULT WINAPI IDirectDrawClipper_SetClipList( + LPDIRECTDRAWCLIPPER this,LPRGNDATA lprgn,DWORD hmm +) { + FIXME(ddraw,"(%p,%p,%ld),stub!\n",this,lprgn,hmm); + return 0; +} + static struct IDirectDrawClipper_VTable ddclipvt = { (void*)1, (void*)2, @@ -1654,7 +1028,7 @@ static struct IDirectDrawClipper_VTable ddclipvt = { (void*)5, (void*)6, (void*)7, - (void*)8, + IDirectDrawClipper_SetClipList, IDirectDrawClipper_SetHwnd }; @@ -1668,7 +1042,7 @@ static HRESULT WINAPI IDirectDrawPalette_GetEntries( int i; if (!this->cm) /* should not happen */ { - TRACE(ddraw,"app tried to read colormap for non-palettized mode\n"); + FIXME(ddraw,"app tried to read colormap for non-palettized mode\n"); return DDERR_GENERIC; } for (i=start;icm) /* should not happen */ { - TRACE(ddraw,"app tried to set colormap in non-palettized mode\n"); + FIXME(ddraw,"app tried to set colormap in non-palettized mode\n"); return DDERR_GENERIC; } /* FIXME: free colorcells instead of freeing whole map */ - this->cm = TSXCopyColormapAndFree(display,this->cm); + /*this->cm = TSXCopyColormapAndFree(display,this->cm);*/ for (i=start;icm); + TSXF86DGAInstallColormap(display,DefaultScreen(display),this->cm); return 0; #else /* defined(HAVE_LIBXXF86DGA) */ return E_UNEXPECTED; #endif /* defined(HAVE_LIBXXF86DGA) */ } -static HRESULT WINAPI Xlib_IDirectDrawPalette_SetEntries( - LPDIRECTDRAWPALETTE this,DWORD x,DWORD start,DWORD end,LPPALETTEENTRY palent -) { - HRESULT hres; - hres = common_IDirectDrawPalette_SetEntries(this,x,start,end,palent); - if (hres != 0) return hres; - TSXInstallColormap(display,this->cm); - return 0; -} - static ULONG WINAPI IDirectDrawPalette_Release(LPDIRECTDRAWPALETTE this) { if (!--(this->ref)) { if (this->cm) { @@ -1773,7 +1137,7 @@ static struct IDirectDrawPalette_VTable xshm_ddpalvt = { (void*)4, IDirectDrawPalette_GetEntries, IDirectDrawPalette_Initialize, - Xlib_IDirectDrawPalette_SetEntries + common_IDirectDrawPalette_SetEntries }; static struct IDirectDrawPalette_VTable xlib_ddpalvt = { @@ -1783,7 +1147,7 @@ static struct IDirectDrawPalette_VTable xlib_ddpalvt = { (void*)4, IDirectDrawPalette_GetEntries, IDirectDrawPalette_Initialize, - Xlib_IDirectDrawPalette_SetEntries + common_IDirectDrawPalette_SetEntries }; /******************************************************************************* @@ -1850,8 +1214,7 @@ static HRESULT WINAPI DGA_IDirectDraw_CreateSurface( #ifdef HAVE_LIBXXF86DGA int i; - TRACE(ddraw, "(%p)->(%p,%p,%p)\n", - this,lpddsd,lpdsf,lpunk); + TRACE(ddraw, "(%p)->(%p,%p,%p)\n",this,lpddsd,lpdsf,lpunk); if (TRACE_ON(ddraw)) { DUMP("[w=%ld,h=%ld,flags ",lpddsd->dwWidth,lpddsd->dwHeight); _dump_DDSD(lpddsd->dwFlags); @@ -1863,14 +1226,14 @@ static HRESULT WINAPI DGA_IDirectDraw_CreateSurface( *lpdsf = (LPDIRECTDRAWSURFACE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawSurface)); this->lpvtbl->fnAddRef(this); (*lpdsf)->ref = 1; - (*lpdsf)->lpvtbl = &dga_ddsvt; + (*lpdsf)->lpvtbl = (LPDIRECTDRAWSURFACE_VTABLE)&dga_dds3vt; if ( (lpddsd->dwFlags & DDSD_CAPS) && (lpddsd->ddsCaps.dwCaps & DDSCAPS_OFFSCREENPLAIN) ) { if (!(lpddsd->dwFlags & DDSD_WIDTH)) lpddsd->dwWidth = this->e.dga.fb_width; if (!(lpddsd->dwFlags & DDSD_HEIGHT)) - lpddsd->dwWidth = this->e.dga.fb_height; + lpddsd->dwHeight = this->e.dga.fb_height; (*lpdsf)->s.surface = (LPBYTE)HeapAlloc(GetProcessHeap(),0,lpddsd->dwWidth*lpddsd->dwHeight*this->d.depth/8); (*lpdsf)->t.dga.fb_height = -1; (*lpdsf)->s.lpitch = lpddsd->dwWidth*this->d.depth/8; @@ -1894,15 +1257,15 @@ static HRESULT WINAPI DGA_IDirectDraw_CreateSurface( (*lpdsf)->s.ddraw = this; (*lpdsf)->s.backbuffer = NULL; if (lpddsd->dwFlags & DDSD_BACKBUFFERCOUNT) { - LPDIRECTDRAWSURFACE back; + LPDIRECTDRAWSURFACE3 back; if (lpddsd->dwBackBufferCount>1) FIXME(ddraw,"urks, wants to have more than one backbuffer (%ld)!\n",lpddsd->dwBackBufferCount); - (*lpdsf)->s.backbuffer = back = (LPDIRECTDRAWSURFACE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawSurface)); + (*lpdsf)->s.backbuffer = back = (LPDIRECTDRAWSURFACE3)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawSurface3)); this->lpvtbl->fnAddRef(this); back->ref = 1; - back->lpvtbl = &dga_ddsvt; + back->lpvtbl = (LPDIRECTDRAWSURFACE3_VTABLE)&dga_dds3vt; for (i=0;i<32;i++) if (!(this->e.dga.vpmask & (1<CreateSurface(%p,%p,%p)\n", - this,lpddsd,lpdsf,lpunk); + TRACE(ddraw,"(%p)->CreateSurface(%p,%p,%p)\n",this,lpddsd,lpdsf,lpunk); if (TRACE_ON(ddraw)) { fprintf(stderr,"[w=%ld,h=%ld,flags ",lpddsd->dwWidth,lpddsd->dwHeight); _dump_DDSD(lpddsd->dwFlags); @@ -1945,7 +1307,7 @@ static HRESULT WINAPI XShm_IDirectDraw_CreateSurface( *lpdsf = (LPDIRECTDRAWSURFACE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawSurface)); this->lpvtbl->fnAddRef(this); (*lpdsf)->ref = 1; - (*lpdsf)->lpvtbl = &xshm_ddsvt; + (*lpdsf)->lpvtbl = (LPDIRECTDRAWSURFACE_VTABLE)&xshm_dds3vt; (*lpdsf)->t.xshm.image = img = XShmCreateImage(display, /*FIXME:visual*/0, /*FIXME:depth*/8, ZPixmap, NULL, &(*lpdsf)->t.xshm.shminfo, @@ -1953,9 +1315,8 @@ static HRESULT WINAPI XShm_IDirectDraw_CreateSurface( (*lpdsf)->t.xshm.shminfo.shmid = shmid = shmget(IPC_PRIVATE, img->bytes_per_line*img->height, IPC_CREAT|0777); (*lpdsf)->t.xshm.shminfo.shmaddr = img->data = shmat(shmid, 0, 0); - XShmAttach(display, &(*lpdsf)->t.xshm.shminfo); + TSXShmAttach(display, &(*lpdsf)->t.xshm.shminfo); /* POOLE FIXME: XShm: this will easily break */ - (*lpdsf)->t.xshm.surface_is_image_data = TRUE; (*lpdsf)->s.surface = img->data; /* END FIXME: XShm */ (*lpdsf)->s.lpitch = img->bytes_per_line; @@ -1986,21 +1347,74 @@ static HRESULT WINAPI Xlib_IDirectDraw_CreateSurface( *lpdsf = (LPDIRECTDRAWSURFACE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawSurface)); this->lpvtbl->fnAddRef(this); (*lpdsf)->ref = 1; - (*lpdsf)->lpvtbl = &xlib_ddsvt; - TRACE(ddraw,"using standard XImage for a primary surface\n"); - /* POOLE FIXME: Xlib: this will easily break */ - (*lpdsf)->t.xshm.surface_is_image_data = TRUE; - (*lpdsf)->s.surface = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,640*480); - (*lpdsf)->t.xlib.image = img = - XCreateImage(display, /*FIXME:visual*/0, /*FIXME: depth*/8, ZPixmap, - 0, (*lpdsf)->s.surface, - /*FIXME:width*/640, /*FIXME:height*/480, 0, 640*1); - /* END FIXME: Xlib */ - (*lpdsf)->s.lpitch = img->bytes_per_line; - (*lpdsf)->s.width = img->width; - (*lpdsf)->s.height = img->height; + (*lpdsf)->lpvtbl = (LPDIRECTDRAWSURFACE_VTABLE)&xlib_dds3vt; + if ( (lpddsd->dwFlags & DDSD_CAPS) && + (lpddsd->ddsCaps.dwCaps & DDSCAPS_OFFSCREENPLAIN) + ) { + if (!(lpddsd->dwFlags & DDSD_WIDTH)) + lpddsd->dwWidth = this->e.dga.fb_width; + if (!(lpddsd->dwFlags & DDSD_HEIGHT)) + lpddsd->dwHeight = this->e.dga.fb_height; + (*lpdsf)->s.surface = (LPBYTE)HeapAlloc(GetProcessHeap(),0,lpddsd->dwWidth*lpddsd->dwHeight*this->d.depth/8); + TRACE(ddraw,"using system memory for a primary surface\n"); + } else { + TRACE(ddraw,"using standard XImage for a primary surface\n"); + /* FIXME: !8 bit images */ + (*lpdsf)->s.surface = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,lpddsd->dwHeight*lpddsd->dwWidth); + (*lpdsf)->s.width = this->d.width; + (*lpdsf)->s.height = this->d.height; + } (*lpdsf)->s.ddraw = this; - (*lpdsf)->s.backbuffer = NULL; + (*lpdsf)->t.xlib.image = img = + TSXCreateImage( display, + DefaultVisualOfScreen(screen), + /*FIXME: depth*/8, + ZPixmap, + 0, + (*lpdsf)->s.surface, + (*lpdsf)->s.width, + (*lpdsf)->s.height, + 32, + (*lpdsf)->s.width*1 + /* FIXME: !8 bit images */ + ); + /* END FIXME: Xlib */ + (*lpdsf)->s.lpitch = img->bytes_per_line; + assert(img); + if (lpddsd->dwFlags & DDSD_BACKBUFFERCOUNT) { + LPDIRECTDRAWSURFACE3 back; + + if (lpddsd->dwBackBufferCount>1) + FIXME(ddraw,"urks, wants to have more than one backbuffer (%ld)!\n",lpddsd->dwBackBufferCount); + + (*lpdsf)->s.backbuffer = back = (LPDIRECTDRAWSURFACE3)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawSurface3)); + this->lpvtbl->fnAddRef(this); + back->ref = 1; + back->lpvtbl = (LPDIRECTDRAWSURFACE3_VTABLE)&xlib_dds3vt; + /* FIXME: !8 bit images */ + back->s.surface = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY, + img->width*img->height + ); + back->t.xlib.image = TSXCreateImage( + display, + DefaultVisualOfScreen(screen), + /*FIXME: depth*/8, + ZPixmap, + 0, + back->s.surface, + this->d.width, + this->d.height, + 32, + this->d.width*1 + /* FIXME: !8 bit images */ + ); + back->s.width = this->d.width; + back->s.height = this->d.height; + back->s.ddraw = this; + back->s.lpitch = back->t.xlib.image->bytes_per_line; + back->s.backbuffer = NULL; /* does not have a backbuffer, it is + * one! */ + } return 0; } @@ -2052,8 +1466,7 @@ static HRESULT WINAPI DGA_IDirectDraw_SetDisplayMode( #ifdef HAVE_LIBXXF86DGA int i,*depths,depcount; - TRACE(ddraw, "(%p)->(%ld,%ld,%ld)\n", - this, width, height, depth); + TRACE(ddraw, "(%p)->(%ld,%ld,%ld)\n", this, width, height, depth); depths = TSXListDepths(display,DefaultScreen(display),&depcount); for (i=0;ie.dga.fb_width < width) { - ERR(ddraw,"SetDisplayMode(w=%ld,h=%ld,d=%ld), width %ld exceeds framebuffer width %ld\n",width,height,depth,width,this->e.dga.fb_width); + if (this->d.width < width) { + ERR(ddraw,"SetDisplayMode(w=%ld,h=%ld,d=%ld), width %ld exceeds framebuffer width %ld\n",width,height,depth,width,this->d.width); return DDERR_UNSUPPORTEDMODE; } this->d.width = width; @@ -2079,9 +1492,9 @@ static HRESULT WINAPI DGA_IDirectDraw_SetDisplayMode( * can we save them? and restore them later? In a way that * it works for the library too? */ - XF86DGADirectVideo(display,DefaultScreen(display),XF86DGADirectGraphics); + TSXF86DGADirectVideo(display,DefaultScreen(display),XF86DGADirectGraphics); /* - XF86DGASetViewPort(display,DefaultScreen(display),0,this->d.fb_height); + TSXF86DGASetViewPort(display,DefaultScreen(display),0,this->d.fb_height); */ #ifdef RESTORE_SIGNALS @@ -2089,7 +1502,7 @@ static HRESULT WINAPI DGA_IDirectDraw_SetDisplayMode( #endif return 0; #else /* defined(HAVE_LIBXXF86DGA) */ - return E_UNEXPECTED + return E_UNEXPECTED; #endif /* defined(HAVE_LIBXXF86DGA) */ } @@ -2113,9 +1526,8 @@ static HRESULT WINAPI XShm_IDirectDraw_SetDisplayMode( MessageBox32A(0,buf,"WINE DirectDraw",MB_OK|MB_ICONSTOP); return DDERR_UNSUPPORTEDMODE; } - /* POOLE FIXME: XShm */ - if (this->e.dga.fb_width < width) { - sprintf(buf,"SetDisplayMode(w=%ld,h=%ld,d=%ld), width %ld exceeds framebuffer width %ld",width,height,depth,width,this->e.dga.fb_width); + if (this->d.width < width) { + sprintf(buf,"SetDisplayMode(w=%ld,h=%ld,d=%ld), width %ld exceeds framebuffer width %ld",width,height,depth,width,this->d.width); MessageBox32A(0,buf,"WINE DirectDraw",MB_OK|MB_ICONSTOP); return DDERR_UNSUPPORTEDMODE; } @@ -2151,19 +1563,34 @@ static HRESULT WINAPI Xlib_IDirectDraw_SetDisplayMode( MessageBox32A(0,buf,"WINE DirectDraw",MB_OK|MB_ICONSTOP); return DDERR_UNSUPPORTEDMODE; } - /* POOLE FIXME: Xlib */ - if (this->e.dga.fb_width < width) { - sprintf(buf,"SetDisplayMode(w=%ld,h=%ld,d=%ld), width %ld exceeds framebuffer width %ld",width,height,depth,width,this->e.dga.fb_width); + if (this->d.width < width) { + sprintf(buf,"SetDisplayMode(w=%ld,h=%ld,d=%ld), width %ld exceeds framebuffer width %ld",width,height,depth,width,this->d.width); MessageBox32A(0,buf,"WINE DirectDraw",MB_OK|MB_ICONSTOP); return DDERR_UNSUPPORTEDMODE; } + this->e.xlib.window = CreateWindowEx32A( + 0, + "WINE_DirectDraw", + "WINE_DirectDraw", + WS_VISIBLE|WS_SYSMENU|WS_THICKFRAME, + 0,0, + width, + height, + 0, + 0, + 0, + NULL + ); + ShowWindow32(this->e.xlib.window,TRUE); + UpdateWindow32(this->e.xlib.window); + assert(this->e.xlib.window); + this->e.xlib.drawable = WIN_FindWndPtr(this->e.xlib.window)->window; this->d.width = width; this->d.height = height; /* adjust fb_height, so we don't overlap */ if (this->e.dga.fb_height < height) this->e.dga.fb_height = height; this->d.depth = depth; - /* END FIXME: Xlib */ return 0; } @@ -2243,6 +1670,7 @@ static HRESULT WINAPI common_IDirectDraw_CreatePalette( if (*lpddpal == NULL) return E_OUTOFMEMORY; (*lpddpal)->ref = 1; (*lpddpal)->ddraw = this; + (*lpddpal)->installed = 0; if (this->d.depth<=8) { (*lpddpal)->cm = TSXCreateColormap(display,DefaultRootWindow(display),DefaultVisualOfScreen(screen),AllocAll); } else { @@ -2269,9 +1697,7 @@ static HRESULT WINAPI XShm_IDirectDraw_CreatePalette( LPDIRECTDRAW this,DWORD x,LPPALETTEENTRY palent,LPDIRECTDRAWPALETTE *lpddpal,LPUNKNOWN lpunk ) { HRESULT res; - TRACE(ddraw,"(%p)->(%08lx,%p,%p,%p)\n", - this,x,palent,lpddpal,lpunk - ); + TRACE(ddraw,"(%p)->(%08lx,%p,%p,%p)\n",this,x,palent,lpddpal,lpunk); res = common_IDirectDraw_CreatePalette(this,x,palent,lpddpal,lpunk); if (res != 0) return res; (*lpddpal)->lpvtbl = &xshm_ddpalvt; @@ -2281,22 +1707,28 @@ static HRESULT WINAPI XShm_IDirectDraw_CreatePalette( static HRESULT WINAPI Xlib_IDirectDraw_CreatePalette( LPDIRECTDRAW this,DWORD x,LPPALETTEENTRY palent,LPDIRECTDRAWPALETTE *lpddpal,LPUNKNOWN lpunk ) { - HRESULT res; - TRACE(ddraw,"(%p)->(%08lx,%p,%p,%p)\n", - this,x,palent,lpddpal,lpunk - ); - res = common_IDirectDraw_CreatePalette(this,x,palent,lpddpal,lpunk); - if (res != 0) return res; + TRACE(ddraw,"(%p)->(%08lx,%p,%p,%p)\n",this,x,palent,lpddpal,lpunk); + *lpddpal = (LPDIRECTDRAWPALETTE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDrawPalette)); + if (*lpddpal == NULL) return E_OUTOFMEMORY; + (*lpddpal)->ref = 1; + (*lpddpal)->installed = 0; + (*lpddpal)->ddraw = this; + if (this->d.depth<=8) { + (*lpddpal)->cm = TSXCreateColormap(display,this->e.xlib.drawable,DefaultVisualOfScreen(screen),AllocAll); + TSXInstallColormap(display,(*lpddpal)->cm); + TSXSetWindowColormap(display,this->e.xlib.drawable,(*lpddpal)->cm); + } else + /* we don't want palettes in hicolor or truecolor */ + (*lpddpal)->cm = 0; (*lpddpal)->lpvtbl = &xlib_ddpalvt; return 0; } static HRESULT WINAPI DGA_IDirectDraw_RestoreDisplayMode(LPDIRECTDRAW this) { #ifdef HAVE_LIBXXF86DGA - TRACE(ddraw, "(%p)->()\n", - this); + TRACE(ddraw, "(%p)->()\n",this); Sleep(1000); - XF86DGADirectVideo(display,DefaultScreen(display),0); + TSXF86DGADirectVideo(display,DefaultScreen(display),0); #ifdef RESTORE_SIGNALS SIGNAL_InitEmulator(); #endif @@ -2308,8 +1740,7 @@ static HRESULT WINAPI DGA_IDirectDraw_RestoreDisplayMode(LPDIRECTDRAW this) { static HRESULT WINAPI XShm_IDirectDraw_RestoreDisplayMode(LPDIRECTDRAW this) { #ifdef HAVE_LIBXXF86DGA - TRACE(ddraw, "(%p)->RestoreDisplayMode()\n", - this); + TRACE(ddraw, "(%p)->RestoreDisplayMode()\n", this); Sleep(1000); return 0; #else /* defined(HAVE_LIBXXF86DGA) */ @@ -2318,8 +1749,7 @@ static HRESULT WINAPI XShm_IDirectDraw_RestoreDisplayMode(LPDIRECTDRAW this) { } static HRESULT WINAPI Xlib_IDirectDraw_RestoreDisplayMode(LPDIRECTDRAW this) { - TRACE(ddraw, "(%p)->RestoreDisplayMode()\n", - this); + TRACE(ddraw, "(%p)->RestoreDisplayMode()\n", this); return 0; } @@ -2337,7 +1767,7 @@ static ULONG WINAPI IDirectDraw_AddRef(LPDIRECTDRAW this) { static ULONG WINAPI DGA_IDirectDraw_Release(LPDIRECTDRAW this) { #ifdef HAVE_LIBXXF86DGA if (!--(this->ref)) { - XF86DGADirectVideo(display,DefaultScreen(display),0); + TSXF86DGADirectVideo(display,DefaultScreen(display),0); #ifdef RESTORE_SIGNALS SIGNAL_InitEmulator(); #endif @@ -3020,22 +2450,23 @@ HRESULT WINAPI DGA_DirectDrawCreate( LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter) *lplpDD = (LPDIRECTDRAW)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDraw)); (*lplpDD)->lpvtbl = &dga_ddvt; (*lplpDD)->ref = 1; - XF86DGAQueryVersion(display,&major,&minor); + TSXF86DGAQueryVersion(display,&major,&minor); TRACE(ddraw,"XF86DGA is version %d.%d\n",major,minor); - XF86DGAQueryDirectVideo(display,DefaultScreen(display),&flags); + TSXF86DGAQueryDirectVideo(display,DefaultScreen(display),&flags); if (!(flags & XF86DGADirectPresent)) - MSG("direct video is NOT ENABLED.\n"); - XF86DGAGetVideo(display,DefaultScreen(display),&addr,&width,&banksize,&memsize); + MSG("direct video is NOT PRESENT.\n"); + TSXF86DGAGetVideo(display,DefaultScreen(display),&addr,&width,&banksize,&memsize); TRACE(ddraw,"video framebuffer: begin %p, width %d,banksize %d,memsize %d\n", addr,width,banksize,memsize ); (*lplpDD)->e.dga.fb_width = width; + (*lplpDD)->d.width = width; (*lplpDD)->e.dga.fb_addr = addr; (*lplpDD)->e.dga.fb_memsize = memsize; (*lplpDD)->e.dga.fb_banksize = banksize; - XF86DGAGetViewPortSize(display,DefaultScreen(display),&width,&height); - XF86DGASetViewPort(display,DefaultScreen(display),0,0); + TSXF86DGAGetViewPortSize(display,DefaultScreen(display),&width,&height); + TSXF86DGASetViewPort(display,DefaultScreen(display),0,0); (*lplpDD)->e.dga.fb_height = screenHeight; (*lplpDD)->e.dga.vpmask = 0; @@ -3059,54 +2490,77 @@ HRESULT WINAPI XShm_DirectDrawCreate( LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter) *lplpDD = (LPDIRECTDRAW)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDraw)); (*lplpDD)->lpvtbl = &xshm_ddvt; (*lplpDD)->ref = 1; - (*lplpDD)->e.xshm.drawable = 0; /* FIXME: make a window */ + (*lplpDD)->e.xshm.drawable = DefaultRootWindow(display); /* FIXME: make a window */ (*lplpDD)->d.depth = DefaultDepthOfScreen(screen); - (*lplpDD)->d.height = (*lplpDD)->d.width = 0; /* FIXME */ + (*lplpDD)->d.height = screenHeight; + (*lplpDD)->d.width = screenWidth; return 0; #else /* defined(HAVE_LIBXXSHM) */ return DDERR_INVALIDDIRECTDRAWGUID; #endif /* defined(HAVE_LIBXXSHM) */ } +LRESULT WINAPI Xlib_DDWndProc(HWND32 hwnd,UINT32 msg,WPARAM32 wParam,LPARAM lParam) { + LRESULT ret; + /*FIXME(ddraw,"(0x%04x,%s,0x%08lx,0x%08lx),stub!\n",(int)hwnd,SPY_GetMsgName(msg),(long)wParam,(long)lParam); */ + ret = DefWindowProc32A(hwnd,msg,wParam,lParam); + return ret; +} HRESULT WINAPI Xlib_DirectDrawCreate( LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter) { + WNDCLASS32A wc; + *lplpDD = (LPDIRECTDRAW)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirectDraw)); (*lplpDD)->lpvtbl = &xlib_ddvt; (*lplpDD)->ref = 1; - (*lplpDD)->e.xshm.drawable = 0; /* FIXME: make a window */ + (*lplpDD)->e.xlib.drawable = 0; /* in SetDisplayMode */ + wc.style = CS_GLOBALCLASS; + wc.lpfnWndProc = Xlib_DDWndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = 0; + wc.hIcon = 0; + wc.hCursor = (HCURSOR32)IDC_ARROW32A; + wc.hbrBackground= NULL_BRUSH; + wc.lpszMenuName = 0; + wc.lpszClassName= "WINE_DirectDraw"; + + (*lplpDD)->e.xlib.winclass = RegisterClass32A(&wc); + (*lplpDD)->d.depth = DefaultDepthOfScreen(screen); - (*lplpDD)->d.height = (*lplpDD)->d.width = 0; /* FIXME */ + (*lplpDD)->d.height = screenHeight; + (*lplpDD)->d.width = screenWidth; return 0; } HRESULT WINAPI DirectDrawCreate( LPGUID lpGUID, LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter ) { char xclsid[50]; - if (lpGUID) + if (HIWORD(lpGUID)) WINE_StringFromCLSID(lpGUID,xclsid); - else - strcpy(xclsid,""); + else { + sprintf(xclsid,"",(int)lpGUID); + lpGUID = NULL; + } TRACE(ddraw,"(%s,%p,%p)\n",xclsid,lplpDD,pUnkOuter); if (!lpGUID) { /* if they didn't request a particular interface, use the best * supported one */ - if (DDRAW_DGA_Available()) { + if (DDRAW_DGA_Available()) lpGUID = &DGA_DirectDraw_GUID; - } else if (DDRAW_XShm_Available()) { + else if (DDRAW_XShm_Available()) lpGUID = &XSHM_DirectDraw_GUID; - } else { + else lpGUID = &XLIB_DirectDraw_GUID; - } } - if (!memcmp(lpGUID, &DGA_DirectDraw_GUID, sizeof(GUID))) { + if (!memcmp(lpGUID, &DGA_DirectDraw_GUID, sizeof(GUID))) return DGA_DirectDrawCreate(lplpDD, pUnkOuter); - } else if (!memcmp(lpGUID, &XSHM_DirectDraw_GUID, sizeof(GUID))) { + else if (!memcmp(lpGUID, &XSHM_DirectDraw_GUID, sizeof(GUID))) return XShm_DirectDrawCreate(lplpDD, pUnkOuter); - } else if (!memcmp(lpGUID, &XLIB_DirectDraw_GUID, sizeof(GUID))) { + else if (!memcmp(lpGUID, &XLIB_DirectDraw_GUID, sizeof(GUID))) return Xlib_DirectDrawCreate(lplpDD, pUnkOuter); - } fprintf(stderr,"DirectDrawCreate(%s,%p,%p): did not recognize requested GUID\n",xclsid,lplpDD,pUnkOuter); return DDERR_INVALIDDIRECTDRAWGUID; diff --git a/graphics/painting.c b/graphics/painting.c index 659e9e8c55c..6797fccd348 100644 --- a/graphics/painting.c +++ b/graphics/painting.c @@ -1104,8 +1104,8 @@ BOOL32 WINAPI PolyBezier32( HDC32 hdc, LPPOINT32 lppt, DWORD cPoints ) if(!dc) return FALSE; if(dc && PATH_IsPathOpen(dc->w.path)) FIXME(gdi, "PATH_PolyBezier is not implemented!\n"); -// if(!PATH_PolyBezier(hdc, x, y)) -// return FALSE; +/* if(!PATH_PolyBezier(hdc, x, y)) + return FALSE; */ return dc->funcs->pPolyBezier&& dc->funcs->pPolyBezier(dc, lppt[0], lppt+1, cPoints-1); } @@ -1131,8 +1131,8 @@ BOOL32 WINAPI PolyBezierTo32( HDC32 hdc, LPPOINT32 lppt, DWORD cPoints ) pt.y=dc->w.CursPosY; if(dc && PATH_IsPathOpen(dc->w.path)) FIXME(gdi, "PATH_PolyBezierTo is not implemented!\n"); -// if(!PATH_PolyBezier(hdc, x, y)) -// return FALSE; +/* if(!PATH_PolyBezier(hdc, x, y)) + return FALSE; */ ret= dc->funcs->pPolyBezier && dc->funcs->pPolyBezier(dc, pt, lppt, cPoints); if( dc->funcs->pMoveToEx) diff --git a/graphics/path.c b/graphics/path.c index b68d2869a41..9fd23cacb55 100644 --- a/graphics/path.c +++ b/graphics/path.c @@ -199,9 +199,10 @@ BOOL16 WINAPI CloseFigure16(HDC16 hdc) /*********************************************************************** * CloseFigure32 (GDI32.16) + * + * FIXME: Check that SetLastError is being called correctly */ BOOL32 WINAPI CloseFigure32(HDC32 hdc) -/* FIXME: Check that SetLastError is being called correctly */ { GdiPath *pPath; @@ -293,12 +294,14 @@ INT32 WINAPI GetPath32(HDC32 hdc, LPPOINT32 pPoints, LPBYTE pTypes, /*********************************************************************** * PathToRegion32 (GDI32.261) - */ -HRGN32 WINAPI PathToRegion32(HDC32 hdc) -/* FIXME: Check that SetLastError is being called correctly */ -/* The documentation does not state this explicitly, but a test under Windows + * + * FIXME + * Check that SetLastError is being called correctly + * + * The documentation does not state this explicitly, but a test under Windows * shows that the region which is returned should be in device coordinates. */ +HRGN32 WINAPI PathToRegion32(HDC32 hdc) { GdiPath *pPath; HRGN32 hrgnRval; @@ -329,9 +332,11 @@ HRGN32 WINAPI PathToRegion32(HDC32 hdc) /*********************************************************************** * FillPath32 (GDI32.100) + * + * FIXME + * Check that SetLastError is being called correctly */ BOOL32 WINAPI FillPath32(HDC32 hdc) -/* FIXME: Check that SetLastError is being called correctly */ { GdiPath *pPath; INT32 mapMode, graphicsMode; @@ -413,9 +418,10 @@ BOOL32 WINAPI FillPath32(HDC32 hdc) /*********************************************************************** * SelectClipPath32 (GDI32.296) + * FIXME + * Check that SetLastError is being called correctly */ BOOL32 WINAPI SelectClipPath32(HDC32 hdc, INT32 iMode) -/* FIXME: Check that SetLastError is being called correctly */ { GdiPath *pPath; HRGN32 hrgnPath, hrgnClip; diff --git a/graphics/win16drv/init.c b/graphics/win16drv/init.c index 10dbf6556b9..e0f96999ca9 100644 --- a/graphics/win16drv/init.c +++ b/graphics/win16drv/init.c @@ -177,7 +177,7 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output, if (lstrcmpi32A(printerEnabled,"on")) { MSG("Printing disabled in wine.conf or .winerc file\n"); - MSG("Use \"printer=on\" in the \"[wine]\" section to enable it."); + MSG("Use \"printer=on\" in the \"[wine]\" section to enable it.\n"); return FALSE; } diff --git a/graphics/wing.c b/graphics/wing.c index f6dffa1166e..a68cacf4564 100644 --- a/graphics/wing.c +++ b/graphics/wing.c @@ -147,7 +147,7 @@ HBITMAP16 WINAPI WinGCreateBitmap16(HDC16 winDC, BITMAPINFO *header, { WORD sel = 0; - XShmAttach(display, &p->si); + TSXShmAttach(display, &p->si); bmpObjPtr->pixmap = XShmCreatePixmap(display, rootWindow, p->si.shmaddr, &p->si, bmpObjPtr->bitmap.bmWidth, bmpObjPtr->bitmap.bmHeight, bmpi->biBitCount ); diff --git a/graphics/x11drv/graphics.c b/graphics/x11drv/graphics.c index 0f385ad902e..ef1cf1c4da0 100644 --- a/graphics/x11drv/graphics.c +++ b/graphics/x11drv/graphics.c @@ -920,7 +920,7 @@ X11DRV_ExtFloodFill( DC *dc, INT32 x, INT32 y, COLORREF color, return result; } -/****************** WARNING: WORK IN PROGRESS AHEAD !!!! **************** +/****************************************************************** * * *Very* simple bezier drawing code, * @@ -938,82 +938,71 @@ X11DRV_ExtFloodFill( DC *dc, INT32 x, INT32 y, COLORREF color, * to avoid trucation errors the coordinates are * shifted upwards. When used in drawing they are * shifted down again, including correct rounding - * and avoiding floating points + * and avoiding floating point arithmatic + * 4 bits should allow 27 bits coordinates which I saw + * somewere in the win32 doc's + * */ #define BEZIERSHIFTBITS 4 #define BEZIERSHIFTUP(x) ((x)<>BEZIERSHIFTBITS) /* maximum depth of recursion */ -#define BEZIERMAXDEPTH 6 +#define BEZIERMAXDEPTH 8 /* size of array to store points on */ /* enough for one curve */ -#define BEZMAXPOINTS ((1<Points[0].x) - if(Points[1].x > Points[3].x+BEZIERFACTOR || - Points[1].x < Points[0].x-BEZIERFACTOR || - Points[2].x > Points[3].x+BEZIERFACTOR || - Points[2].x < Points[0].x-BEZIERFACTOR) - return FALSE; - else - if(Points[1].x < Points[3].x-BEZIERFACTOR || - Points[1].x > Points[0].x+BEZIERFACTOR || - Points[2].x < Points[3].x-BEZIERFACTOR || - Points[2].x > Points[0].x+BEZIERFACTOR) - return FALSE; - if(Points[3].y>Points[0].y) - if(Points[1].y > Points[3].y+BEZIERFACTOR || - Points[1].y < Points[0].y-BEZIERFACTOR || - Points[2].y > Points[3].y+BEZIERFACTOR || - Points[2].y < Points[0].y-BEZIERFACTOR) - return FALSE; - else - if(Points[1].x < Points[3].x-BEZIERFACTOR || - Points[1].x > Points[0].x+BEZIERFACTOR || - Points[2].x < Points[3].x-BEZIERFACTOR || - Points[2].x > Points[0].x+BEZIERFACTOR) - return FALSE;o - - /* calculate the distance squared of the control point from - * the line from begin and endpoint - */ - - hyp=((double)(Points[3].x-Points[0].x)*(double)(Points[3].x-Points[0].x)+ - (double) (Points[3].y-Points[0].y)*(double)(Points[3].y-Points[0].y)); - r1=((double)(Points[2].y-Points[0].y)*(double)(Points[3].x-Points[0].x)- - (double) (Points[3].y-Points[0].y)*(double)(Points[2].x-Points[0].x)) - /BEZIERFACTOR; - r2=((double)(Points[1].y-Points[0].y)*(double)(Points[3].x-Points[0].x)- - (double)(Points[3].y-Points[0].y)*(double)(Points[1].x-Points[0].x)) - /BEZIERFACTOR; - r1=r1*r1/hyp; - r1=r2*r2/hyp; - if( r1<1 && r2 <1){ /* distance less then a pixel */ -// fprintf(stderr,"level is %d\n", level); - return TRUE; + INT32 dx, dy; + dx=Points[3].x-Points[0].x; + dy=Points[3].y-Points[0].y; + if(ABS(dy) BEZIERPIXEL || + abs(Points[2].y-Points[0].y-(dy/dx)* + BEZIERSHIFTDOWN(Points[2].x-Points[0].x)) > BEZIERPIXEL ) + return FALSE; + else + return TRUE; + }else{ /* steep line */ + /* check that control points are between begin and end */ + if( (Points[1].y-Points[0].y)*dy < 0 || + (Points[2].y-Points[0].y)*dy < 0 ) return FALSE; + dy=BEZIERSHIFTDOWN(dy); + if(!dy) return TRUE; + if(abs(Points[1].x-Points[0].x-(dx/dy)* + BEZIERSHIFTDOWN(Points[1].y-Points[0].y)) > BEZIERPIXEL || + abs(Points[2].x-Points[0].x-(dx/dy)* + BEZIERSHIFTDOWN(Points[2].y-Points[0].y)) > BEZIERPIXEL ) + return FALSE; + else + return TRUE; } -#endif - return FALSE; - } /*********************************************************************** @@ -1021,24 +1010,31 @@ static int BezierCheck( int level, POINT32 *Points) * Draw a -what microsoft calls- bezier curve * The routine recursively devides the curve * in two parts until a straight line can be drawn + * + * level recusion depth counted backwards + * dc device context + * Points array of begin(0), end(3) and control points(1 and 2) + * XPoints array with points calculated sofar + * *pIx nr points calculated sofar + * */ static void X11DRV_Bezier(int level, DC * dc, POINT32 *Points, - XPoint* xpoints, unsigned int* pix) + XPoint* xpoints, unsigned int* pIx) { - if(*pix == BEZMAXPOINTS){ + if(*pIx == BEZMAXPOINTS){ TSXDrawLines( display, dc->u.x.drawable, dc->u.x.gc, - xpoints, *pix, CoordModeOrigin ); - *pix=0; + xpoints, *pIx, CoordModeOrigin ); + *pIx=0; } if(!level || BezierCheck(level, Points)) { - if(*pix == 0){ - xpoints[*pix].x= dc->w.DCOrgX + BEZIERSHIFTDOWN(Points[0].x); - xpoints[*pix].y= dc->w.DCOrgY + BEZIERSHIFTDOWN(Points[0].y); - *pix=1; + if(*pIx == 0){ + xpoints[*pIx].x= dc->w.DCOrgX + BEZIERSHIFTDOWN(Points[0].x); + xpoints[*pIx].y= dc->w.DCOrgY + BEZIERSHIFTDOWN(Points[0].y); + *pIx=1; } - xpoints[*pix].x= dc->w.DCOrgX + BEZIERSHIFTDOWN(Points[3].x); - xpoints[*pix].y= dc->w.DCOrgY + BEZIERSHIFTDOWN(Points[3].y); - (*pix) ++; + xpoints[*pIx].x= dc->w.DCOrgX + BEZIERSHIFTDOWN(Points[3].x); + xpoints[*pIx].y= dc->w.DCOrgY + BEZIERSHIFTDOWN(Points[3].y); + (*pIx) ++; } else { POINT32 Points2[4]; /* for the second recursive call */ Points2[3]=Points[3]; @@ -1053,8 +1049,8 @@ static void X11DRV_Bezier(int level, DC * dc, POINT32 *Points, Points2[0]=Points[3]; /* do the two halves */ - X11DRV_Bezier(level-1, dc, Points, xpoints, pix); - X11DRV_Bezier(level-1, dc, Points2, xpoints, pix); + X11DRV_Bezier(level-1, dc, Points, xpoints, pIx); + X11DRV_Bezier(level-1, dc, Points2, xpoints, pIx); } } @@ -1081,9 +1077,9 @@ X11DRV_PolyBezier(DC *dc, POINT32 start, POINT32 *BezierPoints, DWORD count) (Points+0)->x, (Points+0)->y, (Points+1)->x, (Points+1)->y, (Points+2)->x, (Points+2)->y); - if(!count || count % 3){ + if(!count || count % 3){/* paranoid */ WARN(graphics," bad value for count : %ld\n", count); - return FALSE; /* paranoid */ + return FALSE; } xpoints=(XPoint*) xmalloc( sizeof(XPoint)*BEZMAXPOINTS); Points[3].x=BEZIERSHIFTUP(XLPTODP(dc,start.x)); @@ -1100,8 +1096,6 @@ X11DRV_PolyBezier(DC *dc, POINT32 start, POINT32 *BezierPoints, DWORD count) } if( ix) TSXDrawLines( display, dc->u.x.drawable, dc->u.x.gc, xpoints, ix, CoordModeOrigin ); -// fprintf(stderr," ix is %d\n",ix); free(xpoints); return TRUE; } -/***************************END OF WORK IN PROGRESS ********************/ diff --git a/graphics/x11drv/xfont.c b/graphics/x11drv/xfont.c index edefaf7f240..7120689b2eb 100644 --- a/graphics/x11drv/xfont.c +++ b/graphics/x11drv/xfont.c @@ -29,7 +29,7 @@ #define X_PFONT_MAGIC (0xFADE0000) #define X_FMC_MAGIC (0x0000CAFE) -#define MAX_FONT_FAMILIES 64 +#define MAX_FONT_FAMILIES 128 #define MAX_LFD_LENGTH 256 #define REMOVE_SUBSETS 1 @@ -575,7 +575,7 @@ static BOOL32 XFONT_GetLeading( LPIFONTINFO16 pFI, XFontStruct* x_fs, INT32* Atom RAW_CAP_HEIGHT = TSXInternAtom(display, "RAW_CAP_HEIGHT", TRUE); if(TSXGetFontProperty(x_fs, RAW_CAP_HEIGHT, &height)) *pIL = XFT->ascent - - (INT32)(hypotf(XFT->a, XFT->b) / 1000.0 * height); + (INT32)(XFT->pixelsize / 1000.0 * height); else *pIL = 0; return bHaveCapHeight && x_fs->per_char; @@ -2015,7 +2015,7 @@ static BOOL32 XFONT_SetX11Trans( fontObject *pfo ) XGetFontProperty( pfo->fs, RAW_ASCENT, &PX->RAW_ASCENT ); XGetFontProperty( pfo->fs, RAW_DESCENT, &PX->RAW_DESCENT ); - PX->pixelsize = hypotf(PX->a, PX->b); + PX->pixelsize = hypot(PX->a, PX->b); PX->ascent = PX->pixelsize / 1000.0 * PX->RAW_ASCENT; PX->descent = PX->pixelsize / 1000.0 * PX->RAW_DESCENT; diff --git a/if1632/Makefile.in b/if1632/Makefile.in index 3275487b7fb..392b50a7f6f 100644 --- a/if1632/Makefile.in +++ b/if1632/Makefile.in @@ -24,6 +24,7 @@ DLLS = \ ole2thk.spec \ olecli.spec \ olesvr.spec \ + rasapi16.spec \ shell.spec \ sound.spec \ storage.spec \ diff --git a/if1632/builtin.c b/if1632/builtin.c index b300732d65c..c20ca16ce9c 100644 --- a/if1632/builtin.c +++ b/if1632/builtin.c @@ -64,6 +64,7 @@ extern const WIN16_DESCRIPTOR OLE2THK_Descriptor; extern const WIN16_DESCRIPTOR OLE2_Descriptor; extern const WIN16_DESCRIPTOR OLECLI_Descriptor; extern const WIN16_DESCRIPTOR OLESVR_Descriptor; +extern const WIN16_DESCRIPTOR RASAPI16_Descriptor; extern const WIN16_DESCRIPTOR SHELL_Descriptor; extern const WIN16_DESCRIPTOR SOUND_Descriptor; extern const WIN16_DESCRIPTOR STORAGE_Descriptor; @@ -109,6 +110,7 @@ static BUILTIN16_DLL BuiltinDLLs[] = { &OLE2_Descriptor, DLL_FLAG_NOT_USED }, { &OLECLI_Descriptor, DLL_FLAG_NOT_USED }, { &OLESVR_Descriptor, DLL_FLAG_NOT_USED }, + { &RASAPI16_Descriptor, 0 }, { &SHELL_Descriptor, 0 }, { &SOUND_Descriptor, 0 }, { &STORAGE_Descriptor, DLL_FLAG_NOT_USED }, diff --git a/if1632/rasapi16.spec b/if1632/rasapi16.spec new file mode 100644 index 00000000000..30decf47c3b --- /dev/null +++ b/if1632/rasapi16.spec @@ -0,0 +1,12 @@ +name rasapi16 +type win16 + +#1 stub WEP +#2 stub DLLENTRYPOINT +3 stub RNA1632_THUNKDATA16 +4 stub RasGetErrorString +5 stub RasEnumConnections +6 stub RasHangUp +7 stub RasEnumEntries +8 stub RasGetConnectStatus +9 stub RasDial diff --git a/if1632/snoop.c b/if1632/snoop.c index 3935901345a..1f946655029 100644 --- a/if1632/snoop.c +++ b/if1632/snoop.c @@ -60,6 +60,7 @@ typedef struct tagSNOOP16_RETURNENTRY { DWORD ordinal; WORD origSP; WORD *args; /* saved args across a stdcall */ + BYTE show; } SNOOP16_RETURNENTRY; typedef struct tagSNOOP16_RETURNENTRIES { @@ -213,6 +214,8 @@ void WINAPI SNOOP16_Entry(CONTEXT *context) { SNOOP16_RETURNENTRIES **rets = &firstrets; SNOOP16_RETURNENTRY *ret; int i,max; + /* from relay32/snoop.c */ + extern int SNOOP_ShowDebugmsgSnoop(const char *dll,int ord,const char *fname); while (dll) { if (xcs == dll->funhandle) { @@ -266,6 +269,8 @@ void WINAPI SNOOP16_Entry(CONTEXT *context) { IP_reg(context)= LOWORD(fun->origfun); CS_reg(context)= HIWORD(fun->origfun); + ret->show = SNOOP_ShowDebugmsgSnoop(dll->name, ordinal, fun->name); + if(!ret->show) return; DPRINTF("Call %s.%ld: %s(",dll->name,ordinal,fun->name); if (fun->nrofargs>0) { max = fun->nrofargs; if (max>16) max=16; @@ -278,7 +283,7 @@ void WINAPI SNOOP16_Entry(CONTEXT *context) { ret->args = HeapAlloc(SystemHeap,0,16*sizeof(WORD)); memcpy(ret->args,(LPBYTE)(PTR_SEG_OFF_TO_LIN(SS_reg(context),SP_reg(context))+8),sizeof(WORD)*16); } - DPRINTF(") ret=%04x:%04x\n",HIWORD((DWORD)(*rets)->entry[i].origreturn),LOWORD((DWORD)(*rets)->entry[i].origreturn)); + DPRINTF(") ret=%04x:%04x\n",HIWORD(ret->origreturn),LOWORD(ret->origreturn)); } void WINAPI SNOOP16_Return(CONTEXT *context) { @@ -293,7 +298,9 @@ void WINAPI SNOOP16_Return(CONTEXT *context) { ret->dll->funs[ret->ordinal].nrofargs=(SP_reg(context)-ret->origSP-4)/2; IP_reg(context) = LOWORD(ret->origreturn); CS_reg(context) = HIWORD(ret->origreturn); - if (ret->args) { + if(!ret->show) { + ; + } else if (ret->args) { int i,max; DPRINTF("Ret %s.%ld: %s(",ret->dll->name,ret->ordinal,ret->dll->funs[ret->ordinal].name); diff --git a/include/acconfig.h b/include/acconfig.h index 1fad5da9dfe..f0287eacb87 100644 --- a/include/acconfig.h +++ b/include/acconfig.h @@ -12,6 +12,9 @@ /* Define if union semun is defined in sys/sem.h */ #undef HAVE_UNION_SEMUN +/* Define if struct msghdr contains msg_accrights */ +#undef HAVE_MSGHDR_ACCRIGHTS + /* Define if you have the Xxf86dga library (-lXxf86dga). */ #undef HAVE_LIBXXF86DGA diff --git a/include/commctrl.h b/include/commctrl.h index 32a5372f814..d4e765c6528 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -712,10 +712,12 @@ CreateMappedBitmap (HINSTANCE32, INT32, UINT32, LPCOLORMAP, INT32); #define TOOLTIPS_CLASS32W L"tooltips_class32" #define TOOLTIPS_CLASS32A "tooltips_class32" #define TOOLTIPS_CLASS WINELIB_NAME_AW(TOOLTIPS_CLASS) + +#define INFOTIPSIZE 1024 #define TTS_ALWAYSTIP 0x01 #define TTS_NOPREFIX 0x02 - + #define TTF_IDISHWND 0x0001 #define TTF_CENTERTIP 0x0002 #define TTF_RTLREADING 0x0004 @@ -781,6 +783,15 @@ CreateMappedBitmap (HINSTANCE32, INT32, UINT32, LPCOLORMAP, INT32); #define TTM_POP (WM_USER+28) #define TTM_UPDATE (WM_USER+29) + +#define TTN_FIRST (0U-520U) +#define TTN_LAST (0U-549U) +#define TTN_GETDISPINFOA (TTN_FIRST-0) +#define TTN_GETDISPINFOW (TTN_FIRST-10) +#define TTN_SHOW (TTN_FIRST-1) +#define TTN_POP (TTN_FIRST-2) + + typedef struct tagTOOLINFOA { UINT32 cbSize; UINT32 uFlags; @@ -790,7 +801,7 @@ typedef struct tagTOOLINFOA { HINSTANCE32 hinst; LPSTR lpszText; LPARAM lParam; -} TOOLINFOA, *PTOOLINFOA, *LPTOOLINFOA; +} TTTOOLINFOA, *PTOOLINFOA, *LPTTTOOLINFOA; typedef struct tagTOOLINFOW { UINT32 cbSize; @@ -801,9 +812,41 @@ typedef struct tagTOOLINFOW { HINSTANCE32 hinst; LPWSTR lpszText; LPARAM lParam; -} TOOLINFOW, *PTOOLINFOW, *LPTOOLINFOW; +} TTTOOLINFOW, *PTOOLINFOW, *LPTTTOOLINFOW; +typedef struct _TT_HITTESTINFOA +{ + HWND32 hwnd; + POINT32 pt; + TTTOOLINFOA ti; +} TTHITTESTINFOA, *LPTTHITTESTINFOA; +typedef struct _TT_HITTESTINFOW +{ + HWND32 hwnd; + POINT32 pt; + TTTOOLINFOW ti; +} TTHITTESTINFOW, *LPTTHITTESTINFOW; + +typedef struct tagNMTTDISPINFOA +{ + NMHDR hdr; + LPSTR lpszText; + CHAR szText[80]; + HINSTANCE32 hinst; + UINT32 uFlags; + LPARAM lParam; +} NMTTDISPINFOA, *LPNMTTDISPINFOA; + +typedef struct tagNMTTDISPINFOW +{ + NMHDR hdr; + LPWSTR lpszText; + WCHAR szText[80]; + HINSTANCE32 hinst; + UINT32 uFlags; + LPARAM lParam; +} NMTTDISPINFOW, *LPNMTTDISPINFOW; @@ -863,6 +906,37 @@ typedef struct tagTOOLINFOW { #define WC_PAGESCROLLER32W L"SysPager" #define WC_PAGESCROLLER WINELIB_NAME_AW(WC_PAGESCROLLER) +#define PGS_VERT 0x00000000 +#define PGS_HORZ 0x00000001 +#define PGS_AUTOSCROLL 0x00000002 +#define PGS_DRAGNDROP 0x00000004 + +#define PGF_INVISIBLE 0 +#define PGF_NORMAL 1 +#define PGF_GRAYED 2 +#define PGF_DEPRESSED 4 +#define PGF_HOT 8 + +#define PGB_TOPORLEFT 0 +#define PGB_BOTTOMORRIGHT 1 + +#define PGM_FIRST 0x1400 + +#define PGM_SETCHILD (PGM_FIRST+1) +#define PGM_RECALCSIZE (PGM_FIRST+2) +#define PGM_FORWARDMOUSE (PGM_FIRST+3) +#define PGM_SETBKCOLOR (PGM_FIRST+4) +#define PGM_GETBKCOLOR (PGM_FIRST+5) +#define PGM_SETBORDER (PGM_FIRST+6) +#define PGM_GETBORDER (PGM_FIRST+7) +#define PGM_SETPOS (PGM_FIRST+8) +#define PGM_GETPOS (PGM_FIRST+9) +#define PGM_SETBUTTONSIZE (PGM_FIRST+10) +#define PGM_GETBUTTONSIZE (PGM_FIRST+11) +#define PGM_GETBUTTONSTATE (PGM_FIRST+12) +#define PGM_GETDROPTARGET CCM_GETDROPTARGET + + /* Treeview control */ @@ -870,7 +944,15 @@ typedef struct tagTOOLINFOW { #define WC_TREEVIEW32W L"SysTreeView32" #define WC_TREEVIEW WINELIB_NAME_AW(WC_TREEVIEW) -#define TV_FIRST 0x1100 +#define TVSIL_NORMAL 0 +#define TVSIL_STATE 2 + +#define TV_FIRST 0x1100 + + +#define TVM_GETIMAGELIST (TV_FIRST+8) +#define TVM_SETIMAGELIST (TV_FIRST+9) + /* Listview control */ diff --git a/include/config.h.in b/include/config.h.in index 21e18e1f6f5..30fe2a3ee89 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -24,6 +24,9 @@ /* Define if union semun is defined in sys/sem.h */ #undef HAVE_UNION_SEMUN +/* Define if struct msghdr contains msg_accrights */ +#undef HAVE_MSGHDR_ACCRIGHTS + /* Define if you have the Xxf86dga library (-lXxf86dga). */ #undef HAVE_LIBXXF86DGA @@ -102,6 +105,9 @@ /* Define if you have the header file. */ #undef HAVE_LINUX_CDROM_H +/* Define if you have the header file. */ +#undef HAVE_LINUX_UCDROM_H + /* Define if you have the header file. */ #undef HAVE_MACHINE_SOUNDCARD_H diff --git a/include/ddraw.h b/include/ddraw.h index cc0818e7520..58ea6ff9374 100644 --- a/include/ddraw.h +++ b/include/ddraw.h @@ -817,6 +817,7 @@ struct IDirectDrawPalette { LPDIRECTDRAW ddraw; Colormap cm; PALETTEENTRY palents[256]; + int installed; }; #undef THIS @@ -889,6 +890,9 @@ struct _xlib_directdrawdata { /* are these needed for anything? (draw_surf is the active surface) IDirectDrawSurface *surfs; DWORD num_surfs, alloc_surfs, draw_surf; */ + + ATOM winclass; + HWND32 window; }; struct IDirectDraw { @@ -962,11 +966,11 @@ struct IDirectDraw2 { #define THIS LPDIRECTDRAWSURFACE this struct _common_directdrawsurface { - LPDIRECTDRAWPALETTE palette; - LPDIRECTDRAW ddraw; - LPDIRECTDRAWSURFACE backbuffer; - LPVOID surface; - DWORD lpitch,width,height; + LPDIRECTDRAWPALETTE palette; + LPDIRECTDRAW ddraw; + LPDIRECTDRAWSURFACE3 backbuffer; + LPVOID surface; + DWORD lpitch,width,height; }; struct _dga_directdrawsurface { @@ -975,7 +979,6 @@ struct _dga_directdrawsurface { struct _xshm_directdrawsurface { XImage *image; - BOOL32 surface_is_image_data; #ifdef HAVE_LIBXXSHM XShmSegmentInfo shminfo; #endif diff --git a/include/file.h b/include/file.h index 9c2abea3bc9..564314fb327 100644 --- a/include/file.h +++ b/include/file.h @@ -33,9 +33,17 @@ typedef struct #define IS_END_OF_NAME(ch) (!(ch) || ((ch) == '/') || ((ch) == '\\')) +/* DOS device descriptor */ +typedef struct +{ + char *name; + int flags; +} DOS_DEVICE; + /* files/file.c */ extern FILE_OBJECT *FILE_GetFile( HFILE32 handle ); +extern void FILE_ReleaseFile( FILE_OBJECT *file ); extern HFILE32 FILE_Alloc( FILE_OBJECT **file ); extern void FILE_SetDosError(void); extern HFILE32 FILE_DupUnixHandle( int fd ); @@ -68,7 +76,7 @@ extern void DOSFS_UnixTimeToFileTime( time_t unixtime, LPFILETIME ft, DWORD remainder ); extern time_t DOSFS_FileTimeToUnixTime( const FILETIME *ft, DWORD *remainder ); extern BOOL32 DOSFS_ToDosFCBFormat( LPCSTR name, LPSTR buffer ); -extern BOOL32 DOSFS_IsDevice( const char *name ); +extern const DOS_DEVICE *DOSFS_GetDevice( const char *name ); extern HFILE32 DOSFS_OpenDevice( const char *name, INT32 mode ); extern BOOL32 DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf, INT32 long_len, LPSTR short_buf, diff --git a/include/heap.h b/include/heap.h index 2ad3098d16e..84f6dc25a37 100644 --- a/include/heap.h +++ b/include/heap.h @@ -32,8 +32,11 @@ extern LPSTR HEAP_strdupWtoA( HANDLE32 heap, DWORD flags, LPCWSTR str ); (HIWORD(str) ? HEAP_strdupA( SegptrHeap, 0, (str) ) : (LPSTR)(str)) #define SEGPTR_STRDUP_WtoA(str) \ (HIWORD(str) ? HEAP_strdupWtoA( SegptrHeap, 0, (str) ) : (LPSTR)(str)) -#define SEGPTR_GET(ptr) \ - (HIWORD(ptr) ? HEAP_GetSegptr( SegptrHeap, 0, (ptr) ) : (SEGPTR)(ptr)) + /* define an inline function, a macro won't do */ +static __inline__ SEGPTR SEGPTR_Get(LPCVOID ptr) { + return (HIWORD(ptr) ? HEAP_GetSegptr( SegptrHeap, 0, ptr ) : (SEGPTR)ptr); +} +#define SEGPTR_GET(ptr) SEGPTR_Get(ptr) #define SEGPTR_FREE(ptr) \ (HIWORD(ptr) ? HeapFree( SegptrHeap, 0, (ptr) ) : 0) diff --git a/include/pager.h b/include/pager.h index 428a8f07a0b..fe992ff4655 100644 --- a/include/pager.h +++ b/include/pager.h @@ -10,7 +10,11 @@ typedef struct tagPAGER_INFO { - UINT32 uDummy; /* this is just a dummy to keep the compiler happy */ + HWND32 hwndChild; + COLORREF clrBk; + INT32 iBorder; + INT32 iButtonSize; + } PAGER_INFO; diff --git a/include/peexe.h b/include/peexe.h index 848ed949acd..9d1a60d7c08 100644 --- a/include/peexe.h +++ b/include/peexe.h @@ -238,9 +238,9 @@ typedef struct _IMAGE_IMPORT_BY_NAME { /* Import thunk */ typedef struct _IMAGE_THUNK_DATA { union { - LPBYTE ForwarderString; - LPDWORD Function; - DWORD Ordinal; + LPBYTE ForwarderString; + FARPROC32 Function; + DWORD Ordinal; LPIMAGE_IMPORT_BY_NAME AddressOfData; } u1; } IMAGE_THUNK_DATA,*LPIMAGE_THUNK_DATA; diff --git a/include/server.h b/include/server.h index ab3dcc80062..d6501f1628a 100644 --- a/include/server.h +++ b/include/server.h @@ -18,6 +18,15 @@ struct header /* max msg length (not including the header) */ #define MAX_MSG_LENGTH (16384 - sizeof(struct header)) +/* data structure used to pass an fd with sendmsg/recvmsg */ +struct cmsg_fd +{ + int len; /* sizeof structure */ + int level; /* SOL_SOCKET */ + int type; /* SCM_RIGHTS */ + int fd; /* fd to pass */ +}; + /* request from client to server */ enum request diff --git a/include/shlobj.h b/include/shlobj.h index 3deeb401721..4aed4415aa8 100644 --- a/include/shlobj.h +++ b/include/shlobj.h @@ -12,6 +12,75 @@ #define FAR #define THIS_ THIS, +/* common shell file structures*/ +#define FO_MOVE 0x0001 +#define FO_COPY 0x0002 +#define FO_DELETE 0x0003 +#define FO_RENAME 0x0004 + +#define FOF_MULTIDESTFILES 0x0001 +#define FOF_CONFIRMMOUSE 0x0002 +#define FOF_SILENT 0x0004 +#define FOF_RENAMEONCOLLISION 0x0008 +#define FOF_NOCONFIRMATION 0x0010 +#define FOF_WANTMAPPINGHANDLE 0x0020 +#define FOF_ALLOWUNDO 0x0040 +#define FOF_FILESONLY 0x0080 +#define FOF_SIMPLEPROGRESS 0x0100 +#define FOF_NOCONFIRMMKDIR 0x0200 +#define FOF_NOERRORUI 0x0400 +typedef WORD FILEOP_FLAGS; + +#define PO_DELETE 0x0013 +#define PO_RENAME 0x0014 +#define PO_PORTCHANGE 0x0020 + +typedef WORD PRINTEROP_FLAGS; + +typedef struct _SHFILEOPSTRUCTA +{ HWND32 hwnd; + UINT32 wFunc; + LPCSTR pFrom; + LPCSTR pTo; + FILEOP_FLAGS fFlags; + BOOL32 fAnyOperationsAborted; + LPVOID hNameMappings; + LPCSTR lpszProgressTitle; +} SHFILEOPSTRUCT32A, FAR *LPSHFILEOPSTRUCT32A; + +typedef struct _SHFILEOPSTRUCTW +{ HWND32 hwnd; + UINT32 wFunc; + LPCWSTR pFrom; + LPCWSTR pTo; + FILEOP_FLAGS fFlags; + BOOL32 fAnyOperationsAborted; + LPVOID hNameMappings; + LPCWSTR lpszProgressTitle; +} SHFILEOPSTRUCT32W, FAR *LPSHFILEOPSTRUCT32W; + +typedef SHFILEOPSTRUCT32A SHFILEOPSTRUCT32; +typedef LPSHFILEOPSTRUCT32A LPSHFILEOPSTRUCT32; + +/*common IDList structures*/ +typedef struct { + WORD cb; /* nr of bytes in this item */ + BYTE abID[1];/* first byte in this item */ +} SHITEMID,*LPSHITEMID; + +typedef struct { + SHITEMID mkid; /* first itemid in list */ +} ITEMIDLIST,*LPITEMIDLIST,*LPCITEMIDLIST; + +/* for SHChangeNotifyRegister*/ +typedef struct { + LPITEMIDLIST pidl; + DWORD unknown; +} IDSTRUCT; + +/* for SHAddToRecentDocs*/ +#define SHARD_PIDL 0x00000001L +#define SHARD_PATH 0x00000002L typedef LPVOID LPBC; /* *IBindCtx really */ @@ -48,16 +117,6 @@ typedef struct _STRRET }u; } STRRET,*LPSTRRET; -typedef struct { - WORD cb; /* nr of bytes in this item */ - BYTE abID[1];/* first byte in this item */ -} SHITEMID,*LPSHITEMID; - -typedef struct { - SHITEMID mkid; /* first itemid in list */ -} ITEMIDLIST,*LPITEMIDLIST,*LPCITEMIDLIST; - - /**************************************************************************** * INTERNAL CLASS: PIDL-Manager * Source: HOWTO extend the explorer namespace @@ -66,9 +125,12 @@ typedef struct { #define THIS LPPIDLMGR this typedef enum tagPIDLTYPE { PT_DESKTOP = 0x00000000, - PT_DRIVE = 0x00000001, - PT_FOLDER = 0x00000002, - PT_VALUE = 0x00000004, + PT_MYCOMP = 0x00000001, + PT_CONTROL = 0x00000002, + PT_RECYCLER =0x00000004, + PT_DRIVE = 0x00000008, + PT_FOLDER = 0x00000010, + PT_VALUE = 0x00000020, PT_TEXT = PT_FOLDER | PT_VALUE } PIDLTYPE; @@ -78,8 +140,9 @@ typedef struct tagPIDLDATA }PIDLDATA, FAR *LPPIDLDATA; typedef struct pidlmgr pidlmgr,*LPPIDLMGR; -typedef struct PidlMgr_VTable { - STDMETHOD_(LPITEMIDLIST, CreateDesktop) (THIS); +typedef struct PidlMgr_VTable +{ STDMETHOD_(LPITEMIDLIST, CreateDesktop) (THIS); + STDMETHOD_(LPITEMIDLIST, CreateMyComputer) (THIS); STDMETHOD_(LPITEMIDLIST, CreateDrive) (THIS_ LPCSTR); STDMETHOD_(LPITEMIDLIST, CreateFolder) (THIS_ LPCSTR); STDMETHOD_(LPITEMIDLIST, CreateValue) (THIS_ LPCSTR); @@ -92,6 +155,7 @@ typedef struct PidlMgr_VTable { STDMETHOD_(LPITEMIDLIST, GetLastItem) (THIS_ LPCITEMIDLIST); STDMETHOD_(DWORD, GetItemText) (THIS_ LPCITEMIDLIST, LPSTR, UINT16); STDMETHOD_(BOOL32, IsDesktop) (THIS_ LPCITEMIDLIST); + STDMETHOD_(BOOL32, IsMyComputer) (THIS_ LPCITEMIDLIST); STDMETHOD_(BOOL32, IsDrive) (THIS_ LPCITEMIDLIST); STDMETHOD_(BOOL32, IsFolder) (THIS_ LPCITEMIDLIST); STDMETHOD_(BOOL32, IsValue) (THIS_ LPCITEMIDLIST); @@ -114,8 +178,8 @@ typedef struct PidlMgr_VTable { } *LPPIDLMGR_VTABLE,PidlMgr_VTable; -struct pidlmgr { - LPPIDLMGR_VTABLE lpvtbl; +struct pidlmgr +{ LPPIDLMGR_VTABLE lpvtbl; }; #ifdef __WINE__ extern LPPIDLMGR PidlMgr_Constructor(); @@ -174,18 +238,16 @@ struct IEnumIDList { /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */ typedef enum -{ - SHGDN_NORMAL = 0, /* default (display purpose) */ - SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/ - SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */ +{ SHGDN_NORMAL = 0, /* default (display purpose) */ + SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/ + SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */ } SHGNO; /* IShellFolder::EnumObjects */ typedef enum tagSHCONTF -{ - SHCONTF_FOLDERS = 32, /* for shell browser */ - SHCONTF_NONFOLDERS = 64, /* for default view */ - SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */ +{ SHCONTF_FOLDERS = 32, /* for shell browser */ + SHCONTF_NONFOLDERS = 64, /* for default view */ + SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */ } SHCONTF; /* from oleidl.h */ @@ -225,7 +287,7 @@ typedef struct IShellFolder_VTable { STDMETHOD_(ULONG,AddRef) (THIS) PURE; STDMETHOD_(ULONG,Release) (THIS) PURE; /* *** IPersist Folder methods *** */ - STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidl) PURE; +/* STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidl) PURE; */ /* *** IShellFolder methods *** */ STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner, LPBC pbcReserved, LPOLESTR32 lpszDisplayName, @@ -258,7 +320,7 @@ struct tagSHELLFOLDER { LPITEMIDLIST mpidlNSRoot; LPSHELLFOLDER mpSFParent; }; - +extern LPSHELLFOLDER pdesktopfolder; #undef THIS /**************************************************************************** @@ -333,9 +395,6 @@ extern LPSHELLLINK IShellLink_Constructor(); extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD,HRESULT*); #endif -DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*); - - /**************************************************************************** * SHBrowseForFolder API */ @@ -393,10 +452,9 @@ typedef struct tagBROWSEINFO32W { #define BFFM_SETSELECTIONW (WM_USER+103) #define BFFM_SETSTATUSTEXTW (WM_USER+104) -LPITEMIDLIST WINAPI SHBrowseForFolder32A(LPBROWSEINFO32A lpbi); -/* -LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi); + +/* #ifdef UNICODE #define SHBrowseForFolder SHBrowseForFolderW #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW @@ -412,6 +470,41 @@ LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi); #endif */ +/**************************************************************************** + * shlview structures + */ +typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,HWND32 hwnd,UINT32 uMsg,UINT32 wParam,LPARAM lParam); + +/* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/ +#define NF_INHERITVIEW 0x0000 +#define NF_LOCALVIEW 0x0001 + +typedef struct _SHELLVIEWDATA // idl +{ DWORD dwSize; + LPSHELLFOLDER pShellFolder; + DWORD dwUserParam; + LPCITEMIDLIST pidl; + DWORD v3; // always 0 + SHELLVIEWPROC pCallBack; + DWORD viewmode; // NF_* enum +} SHELLVIEWDATA, * LPSHELLVIEWDATA; + +/**************************************************************************** + * functions + */ + +DWORD WINAPI ILGetSize(LPITEMIDLIST iil); +DWORD WINAPI SHAddToRecentDocs(UINT32 uFlags, LPCVOID pv); +LPVOID WINAPI SHAlloc(DWORD len); +LPITEMIDLIST WINAPI SHBrowseForFolder32A(LPBROWSEINFO32A lpbi); +/*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/ +DWORD WINAPI SHChangeNotifyRegister(HWND32 hwnd,LONG events1,LONG events2,DWORD msg,int count,IDSTRUCT *idlist); +DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*); +DWORD WINAPI SHFileOperation32(LPSHFILEOPSTRUCT32 lpFileOp); +LPSTR WINAPI PathAddBackslash(LPSTR path); +LPSTR WINAPI PathRemoveBlanks(LPSTR str); + + #undef PURE #undef FAR #undef THIS diff --git a/include/toolbar.h b/include/toolbar.h index e036a125f18..fc0573928fa 100644 --- a/include/toolbar.h +++ b/include/toolbar.h @@ -51,6 +51,7 @@ typedef struct tagTOOLBAR_INFO HWND32 hwndNotify; /* handle to the window that gets notifications */ BOOL32 bTransparent; /* background transparency flag */ BOOL32 bAutoSize; + DWORD dwExStyle; /* extended toolbar style */ COLORREF clrInsertMark; /* insert mark color */ diff --git a/include/tooltips.h b/include/tooltips.h index 1c071356361..95e2a6c9e2c 100644 --- a/include/tooltips.h +++ b/include/tooltips.h @@ -18,18 +18,28 @@ typedef struct tagTTTOOL_INFO LPSTR lpszText; LPARAM lParam; + } TTTOOL_INFO; typedef struct tagTOOLTIPS_INFO { + CHAR szTipText[INFOTIPSIZE]; BOOL32 bActive; UINT32 uNumTools; COLORREF clrBk; COLORREF clrText; HFONT32 hFont; - INT32 iMaxTipWidth; - INT32 iCurrentTool; + INT32 nMaxTipWidth; + INT32 nTool; + INT32 nOldTool; + INT32 nCurrentTool; + + INT32 nAutomaticTime; + INT32 nReshowTime; + INT32 nAutoPopTime; + INT32 nInitialTime; + RECT32 rcMargin; TTTOOL_INFO *tools; } TOOLTIPS_INFO; diff --git a/include/treeview.h b/include/treeview.h index 2d92a8036db..0c315d431e7 100644 --- a/include/treeview.h +++ b/include/treeview.h @@ -9,7 +9,12 @@ typedef struct tagTREEVIEW_INFO { - UINT32 uDummy; /* this is just a dummy to keep the compiler happy */ + COLORREF clrBk; + COLORREF clrText; + + HIMAGELIST himlNormal; + HIMAGELIST himlState; + } TREEVIEW_INFO; diff --git a/include/ts_xf86dga.h b/include/ts_xf86dga.h new file mode 100644 index 00000000000..e529ee197fb --- /dev/null +++ b/include/ts_xf86dga.h @@ -0,0 +1,25 @@ +/* + * Thread safe wrappers around xf86dga calls. + * Always include this file instead of . + * This file was generated automatically by tools/make_X11wrappers + * + * Copyright 1998 Kristian Nielsen + */ + +#ifndef __WINE_TSXF86DGA_H +#define __WINE_TSXF86DGA_H + +#include +#include + +extern Bool TSXF86DGAQueryVersion(Display*,int*,int*); +extern Bool TSXF86DGAQueryExtension(Display*,int*,int*); +extern Status TSXF86DGAGetVideo(Display*,int,char**,int*,int*,int*); +extern Status TSXF86DGADirectVideo(Display*,int,int); +extern Status TSXF86DGAGetViewPortSize(Display*,int,int*,int*); +extern Status TSXF86DGASetViewPort(Display*,int,int,int); +extern Status TSXF86DGAInstallColormap(Display*,int,Colormap); +extern Status TSXF86DGAQueryDirectVideo(Display*,int,int*); +extern Status TSXF86DGAViewPortChanged(Display*,int,int); + +#endif /* __WINE_TSXF86DGA_H */ diff --git a/include/ts_xlib.h b/include/ts_xlib.h index f49bdee8aa1..f78176c97f8 100644 --- a/include/ts_xlib.h +++ b/include/ts_xlib.h @@ -83,7 +83,6 @@ extern int TSXGetKeyboardControl(Display*, XKeyboardState*); extern int TSXGetScreenSaver(Display*, int*, int*, int*, int*); extern int TSXGetWindowProperty(Display*, Window, Atom, long, long, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**); extern int TSXGetWindowAttributes(Display*, Window, XWindowAttributes*); -extern int TSXGrabPointer(Display*, Window, int, unsigned int, int, int, Window, Cursor, Time); extern int TSXGrabServer(Display*); extern int TSXInstallColormap(Display*, Colormap); extern KeyCode TSXKeysymToKeycode(Display*, KeySym); @@ -115,12 +114,12 @@ extern int TSXSetLineAttributes(Display*, GC, unsigned int, int, int, int); extern int TSXSetScreenSaver(Display*, int, int, int, int); extern int TSXSetSelectionOwner(Display*, Atom, Window, Time); extern int TSXSetSubwindowMode(Display*, GC, int); +extern int TSXSetWindowColormap(Display*, Window, Colormap); extern int TSXStoreColor(Display*, Colormap, XColor*); extern int TSXStoreName(Display*, Window, const char*); extern int TSXSync(Display*, int); extern int TSXTextExtents(XFontStruct*, const char*, int, int*, int*, int*, XCharStruct*); extern int TSXTextWidth(XFontStruct*, const char*, int); -extern int TSXUngrabPointer(Display*, Time); extern int TSXUngrabServer(Display*); extern int TSXUninstallColormap(Display*, Colormap); extern int TSXUnmapWindow(Display*, Window); diff --git a/include/version.h b/include/version.h index 0554a0e9c36..2eeda851878 100644 --- a/include/version.h +++ b/include/version.h @@ -1 +1 @@ -#define WINE_RELEASE_INFO "Wine release 980712" +#define WINE_RELEASE_INFO "Wine release 980726" diff --git a/include/windows.h b/include/windows.h index 5184273124f..a8bee8a88b6 100644 --- a/include/windows.h +++ b/include/windows.h @@ -5520,6 +5520,12 @@ DECL_WINELIB_TYPE_AW(LPDEVMODE) #define DM_COLOR 0x00000800L #define DM_DUPLEX 0x00001000L +#define DM_BITSPERPEL 0x00040000L +#define DM_PELSWIDTH 0x00080000L +#define DM_PELSHEIGHT 0x00100000L +#define DM_DISPLAYFLAGS 0x00200000L +#define DM_DISPLAYFREQUENCY 0x00400000L + /* etc.... */ #define DMORIENT_PORTRAIT 1 @@ -5567,6 +5573,16 @@ typedef struct _PRINTER_DEFAULTS32W { DECL_WINELIB_TYPE_AW(PRINTER_DEFAULTS) DECL_WINELIB_TYPE_AW(LPPRINTER_DEFAULTS) + /* ChangeDisplaySettings return codes */ + +#define DISP_CHANGE_SUCCESSFUL 0 +#define DISP_CHANGE_RESTART 1 +#define DISP_CHANGE_FAILED (-1) +#define DISP_CHANGE_BADMODE (-2) +#define DISP_CHANGE_NOTUPDATED (-3) +#define DISP_CHANGE_BADFLAGS (-4) + + typedef struct _SYSTEM_POWER_STATUS { BOOL16 ACLineStatus; @@ -6520,6 +6536,7 @@ DWORD WINAPI GetFullPathName32W(LPCWSTR,DWORD,LPWSTR,LPWSTR*); #define GetFullPathName WINELIB_NAME_AW(GetFullPathName) INT32 WINAPI GetGraphicsMode(HDC32); BOOL32 WINAPI GetHandleInformation(HANDLE32,LPDWORD); +BOOL32 WINAPI GetIconInfo(HICON32,LPICONINFO); DWORD WINAPI GetLargestConsoleWindowSize(HANDLE32); VOID WINAPI GetLocalTime(LPSYSTEMTIME); DWORD WINAPI GetLogicalDrives(void); diff --git a/loader/ne/segment.c b/loader/ne/segment.c index fcaa0851f5e..1c47dd1931b 100644 --- a/loader/ne/segment.c +++ b/loader/ne/segment.c @@ -213,10 +213,13 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum ) *((BYTE *)pModule + pModule->name_table), (char *)pModule + pModule->name_table + 1 ); else - WARN(module, "No handler for %.*s.%d, setting to 0:0\n", + { + ERR(fixup, "No handler for %.*s.%d, setting to 0xdeadbeef\n", *((BYTE *)pTarget + pTarget->name_table), (char *)pTarget + pTarget->name_table + 1, ordinal ); + address = 0xdeadbeef; + } } if (TRACE_ON(fixup)) { @@ -241,10 +244,11 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum ) if (ERR_ON(fixup) && !address) { NE_MODULE *pTarget = NE_GetPtr( module ); - ERR(fixup, "Warning: no handler for %.*s.%s, setting to 0:0\n", + ERR(fixup, "Warning: no handler for %.*s.%s, setting to 0xdeadbeef\n", *((BYTE *)pTarget + pTarget->name_table), (char *)pTarget + pTarget->name_table + 1, func_name ); } + if (!address) address = 0xdeadbeef; if (TRACE_ON(fixup)) { NE_MODULE *pTarget = NE_GetPtr( module ); diff --git a/loader/pe_image.c b/loader/pe_image.c index 30273cbf86a..5d5a51cf606 100644 --- a/loader/pe_image.c +++ b/loader/pe_image.c @@ -310,22 +310,24 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm) int ordinal = IMAGE_ORDINAL(import_list->u1.Ordinal); TRACE(win32, "--- Ordinal %s,%d\n", name, ordinal); - thunk_list->u1.Function=(LPDWORD)MODULE_GetProcAddress32( + thunk_list->u1.Function=MODULE_GetProcAddress32( process, hImpModule, (LPCSTR)ordinal ); if (!thunk_list->u1.Function) { - ERR(win32,"No implementation for %s.%d, setting to NULL\n", + ERR(win32,"No implementation for %s.%d, setting to 0xdeadbeef\n", name, ordinal); + thunk_list->u1.Function = (FARPROC32)0xdeadbeef; } } else { /* import by name */ pe_name = (LPIMAGE_IMPORT_BY_NAME)RVA(import_list->u1.AddressOfData); TRACE(win32, "--- %s %s.%d\n", pe_name->Name, name, pe_name->Hint); - thunk_list->u1.Function=(LPDWORD)MODULE_GetProcAddress32( + thunk_list->u1.Function=MODULE_GetProcAddress32( process, hImpModule, pe_name->Name ); if (!thunk_list->u1.Function) { - ERR(win32,"No implementation for %s.%d(%s), setting to NULL\n", + ERR(win32,"No implementation for %s.%d(%s), setting to 0xdeadbeef\n", name,pe_name->Hint,pe_name->Name); + thunk_list->u1.Function = (FARPROC32)0xdeadbeef; } } import_list++; @@ -340,23 +342,25 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm) int ordinal = IMAGE_ORDINAL(thunk_list->u1.Ordinal); TRACE(win32,"--- Ordinal %s.%d\n",name,ordinal); - thunk_list->u1.Function=(LPDWORD)MODULE_GetProcAddress32( + thunk_list->u1.Function=MODULE_GetProcAddress32( process, hImpModule, (LPCSTR) ordinal ); if (!thunk_list->u1.Function) { - ERR(win32, "No implementation for %s.%d, setting to NULL\n", + ERR(win32, "No implementation for %s.%d, setting to 0xdeadbeef\n", name,ordinal); + thunk_list->u1.Function = (FARPROC32)0xdeadbeef; } } else { pe_name=(LPIMAGE_IMPORT_BY_NAME) RVA(thunk_list->u1.AddressOfData); TRACE(win32,"--- %s %s.%d\n", pe_name->Name,name,pe_name->Hint); - thunk_list->u1.Function=(LPDWORD)MODULE_GetProcAddress32( + thunk_list->u1.Function=MODULE_GetProcAddress32( process, hImpModule, pe_name->Name ); if (!thunk_list->u1.Function) { - ERR(win32, "No implementation for %s.%d, setting to NULL\n", + ERR(win32, "No implementation for %s.%d, setting to 0xdeadbeef\n", name, pe_name->Hint); + thunk_list->u1.Function = (FARPROC32)0xdeadbeef; } } thunk_list++; diff --git a/memory/selector.c b/memory/selector.c index f6290d871b0..dbe68fe648b 100644 --- a/memory/selector.c +++ b/memory/selector.c @@ -179,6 +179,8 @@ void SELECTOR_FreeBlock( WORD sel, WORD count ) WARN(selector, "Freeing %%fs selector (%04x), not good.\n", fs ); SET_FS( 0 ); } + fs = THREAD_Current()->saved_fs; + if ((fs >= sel) && (fs < nextsel)) THREAD_Current()->saved_fs = 0; GET_GS(gs); if ((gs >= sel) && (gs < nextsel)) SET_GS( 0 ); } diff --git a/misc/aspi.c b/misc/aspi.c index aad7f05f6a8..e4592a932e3 100644 --- a/misc/aspi.c +++ b/misc/aspi.c @@ -475,8 +475,9 @@ void WINAPI ASPI_DOS_func(DWORD srb) UnMapLS(spSRB); } -void ASPI_DOS_HandleInt(CONTEXT *context) + /* returns a real mode call address to ASPI_DOS_func() */ +void ASPI_DOS_HandleInt(CONTEXT *context) { #ifdef linux FARPROC16 DOS_func; @@ -497,3 +498,19 @@ void ASPI_DOS_HandleInt(CONTEXT *context) SET_CFLAG(context); #endif } + +/******************************************************************* + * GetASPI32SupportInfo [WNASPI32.0] + * + * Checks if the ASPI subsystem is initialized correctly. + * + * RETURNS + * HIWORD: 0. + * HIBYTE of LOWORD: status (SS_COMP or SS_FAILED_INIT) + * LOBYTE of LOWORD: # of host adapters. + */ +DWORD WINAPI GetASPI32SupportInfo() +{ + return (SS_COMP << 8) | 1; /* FIXME: get # of host adapters installed */ +} + diff --git a/misc/commdlg.c b/misc/commdlg.c index 03e57f93463..db21377f688 100644 --- a/misc/commdlg.c +++ b/misc/commdlg.c @@ -1447,7 +1447,13 @@ BOOL16 WINAPI PrintDlg16( SEGPTR printdlg ) BOOL32 WINAPI PrintDlg32A( LPPRINTDLG32A printdlg ) { FIXME(commdlg, "empty stub\n" ); - return FALSE; + /* Altough returning FALSE is theoricaly the right thing + * most programs check for a printer at startup, and if + * none is found popup PrintDlg32A(), if it fails the program + * terminates; by returning TRUE the programs can still run + * as long as no printer related stuff is used + */ + return TRUE; } @@ -3631,7 +3637,7 @@ LRESULT WINAPI FormatCharDlgProc32W(HWND32 hDlg, UINT32 uMsg, WPARAM32 wParam, } -static BOOL32 Commdlg_GetFileName32A( BOOL16 (*dofunction)(), +static BOOL32 Commdlg_GetFileName32A( BOOL16 (CALLBACK *dofunction)(SEGPTR x), LPOPENFILENAME32A ofn ) { BOOL16 ret; @@ -3661,8 +3667,8 @@ static BOOL32 Commdlg_GetFileName32A( BOOL16 (*dofunction)(), s = (LPSTR)ofn->lpstrCustomFilter; while (*s) s = s+strlen(s)+1; - x = SEGPTR_ALLOC(s-ofn->lpstrCustomFilter); s++; + x = SEGPTR_ALLOC(s-ofn->lpstrCustomFilter); memcpy(x,ofn->lpstrCustomFilter,s-ofn->lpstrCustomFilter); ofn16->lpstrCustomFilter = SEGPTR_GET(x); } @@ -3721,7 +3727,7 @@ static BOOL32 Commdlg_GetFileName32A( BOOL16 (*dofunction)(), return ret; } -static BOOL32 Commdlg_GetFileName32W( BOOL16 (*dofunction)(), +static BOOL32 Commdlg_GetFileName32W( BOOL16 (CALLBACK *dofunction)(SEGPTR x), LPOPENFILENAME32W ofn ) { BOOL16 ret; @@ -3830,7 +3836,7 @@ static BOOL32 Commdlg_GetFileName32W( BOOL16 (*dofunction)(), */ BOOL32 WINAPI GetOpenFileName32A( LPOPENFILENAME32A ofn ) { - BOOL16 (WINAPI * dofunction)(SEGPTR ofn16) = GetOpenFileName16; + BOOL16 (CALLBACK * dofunction)(SEGPTR ofn16) = GetOpenFileName16; return Commdlg_GetFileName32A(dofunction,ofn); } @@ -3839,7 +3845,7 @@ BOOL32 WINAPI GetOpenFileName32A( LPOPENFILENAME32A ofn ) */ BOOL32 WINAPI GetOpenFileName32W( LPOPENFILENAME32W ofn ) { - BOOL16 (WINAPI * dofunction)(SEGPTR ofn16) = GetOpenFileName16; + BOOL16 (CALLBACK * dofunction)(SEGPTR ofn16) = GetOpenFileName16; return Commdlg_GetFileName32W(dofunction,ofn); } @@ -3848,7 +3854,7 @@ BOOL32 WINAPI GetOpenFileName32W( LPOPENFILENAME32W ofn ) */ BOOL32 WINAPI GetSaveFileName32A( LPOPENFILENAME32A ofn ) { - BOOL16 (WINAPI * dofunction)(SEGPTR ofn16) = GetSaveFileName16; + BOOL16 (CALLBACK * dofunction)(SEGPTR ofn16) = GetSaveFileName16; return Commdlg_GetFileName32A(dofunction,ofn); } @@ -3857,7 +3863,7 @@ BOOL32 WINAPI GetSaveFileName32A( LPOPENFILENAME32A ofn ) */ BOOL32 WINAPI GetSaveFileName32W( LPOPENFILENAME32W ofn ) { - BOOL16 (WINAPI * dofunction)(SEGPTR ofn16) = GetSaveFileName16; + BOOL16 (CALLBACK * dofunction)(SEGPTR ofn16) = GetSaveFileName16; return Commdlg_GetFileName32W(dofunction,ofn); } diff --git a/misc/debugstr.c b/misc/debugstr.c index 7882b0f11dd..b751b46e437 100644 --- a/misc/debugstr.c +++ b/misc/debugstr.c @@ -182,4 +182,3 @@ void debug_dumpstr (LPCSTR s) fputc ('"', stderr); } -/* ---------------------------------------------------------------------- */ diff --git a/misc/imagelist.c b/misc/imagelist.c index 0514c0f7e04..4c3125d066b 100644 --- a/misc/imagelist.c +++ b/misc/imagelist.c @@ -30,9 +30,7 @@ * an empty structure. It's just to keep compatibility. */ #define __WINE_IMAGELIST_C - -/* This must be defined until "GetIconInfo" is not fully implemented. */ -#define __GET_ICON_INFO_HACK__ + #include "windows.h" #include "compobj.h" @@ -41,10 +39,6 @@ #include "commctrl.h" #include "debug.h" -#ifdef __GET_ICON_INFO_HACK__ -#include "bitmap.h" -#endif - #define _MAX(a,b) (((a)>(b))?(a):(b)) #define _MIN(a,b) (((a)>(b))?(b):(a)) @@ -112,7 +106,7 @@ IMAGELIST_InternalExpandBitmaps (HIMAGELIST himl, INT32 nImageCount) if (himl->hbmMask) { hbmNewBitmap = - CreateBitmap32 (nNewWidth, himl->cy, 1, himl->uBitsPixel, NULL); + CreateBitmap32 (nNewWidth, himl->cy, 1, 1, NULL); if (hbmNewBitmap == 0) ERR (imagelist, "creating new mask bitmap!"); @@ -438,7 +432,7 @@ ImageList_Copy (HIMAGELIST himlDst, INT32 iDst, HIMAGELIST himlSrc, hbmTempImage = CreateBitmap32 (himlSrc->cx, himlSrc->cy, 1, himlSrc->uBitsPixel, NULL); hbmTempMask = CreateBitmap32 (himlSrc->cx, himlSrc->cy, 1, - himlSrc->uBitsPixel, NULL); + 1, NULL); /* copy (and stretch) destination to temporary bitmaps.(save) */ /* image */ @@ -546,6 +540,8 @@ ImageList_Create (INT32 cx, INT32 cy, UINT32 flags, {0x5555, 0xAAAA, 0x5555, 0xAAAA, 0x5555, 0xAAAA, 0x5555, 0xAAAA, 0x5555, 0xAAAA, 0x5555, 0xAAAA, 0x5555, 0xAAAA, 0x5555, 0xAAAA}; + TRACE (imagelist, "(%d %d 0x%x %d %d)\n", cx, cy, flags, cInitial, cGrow); + himl = (HIMAGELIST)LocalAlloc32 (LMEM_FIXED | LMEM_ZEROINIT, sizeof(struct _IMAGELIST)); if (!himl) @@ -579,7 +575,7 @@ ImageList_Create (INT32 cx, INT32 cy, UINT32 flags, if (himl->flags & ILC_MASK) { himl->hbmMask = CreateBitmap32 (himl->cx * himl->cMaxImage, himl->cy, - 1, himl->uBitsPixel, NULL); + 1, 1, NULL); if (himl->hbmMask == 0) { ERR(imagelist, "Error creating mask bitmap!\n"); if (himl->hbmImage) @@ -1242,7 +1238,7 @@ ImageList_GetIcon (HIMAGELIST himl, INT32 i, UINT32 fStyle) ii.xHotspot = 0; ii.yHotspot = 0; ii.hbmMask = CreateBitmap32 (nWidth, nHeight, 1, 1, NULL); - ii.hbmColor = CreateBitmap32 (nWidth, nHeight, 1, 1, NULL); + ii.hbmColor = CreateBitmap32 (nWidth, nHeight, 1, himl->uBitsPixel, NULL); hdc = CreateCompatibleDC32(0); @@ -1431,36 +1427,16 @@ ImageList_LoadImage32A (HINSTANCE32 hi, LPCSTR lpbmp, INT32 cx, INT32 cGrow, ImageList_AddMasked (himl, (HBITMAP32)handle, clrMask); } else if ((uType == IMAGE_ICON) || (uType == IMAGE_CURSOR)) { -#ifdef __GET_ICON_INFO_HACK__ - HBITMAP32 hbmImage; - HBITMAP32 hbmMask; - CURSORICONINFO *ptr; - - if (!(ptr = (CURSORICONINFO *)GlobalLock16(handle))) return (NULL); - hbmMask = CreateBitmap32 (ptr->nWidth, ptr->nHeight, 1, 1, - (char *)(ptr + 1)); - hbmImage = CreateBitmap32 (ptr->nWidth, ptr->nHeight, ptr->bPlanes, - ptr->bBitsPerPixel, - (char *)(ptr + 1) + ptr->nHeight * - BITMAP_WIDTH_BYTES(ptr->nWidth, 1)); - GlobalUnlock16 (handle); - himl = ImageList_Create (ptr->nWidth, ptr->nHeight, - ILC_MASK | ILC_COLOR, 1, cGrow); - ImageList_Add (himl, hbmImage, hbmMask); - DeleteObject32 (hbmImage); - DeleteObject32 (hbmMask); -#else - ICONINFO32 ii; + ICONINFO ii; BITMAP32 bmp; - GetIconInfo (hIcon, &ii); - GetObject32A (ii->hbmColor, sizeof(BITMAP32), (LPVOID)&bmp); + GetIconInfo (handle, &ii); + GetObject32A (ii.hbmColor, sizeof(BITMAP32), (LPVOID)&bmp); himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight, ILC_MASK | ILC_COLOR, 1, cGrow); - ImageList_Add (himl, ii->hbmColor, ii->hbmMask); - DeleteObject32 (ii->hbmColor); - DeleteObject32 (ii->hbmMask); -#endif + ImageList_Add (himl, ii.hbmColor, ii.hbmMask); + DeleteObject32 (ii.hbmColor); + DeleteObject32 (ii.hbmMask); } DeleteObject32 (handle); @@ -1515,36 +1491,16 @@ ImageList_LoadImage32W (HINSTANCE32 hi, LPCWSTR lpbmp, INT32 cx, INT32 cGrow, ImageList_AddMasked (himl, (HBITMAP32)handle, clrMask); } else if ((uType == IMAGE_ICON) || (uType == IMAGE_CURSOR)) { -#ifdef __GET_ICON_INFO_HACK__ - HBITMAP32 hbmImage; - HBITMAP32 hbmMask; - CURSORICONINFO *ptr; - - if (!(ptr = (CURSORICONINFO *)GlobalLock16(handle))) return (NULL); - hbmMask = CreateBitmap32 (ptr->nWidth, ptr->nHeight, 1, 1, - (char *)(ptr + 1)); - hbmImage = CreateBitmap32 (ptr->nWidth, ptr->nHeight, ptr->bPlanes, - ptr->bBitsPerPixel, - (char *)(ptr + 1) + ptr->nHeight * - BITMAP_WIDTH_BYTES(ptr->nWidth, 1)); - himl = ImageList_Create (ptr->nWidth, ptr->nHeight, - ILC_MASK | ILC_COLOR, 1, cGrow); - ImageList_Add (himl, hbmImage, hbmMask); - DeleteObject32 (hbmImage); - DeleteObject32 (hbmMask); - GlobalUnlock16 (handle); -#else - ICONINFO32 ii; + ICONINFO ii; BITMAP32 bmp; - GetIconInfo (hIcon, &ii); - GetObject32A (ii->hbmMask, sizeof(BITMAP32), (LPVOID)&bmp); + GetIconInfo (handle, &ii); + GetObject32A (ii.hbmMask, sizeof(BITMAP32), (LPVOID)&bmp); himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight, ILC_MASK | ILC_COLOR, 1, cGrow); - ImageList_Add (himl, ii->hbmColor, ii->hbmMask); - DeleteObject32 (ii->hbmColor); - DeleteObject32 (ii->hbmMask); -#endif + ImageList_Add (himl, ii.hbmColor, ii.hbmMask); + DeleteObject32 (ii.hbmColor); + DeleteObject32 (ii.hbmMask); } DeleteObject32 (handle); @@ -1747,7 +1703,7 @@ ImageList_Remove (HIMAGELIST himl, INT32 i) DeleteObject32 (himl->hbmMask); himl->hbmMask = CreateBitmap32 (himl->cMaxImage * himl->cx, himl->cy, - 1, himl->uBitsPixel, NULL); + 1, 1, NULL); } } else { @@ -1766,7 +1722,7 @@ ImageList_Remove (HIMAGELIST himl, INT32 i) CreateBitmap32 (cxNew, himl->cy, 1, himl->uBitsPixel, NULL); if (himl->hbmMask) - hbmNewMask = CreateBitmap32 (cxNew, himl->cy, 1, himl->uBitsPixel, NULL); + hbmNewMask = CreateBitmap32 (cxNew, himl->cy, 1, 1, NULL); else hbmNewMask = 0; /* Just to keep compiler happy! */ @@ -1907,36 +1863,21 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT32 i, HICON32 hIcon) { HDC32 hdcImageList, hdcImage; INT32 nIndex; -#ifdef __GET_ICON_INFO_HACK__ - HBITMAP32 hbmImage; - HBITMAP32 hbmMask; - CURSORICONINFO *ptr; -#else - ICONINFO32 ii; + HBITMAP32 hbmOldSrc, hbmOldDst; + ICONINFO ii; BITMAP32 bmp; -#endif - TRACE (imagelist, "(0x%x 0x%x 0x%x)\n", himl, i, hIcon); + TRACE (imagelist, "(0x%lx 0x%x 0x%x)\n", (DWORD)himl, i, hIcon); if (himl == NULL) return (-1); if ((i >= himl->cCurImage) || (i < -1)) return (-1); -#ifdef __GET_ICON_INFO_HACK__ - if (!(ptr = (CURSORICONINFO *)GlobalLock16(hIcon))) return (-1); - hbmMask = CreateBitmap32 (ptr->nWidth, ptr->nHeight, 1, 1, - (char *)(ptr + 1)); - if (!(hbmMask)) - ERR (imagelist, " no mask!\n"); - hbmImage = CreateBitmap32 (ptr->nWidth, ptr->nHeight, ptr->bPlanes, - ptr->bBitsPerPixel, - (char *)(ptr + 1) + ptr->nHeight * - BITMAP_WIDTH_BYTES(ptr->nWidth, 1)); - if (!(hbmMask)) - ERR (imagelist, " no image!\n"); -#else GetIconInfo (hIcon, &ii); - GetObject32A (ii->hbmMask, sizeof(BITMAP32), (LPVOID)&bmp); -#endif + if (ii.hbmMask == 0) + ERR (imagelist, "no mask!\n"); + if (ii.hbmColor == 0) + ERR (imagelist, "no color!\n"); + GetObject32A (ii.hbmMask, sizeof(BITMAP32), (LPVOID)&bmp); if (i == -1) { if (himl->cCurImage + 1 >= himl->cMaxImage) @@ -1949,42 +1890,42 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT32 i, HICON32 hIcon) nIndex = i; hdcImageList = CreateCompatibleDC32 (0); - hdcImage = CreateCompatibleDC32 (0); + TRACE (imagelist, "hdcImageList=0x%x!\n", hdcImageList); + if (hdcImageList == 0) + ERR (imagelist, "invalid hdcImageList!\n"); -#ifdef __GET_ICON_INFO_HACK__ - SelectObject32 (hdcImageList, himl->hbmImage); - SelectObject32 (hdcImage, hbmImage); - StretchBlt32 (hdcImageList, nIndex * himl->cx, 0, himl->cx, himl->cy, - hdcImage, 0, 0, ptr->nWidth, ptr->nHeight, SRCCOPY); -#else - SelectObject32 (hdcImage, ii->hbmColor); + hdcImage = CreateCompatibleDC32 (0); + TRACE (imagelist, "hdcImage=0x%x!\n", hdcImage); + if (hdcImage == 0) + ERR (imagelist, "invalid hdcImage!\n"); + + hbmOldDst = SelectObject32 (hdcImageList, himl->hbmImage); + SetTextColor32( hdcImageList, RGB(0,0,0)); + SetBkColor32( hdcImageList, RGB(255,255,255)); + hbmOldSrc = SelectObject32 (hdcImage, ii.hbmColor); StretchBlt32 (hdcImageList, nIndex * himl->cx, 0, himl->cx, himl->cy, hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY); -#endif if (himl->hbmMask) { -#ifdef __GET_ICON_INFO_HACK__ SelectObject32 (hdcImageList, himl->hbmMask); - SelectObject32 (hdcImage, hbmMask); - StretchBlt32 (hdcImageList, nIndex * himl->cx, 0, himl->cx, himl->cy, - hdcImage, 0, 0, ptr->nWidth, ptr->nHeight, SRCCOPY); -#else - SelectObject32 (hdcImage, ii->hbmMask); + SelectObject32 (hdcImage, ii.hbmMask); StretchBlt32 (hdcImageList, nIndex * himl->cx, 0, himl->cx, himl->cy, hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY); -#endif } - DeleteDC32 (hdcImageList); - DeleteDC32 (hdcImage); -#ifdef __GET_ICON_INFO_HACK__ - DeleteObject32 (hbmImage); - DeleteObject32 (hbmMask); - GlobalUnlock16 (hIcon); -#else - DeleteObject32 (ii->hbmColor); - DeleteObject32 (ii->hbmMask); -#endif + SelectObject32 (hdcImage, hbmOldSrc); + SelectObject32 (hdcImageList, hbmOldDst); + + if (hdcImageList) + DeleteDC32 (hdcImageList); + if (hdcImage) + DeleteDC32 (hdcImage); + +// FIXME (imagelist, "deleting hbmColor!\n"); + DeleteObject32 (ii.hbmColor); +// FIXME (imagelist, "deleted hbmColor!\n"); + DeleteObject32 (ii.hbmMask); + return (nIndex); } @@ -2084,7 +2025,7 @@ ImageList_SetDragCursorImage (HIMAGELIST himlDrag, INT32 iDrag, BOOL32 WINAPI ImageList_SetFilter (HIMAGELIST himl, INT32 i, DWORD dwFilter) { - FIXME (imagelist, "(%p 0x%08x 0x%08x):empty stub!\n", + FIXME (imagelist, "(%p 0x%x 0x%lx):empty stub!\n", himl, i, dwFilter); return FALSE; @@ -2132,7 +2073,7 @@ ImageList_SetIconSize (HIMAGELIST himl, INT32 cx, INT32 cy) DeleteObject32 (himl->hbmMask); himl->hbmMask = CreateBitmap32 (himl->cMaxImage * himl->cx, himl->cy, - 1, himl->uBitsPixel, NULL); + 1, 1, NULL); } return (TRUE); @@ -2189,7 +2130,7 @@ ImageList_SetImageCount (HIMAGELIST himl, INT32 iImageCount) if (himl->hbmMask) { hbmNewBitmap = CreateBitmap32 (nNewCount * himl->cx, himl->cy, - 1, himl->uBitsPixel, NULL); + 1, 1, NULL); if (hbmNewBitmap != 0) { SelectObject32 (hdcImageList, himl->hbmMask); diff --git a/misc/main.c b/misc/main.c index 6a459da5f42..d714aad6c53 100644 --- a/misc/main.c +++ b/misc/main.c @@ -518,6 +518,7 @@ static void MAIN_CreateDesktop( int argc, char *argv[] ) /* Create window */ + win_attr.background_pixel = BlackPixel(display,0); win_attr.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask | EnterWindowMask; @@ -526,7 +527,7 @@ static void MAIN_CreateDesktop( int argc, char *argv[] ) rootWindow = TSXCreateWindow( display, DefaultRootWindow(display), x, y, width, height, 0, CopyFromParent, InputOutput, CopyFromParent, - CWEventMask | CWCursor, &win_attr ); + CWBackPixel | CWEventMask | CWCursor, &win_attr ); /* Set window manager properties */ diff --git a/misc/ntdll.c b/misc/ntdll.c index faee4d8b34a..60f7f8cd69b 100644 --- a/misc/ntdll.c +++ b/misc/ntdll.c @@ -83,7 +83,8 @@ BOOL32 WINAPI RtlFirstFreeAce(LPACL acl,LPACE_HEADER *x) /************************************************************************** * RtlAddAce [NTDLL] */ -DWORD /* NTSTATUS */ WINAPI RtlAddAce(LPACL acl,DWORD rev,DWORD xnrofaces, +DWORD /* NTSTATUS */ +WINAPI RtlAddAce(LPACL acl,DWORD rev,DWORD xnrofaces, LPACE_HEADER acestart,DWORD acelen) { LPACE_HEADER ace,targetace; @@ -108,7 +109,8 @@ DWORD /* NTSTATUS */ WINAPI RtlAddAce(LPACL acl,DWORD rev,DWORD xnrofaces, /************************************************************************** * RtlCreateSecurityDescriptor [NTDLL] */ -DWORD /* NTSTATUS */ WINAPI RtlCreateSecurityDescriptor(LPSECURITY_DESCRIPTOR lpsd,DWORD rev) +DWORD /* NTSTATUS */ +WINAPI RtlCreateSecurityDescriptor(LPSECURITY_DESCRIPTOR lpsd,DWORD rev) { if (rev!=SECURITY_DESCRIPTOR_REVISION) return STATUS_UNKNOWN_REVISION; @@ -120,7 +122,8 @@ DWORD /* NTSTATUS */ WINAPI RtlCreateSecurityDescriptor(LPSECURITY_DESCRIPTOR lp /************************************************************************** * RtlSetDaclSecurityDescriptor [NTDLL] */ -DWORD /* NTSTATUS */ WINAPI RtlSetDaclSecurityDescriptor ( LPSECURITY_DESCRIPTOR lpsd,BOOL32 daclpresent,LPACL dacl,BOOL32 dacldefaulted ) +DWORD /* NTSTATUS */ +WINAPI RtlSetDaclSecurityDescriptor ( LPSECURITY_DESCRIPTOR lpsd,BOOL32 daclpresent,LPACL dacl,BOOL32 dacldefaulted ) { if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION) return STATUS_UNKNOWN_REVISION; @@ -142,7 +145,8 @@ DWORD /* NTSTATUS */ WINAPI RtlSetDaclSecurityDescriptor ( LPSECURITY_DESCRIPTOR /************************************************************************** * RtlSetSaclSecurityDescriptor [NTDLL] */ -DWORD /* NTSTATUS */ WINAPI RtlSetSaclSecurityDescriptor ( +DWORD /* NTSTATUS */ +WINAPI RtlSetSaclSecurityDescriptor ( LPSECURITY_DESCRIPTOR lpsd,BOOL32 saclpresent,LPACL sacl,BOOL32 sacldefaulted ) { @@ -166,7 +170,8 @@ LPSECURITY_DESCRIPTOR lpsd,BOOL32 saclpresent,LPACL sacl,BOOL32 sacldefaulted /************************************************************************** * RtlSetOwnerSecurityDescriptor [NTDLL] */ -DWORD /* NTSTATUS */ WINAPI RtlSetOwnerSecurityDescriptor (LPSECURITY_DESCRIPTOR lpsd,LPSID owner,BOOL32 ownerdefaulted) +DWORD /* NTSTATUS */ +WINAPI RtlSetOwnerSecurityDescriptor (LPSECURITY_DESCRIPTOR lpsd,LPSID owner,BOOL32 ownerdefaulted) { if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION) return STATUS_UNKNOWN_REVISION; @@ -184,7 +189,8 @@ DWORD /* NTSTATUS */ WINAPI RtlSetOwnerSecurityDescriptor (LPSECURITY_DESCRIPTOR /************************************************************************** * RtlSetOwnerSecurityDescriptor [NTDLL] */ -DWORD /* NTSTATUS */ WINAPI RtlSetGroupSecurityDescriptor (LPSECURITY_DESCRIPTOR lpsd,LPSID group,BOOL32 groupdefaulted) +DWORD /* NTSTATUS */ +WINAPI RtlSetGroupSecurityDescriptor (LPSECURITY_DESCRIPTOR lpsd,LPSID group,BOOL32 groupdefaulted) { if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION) return STATUS_UNKNOWN_REVISION; @@ -255,7 +261,8 @@ DWORD WINAPI RtlCopySid(DWORD len,LPSID to,LPSID from) /************************************************************************** * RtlAnsiStringToUnicodeString [NTDLL] */ -DWORD /* NTSTATUS */ WINAPI RtlAnsiStringToUnicodeString(LPUNICODE_STRING uni,LPANSI_STRING ansi,BOOL32 doalloc) +DWORD /* NTSTATUS */ +WINAPI RtlAnsiStringToUnicodeString(LPUNICODE_STRING uni,LPANSI_STRING ansi,BOOL32 doalloc) { DWORD unilen = (ansi->Length+1)*sizeof(WCHAR); @@ -277,7 +284,8 @@ DWORD /* NTSTATUS */ WINAPI RtlAnsiStringToUnicodeString(LPUNICODE_STRING uni,LP /************************************************************************** * RtlOemStringToUnicodeString [NTDLL] */ -DWORD /* NTSTATUS */ WINAPI RtlOemStringToUnicodeString(LPUNICODE_STRING uni,LPSTRING ansi,BOOL32 doalloc) +DWORD /* NTSTATUS */ +WINAPI RtlOemStringToUnicodeString(LPUNICODE_STRING uni,LPSTRING ansi,BOOL32 doalloc) { DWORD unilen = (ansi->Length+1)*sizeof(WCHAR); @@ -299,7 +307,8 @@ DWORD /* NTSTATUS */ WINAPI RtlOemStringToUnicodeString(LPUNICODE_STRING uni,LPS * RtlMultiByteToUnicodeN [NTDLL] * FIXME: multibyte support */ -DWORD /* NTSTATUS */ WINAPI RtlMultiByteToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD reslen,LPSTR oemstr,DWORD oemlen) +DWORD /* NTSTATUS */ +WINAPI RtlMultiByteToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD reslen,LPSTR oemstr,DWORD oemlen) { DWORD len; LPWSTR x; @@ -317,7 +326,8 @@ DWORD /* NTSTATUS */ WINAPI RtlMultiByteToUnicodeN(LPWSTR unistr,DWORD unilen,LP /************************************************************************** * RtlOemToUnicodeN [NTDLL] */ -DWORD /* NTSTATUS */ WINAPI RtlOemToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD reslen,LPSTR oemstr,DWORD oemlen) +DWORD /* NTSTATUS */ +WINAPI RtlOemToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD reslen,LPSTR oemstr,DWORD oemlen) { DWORD len; LPWSTR x; @@ -382,7 +392,8 @@ VOID WINAPI RtlFreeUnicodeString(LPUNICODE_STRING str) /************************************************************************** * RtlUnicodeToOemN [NTDLL] */ -DWORD /* NTSTATUS */ WINAPI RtlUnicodeToOemN(LPSTR oemstr,DWORD oemlen,LPDWORD reslen,LPWSTR unistr,DWORD unilen) +DWORD /* NTSTATUS */ +WINAPI RtlUnicodeToOemN(LPSTR oemstr,DWORD oemlen,LPDWORD reslen,LPWSTR unistr,DWORD unilen) { DWORD len; LPSTR x; @@ -400,7 +411,8 @@ DWORD /* NTSTATUS */ WINAPI RtlUnicodeToOemN(LPSTR oemstr,DWORD oemlen,LPDWORD r /************************************************************************** * RtlUnicodeStringToOemString [NTDLL] */ -DWORD /* NTSTATUS */ WINAPI RtlUnicodeStringToOemString(LPANSI_STRING oem,LPUNICODE_STRING uni,BOOL32 alloc) +DWORD /* NTSTATUS */ +WINAPI RtlUnicodeStringToOemString(LPANSI_STRING oem,LPUNICODE_STRING uni,BOOL32 alloc) { if (alloc) { oem->Buffer = (LPSTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,uni->Length/2)+1; @@ -414,7 +426,8 @@ DWORD /* NTSTATUS */ WINAPI RtlUnicodeStringToOemString(LPANSI_STRING oem,LPUNIC /************************************************************************** * RtlUnicodeStringToAnsiString [NTDLL] */ -DWORD /* NTSTATUS */ WINAPI RtlUnicodeStringToAnsiString(LPUNICODE_STRING uni,LPANSI_STRING oem,BOOL32 alloc) +DWORD /* NTSTATUS */ +WINAPI RtlUnicodeStringToAnsiString(LPUNICODE_STRING uni,LPANSI_STRING oem,BOOL32 alloc) { if (alloc) { oem->Buffer = (LPSTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,uni->Length/2)+1; @@ -671,7 +684,8 @@ INT32 WINAPI RtlExtendedLargeIntegerDivide( * Note: This even works, since gcc returns 64bit values in eax/edx just like * the caller expects. However... The relay code won't grok this I think. */ -long long /*LARGE_INTEGER*/ WINAPI RtlExtendedIntegerMultiply( +long long /*LARGE_INTEGER*/ +WINAPI RtlExtendedIntegerMultiply( LARGE_INTEGER factor1,INT32 factor2 ) { #if SIZEOF_LONG_LONG==8 diff --git a/misc/shell.c b/misc/shell.c index 75d830f0731..671914c433f 100644 --- a/misc/shell.c +++ b/misc/shell.c @@ -1615,7 +1615,7 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv) if(IsEqualCLSID(rclsid, &CLSID_ShellLink)) /*debug*/ TRACE(shell,"requested CLSID_ShellLink\n"); - /* fixme: the IClassFactory_Constructor at the moment only + /* fixme: the IClassFactory_Constructor is at the moment only for rclsid=CLSID_ShellDesktop, so we get the right Interface (jsch)*/ lpclf = IClassFactory_Constructor(); if(lpclf) @@ -1641,6 +1641,8 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv) * RETURNS * the interface to the shell desktop folder. * + * FIXME + * the pdesktopfolder has to be released at the end (at dll unloading???) */ LPSHELLFOLDER pdesktopfolder=NULL; @@ -1648,23 +1650,28 @@ DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder) { HRESULT hres = E_OUTOFMEMORY; LPCLASSFACTORY lpclf; TRACE(shell,"%p->(%p)\n",shellfolder,*shellfolder); - + if (pdesktopfolder) - { *shellfolder = pdesktopfolder; - hres = NOERROR; + { hres = NOERROR; } - else - { lpclf = IClassFactory_Constructor(); + else + { lpclf = IClassFactory_Constructor(); /* fixme: the buildin IClassFactory_Constructor is at the moment only for rclsid=CLSID_ShellDesktop, so we get the right Interface (jsch)*/ if(lpclf) { hres = lpclf->lpvtbl->fnCreateInstance(lpclf,NULL,(REFIID)&IID_IShellFolder, (void*)&pdesktopfolder); lpclf->lpvtbl->fnRelease(lpclf); } - } - if (pdesktopfolder) - { *shellfolder = pdesktopfolder; + } + + if (pdesktopfolder) + { *shellfolder = pdesktopfolder; + pdesktopfolder->lpvtbl->fnAddRef(pdesktopfolder); } + else + { *shellfolder=NULL; + } + TRACE(shell,"-- %p->(%p)\n",shellfolder, *shellfolder); return hres; } @@ -1686,109 +1693,248 @@ DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal) /************************************************************************* * SHGetSpecialFolderLocation [SHELL32.223] - * nFolder is a CSIDL_xxxxx. + * gets the folder locations from the registry and creates a pidl + * creates missing reg keys and directorys + * + * PARAMS + * hwndOwner [I] + * nFolder [I] CSIDL_xxxxx + * ppidl [O] PIDL of a special folder * * RETURNS - * returns the PIDL of a special folder + * HResult * * FIXME - * the path is every time x:\\windows\\desktop - * we should get the path's from the registry + * - look for "User Shell Folder" first + * */ -HRESULT WINAPI SHGetSpecialFolderLocation( - HWND32 hwndOwner, - INT32 nFolder, - LPITEMIDLIST * ppidl) +HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITEMIDLIST * ppidl) { LPSHELLFOLDER shellfolder; - DWORD pchEaten; - CHAR pszTemp[256]; + DWORD pchEaten,tpathlen=MAX_PATH,type,dwdisp,res; + CHAR pszTemp[256],buffer[256],tpath[MAX_PATH],npath[MAX_PATH]; LPWSTR lpszDisplayName = (LPWSTR)&pszTemp[0]; - - FIXME(shell,"(%04x,%d,%p),stub!\n", hwndOwner,nFolder,ppidl); + HKEY key; - LocalToWideChar32(lpszDisplayName, "x:\\windows\\desktop\\", 256); - - if (SHGetDesktopFolder(&shellfolder)==S_OK) - { shellfolder->lpvtbl->fnParseDisplayName(shellfolder,hwndOwner, - NULL,lpszDisplayName,&pchEaten,ppidl,NULL); + enum + { FT_UNKNOWN= 0x00000000, + FT_DIR= 0x00000001, + FT_DESKTOP= 0x00000002 + } tFolder; + + TRACE(shell,"(%04x,%d,%p)\n", hwndOwner,nFolder,ppidl); + + strcpy(buffer,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\"); + + res=RegCreateKeyEx32A(HKEY_CURRENT_USER,buffer,0,NULL,REG_OPTION_NON_VOLATILE,KEY_WRITE,NULL,&key,&dwdisp); + if (res) + { ERR(shell,"Could not create key %s %08lx \n",buffer,res); + return E_OUTOFMEMORY; } + tFolder=FT_DIR; switch (nFolder) { case CSIDL_BITBUCKET: - TRACE (shell,"looking for Recyceler\n"); + strcpy (buffer,"xxx"); /*not in the registry*/ + TRACE (shell,"looking for Recycler\n"); + tFolder=FT_UNKNOWN; break; case CSIDL_CONTROLS: + strcpy (buffer,"xxx"); /*virtual folder*/ TRACE (shell,"looking for Control\n"); + tFolder=FT_UNKNOWN; break; case CSIDL_DESKTOP: - TRACE (shell,"looking for Desktop\n"); + strcpy (buffer,"xxx"); /*virtual folder*/ + TRACE (shell,"looking for Desktop\n"); + tFolder=FT_DESKTOP; break; case CSIDL_DESKTOPDIRECTORY: - TRACE (shell,"looking for DeskDir\n"); + strcpy (buffer,"Desktop"); break; case CSIDL_DRIVES: + strcpy (buffer,"xxx"); /*virtual folder*/ TRACE (shell,"looking for Drives\n"); + tFolder=FT_UNKNOWN; break; case CSIDL_FONTS: - TRACE (shell,"looking for Fonts\n"); + strcpy (buffer,"Fonts"); break; case CSIDL_NETHOOD: - TRACE (shell,"looking for Nethood\n"); + strcpy (buffer,"NetHood"); break; case CSIDL_NETWORK: - TRACE (shell,"looking for Network\n"); + strcpy (buffer,"xxx"); /*virtual folder*/ + TRACE (shell,"looking for Network\n"); + tFolder=FT_UNKNOWN; break; case CSIDL_PERSONAL: - TRACE (shell,"looking for Personal\n"); + strcpy (buffer,"Personal"); + break; + case CSIDL_FAVORITES: + strcpy (buffer,"Favorites"); break; case CSIDL_PRINTERS: - TRACE (shell,"looking for Printers\n"); + strcpy (buffer,"PrintHood"); break; case CSIDL_PROGRAMS: - TRACE (shell,"looking for Programms\n"); + strcpy (buffer,"Programs"); break; case CSIDL_RECENT: - TRACE (shell,"looking for Recent\n"); + strcpy (buffer,"Recent"); break; case CSIDL_SENDTO: - TRACE (shell,"looking for Sendto\n"); - break; + strcpy (buffer,"SendTo"); + break; case CSIDL_STARTMENU: - TRACE (shell,"looking for Startmenu\n"); + strcpy (buffer,"Start Menu"); break; case CSIDL_STARTUP: - TRACE (shell,"looking for Startup\n"); + strcpy (buffer,"Startup"); break; case CSIDL_TEMPLATES: - TRACE (shell,"looking for Templates\n"); + strcpy (buffer,"Templates"); break; default: ERR (shell,"unknown CSIDL\n"); + tFolder=FT_UNKNOWN; break; } - TRACE(shell, "-- (new pidl %p)\n",*ppidl); + TRACE(shell,"Key=%s\n",buffer); + type=REG_SZ; + + switch (tFolder) + { case FT_DIR: + /* Directory: get the value from the registry, if its not there + create it and the directory*/ + if (RegQueryValueEx32A(key,buffer,NULL,&type,tpath,&tpathlen)) + { GetWindowsDirectory32A(npath,MAX_PATH); + PathAddBackslash(npath); + switch (nFolder) + { case CSIDL_DESKTOPDIRECTORY: + strcat (npath,"Desktop"); + break; + case CSIDL_FONTS: + strcat (npath,"Fonts"); + break; + case CSIDL_NETHOOD: + strcat (npath,"NetHood"); + break; + case CSIDL_PERSONAL: + strcpy (npath,"C:\\Personal"); + break; + case CSIDL_FAVORITES: + strcat (npath,"Favorites"); + break; + case CSIDL_PRINTERS: + strcat (npath,"PrintHood"); + break; + case CSIDL_PROGRAMS: + strcat (npath,"Start Menu"); + CreateDirectory32A(npath,NULL); + strcat (npath,"\\Programs"); + break; + case CSIDL_RECENT: + strcat (npath,"Recent"); + break; + case CSIDL_SENDTO: + strcat (npath,"SendTo"); + break; + case CSIDL_STARTMENU: + strcat (npath,"Start Menu"); + break; + case CSIDL_STARTUP: + strcat (npath,"Start Menu"); + CreateDirectory32A(npath,NULL); + strcat (npath,"\\Startup"); + break; + case CSIDL_TEMPLATES: + strcat (npath,"Templates"); + break; + default: + RegCloseKey(key); + return E_OUTOFMEMORY; + } + if (RegSetValueEx32A(key,buffer,0,REG_SZ,npath,sizeof(npath)+1)) + { ERR(shell,"could not create value %s\n",buffer); + RegCloseKey(key); + return E_OUTOFMEMORY; + } + TRACE(shell,"value %s=%s created\n",buffer,npath); + CreateDirectory32A(npath,NULL); + } + break; + case FT_DESKTOP: + strcpy (tpath,"Desktop"); + break; + default: + RegCloseKey(key); + return E_OUTOFMEMORY; + break; + } + + RegCloseKey(key); + + TRACE(shell,"Value=%s\n",tpath); + LocalToWideChar32(lpszDisplayName, tpath, 256); + + if (SHGetDesktopFolder(&shellfolder)==S_OK) + { shellfolder->lpvtbl->fnParseDisplayName(shellfolder,hwndOwner, NULL,lpszDisplayName,&pchEaten,ppidl,NULL); + shellfolder->lpvtbl->fnRelease(shellfolder); + } + + TRACE(shell, "-- (new pidl %p)\n",*ppidl); return NOERROR; } /************************************************************************* - * SHGetPathFromIDList [SHELL32.221] - * returns the path from a passed PIDL. + * SHGetPathFromIDList32A [SHELL32.261][NT 4.0: SHELL32.220] + * + * NOTES + * exported by name + * FIXME + * fnGetDisplayNameOf can return different types of OLEString */ -BOOL32 WINAPI SHGetPathFromIDList(LPCITEMIDLIST pidl,LPSTR pszPath) -{ STRRET lpName; +DWORD WINAPI SHGetPathFromIDList32A ( + LPCITEMIDLIST pidl, /* [IN] pidl */ + LPSTR pszPath) /* [OUT] path */ +{ STRRET lpName; LPSHELLFOLDER shellfolder; TRACE(shell,"(pidl=%p,%p)\n",pidl,pszPath); if (SHGetDesktopFolder(&shellfolder)==S_OK) { shellfolder->lpvtbl->fnGetDisplayNameOf(shellfolder,pidl,SHGDN_FORPARSING,&lpName); + shellfolder->lpvtbl->fnRelease(shellfolder); } - WideCharToLocal32(pszPath, lpName.u.pOleStr, MAX_PATH); + /*WideCharToLocal32(pszPath, lpName.u.pOleStr, MAX_PATH);*/ + strcpy(pszPath,lpName.u.cStr); /* fixme free the olestring*/ TRACE(shell,"-- (%s)\n",pszPath); return NOERROR; } +/************************************************************************* + * SHGetPathFromIDList32W [SHELL32.262] + * + * NOTES + * exported by name + */ +DWORD WINAPI SHGetPathFromIDList32W (DWORD dwParam1,DWORD dwParam2) +{ FIXME (shell,"(0x%08lx,0x%08lx):stub.\n", dwParam1, dwParam2); + return 0; +} +/************************************************************************* + * SHGetPathFromIDList [SHELL32.221][NT 4.0: SHELL32.219] + * + * returns the path from a passed PIDL. + */ +BOOL32 WINAPI SHGetPathFromIDList( + LPCITEMIDLIST pidl, /* [IN] pidl */ + LPSTR pszPath) /* [OUT] path */ +{ TRACE(shell,"(pidl=%p,%p)\n",pidl,pszPath); + + return SHGetPathFromIDList32A(pidl,pszPath); +} /************************************************************************* * SHHelpShortcuts_RunDLL [SHELL32.224] diff --git a/misc/shellord.c b/misc/shellord.c index 2f6a3437c2b..66617808f81 100644 --- a/misc/shellord.c +++ b/misc/shellord.c @@ -32,15 +32,30 @@ /************************************************************************* * SHChangeNotifyRegister [SHELL32.2] + * NOTES + * Idlist is an array of structures and Count specifies how many items in the array + * (usually just one I think). */ DWORD WINAPI -SHChangeNotifyRegister(HWND32 hwnd,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6) { - FIXME(shell,"(0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub.\n", - hwnd,x2,x3,x4,x5,x6 - ); +SHChangeNotifyRegister( + HWND32 hwnd, + LONG events1, + LONG events2, + DWORD msg, + int count, + IDSTRUCT *idlist) +{ FIXME(shell,"(0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08x,%p):stub.\n", + hwnd,events1,events2,msg,count,idlist); + return 0; +} +/************************************************************************* + * SHChangeNotifyDeregister [SHELL32.4] + */ +DWORD WINAPI +SHChangeNotifyDeregister(LONG x1,LONG x2) +{ FIXME(shell,"(0x%08lx,0x%08lx):stub.\n",x1,x2); return 0; } - /************************************************************************* * ILGetDisplayName [SHELL32.15] * get_path_from_itemlist(itemlist,path); ? not sure... @@ -67,6 +82,58 @@ LPSHITEMID WINAPI ILFindLastID(LPITEMIDLIST iil) { } return lastsii; } +/************************************************************************* + * ILFindLastID [SHELL32.17] + * NOTES + * Creates a new list with the last tiem removed + */ + LPITEMIDLIST WINAPI ILRemoveLastID(LPCITEMIDLIST); + + +/************************************************************************* + * ILClone [SHELL32.18] + * + * NOTES + * dupicate an idlist + */ +LPITEMIDLIST WINAPI ILClone (LPITEMIDLIST iil) { + DWORD len; + LPITEMIDLIST newiil; + TRACE(shell,"%p\n",iil); + len = ILGetSize(iil); + newiil = (LPITEMIDLIST)SHAlloc(len); + if (newiil) + memcpy(newiil,iil,len); + return newiil; +} + +/************************************************************************* + * ILCloneFirst [SHELL32.19] + * + * NOTES + * duplicates the first idlist of a complex pidl + */ +LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl); + +/************************************************************************* + * ILCombine [SHELL32.25] + * + * NOTES + * Concatenates two complex idlists. + * The pidl is the first one, pidlsub the next one + * Does not destroy the passed in idlists! + */ +LPITEMIDLIST WINAPI ILCombine(LPITEMIDLIST iil1,LPITEMIDLIST iil2) { + DWORD len1,len2; + LPITEMIDLIST newiil; + TRACE(shell,"%p %p\n",iil1,iil2); + len1 = ILGetSize(iil1)-2; + len2 = ILGetSize(iil2); + newiil = SHAlloc(len1+len2); + memcpy(newiil,iil1,len1); + memcpy(((char*)newiil)+len1,iil2,len2); + return newiil; +} /************************************************************************* * PathIsRoot [SHELL32.29] @@ -125,16 +192,17 @@ LPSTR WINAPI PathFindExtension(LPSTR path) { * NOTES * append \ if there is none */ -LPSTR WINAPI PathAddBackslash(LPSTR path) { - int len; +LPSTR WINAPI PathAddBackslash(LPSTR path) +{ int len; TRACE(shell,"%p->%s\n",path,path); - len = lstrlen32A(path); - if (len && path[len-1]!='\\') { - path[len+0]='\\'; - path[len+1]='\0'; - return path+len+1; - } else - return path+len; + len = strlen(path); + if (len && path[len-1]!='\\') + { path[len+0]='\\'; + path[len+1]='\0'; + return path+len+1; + } + else + return path+len; } /************************************************************************* @@ -143,20 +211,20 @@ LPSTR WINAPI PathAddBackslash(LPSTR path) { * NOTES * remove spaces from beginning and end of passed string */ -LPSTR WINAPI PathRemoveBlanks(LPSTR str) { - LPSTR x = str; - TRACE(shell,"PathRemoveBlanks %s\n",str); - while (*x==' ') x++; - if (x!=str) - lstrcpy32A(str,x); - if (!*str) - return str; - x=str+strlen(str)-1; - while (*x==' ') - x--; - if (*x==' ') - *x='\0'; - return x; +LPSTR WINAPI PathRemoveBlanks(LPSTR str) +{ LPSTR x = str; + TRACE(shell,"%s\n",str); + while (*x==' ') x++; + if (x!=str) + strcpy(str,x); + if (!*str) + return str; + x=str+strlen(str)-1; + while (*x==' ') + x--; + if (*x==' ') + *x='\0'; + return x; } @@ -168,7 +236,7 @@ LPSTR WINAPI PathRemoveBlanks(LPSTR str) { */ LPSTR WINAPI PathFindFilename(LPSTR fn) { LPSTR basefn; - TRACE(shell,"PathFindFilename %s\n",fn); + TRACE(shell,"%s\n",fn); basefn = fn; while (fn[0]) { if (((fn[0]=='\\') || (fn[0]==':')) && fn[1] && fn[1]!='\\') @@ -392,7 +460,19 @@ BOOL32 WINAPI Shell_GetImageList(LPDWORD x,LPDWORD y) { void WINAPI Shell_GetCachedImageIndex(LPSTR x,DWORD y,DWORD z) { FIXME(shell,"(%s,%08lx,%08lx):stub.\n",x,y,z); } - +/************************************************************************* + * SHShellFolderView_Message [SHELL32.73] + * NOTES + * Message SFVM_REARRANGE = 1 + * This message gets sent when a column gets clicked to instruct the + * shell view to re-sort the item list. lParam identifies the column + * that was clicked. + */ +int WINAPI SHShellFolderView_Message( + HWND32 hwndCabinet, /* This hwnd defines the explorer cabinet window that contains the + shellview you need to communicate with*/ + UINT32 uMsg, /* A parameter identifying the SFVM enum to perform */ + LPARAM lParam); /************************************************************************* * SHCloneSpecialIDList [SHELL32.89] * @@ -458,26 +538,38 @@ BOOL32 WINAPI PathYetAnotherMakeUniqueName(LPDWORD x,LPDWORD y) { * * NOTES * exported by ordinal + * */ DWORD WINAPI -SHMapPIDLToSystemImageListIndex(DWORD x,DWORD y,DWORD z) { - FIXME(shell,"(%08lx,%08lx,%08lx):stub.\n",x,y,z); +SHMapPIDLToSystemImageListIndex( + DWORD x, /* pointer to an instance of IShellFolder */ + DWORD y, + DWORD z) +{ FIXME(shell,"(%08lx,%08lx,%08lx):stub.\n",x,y,z); return 0; } /************************************************************************* - * SHELL32_79 [SHELL32.79] - * create_directory_and_notify(...) + * OleStrToStrN [SHELL32.78] * * NOTES - * (isn't it StrToOleStrN ??? jsch) + * exported by ordinal */ -DWORD WINAPI SHELL32_79(LPCSTR dir,LPVOID xvoid) { - TRACE(shell,"mkdir %s,%p\n",dir,xvoid); - if (!CreateDirectory32A(dir,xvoid)) - return FALSE; - /* SHChangeNotify(8,1,dir,0); */ - return TRUE; +BOOL32 WINAPI +OleStrToStrN (LPSTR lpMulti, INT32 nMulti, LPCWSTR lpWide, INT32 nWide) { + return WideCharToMultiByte (0, 0, lpWide, nWide, + lpMulti, nMulti, NULL, NULL); +} + +/************************************************************************* + * StrToOleStrN [SHELL32.79] + * + * NOTES + * exported by ordinal + */ +BOOL32 WINAPI +StrToOleStrN (LPWSTR lpWide, INT32 nWide, LPCSTR lpMulti, INT32 nMulti) { + return MultiByteToWideChar (0, 0, lpMulti, nMulti, lpWide, nWide); } /************************************************************************* @@ -512,14 +604,21 @@ static GetClassPtr SH_find_moduleproc(LPSTR dllname,HMODULE32 *xhmod, /************************************************************************* * */ -static DWORD SH_get_instance(REFCLSID clsid,LPSTR dllname, - LPVOID unknownouter,REFIID refiid,LPVOID inst -) { - GetClassPtr dllgetclassob; +static DWORD SH_get_instance( + REFCLSID clsid, + LPSTR dllname, + LPVOID unknownouter, + REFIID refiid, + LPVOID inst) +{ GetClassPtr dllgetclassob; DWORD hres; LPCLASSFACTORY classfac; - TRACE(shell,"%s\n",dllname); + char xclsid[50],xrefiid[50]; + WINE_StringFromCLSID((LPCLSID)clsid,xclsid); + WINE_StringFromCLSID((LPCLSID)refiid,xrefiid); + TRACE(shell,"\n\tCLSID:%s,%s,%p,\n\tIID:%s,%p\n", + xclsid, dllname,unknownouter,xrefiid,inst); dllgetclassob = SH_find_moduleproc(dllname,NULL,"DllGetClassObject"); if (!dllgetclassob) @@ -663,7 +762,8 @@ DWORD WINAPI SHRestricted (DWORD pol) { * ILGetSize [SHELL32.152] * * NOTES - * exported by ordinal + * exported by ordinal + * Gets the byte size of an idlist including zero terminator */ DWORD WINAPI ILGetSize(LPITEMIDLIST iil) { LPSHITEMID si; @@ -679,6 +779,16 @@ DWORD WINAPI ILGetSize(LPITEMIDLIST iil) { } return len; } +/************************************************************************* + * ILAppend [SHELL32.154] + * + * NOTES + * Adds the single item to the idlist indicated by pidl. + * if bEnd is 0, adds the item to the front of the list, + * otherwise adds the item to the end. + * Destroys the passed in idlist! + */ +LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl,LPCITEMIDLIST item,BOOL32 bEnd); /************************************************************************* * PathGetExtension [SHELL32.158] @@ -736,36 +846,6 @@ LPVOID WINAPI SHAlloc(DWORD len) { return (LPVOID)LocalAlloc32(len,LMEM_ZEROINIT); /* FIXME */ } -/************************************************************************* - * ILClone [SHELL32.18] - * - */ -LPITEMIDLIST WINAPI ILClone (LPITEMIDLIST iil) { - DWORD len; - LPITEMIDLIST newiil; - TRACE(shell,"%p\n",iil); - len = ILGetSize(iil); - newiil = (LPITEMIDLIST)SHAlloc(len); - if (newiil) - memcpy(newiil,iil,len); - return newiil; -} - -/************************************************************************* - * ILCombine [SHELL32.25] - * - */ -LPITEMIDLIST WINAPI ILCombine(LPITEMIDLIST iil1,LPITEMIDLIST iil2) { - DWORD len1,len2; - LPITEMIDLIST newiil; - TRACE(shell,"%p %p\n",iil1,iil2); - len1 = ILGetSize(iil1)-2; - len2 = ILGetSize(iil2); - newiil = SHAlloc(len1+len2); - memcpy(newiil,iil1,len1); - memcpy(((char*)newiil)+len1,iil2,len2); - return newiil; -} /************************************************************************* * ILFree [SHELL32.155] @@ -893,3 +973,57 @@ SignalFileOpen (DWORD dwParam1) return 0; } +/************************************************************************* + * SHAddToRecentDocs [SHELL32.234] + * + * NOTES + * exported by name + */ +DWORD WINAPI SHAddToRecentDocs32 ( + UINT32 uFlags, /* [IN] SHARD_PATH or SHARD_PIDL */ + LPCVOID pv) /* [IN] string or pidl, NULL clears the list */ +{ if (SHARD_PIDL==uFlags) + { FIXME (shell,"(0x%08x,pidl=%p):stub.\n", uFlags,pv); + } + else + { FIXME (shell,"(0x%08x,%s):stub.\n", uFlags,(char*)pv); + } + return 0; +} + +/************************************************************************* + * SHFileOperation [SHELL32.242] + * + * NOTES + * exported by name + */ +DWORD WINAPI SHFileOperation32 ( + LPSHFILEOPSTRUCT32 lpFileOp) +{ FIXME (shell,"(%p):stub.\n", lpFileOp); + return 1; +} + +/************************************************************************* + * SHChangeNotify [SHELL32.239] + * + * NOTES + * exported by name + */ +DWORD WINAPI SHChangeNotify32 ( + INT32 wEventId, /* [IN] flags that specifies the event*/ + UINT32 uFlags, /* [IN] the meaning of dwItem[1|2]*/ + LPCVOID dwItem1, + LPCVOID dwItem2) +{ FIXME (shell,"(0x%08x,0x%08ux,%p,%p):stub.\n", wEventId,uFlags,dwItem1,dwItem2); + return 0; +} +/************************************************************************* + * SHCreateShellFolderViewEx [SHELL32.174] + * + */ +HRESULT WINAPI SHCreateShellFolderViewEx32( + LPSHELLVIEWDATA psvcbi, /*[in ] shelltemplate struct*/ + LPVOID* ppv) /*[out] IShellView pointer*/ +{ FIXME (shell,"(%p,%p):stub.\n", psvcbi,ppv); + return 0; +} diff --git a/misc/tweak.c b/misc/tweak.c index 5e7e6af1870..11c19a44b93 100644 --- a/misc/tweak.c +++ b/misc/tweak.c @@ -36,14 +36,9 @@ #include "windows.h" /* Parameters for windows/nonclient.c */ -extern int NC_CaptionLeftNudge; -extern int NC_CaptionTopNudge; -extern int NC_SysControlNudge; extern int NC_MaxControlNudge; extern int NC_MinControlNudge; extern UINT32 NC_CaptionTextFlags; -extern HBRUSH32 NC_WinHighlight95; -extern HBRUSH32 NC_WinShadow95; /* Parameters for controls/menu.c */ extern UINT32 MENU_BarItemTopNudge; @@ -125,20 +120,11 @@ static int TWEAK_NonClientInit() { char key_value[2]; - NC_CaptionLeftNudge = - PROFILE_GetWineIniInt("Tweak.Layout", "CaptionLeftNudge", 0); - NC_CaptionTopNudge = - PROFILE_GetWineIniInt("Tweak.Layout", "CaptionTopNudge", 0); - NC_SysControlNudge = - PROFILE_GetWineIniInt("Tweak.Layout", "SysControlNudge", 0); NC_MaxControlNudge = PROFILE_GetWineIniInt("Tweak.Layout", "MaxControlNudge", 0); NC_MinControlNudge = PROFILE_GetWineIniInt("Tweak.Layout", "MinControlNudge", 0); - NC_WinHighlight95 = CreateSolidBrush32(RGB(0xc0, 0xc0, 0xc0)); - NC_WinShadow95 = CreateSolidBrush32(RGB(0x00, 0x00, 0x00)); - NC_CaptionTextFlags = DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX; PROFILE_GetWineIniString("Tweak.Layout", "CaptionAlignment", diff --git a/misc/winsock_dns.c b/misc/winsock_dns.c index baf9b9f0209..cf841723bba 100644 --- a/misc/winsock_dns.c +++ b/misc/winsock_dns.c @@ -47,7 +47,8 @@ #define FASYNC FIOASYNC #endif -typedef struct /* async DNS op control struct */ +/* async DNS op control struct */ +typedef struct { ws_async_op* ws_aop; char* buffer; @@ -263,7 +264,8 @@ HANDLER_DEF(WINSOCK_sigio) /* ----------------------------------- getXbyY requests */ -static ws_async_ctl async_ctl; /* child process control struct */ +/* child process control struct */ +static ws_async_ctl async_ctl; static int aop_control(ws_async_op* p_aop, int flag ) { diff --git a/msdos/cdrom.c b/msdos/cdrom.c index 37d73a89e79..1881c779e6d 100644 --- a/msdos/cdrom.c +++ b/msdos/cdrom.c @@ -7,12 +7,17 @@ #ifdef linux +#include "config.h" #include #include #include /* FIXME - how to make this OS independent ?? */ -#include -#include +#ifdef HAVE_LINUX_CDROM_H +# include +#endif +#ifdef HAVE_LINUX_UCDROM_H +# include +#endif #include "ldt.h" #include "drive.h" @@ -107,7 +112,7 @@ else if (!driver_request) { /* FIXME - to be deleted ?? */ ERR(int," ES:BX==0 ! SEGFAULT ?\n"); - ERR(int," -->BX=0x%04X, ES=0x%04X, DS=0x%04X, CX=0x%04X\n\n", + ERR(int," -->BX=0x%04x, ES=0x%04lx, DS=0x%04lx, CX=0x%04x\n\n", BX_reg(context), ES_reg(context), DS_reg(context), @@ -155,7 +160,7 @@ else io_stru[2]=1; /* supports audio channels (?? FIXME ??) */ io_stru[1]=16; /* data read and plays audio racks */ io_stru[1]|=(ioctl(fdcd,CDROM_DRIVE_STATUS,0)==CDS_TRAY_OPEN); - TRACE(int," ----> DEVICE STATUS <0x%08X>\n\n",(DWORD)io_stru[1]); + TRACE(int," ----> DEVICE STATUS <0x%08lx>\n\n",(DWORD)io_stru[1]); break; case 9: /* media changed ? */ diff --git a/msdos/int21.c b/msdos/int21.c index ec8543969dd..b39592fdae3 100644 --- a/msdos/int21.c +++ b/msdos/int21.c @@ -209,9 +209,26 @@ static void GetDrivePB( CONTEXT *context, int drive ) static void ioctlGetDeviceInfo( CONTEXT *context ) { - int curr_drive; + int curr_drive, i; + FILE_OBJECT *file; + TRACE(int21, "(%d)\n", BX_reg(context)); + RESET_CFLAG(context); + + /* DOS device ? */ + if ((file = FILE_GetFile( BX_reg(context) ))) + { + const DOS_DEVICE *dev = DOSFS_GetDevice( file->unix_name ); + FILE_ReleaseFile( file ); + if (dev) + { + DX_reg(context) = dev->flags; + return; + } + } + + /* it seems to be a file */ curr_drive = DRIVE_GetCurrentDrive(); DX_reg(context) = 0x0140 + curr_drive + ((curr_drive > 1) ? 0x0800 : 0); /* no floppy */ @@ -222,7 +239,6 @@ static void ioctlGetDeviceInfo( CONTEXT *context ) * bit 14 - don't set file date/time on closing * bit 15 - file is remote */ - RESET_CFLAG(context); } static BOOL32 ioctlGenericBlkDevReq( CONTEXT *context ) @@ -1323,8 +1339,9 @@ void WINAPI DOS3Call( CONTEXT *context ) case 0x02:{ FILE_OBJECT *file; file = FILE_GetFile(BX_reg(context)); - if (!strcasecmp(file->unix_name, "SCSIMGR$")) + if (!strcasecmp(file->unix_name, "SCSIMGR$")) ASPI_DOS_HandleInt(context); + FILE_ReleaseFile( file ); break; } case 0x05:{ /* IOCTL - WRITE TO BLOCK DEVICE CONTROL CHANNEL */ diff --git a/multimedia/dsound.c b/multimedia/dsound.c index 8926af3e20a..d3adc762ce8 100644 --- a/multimedia/dsound.c +++ b/multimedia/dsound.c @@ -30,6 +30,7 @@ #include "config.h" #include +#include #include #include #include @@ -977,6 +978,8 @@ DSOUND_thread(LPVOID arg) { while (curleft < sizeof(playbuf)) { res = write(audiofd,(LPBYTE)playbuf+curleft,sizeof(playbuf)-curleft); if (res==-1) { + if (errno==EINTR) + continue; perror("write audiofd"); ExitThread(0); break; diff --git a/multimedia/mmsystem.c b/multimedia/mmsystem.c index 36c9261926e..3dbc7c170ac 100644 --- a/multimedia/mmsystem.c +++ b/multimedia/mmsystem.c @@ -24,6 +24,8 @@ #include "debug.h" #include "xmalloc.h" #include "callback.h" +#include "module.h" +#include "selectors.h" static int InstalledCount; static int InstalledListLen; @@ -3708,18 +3710,61 @@ LRESULT WINAPI mmThreadSignal16(WORD hnd) { /************************************************************************** * mmTaskCreate [MMSYSTEM.900] */ -LRESULT WINAPI mmTaskCreate16(LPWORD lphnd,DWORD x1,DWORD x2) { - FIXME(mmsys,"(%p,%08lx,%08lx): stub!\n",lphnd,x1,x2); - *lphnd = 0xcafe; - return 0; +HINSTANCE16 WINAPI mmTaskCreate16(LPWORD lphnd,HINSTANCE16 *hMmTask,DWORD x2) +{ + DWORD showCmd = 0x40002; + LPSTR cmdline; + WORD sel1, sel2; + LOADPARAMS *lp; + HINSTANCE16 ret, handle; + + TRACE(mmsys,"(%p,%p,%08lx);\n",lphnd,hMmTask,x2); + cmdline = (LPSTR)HeapAlloc(GetProcessHeap(), 0, 0x0d); + cmdline[0] = 0x0d; + (DWORD)cmdline[1] = (DWORD)lphnd; + (DWORD)cmdline[5] = x2; + (DWORD)cmdline[9] = 0; + + sel1 = SELECTOR_AllocBlock(cmdline, 0x0d, SEGMENT_DATA, FALSE, FALSE); + sel2 = SELECTOR_AllocBlock(&showCmd, sizeof(showCmd), + SEGMENT_DATA, FALSE, FALSE); + + lp = (LOADPARAMS *)HeapAlloc(GetProcessHeap(), 0, sizeof(LOADPARAMS)); + lp->hEnvironment = 0; + lp->cmdLine = PTR_SEG_OFF_TO_SEGPTR(sel1, 0); + lp->showCmd = PTR_SEG_OFF_TO_SEGPTR(sel2, 0); + lp->reserved = 0; + + ret = LoadModule16("c:\\windows\\mmtask.tsk", lp); + if (ret < 32) { + if (ret) + ret = 1; + else + ret = 2; + handle = 0; + } + else { + handle = ret; + ret = 0; + } + if (hMmTask) + *(HINSTANCE16 *)PTR_SEG_TO_LIN(hMmTask) = handle; + + UnMapLS(PTR_SEG_OFF_TO_SEGPTR(sel2, 0)); + UnMapLS(PTR_SEG_OFF_TO_SEGPTR(sel1, 0)); + + HeapFree(GetProcessHeap(), 0, lp); + HeapFree(GetProcessHeap(), 0, cmdline); + + return ret; } /************************************************************************** * mmTaskSignal [MMSYSTEM.903] */ LRESULT WINAPI mmTaskSignal16(HTASK16 ht) { - FIXME(mmsys,"(%04x): stub!\n",ht); - return PostAppMessage16(ht,0x400,0,0); + TRACE(mmsys,"(%04x);\n",ht); + return PostAppMessage16(ht,WM_USER,0,0); } /************************************************************************** diff --git a/objects/cursoricon.c b/objects/cursoricon.c index f6568c834e9..45d1cc66b5d 100644 --- a/objects/cursoricon.c +++ b/objects/cursoricon.c @@ -861,7 +861,9 @@ HCURSOR16 WINAPI CopyCursor16( HINSTANCE16 hInstance, HCURSOR16 hCursor ) */ BOOL16 WINAPI DestroyIcon16( HICON16 hIcon ) { - return DestroyIcon32( hIcon ); + TRACE(icon, "%04x\n", hIcon ); + /* FIXME: should check for OEM/global heap icon here */ + return (FreeResource16( hIcon ) == 0); } @@ -871,8 +873,8 @@ BOOL16 WINAPI DestroyIcon16( HICON16 hIcon ) BOOL32 WINAPI DestroyIcon32( HICON32 hIcon ) { TRACE(icon, "%04x\n", hIcon ); - /* FIXME: should check for OEM icon here */ - return (FreeResource16( hIcon ) == 0); + /* FIXME: should check for OEM/global heap icon here */ + return (FreeResource32( hIcon ) == 0); } @@ -881,7 +883,9 @@ BOOL32 WINAPI DestroyIcon32( HICON32 hIcon ) */ BOOL16 WINAPI DestroyCursor16( HCURSOR16 hCursor ) { - return DestroyCursor32( hCursor ); + TRACE(cursor, "%04x\n", hCursor ); + /* FIXME: should check for OEM/global heap cursor here */ + return (FreeResource16( hCursor ) == 0); } @@ -891,8 +895,8 @@ BOOL16 WINAPI DestroyCursor16( HCURSOR16 hCursor ) BOOL32 WINAPI DestroyCursor32( HCURSOR32 hCursor ) { TRACE(cursor, "%04x\n", hCursor ); - /* FIXME: should check for OEM cursor here */ - return (FreeResource16( hCursor ) == 0); + /* FIXME: should check for OEM/global heap cursor here */ + return (FreeResource32( hCursor ) == 0); } @@ -1531,7 +1535,17 @@ BOOL32 WINAPI GetIconInfo(HICON32 hIcon,LPICONINFO iconinfo) { iconinfo->xHotspot = ciconinfo->ptHotSpot.x; iconinfo->yHotspot = ciconinfo->ptHotSpot.y; iconinfo->fIcon = TRUE; /* hmm */ - /* FIXME ... add both bitmaps */ + + iconinfo->hbmColor = CreateBitmap32 ( ciconinfo->nWidth, ciconinfo->nHeight, + ciconinfo->bPlanes, ciconinfo->bBitsPerPixel, + (char *)(ciconinfo + 1) + + ciconinfo->nHeight * + BITMAP_WIDTH_BYTES(ciconinfo->nWidth,1) ); + iconinfo->hbmMask = CreateBitmap32 ( ciconinfo->nWidth, ciconinfo->nHeight, + 1, 1, (char *)(ciconinfo + 1)); + + GlobalUnlock16(hIcon); + return TRUE; } diff --git a/objects/font.c b/objects/font.c index 9c1d638a4bd..8da7089e163 100644 --- a/objects/font.c +++ b/objects/font.c @@ -659,9 +659,13 @@ INT32 WINAPI GetTextFace32A( HDC32 hdc, INT32 count, LPSTR name ) if (!dc) return 0; if (!(font = (FONTOBJ *) GDI_GetObjPtr( dc->w.hFont, FONT_MAGIC ))) return 0; - lstrcpyn32A( name, font->logfont.lfFaceName, count ); + if (name) + lstrcpyn32A( name, font->logfont.lfFaceName, count ); GDI_HEAP_UNLOCK( dc->w.hFont ); - return strlen(name); + if (name) + return strlen(name); + else + return strlen(font->logfont.lfFaceName) + 1; } /*********************************************************************** diff --git a/objects/palette.c b/objects/palette.c index c23c784066f..b48b7c862d0 100644 --- a/objects/palette.c +++ b/objects/palette.c @@ -162,18 +162,22 @@ UINT32 WINAPI GetPaletteEntries32( if (!palPtr) return 0; numEntries = palPtr->logpalette.palNumEntries; - if (start >= numEntries) - { - GDI_HEAP_UNLOCK( hpalette ); - return 0; - } if (start+count > numEntries) count = numEntries - start; - memcpy( entries, &palPtr->logpalette.palPalEntry[start], - count * sizeof(PALETTEENTRY) ); - for( numEntries = 0; numEntries < count ; numEntries++ ) - if (entries[numEntries].peFlags & 0xF0) - entries[numEntries].peFlags = 0; - GDI_HEAP_UNLOCK( hpalette ); + if (entries) + { + if (start >= numEntries) + { + GDI_HEAP_UNLOCK( hpalette ); + return 0; + } + memcpy( entries, &palPtr->logpalette.palPalEntry[start], + count * sizeof(PALETTEENTRY) ); + for( numEntries = 0; numEntries < count ; numEntries++ ) + if (entries[numEntries].peFlags & 0xF0) + entries[numEntries].peFlags = 0; + GDI_HEAP_UNLOCK( hpalette ); + } + return count; } diff --git a/ole/folders.c b/ole/folders.c index a74a2a7ace4..7be42edd3ec 100644 --- a/ole/folders.c +++ b/ole/folders.c @@ -37,7 +37,7 @@ LPSTR GetNextElement( DWORD dwOut) /*[IN] length of pszOut*/ { LPSTR pszTail = pszNext; DWORD dwCopy; - TRACE(shell,"(%s %p %lx)\n",pszNext, pszOut, dwOut); + TRACE(shell,"(%s %p 0x%08lx)\n",pszNext, pszOut, dwOut); if(!pszNext || !*pszNext) return NULL; @@ -52,7 +52,7 @@ LPSTR GetNextElement( { pszTail++; } - TRACE(shell,"--(%s %s %lx)\n",pszNext, pszOut, dwOut); + TRACE(shell,"--(%s %s 0x%08lx)\n",pszNext, pszOut, dwOut); return pszTail; } @@ -138,32 +138,36 @@ static ULONG WINAPI IClassFactory_Release(LPCLASSFACTORY this) */ static HRESULT WINAPI IClassFactory_CreateInstance( LPCLASSFACTORY this, LPUNKNOWN pUnknown, REFIID riid, LPVOID *ppObject) -{ LPSHELLFOLDER pSHFolder; - HRESULT hResult=E_OUTOFMEMORY; - +{ IUnknown *pObj = NULL; + HRESULT hres; char xriid[50]; + WINE_StringFromCLSID((LPCLSID)riid,xriid); TRACE(shell,"%p->(%p,\n\tIID:\t%s)\n",this,pUnknown,xriid); - *ppObject = NULL; - + *ppObject = NULL; + if(pUnknown) - { return CLASS_E_NOAGGREGATION; + { return(CLASS_E_NOAGGREGATION); } if (IsEqualIID(riid, &IID_IShellFolder)) - { pSHFolder = IShellFolder_Constructor(NULL,NULL); - if(pSHFolder) - { hResult = pSHFolder->lpvtbl->fnQueryInterface(pSHFolder,riid, ppObject); - pSHFolder->lpvtbl->fnRelease(pSHFolder); - TRACE(shell,"-- ShellFolder created: (%p)->%p\n",this,*ppObject); - } - } + { pObj = (IUnknown *)IShellFolder_Constructor(NULL,NULL); + } else - { FIXME(shell,"unknown IID requested\n\tIID:\t%s\n",xriid); - hResult=E_NOINTERFACE; + { ERR(shell,"unknown IID requested\n\tIID:\t%s\n",xriid); + return(E_NOINTERFACE); } - return hResult; + + if (!pObj) + { return(E_OUTOFMEMORY); + } + + hres = pObj->lpvtbl->fnQueryInterface(pObj,riid, ppObject); + pObj->lpvtbl->fnRelease(pObj); + TRACE(shell,"-- Object created: (%p)->%p\n",this,*ppObject); + + return hres; } /****************************************************************************** * IClassFactory_LockServer @@ -217,7 +221,7 @@ LPENUMIDLIST IEnumIDList_Constructor( LPCSTR lpszPath, DWORD dwFlags, HRESULT* p lpeidl->mpLast=NULL; lpeidl->mpCurrent=NULL; - TRACE(shell,"(%p)->(%s %lx %p)\n",lpeidl,lpszPath,dwFlags,pResult); + TRACE(shell,"(%p)->(%s 0x%08lx %p)\n",lpeidl,lpszPath,dwFlags,pResult); lpeidl->mpPidlMgr=PidlMgr_Constructor(); if (!lpeidl->mpPidlMgr) @@ -368,60 +372,63 @@ static BOOL32 WINAPI IEnumIDList_CreateEnumList(LPENUMIDLIST this, LPCSTR lpszPa WIN32_FIND_DATA32A stffile; HANDLE32 hFile; - TRACE(shell,"(%p)->(%s %lx) \n",this,lpszPath,dwFlags); + TRACE(shell,"(%p)->(%s 0x%08lx) \n",this,lpszPath,dwFlags); /*enumerate the folders*/ if(dwFlags & SHCONTF_FOLDERS) - { /* special case - we can't enumerate the Desktop level Objects (MyComputer,Nethood... - so we need to fake an enumeration of those.*/ - if(!lpszPath) - { //create the pidl for this item - pidl = this->mpPidlMgr->lpvtbl->fnCreateDesktop(this->mpPidlMgr); - if(pidl) - { if(!IEnumIDList_AddToEnumList(this, pidl)) - return FALSE; - } + { /* special case - we can't enumerate the Desktop level Objects (MyComputer,Nethood... + so we need to fake an enumeration of those.*/ + if(!lpszPath) + { TRACE (shell,"(%p)-> enumerate the special-folder items\n",this); + //create the pidl for this item + pidl = this->mpPidlMgr->lpvtbl->fnCreateDesktop(this->mpPidlMgr); + if(pidl) + { if(!IEnumIDList_AddToEnumList(this, pidl)) + return FALSE; + } + else + { return FALSE; + } + } else - { return FALSE; - } - } - else - { hFile = FindFirstFile32A(lpszPath,&stffile); - do - { if (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - //create the pidl for this item - /* fixme: the shortname should be given too*/ - pidl = this->mpPidlMgr->lpvtbl->fnCreateFolder(this->mpPidlMgr, stffile.cFileName); - if(pidl) - { if(!IEnumIDList_AddToEnumList(this, pidl)) - return FALSE; - } - else - { return FALSE; - } + { TRACE (shell,"(%p)-> enumerate the folder items for %s\n",this,lpszPath); + hFile = FindFirstFile32A(lpszPath,&stffile); + do + { if (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + //create the pidl for this item + /* fixme: the shortname should be given too*/ + pidl = this->mpPidlMgr->lpvtbl->fnCreateFolder(this->mpPidlMgr, stffile.cFileName); + if(pidl) + { if(!IEnumIDList_AddToEnumList(this, pidl)) + return FALSE; + } + else + { return FALSE; + } } while( FindNextFile32A(hFile,&stffile)); FindClose32 (hFile); } } //enumerate the non-folder items (values) if(dwFlags & SHCONTF_NONFOLDERS) - { hFile = FindFirstFile32A(lpszPath,&stffile); - do - { if (! (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) - //create the pidl for this item - /* fixme: the shortname should be given too*/ - pidl = this->mpPidlMgr->lpvtbl->fnCreateFolder(this->mpPidlMgr, stffile.cFileName); - if(pidl) - { if(!IEnumIDList_AddToEnumList(this, pidl)) - { return FALSE; - } - } - else + { TRACE (shell,"(%p)-> enumerate the non-folder items (values) of %s\n",this,lpszPath); + hFile = FindFirstFile32A(lpszPath,&stffile); + do + { if (! (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) + //create the pidl for this item + /* fixme: the shortname should be given too*/ + pidl = this->mpPidlMgr->lpvtbl->fnCreateFolder(this->mpPidlMgr, stffile.cFileName); + if(pidl) + { if(!IEnumIDList_AddToEnumList(this, pidl)) { return FALSE; - } - } while( FindNextFile32A(hFile,&stffile)); - FindClose32 (hFile); - } + } + } + else + { return FALSE; + } + } while( FindNextFile32A(hFile,&stffile)); + FindClose32 (hFile); + } return TRUE; } @@ -504,7 +511,7 @@ static struct IShellFolder_VTable sfvt = { IShellFolder_QueryInterface, IShellFolder_AddRef, IShellFolder_Release, - IShellFolder_Initialize, +/* IShellFolder_Initialize,*/ IShellFolder_ParseDisplayName, IShellFolder_EnumObjects, IShellFolder_BindToObject, @@ -530,8 +537,9 @@ LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl) sf->mlpszFolder=NULL; sf->mpSFParent=pParent; - TRACE(shell,"(%p)->(parent:%p, pidl=%p)\n",sf,pParent, pidl); + TRACE(shell,"(%p)->(parent=%p, pidl=%p)\n",sf,pParent, pidl); + /* create own pidl-manager*/ sf->pPidlMgr = PidlMgr_Constructor(); if (! sf->pPidlMgr ) { HeapFree(GetProcessHeap(),0,sf); @@ -539,10 +547,11 @@ LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl) return NULL; } + /* keep a copy of the pidl in the instance*/ sf->mpidl = sf->pPidlMgr->lpvtbl->fnCopy(sf->pPidlMgr, pidl); sf->mpidlNSRoot = NULL; - if(sf->mpidl) + if(sf->mpidl) /* do we have a pidl?*/ { /*if(sf->pPidlMgr->lpvtbl->fnIsDesktop(sf->pPidlMgr,sf->mpidl)) { sf->pPidlMgr->lpvtbl->fnGetDesktop(sf->pPidlMgr,sf->mpidl); }*/ @@ -566,7 +575,7 @@ LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl) } } - TRACE(shell,"-- (%p)->(%p,%p)\n",sf,pParent, pidl); + TRACE(shell,"-- (%p)->(%p,%p,%s)\n",sf,pParent, pidl, debugstr_a(sf->mlpszFolder)); return sf; } /************************************************************************** @@ -612,6 +621,10 @@ static ULONG WINAPI IShellFolder_Release(LPSHELLFOLDER this) { TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); if (!--(this->ref)) { TRACE(shell,"-- destroying IShellFolder(%p)\n",this); + if (pdesktopfolder==this) + { pdesktopfolder=NULL; + TRACE(shell,"-- destroyed IShellFolder(%p) was Desktopfolder\n",this); + } HeapFree(GetProcessHeap(),0,this); return 0; } @@ -632,66 +645,70 @@ static HRESULT WINAPI IShellFolder_ParseDisplayName( LPITEMIDLIST *ppidl, /* [out] the pidl*/ DWORD *pdwAttributes) { HRESULT hr=E_OUTOFMEMORY; - LPITEMIDLIST pidlFull=NULL; - DWORD dwChars=lstrlen32W(lpszDisplayName) + 1; - LPSTR pszTemp=(LPSTR)HeapAlloc(GetProcessHeap(),0,dwChars * sizeof(CHAR)); + LPITEMIDLIST pidlFull=NULL, pidlTemp = NULL, pidlOld = NULL; LPSTR pszNext=NULL; CHAR szElement[MAX_PATH]; BOOL32 bType; - LPITEMIDLIST pidlTemp = NULL; - LPITEMIDLIST pidlOld = NULL; + + DWORD dwChars=lstrlen32W(lpszDisplayName) + 1; + LPSTR pszTemp=(LPSTR)HeapAlloc(GetProcessHeap(),0,dwChars * sizeof(CHAR)); - TRACE(shell,"(%p)->(%x,%p,%p=%s,%p,pidl=%p,%p)\n", - this,hwndOwner,pbcReserved,lpszDisplayName,debugstr_w(lpszDisplayName),pchEaten,ppidl,pdwAttributes - ); + TRACE(shell,"(%p)->(HWND=0x%08x,%p,%p=%s,%p,pidl=%p,%p)\n", + this,hwndOwner,pbcReserved,lpszDisplayName,debugstr_w(lpszDisplayName),pchEaten,ppidl,pdwAttributes); + if(pszTemp) { hr = E_FAIL; WideCharToLocal32(pszTemp, lpszDisplayName, dwChars); if(*pszTemp) - { pidlFull = this->pPidlMgr->lpvtbl->fnCreateDesktop(this->pPidlMgr); + { if (strcmp(pszTemp,"Desktop")==0) + { pidlFull = (LPITEMIDLIST)HeapAlloc(GetProcessHeap(),0,sizeof(ITEMIDLIST)); + pidlFull->mkid.cb = 0; + pidlFull->mkid.abID[0] = 0; + } + else + { pidlFull = this->pPidlMgr->lpvtbl->fnCreateMyComputer(this->pPidlMgr); - /* check if the lpszDisplayName is Folder or File*/ - bType = ! (GetFileAttributes32A(pszNext)&FILE_ATTRIBUTE_DIRECTORY); - - pszNext = GetNextElement(pszTemp, szElement, MAX_PATH); - - pidlTemp = this->pPidlMgr->lpvtbl->fnCreateDrive(this->pPidlMgr,szElement); - pidlOld = pidlFull; - pidlFull = this->pPidlMgr->lpvtbl->fnConcatenate(this->pPidlMgr,pidlFull,pidlTemp); - this->pPidlMgr->lpvtbl->fnDelete(this->pPidlMgr,pidlOld); - - if(pidlFull) - { while((pszNext=GetNextElement(pszNext, szElement, MAX_PATH))) - { if(!*pszNext && bType) - { pidlTemp = this->pPidlMgr->lpvtbl->fnCreateValue(this->pPidlMgr,szElement); - } - else - { pidlTemp = this->pPidlMgr->lpvtbl->fnCreateFolder(this->pPidlMgr,szElement); - } - pidlOld = pidlFull; - pidlFull = this->pPidlMgr->lpvtbl->fnConcatenate(this->pPidlMgr,pidlFull,pidlTemp); - this->pPidlMgr->lpvtbl->fnDelete(this->pPidlMgr,pidlOld); - } - hr = S_OK; - } - } - HeapFree(GetProcessHeap(),0,pszTemp); + /* check if the lpszDisplayName is Folder or File*/ + bType = ! (GetFileAttributes32A(pszNext)&FILE_ATTRIBUTE_DIRECTORY); + pszNext = GetNextElement(pszTemp, szElement, MAX_PATH); + + pidlTemp = this->pPidlMgr->lpvtbl->fnCreateDrive(this->pPidlMgr,szElement); + pidlOld = pidlFull; + pidlFull = this->pPidlMgr->lpvtbl->fnConcatenate(this->pPidlMgr,pidlFull,pidlTemp); + this->pPidlMgr->lpvtbl->fnDelete(this->pPidlMgr,pidlOld); + + if(pidlFull) + { while((pszNext=GetNextElement(pszNext, szElement, MAX_PATH))) + { if(!*pszNext && bType) + { pidlTemp = this->pPidlMgr->lpvtbl->fnCreateValue(this->pPidlMgr,szElement); + } + else + { pidlTemp = this->pPidlMgr->lpvtbl->fnCreateFolder(this->pPidlMgr,szElement); + } + pidlOld = pidlFull; + pidlFull = this->pPidlMgr->lpvtbl->fnConcatenate(this->pPidlMgr,pidlFull,pidlTemp); + this->pPidlMgr->lpvtbl->fnDelete(this->pPidlMgr,pidlOld); + } + hr = S_OK; + } + } + } } + HeapFree(GetProcessHeap(),0,pszTemp); *ppidl = pidlFull; return hr; - - - } /************************************************************************** * IShellFolder_EnumObjects */ static HRESULT WINAPI IShellFolder_EnumObjects( - LPSHELLFOLDER this,HWND32 hwndOwner,DWORD dwFlags, + LPSHELLFOLDER this, + HWND32 hwndOwner, + DWORD dwFlags, LPENUMIDLIST* ppEnumIDList) { HRESULT hr; - TRACE(shell,"(%p)->(%x,%lx,%p)\n",this,hwndOwner,dwFlags,ppEnumIDList); + TRACE(shell,"(%p)->(HWND=0x%08x,0x%08lx,%p)\n",this,hwndOwner,dwFlags,ppEnumIDList); *ppEnumIDList = NULL; *ppEnumIDList = IEnumIDList_Constructor (this->mlpszFolder, dwFlags, &hr); @@ -726,19 +743,20 @@ static HRESULT WINAPI IShellFolder_BindToObject( LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ char xclsid[50]; +{ char xriid[50]; HRESULT hr; LPSHELLFOLDER pShellFolder; - WINE_StringFromCLSID(riid,xclsid); + WINE_StringFromCLSID(riid,xriid); - TRACE(shell,"(%p)->(pidl=%p,%p,\n\tSID:%s,%p)\n",this,pidl,pbcReserved,xclsid,ppvOut); + TRACE(shell,"(%p)->(pidl=%p,%p,\n\tIID:%s,%p)\n",this,pidl,pbcReserved,xriid,ppvOut); *ppvOut = NULL; pShellFolder = IShellFolder_Constructor(this, pidl); if(!pShellFolder) return E_OUTOFMEMORY; - pShellFolder->lpvtbl->fnInitialize(pShellFolder, this->mpidlNSRoot); +/* pShellFolder->lpvtbl->fnInitialize(pShellFolder, this->mpidlNSRoot);*/ + IShellFolder_Initialize(pShellFolder, this->mpidlNSRoot); hr = pShellFolder->lpvtbl->fnQueryInterface(pShellFolder, riid, ppvOut); pShellFolder->lpvtbl->fnRelease(pShellFolder); TRACE(shell,"-- (%p)->(interface=%p)\n",this, ppvOut); @@ -754,10 +772,10 @@ static HRESULT WINAPI IShellFolder_BindToStorage( LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) -{ char xclsid[50]; - WINE_StringFromCLSID(riid,xclsid); +{ char xriid[50]; + WINE_StringFromCLSID(riid,xriid); - FIXME(shell,"(%p)->(pidl=%p,%p,\n\tSID:%s,%p) stub\n",this,pidl,pbcReserved,xclsid,ppvOut); + FIXME(shell,"(%p)->(pidl=%p,%p,\n\tIID:%s,%p) stub\n",this,pidl,pbcReserved,xriid,ppvOut); *ppvOut = NULL; return E_NOTIMPL; @@ -776,7 +794,7 @@ static HRESULT WINAPI IShellFolder_CompareIDs( int nReturn; LPCITEMIDLIST pidlTemp1 = pidl1, pidlTemp2 = pidl2; - TRACE(shell,"(%p)->(%lx,pidl1=%p,pidl2=%p) stub\n",this,lParam,pidl1,pidl2); + TRACE(shell,"(%p)->(0x%08lx,pidl1=%p,pidl2=%p) stub\n",this,lParam,pidl1,pidl2); /*Special case - If one of the items is a Path and the other is a File, always make the Path come before the File.*/ @@ -813,16 +831,21 @@ static HRESULT WINAPI IShellFolder_CompareIDs( /************************************************************************** * IShellFolder_CreateViewObject +* NOTES +* the same as SHCreateShellFolderViewEx ??? */ static HRESULT WINAPI IShellFolder_CreateViewObject( - LPSHELLFOLDER this,HWND32 hwndOwner,REFIID riid,LPVOID *ppv) -{ char xclsid[50]; + LPSHELLFOLDER this, + HWND32 hwndOwner, + REFIID riid, + LPVOID *ppvOut) +{ char xriid[50]; - WINE_StringFromCLSID(riid,xclsid); - FIXME(shell,"(%p)->(0x%04x,\n\tIID:\t%s,%p),stub!\n",this,hwndOwner,xclsid,ppv); + WINE_StringFromCLSID(riid,xriid); + FIXME(shell,"(%p)->(0x%04x,\n\tIID:\t%s,%p),stub!\n",this,hwndOwner,xriid,ppvOut); - *(DWORD*)ppv = 0; - return E_OUTOFMEMORY; + *ppvOut = NULL; + return E_NOTIMPL; } /************************************************************************** @@ -851,12 +874,17 @@ static HRESULT WINAPI IShellFolder_GetUIObjectOf( WINE_StringFromCLSID(riid,xclsid); - FIXME(shell,"(%p)->(%u %u,pidl=%p,\n\tIID:%s,%p,%p),stub!\n", + FIXME(shell,"(%p)->(%u,%u,pidl=%p,\n\tIID:%s,%p,%p),stub!\n", this,hwndOwner,cidl,apidl,xclsid,prgfInOut,ppvOut); - return E_FAIL; + + *ppvOut = NULL; + return E_NOTIMPL; } /************************************************************************** * IShellFolder_GetDisplayNameOf +* +* FIXME +* if the name is in the pidl the ret value should be a STRRET_OFFSET */ #define GET_SHGDN_FOR(dwFlags) ((DWORD)dwFlags & (DWORD)0x0000FF00) #define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF) @@ -866,45 +894,100 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET lpName) -{ CHAR szText[MAX_PATH]; - int cchOleStr; - LPITEMIDLIST pidlTemp; +{ CHAR szText[MAX_PATH]; + CHAR szTemp[MAX_PATH]; + CHAR szSpecial[MAX_PATH]; + CHAR szDrive[MAX_PATH]; + DWORD dwVolumeSerialNumber,dwMaximumComponetLength,dwFileSystemFlags; + LPITEMIDLIST pidlTemp=NULL; + BOOL32 bSimplePidl=FALSE; + + TRACE(shell,"(%p)->(pidl=%p,0x%08lx,%p)\n",this,pidl,dwFlags,lpName); - TRACE(shell,"(%p)->(pidl=%p,%lx,%p)\n",this,pidl,dwFlags,lpName); - switch(GET_SHGDN_RELATION(dwFlags)) - { case SHGDN_NORMAL: - //get the full name - this->pPidlMgr->lpvtbl->fnGetPidlPath(this->pPidlMgr, pidl, szText, sizeof(szText)); -/* FIXME if the text is NULL and this is a value, then is something wrong*/ -/* if(!*szText && this->pPidlMgr->lpvtbl->fnIsValue(this->pPidlMgr, this->pPidlMgr->lpvtbl->fnGetLastItem(this->pPidlMgr, pidl))) - { do_something() - }*/ - break; - - case SHGDN_INFOLDER: - pidlTemp = this->pPidlMgr->lpvtbl->fnGetLastItem(this->pPidlMgr,pidl); - //get the relative name - this->pPidlMgr->lpvtbl->fnGetItemText(this->pPidlMgr, pidlTemp, szText, sizeof(szText)); -/* FIXME if the text is NULL and this is a value, then is something wrong*/ - if(!*szText && this->pPidlMgr->lpvtbl->fnIsValue(this->pPidlMgr,pidlTemp)) -/* { do_something() - }*/ - break; - default: return E_INVALIDARG; + /* test if simple(relative) or complex(absolute) pidl */ + pidlTemp = this->pPidlMgr->lpvtbl->fnGetNextItem(this->pPidlMgr,pidl); + if (pidlTemp->mkid.cb==0x00) + { bSimplePidl = TRUE; + } + if (this->pPidlMgr->lpvtbl->fnIsDesktop(this->pPidlMgr, pidl)) + { strcpy (szText,"Desktop"); + } + else + { szSpecial[0]=0x00; + if (this->pPidlMgr->lpvtbl->fnIsMyComputer(this->pPidlMgr, pidl)) + { this->pPidlMgr->lpvtbl->fnGetItemText(this->pPidlMgr, pidl, szSpecial, MAX_PATH); + } + szDrive[0]=0x00; + if (this->pPidlMgr->lpvtbl->fnIsDrive(this->pPidlMgr, pidl)) + { pidlTemp = this->pPidlMgr->lpvtbl->fnGetLastItem(this->pPidlMgr,pidl); + if (pidlTemp) + { this->pPidlMgr->lpvtbl->fnGetItemText(this->pPidlMgr, pidlTemp, szTemp, MAX_PATH); + } + if ( dwFlags==SHGDN_NORMAL || dwFlags==SHGDN_INFOLDER) + { GetVolumeInformation32A(szTemp,szDrive,MAX_PATH,&dwVolumeSerialNumber,&dwMaximumComponetLength,&dwFileSystemFlags,NULL,0); + if (szTemp[2]=='\\') + { szTemp[2]='\0'; + } + strcat (szDrive," ("); + strcat (szDrive,szTemp); + strcat (szDrive,")"); + } + else + { PathAddBackslash (szTemp); + strcpy(szDrive,szTemp); + } + } + + switch(dwFlags) + { case SHGDN_NORMAL: + this->pPidlMgr->lpvtbl->fnGetPidlPath(this->pPidlMgr, pidl, szText, MAX_PATH); + break; + case SHGDN_INFOLDER: + pidlTemp = this->pPidlMgr->lpvtbl->fnGetLastItem(this->pPidlMgr,pidl); + if (pidlTemp) + { this->pPidlMgr->lpvtbl->fnGetItemText(this->pPidlMgr, pidlTemp, szText, MAX_PATH); + } + break; + case SHGDN_FORPARSING: + if (bSimplePidl) + { /* if the IShellFolder has parents, get the path from the + parent and add the ItemName*/ + if (this->mlpszFolder && strlen (this->mlpszFolder)) + { strcpy (szText,this->mlpszFolder); + PathAddBackslash (szText); + } + else + { strcpy(szText,""); + } + pidlTemp = this->pPidlMgr->lpvtbl->fnGetLastItem(this->pPidlMgr,pidl); + if (pidlTemp) + { this->pPidlMgr->lpvtbl->fnGetItemText(this->pPidlMgr, pidlTemp, szTemp, MAX_PATH ); + } + strcat(szText,szTemp); + } + else + { /* if the pidl is absolute, get everything from the pidl*/ + this->pPidlMgr->lpvtbl->fnGetPidlPath(this->pPidlMgr, pidl, szText, MAX_PATH); + } + break; + default: return E_INVALIDARG; + } + if ((szText[0]==0x00 && szDrive[0]!=0x00)|| (bSimplePidl && szDrive[0]!=0x00)) + { strcpy(szText,szDrive); + } + if (szText[0]==0x00 && szSpecial[0]!=0x00) + { strcpy(szText,szSpecial); + } + } + + TRACE(shell,"-- (%p)->(%s,%s,%s)\n",this,szSpecial,szDrive,szText); - //get the number of characters required - cchOleStr = strlen(szText) + 1; - - TRACE(shell,"-- (%p)->(%s)\n",this,szText); - //allocate the wide character string - lpName->u.pOleStr = (LPWSTR)HeapAlloc(GetProcessHeap(),0,cchOleStr * sizeof(WCHAR)); - - if(!(lpName->u.pOleStr)) + if(!(lpName)) { return E_OUTOFMEMORY; } - lpName->uType = STRRET_WSTR; - LocalToWideChar32(lpName->u.pOleStr, szText, cchOleStr); + lpName->uType = STRRET_CSTR; + strcpy(lpName->u.cStr,szText); return S_OK; } @@ -967,6 +1050,7 @@ LPSHELLLINK IShellLink_Constructor() * INTERNAL CLASS pidlmgr */ LPITEMIDLIST PidlMgr_CreateDesktop(LPPIDLMGR); +LPITEMIDLIST PidlMgr_CreateMyComputer(LPPIDLMGR); LPITEMIDLIST PidlMgr_CreateDrive(LPPIDLMGR,LPCSTR); LPITEMIDLIST PidlMgr_CreateFolder(LPPIDLMGR,LPCSTR); LPITEMIDLIST PidlMgr_CreateValue(LPPIDLMGR,LPCSTR); @@ -979,6 +1063,7 @@ BOOL32 PidlMgr_GetDrive(LPPIDLMGR,LPCITEMIDLIST,LPSTR,UINT16); LPITEMIDLIST PidlMgr_GetLastItem(LPPIDLMGR,LPCITEMIDLIST); DWORD PidlMgr_GetItemText(LPPIDLMGR,LPCITEMIDLIST,LPSTR,UINT16); BOOL32 PidlMgr_IsDesktop(LPPIDLMGR,LPCITEMIDLIST); +BOOL32 PidlMgr_IsMyComputer(LPPIDLMGR,LPCITEMIDLIST); BOOL32 PidlMgr_IsDrive(LPPIDLMGR,LPCITEMIDLIST); BOOL32 PidlMgr_IsFolder(LPPIDLMGR,LPCITEMIDLIST); BOOL32 PidlMgr_IsValue(LPPIDLMGR,LPCITEMIDLIST); @@ -996,7 +1081,8 @@ BOOL32 PidlMgr_SeparatePathAndValue(LPPIDLMGR,LPITEMIDLIST,LPITEMIDLIST*,LPITEMI static struct PidlMgr_VTable pmgrvt = { PidlMgr_CreateDesktop, - PidlMgr_CreateDrive, + PidlMgr_CreateMyComputer, + PidlMgr_CreateDrive, PidlMgr_CreateFolder, PidlMgr_CreateValue, PidlMgr_Delete, @@ -1008,7 +1094,8 @@ static struct PidlMgr_VTable pmgrvt = { PidlMgr_GetLastItem, PidlMgr_GetItemText, PidlMgr_IsDesktop, - PidlMgr_IsDrive, + PidlMgr_IsMyComputer, + PidlMgr_IsDrive, PidlMgr_IsFolder, PidlMgr_IsValue, PidlMgr_HasFolders, @@ -1051,11 +1138,19 @@ void PidlMgr_Destructor(LPPIDLMGR this) */ LPITEMIDLIST PidlMgr_CreateDesktop(LPPIDLMGR this) { TRACE(shell,"(%p)->()\n",this); - return PidlMgr_Create(this,PT_DESKTOP, (void *)"Desktop", sizeof("Desktop")); + return PidlMgr_Create(this,PT_DESKTOP, NULL, 0); +} +LPITEMIDLIST PidlMgr_CreateMyComputer(LPPIDLMGR this) +{ TRACE(shell,"(%p)->()\n",this); + return PidlMgr_Create(this,PT_MYCOMP, (void *)"My Computer", sizeof("My Computer")); } LPITEMIDLIST PidlMgr_CreateDrive(LPPIDLMGR this, LPCSTR lpszNew) -{ TRACE(shell,"(%p)->(%s)\n",this,lpszNew); - return PidlMgr_Create(this,PT_DRIVE, (LPVOID)lpszNew , strlen(lpszNew)+1); +{ char sTemp[4]; + strncpy (sTemp,lpszNew,4); + sTemp[2]='\\'; + sTemp[3]=0x00; + TRACE(shell,"(%p)->(%s)\n",this,sTemp); + return PidlMgr_Create(this,PT_DRIVE,(LPVOID)&sTemp[0],4); } LPITEMIDLIST PidlMgr_CreateFolder(LPPIDLMGR this, LPCSTR lpszNew) { TRACE(shell,"(%p)->(%s)\n",this,lpszNew); @@ -1078,9 +1173,13 @@ void PidlMgr_Delete(LPPIDLMGR this,LPITEMIDLIST pidl) * PidlMgr_GetNextItem() */ LPITEMIDLIST PidlMgr_GetNextItem(LPPIDLMGR this, LPITEMIDLIST pidl) -{ TRACE(shell,"(%p)->(pidl=%p)\n",this,pidl); +{ LPITEMIDLIST nextpidl; + + TRACE(shell,"(%p)->(pidl=%p)\n",this,pidl); if(pidl) - { return (LPITEMIDLIST)(LPBYTE)(((LPBYTE)pidl) + pidl->mkid.cb); + { nextpidl = (LPITEMIDLIST)(LPBYTE)(((LPBYTE)pidl) + pidl->mkid.cb); +/* TRACE(shell,"-- (%p)->(next pidl=%p)\n",this,nextpidl);*/ + return nextpidl; } else { return (NULL); @@ -1094,10 +1193,10 @@ LPITEMIDLIST PidlMgr_Copy(LPPIDLMGR this, LPITEMIDLIST pidlSource) { LPITEMIDLIST pidlTarget = NULL; UINT16 cbSource = 0; - TRACE(shell,"-- (%p)->(pidl=%p)\n",this,pidlSource); + TRACE(shell,"(%p)->(pidl=%p)\n",this,pidlSource); if(NULL == pidlSource) - { ERR(shell,"-- (%p)->(%p)\n",this,pidlSource); + { TRACE(shell,"-- (%p)->(%p)\n",this,pidlSource); return (NULL); } @@ -1150,12 +1249,11 @@ BOOL32 PidlMgr_GetDrive(LPPIDLMGR this,LPCITEMIDLIST pidl,LPSTR pOut, UINT16 uSi { LPITEMIDLIST pidlTemp=NULL; TRACE(shell,"(%p)->(%p,%p,%u)\n",this,pidl,pOut,uSize); - if(PidlMgr_IsDesktop(this,pidl)) + if(PidlMgr_IsMyComputer(this,pidl)) { pidlTemp = PidlMgr_GetNextItem(this,pidl); } - else if (PidlMgr_IsDrive(this,pidl)) - { pidlTemp = PidlMgr_GetNextItem(this,pidl); - return (BOOL32)PidlMgr_GetData(this,PT_DRIVE, pidlTemp, (LPVOID)pOut, uSize); + else if (PidlMgr_IsDrive(this,pidlTemp)) + { return (BOOL32)PidlMgr_GetData(this,PT_DRIVE, pidlTemp, (LPVOID)pOut, uSize); } return FALSE; } @@ -1182,8 +1280,8 @@ LPITEMIDLIST PidlMgr_GetLastItem(LPPIDLMGR this,LPCITEMIDLIST pidl) */ DWORD PidlMgr_GetItemText(LPPIDLMGR this,LPCITEMIDLIST pidl, LPSTR lpszText, UINT16 uSize) { TRACE(shell,"(%p)->(pidl=%p %p %x)\n",this,pidl,lpszText,uSize); - if (PidlMgr_IsDesktop(this, pidl)) - { return PidlMgr_GetData(this,PT_DESKTOP, pidl, (LPVOID)lpszText, uSize); + if (PidlMgr_IsMyComputer(this, pidl)) + { return PidlMgr_GetData(this,PT_MYCOMP, pidl, (LPVOID)lpszText, uSize); } if (PidlMgr_IsDrive(this, pidl)) { return PidlMgr_GetData(this,PT_DRIVE, pidl, (LPVOID)lpszText, uSize); @@ -1197,10 +1295,15 @@ DWORD PidlMgr_GetItemText(LPPIDLMGR this,LPCITEMIDLIST pidl, LPSTR lpszText, UIN * PidlMgr_IsValue() */ BOOL32 PidlMgr_IsDesktop(LPPIDLMGR this,LPCITEMIDLIST pidl) +{ TRACE(shell,"%p->(%p)\n",this,pidl); + return ( pidl->mkid.cb == 0x00 ); +} + +BOOL32 PidlMgr_IsMyComputer(LPPIDLMGR this,LPCITEMIDLIST pidl) { LPPIDLDATA pData; TRACE(shell,"%p->(%p)\n",this,pidl); pData = PidlMgr_GetDataPointer(this,pidl); - return (PT_DESKTOP == pData->type); + return (PT_MYCOMP == pData->type); } BOOL32 PidlMgr_IsDrive(LPPIDLMGR this,LPCITEMIDLIST pidl) @@ -1248,8 +1351,7 @@ BOOL32 PidlMgr_HasFolders(LPPIDLMGR this, LPSTR pszPath, LPCITEMIDLIST pidl) /************************************************************************** * PidlMgr_GetFolderText() - * Creates a Path string from a PIDL, filtering out the Desktop and the Drive - * value, if either is present. + * Creates a Path string from a PIDL, filtering out the special Folders */ DWORD PidlMgr_GetFolderText(LPPIDLMGR this,LPCITEMIDLIST pidl, LPSTR lpszPath, DWORD dwSize) @@ -1262,12 +1364,9 @@ DWORD PidlMgr_GetFolderText(LPPIDLMGR this,LPCITEMIDLIST pidl, { return 0; } - if(PidlMgr_IsDesktop(this,pidl)) + if(PidlMgr_IsMyComputer(this,pidl)) { pidlTemp = PidlMgr_GetNextItem(this,pidl); } - else if (PidlMgr_IsFolder(this,pidl)) - { pidlTemp = PidlMgr_GetNextItem(this,pidl); - } else { pidlTemp = (LPITEMIDLIST)pidl; } @@ -1284,6 +1383,7 @@ DWORD PidlMgr_GetFolderText(LPPIDLMGR this,LPCITEMIDLIST pidl, } //add one for the NULL terminator + TRACE(shell,"-- (%p)->(size=%lu)\n",this,dwCopied); return dwCopied + 1; } @@ -1299,10 +1399,10 @@ DWORD PidlMgr_GetFolderText(LPPIDLMGR this,LPCITEMIDLIST pidl, strcat(lpszPath, pData->szText); strcat(lpszPath, "\\"); - dwCopied += strlen(pData->szText) + 1; - pidlTemp = PidlMgr_GetNextItem(this,pidlTemp); + + TRACE(shell,"-- (%p)->(size=%lu,%s)\n",this,dwCopied,lpszPath); } //remove the last backslash if necessary @@ -1312,6 +1412,7 @@ DWORD PidlMgr_GetFolderText(LPPIDLMGR this,LPCITEMIDLIST pidl, dwCopied--; } } + TRACE(shell,"-- (%p)->(path=%s)\n",this,lpszPath); return dwCopied; } @@ -1325,7 +1426,7 @@ DWORD PidlMgr_GetValueText(LPPIDLMGR this, { LPITEMIDLIST pidlTemp=pidl; CHAR szText[MAX_PATH]; - TRACE(shell,"(%p)->(pidl=%p %p %lx)\n",this,pidl,lpszValue,dwSize); + TRACE(shell,"(%p)->(pidl=%p %p 0x%08lx)\n",this,pidl,lpszValue,dwSize); if(!pidl) { return 0; @@ -1345,14 +1446,16 @@ DWORD PidlMgr_GetValueText(LPPIDLMGR this, { return strlen(szText) + 1; } strcpy(lpszValue, szText); - TRACE(shell,"-- (%p)->(pidl=%p %p=%s %lx)\n",this,pidl,lpszValue,lpszValue,dwSize); + TRACE(shell,"-- (%p)->(pidl=%p %p=%s 0x%08lx)\n",this,pidl,lpszValue,lpszValue,dwSize); return strlen(lpszValue); } /************************************************************************** * PidlMgr_GetValueType() */ BOOL32 PidlMgr_GetValueType( LPPIDLMGR this, - LPCITEMIDLIST pidlPath, LPCITEMIDLIST pidlValue, LPDWORD pdwType) + LPCITEMIDLIST pidlPath, + LPCITEMIDLIST pidlValue, + LPDWORD pdwType) { LPSTR lpszFolder, lpszValueName; DWORD dwNameSize; @@ -1449,7 +1552,7 @@ DWORD PidlMgr_GetDataText( LPPIDLMGR this, HeapFree(GetProcessHeap(),0,lpszFolder); HeapFree(GetProcessHeap(),0,lpszValueName); - TRACE(shell,"-- (%p)->(%p=%s %lx)\n",this,lpszOut,lpszOut,dwOutSize); + TRACE(shell,"-- (%p)->(%p=%s 0x%08lx)\n",this,lpszOut,lpszOut,dwOutSize); return TRUE; } @@ -1502,7 +1605,10 @@ DWORD PidlMgr_GetPidlPath(LPPIDLMGR this, * PidlMgr_Concatenate() * Create a new PIDL by combining two existing PIDLs. */ -LPITEMIDLIST PidlMgr_Concatenate(LPPIDLMGR this,LPITEMIDLIST pidl1, LPITEMIDLIST pidl2) +LPITEMIDLIST PidlMgr_Concatenate( + LPPIDLMGR this, + LPITEMIDLIST pidl1, + LPITEMIDLIST pidl2) { LPITEMIDLIST pidlNew; UINT32 cb1 = 0, cb2 = 0; @@ -1550,6 +1656,11 @@ LPITEMIDLIST PidlMgr_Create(LPPIDLMGR this,PIDLTYPE type, LPVOID pIn, UINT16 uIn TRACE(shell,"(%p)->(%x %p %x)\n",this,type,pIn,uInSize); + if ( type == PT_DESKTOP) + { pidlOut = (LPITEMIDLIST)HeapAlloc(GetProcessHeap(),0,sizeof(ITEMIDLIST)); + memset(pidlOut, 0x00, sizeof(ITEMIDLIST)); + } + if (! pIn) { return NULL; } @@ -1558,23 +1669,24 @@ LPITEMIDLIST PidlMgr_Create(LPPIDLMGR this,PIDLTYPE type, LPVOID pIn, UINT16 uIn /* Allocate the memory, adding an additional ITEMIDLIST for the NULL terminating ID List. */ pidlOut = (LPITEMIDLIST)HeapAlloc(GetProcessHeap(),0,uSize + sizeof(ITEMIDLIST)); + memset(pidlOut, 0xAA, uSize); pidlTemp = pidlOut; if(pidlOut) { pidlTemp->mkid.cb = uSize; pData = PidlMgr_GetDataPointer(this,pidlTemp); pData->type = type; switch(type) - { case PT_DESKTOP: memcpy(pData->szText, pIn, uInSize); - TRACE(shell,"-- (%p)->create Desktop: %s\n",this,debugstr_a(pData->szText)); + { case PT_MYCOMP: memcpy(pData->szText, pIn, uInSize); + TRACE(shell,"- (%p)->create My Computer: %s\n",this,debugstr_a(pData->szText)); break; case PT_DRIVE: memcpy(pData->szText, pIn, uInSize); - TRACE(shell,"-- (%p)->create Drive: %s\n",this,debugstr_a(pData->szText)); + TRACE(shell,"- (%p)->create Drive: %s\n",this,debugstr_a(pData->szText)); break; case PT_FOLDER: case PT_VALUE: memcpy(pData->szText, pIn, uInSize); - TRACE(shell,"-- (%p)->create Value: %s\n",this,debugstr_a(pData->szText)); + TRACE(shell,"- (%p)->create Value: %s\n",this,debugstr_a(pData->szText)); break; - default: FIXME(shell,"-- (%p) wrong argument\n",this); + default: FIXME(shell,"- (%p) wrong argument\n",this); break; } @@ -1607,21 +1719,21 @@ DWORD PidlMgr_GetData( //copy the data switch(type) - { case PT_DESKTOP: if(uOutSize < 1) + { case PT_MYCOMP: if(uOutSize < 1) return 0; - if(PT_DESKTOP != pData->type) + if(PT_MYCOMP != pData->type) return 0; *(LPSTR)pOut = 0; - strncpy((LPSTR)pOut, "DESKTOP", uOutSize); + strncpy((LPSTR)pOut, "My Computer", uOutSize); dwReturn = strlen((LPSTR)pOut); break; case PT_DRIVE: if(uOutSize < 1) return 0; - if(PT_DESKTOP != pData->type) + if(PT_DRIVE != pData->type) return 0; *(LPSTR)pOut = 0; - strncpy((LPSTR)pOut, "DRIVE", uOutSize); + strncpy((LPSTR)pOut, pData->szText, uOutSize); dwReturn = strlen((LPSTR)pOut); break; @@ -1631,8 +1743,9 @@ DWORD PidlMgr_GetData( strncpy((LPSTR)pOut, pData->szText, uOutSize); dwReturn = strlen((LPSTR)pOut); break; + default: break; } - TRACE(shell,"-- (%p)->(%p:%s %lx)\n",this,pOut,(char*)pOut,dwReturn); + TRACE(shell,"-- (%p)->(%p=%s 0x%08lx)\n",this,pOut,(char*)pOut,dwReturn); return dwReturn; } diff --git a/ole/moniker.c b/ole/moniker.c index 7904ab858e8..844fc78260f 100644 --- a/ole/moniker.c +++ b/ole/moniker.c @@ -15,6 +15,7 @@ #include "heap.h" #include "compobj.h" #include "interfaces.h" +#include "storage.h" #include "shlobj.h" #include "local.h" #include "module.h" @@ -31,3 +32,14 @@ CreateFileMoniker16( FIXME(ole,"(%s,%p),stub!\n",lpszPathName,ppmk); return E_FAIL; } +/**************************************************************************** + * CreateFileMoniker (OLE32.55) + */ +HRESULT WINAPI +CreateFileMoniker32( + LPCOLESTR32 lpszPathName, /* [in] pathname */ + LPMONIKER * ppmk /* [out] new moniker object */ +) { + FIXME(ole,"(%s,%p),stub!\n",debugstr_w(lpszPathName),ppmk); + return E_FAIL; +} diff --git a/ole/nls/cat.nls b/ole/nls/cat.nls index f5537becd96..8415610c78b 100644 --- a/ole/nls/cat.nls +++ b/ole/nls/cat.nls @@ -8,10 +8,10 @@ LOCVAL(LOCALE_SLANGUAGE,"Catal LOCVAL(LOCALE_SENGLANGUAGE,"Catalan") LOCVAL(LOCALE_SABBREVLANGNAME,"cat") LOCVAL(LOCALE_SNATIVELANGNAME,"Català") -/* LOCVAL(LOCALE_ICOUNTRY,"") */ +LOCVAL(LOCALE_ICOUNTRY,"34") LOCVAL(LOCALE_SCOUNTRY,"Espanya") LOCVAL(LOCALE_SENGCOUNTRY,"Spain") -LOCVAL(LOCALE_SABBREVCTRYNAME,"Es") +LOCVAL(LOCALE_SABBREVCTRYNAME,"ESP") LOCVAL(LOCALE_SNATIVECTRYNAME,"Espanya") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ diff --git a/ole/nls/cze.nls b/ole/nls/cze.nls index 806703f8ecf..40bf38db1bb 100644 --- a/ole/nls/cze.nls +++ b/ole/nls/cze.nls @@ -1,21 +1,21 @@ /* * OLE2NLS library * Czech Republic + * (Czech strings in iso-8859-2) */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ /* LOCVAL(LOCALE_SLANGUAGE,"") */ -LOCVAL(LOCALE_SENGLANGUAGE,"Czech Republic") +LOCVAL(LOCALE_SENGLANGUAGE,"Czech") LOCVAL(LOCALE_SABBREVLANGNAME,"cze") - LOCVAL(LOCALE_SNATIVELANGNAME,"Èeský jazyk") -/* LOCVAL(LOCALE_ICOUNTRY,"") */ +LOCVAL(LOCALE_ICOUNTRY,"42") LOCVAL(LOCALE_SCOUNTRY,"Èeská Republika") LOCVAL(LOCALE_SENGCOUNTRY,"Czech Republic") -LOCVAL(LOCALE_SABBREVCTRYNAME,"Cz") +/* LOCVAL(LOCALE_SABBREVCTRYNAME,"") */ LOCVAL(LOCALE_SNATIVECTRYNAME,"Èeská Republika") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ -/* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ +LOCVAL(LOCALE_IDEFAULTCOUNTRY,"42") LOCVAL(LOCALE_IDEFAULTCODEPAGE,"895") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ diff --git a/ole/nls/dea.nls b/ole/nls/dea.nls index bac90de3551..35c3eb0fefa 100644 --- a/ole/nls/dea.nls +++ b/ole/nls/dea.nls @@ -7,12 +7,12 @@ LOCVAL(LOCALE_ILANGUAGE,"9") LOCVAL(LOCALE_SLANGUAGE,"Deutsch") LOCVAL(LOCALE_SENGLANGUAGE,"German") LOCVAL(LOCALE_SABBREVLANGNAME,"dea") -LOCVAL(LOCALE_SNATIVELANGNAME,"€sterreich") +LOCVAL(LOCALE_SNATIVELANGNAME,"Österreich") LOCVAL(LOCALE_ICOUNTRY,"41") -LOCVAL(LOCALE_SCOUNTRY,"€sterreich (Deutsch)") +LOCVAL(LOCALE_SCOUNTRY,"Österreich (Deutsch)") LOCVAL(LOCALE_SENGCOUNTRY,"Austria") LOCVAL(LOCALE_SABBREVCTRYNAME,"ATS") -LOCVAL(LOCALE_SNATIVECTRYNAME,"€sterreich") +LOCVAL(LOCALE_SNATIVECTRYNAME,"Österreich") LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9") LOCVAL(LOCALE_IDEFAULTCOUNTRY,"41") LOCVAL(LOCALE_IDEFAULTCODEPAGE,"851") @@ -72,7 +72,7 @@ LOCVAL(LOCALE_SABBREVDAYNAME5,"Fr") LOCVAL(LOCALE_SABBREVDAYNAME6,"Sa") LOCVAL(LOCALE_SABBREVDAYNAME7,"So") -LOCVAL(LOCALE_SMONTHNAME1,"J€nner") +LOCVAL(LOCALE_SMONTHNAME1,"Jänner") LOCVAL(LOCALE_SMONTHNAME2,"Februar") LOCVAL(LOCALE_SMONTHNAME3,"März") LOCVAL(LOCALE_SMONTHNAME4,"April") @@ -86,7 +86,7 @@ LOCVAL(LOCALE_SMONTHNAME11,"November") LOCVAL(LOCALE_SMONTHNAME12,"Dezember") LOCVAL(LOCALE_SMONTHNAME13,"") -LOCVAL(LOCALE_SABBREVMONTHNAME1,"J€n") +LOCVAL(LOCALE_SABBREVMONTHNAME1,"Jän") LOCVAL(LOCALE_SABBREVMONTHNAME2,"Feb") LOCVAL(LOCALE_SABBREVMONTHNAME3,"Mär") LOCVAL(LOCALE_SABBREVMONTHNAME4,"Apr") @@ -109,4 +109,4 @@ LOCVAL(LOCALE_SABBREVMONTHNAME13,"") /* LOCVAL(LOCALE_INEGSYMPRECEDES) */ /* LOCVAL(LOCALE_INEGSEPBYSPACE) */ -/* Gregorianischer Kalender */ \ No newline at end of file +/* Gregorianischer Kalender */ diff --git a/ole/nls/deu.nls b/ole/nls/deu.nls index 21e789173e1..21bf71ef8dc 100644 --- a/ole/nls/deu.nls +++ b/ole/nls/deu.nls @@ -28,8 +28,8 @@ LOCVAL(LOCALE_ILZERO,"1") LOCVAL(LOCALE_SNATIVEDIGITS, "0123456789") LOCVAL(LOCALE_SCURRENCY,"DM") LOCVAL(LOCALE_SINTLSYMBOL, "DEM") -/* LOCVAL(LOCALE_SMONDECIMALSEP) */ -/* LOCVAL(LOCALE_SMONTHOUSANDSEP) */ +LOCVAL(LOCALE_SMONDECIMALSEP, ",") +LOCVAL(LOCALE_SMONTHOUSANDSEP, ".") LOCVAL(LOCALE_SMONGROUPING, "3;0") LOCVAL(LOCALE_ICURRDIGITS,"2") /* LOCVAL(LOCALE_IINTLCURRDIGITS) */ diff --git a/ole/nls/esa.nls b/ole/nls/esa.nls index 99c56020e75..a4168666b41 100644 --- a/ole/nls/esa.nls +++ b/ole/nls/esa.nls @@ -4,18 +4,18 @@ */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -/* LOCVAL(LOCALE_SLANGUAGE,"") */ +LOCVAL(LOCALE_SLANGUAGE,"Español") LOCVAL(LOCALE_SENGLANGUAGE,"Spanish") LOCVAL(LOCALE_SABBREVLANGNAME,"esa") -LOCVAL(LOCALE_SNATIVELANGNAME,"Panama") +LOCVAL(LOCALE_SNATIVELANGNAME,"Español") /* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ +LOCVAL(LOCALE_SCOUNTRY,"Panamá") LOCVAL(LOCALE_SENGCOUNTRY,"Panama") LOCVAL(LOCALE_SABBREVCTRYNAME,"PAN") -LOCVAL(LOCALE_SNATIVECTRYNAME,"Panama") +LOCVAL(LOCALE_SNATIVECTRYNAME,"Panamá") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ @@ -57,19 +57,19 @@ LOCVAL(LOCALE_SMONGROUPING,"3;0") LOCVAL(LOCALE_SDAYNAME1,"lunes") LOCVAL(LOCALE_SDAYNAME2,"martes") -LOCVAL(LOCALE_SDAYNAME3,"mi?rcoles") +LOCVAL(LOCALE_SDAYNAME3,"miércoles") LOCVAL(LOCALE_SDAYNAME4,"jueves") LOCVAL(LOCALE_SDAYNAME5,"viernes") -LOCVAL(LOCALE_SDAYNAME6,"s?abado") +LOCVAL(LOCALE_SDAYNAME6,"sábado") LOCVAL(LOCALE_SDAYNAME7,"domingo") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"mi?") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") +LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") +LOCVAL(LOCALE_SABBREVDAYNAME3,"mié") +LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") +LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") +LOCVAL(LOCALE_SABBREVDAYNAME6,"sáb") +LOCVAL(LOCALE_SABBREVDAYNAME7,"dom") LOCVAL(LOCALE_SMONTHNAME1,"enero") LOCVAL(LOCALE_SMONTHNAME2,"febrero") @@ -99,8 +99,8 @@ LOCVAL(LOCALE_SABBREVMONTHNAME11,"nov") LOCVAL(LOCALE_SABBREVMONTHNAME12,"dic") LOCVAL(LOCALE_SABBREVMONTHNAME13,"") -/* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ -/* LOCVAL(LOCALE_SNEGATIVESIGN, "") */ +LOCVAL(LOCALE_SPOSITIVESIGN, "") +LOCVAL(LOCALE_SNEGATIVESIGN, "-") /* LOCVAL(LOCALE_IPOSSIGNPOSN, "") */ /* LOCVAL(LOCALE_INEGSIGNPOSN, "") */ /* LOCVAL(LOCALE_IPOSSYMPRECEDES, "") */ diff --git a/ole/nls/esb.nls b/ole/nls/esb.nls index 7fae58308b5..eae2283e85e 100644 --- a/ole/nls/esb.nls +++ b/ole/nls/esb.nls @@ -4,18 +4,18 @@ */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -/* LOCVAL(LOCALE_SLANGUAGE,"") */ +LOCVAL(LOCALE_SLANGUAGE,"Español") LOCVAL(LOCALE_SENGLANGUAGE,"Spanish") LOCVAL(LOCALE_SABBREVLANGNAME,"esb") LOCVAL(LOCALE_SNATIVELANGNAME,"Bolivia") /* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ +LOCVAL(LOCALE_SCOUNTRY,"Bolivia") LOCVAL(LOCALE_SENGCOUNTRY,"Bolivia") LOCVAL(LOCALE_SABBREVCTRYNAME,"BOL") LOCVAL(LOCALE_SNATIVECTRYNAME,"Bolivia") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ @@ -57,19 +57,19 @@ LOCVAL(LOCALE_SMONGROUPING,"3;0") LOCVAL(LOCALE_SDAYNAME1,"lunes") LOCVAL(LOCALE_SDAYNAME2,"martes") -LOCVAL(LOCALE_SDAYNAME3,"mi?rcoles") +LOCVAL(LOCALE_SDAYNAME3,"miércoles") LOCVAL(LOCALE_SDAYNAME4,"jueves") LOCVAL(LOCALE_SDAYNAME5,"viernes") -LOCVAL(LOCALE_SDAYNAME6,"s?abado") +LOCVAL(LOCALE_SDAYNAME6,"sábado") LOCVAL(LOCALE_SDAYNAME7,"domingo") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"mi?") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") +LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") +LOCVAL(LOCALE_SABBREVDAYNAME3,"mié") +LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") +LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") +LOCVAL(LOCALE_SABBREVDAYNAME6,"sáb") +LOCVAL(LOCALE_SABBREVDAYNAME7,"dom") LOCVAL(LOCALE_SMONTHNAME1,"enero") LOCVAL(LOCALE_SMONTHNAME2,"febrero") @@ -99,8 +99,8 @@ LOCVAL(LOCALE_SABBREVMONTHNAME11,"nov") LOCVAL(LOCALE_SABBREVMONTHNAME12,"dic") LOCVAL(LOCALE_SABBREVMONTHNAME13,"") -/* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ -/* LOCVAL(LOCALE_SNEGATIVESIGN, "") */ +LOCVAL(LOCALE_SPOSITIVESIGN, "") +LOCVAL(LOCALE_SNEGATIVESIGN, "-") /* LOCVAL(LOCALE_IPOSSIGNPOSN, "") */ /* LOCVAL(LOCALE_INEGSIGNPOSN, "") */ /* LOCVAL(LOCALE_IPOSSYMPRECEDES, "") */ diff --git a/ole/nls/esc.nls b/ole/nls/esc.nls index 5a9b67dcdbe..48ac4fcf67f 100644 --- a/ole/nls/esc.nls +++ b/ole/nls/esc.nls @@ -4,18 +4,18 @@ */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -/* LOCVAL(LOCALE_SLANGUAGE,"") */ +LOCVAL(LOCALE_SLANGUAGE,"Español") LOCVAL(LOCALE_SENGLANGUAGE,"Spanish") LOCVAL(LOCALE_SABBREVLANGNAME,"esa") -LOCVAL(LOCALE_SNATIVELANGNAME,"Costa Rica") +LOCVAL(LOCALE_SNATIVELANGNAME,"Español") /* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ +LOCVAL(LOCALE_SCOUNTRY,"Costa Rica") LOCVAL(LOCALE_SENGCOUNTRY,"Costa Rica") LOCVAL(LOCALE_SABBREVCTRYNAME,"CRI") LOCVAL(LOCALE_SNATIVECTRYNAME,"Costa Rica") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ @@ -57,19 +57,19 @@ LOCVAL(LOCALE_S2359, "PM") LOCVAL(LOCALE_SDAYNAME1,"lunes") LOCVAL(LOCALE_SDAYNAME2,"martes") -LOCVAL(LOCALE_SDAYNAME3,"mi?rcoles") +LOCVAL(LOCALE_SDAYNAME3,"miércoles") LOCVAL(LOCALE_SDAYNAME4,"jueves") LOCVAL(LOCALE_SDAYNAME5,"viernes") -LOCVAL(LOCALE_SDAYNAME6,"s?abado") +LOCVAL(LOCALE_SDAYNAME6,"sábado") LOCVAL(LOCALE_SDAYNAME7,"domingo") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"mi?") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") +LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") +LOCVAL(LOCALE_SABBREVDAYNAME3,"mié") +LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") +LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") +LOCVAL(LOCALE_SABBREVDAYNAME6,"sáb") +LOCVAL(LOCALE_SABBREVDAYNAME7,"dom") LOCVAL(LOCALE_SMONTHNAME1,"enero") LOCVAL(LOCALE_SMONTHNAME2,"febrero") @@ -99,8 +99,8 @@ LOCVAL(LOCALE_SABBREVMONTHNAME11,"nov") LOCVAL(LOCALE_SABBREVMONTHNAME12,"dic") LOCVAL(LOCALE_SABBREVMONTHNAME13,"") -/* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ -/* LOCVAL(LOCALE_SNEGATIVESIGN, "") */ +LOCVAL(LOCALE_SPOSITIVESIGN, "") +LOCVAL(LOCALE_SNEGATIVESIGN, "-") /* LOCVAL(LOCALE_IPOSSIGNPOSN, "") */ /* LOCVAL(LOCALE_INEGSIGNPOSN, "") */ /* LOCVAL(LOCALE_IPOSSYMPRECEDES, "") */ diff --git a/ole/nls/esd.nls b/ole/nls/esd.nls index a1ee8c74567..4036141e495 100644 --- a/ole/nls/esd.nls +++ b/ole/nls/esd.nls @@ -4,18 +4,18 @@ */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -/* LOCVAL(LOCALE_SLANGUAGE,"") */ +LOCVAL(LOCALE_SLANGUAGE,"Español") LOCVAL(LOCALE_SENGLANGUAGE,"Spanish") LOCVAL(LOCALE_SABBREVLANGNAME,"esd") -LOCVAL(LOCALE_SNATIVELANGNAME,"Rep?blica Dominicana") +LOCVAL(LOCALE_SNATIVELANGNAME,"Español") /* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ +LOCVAL(LOCALE_SCOUNTRY,"República Dominicana") LOCVAL(LOCALE_SENGCOUNTRY,"Dominican Republic") LOCVAL(LOCALE_SABBREVCTRYNAME,"DMA") -LOCVAL(LOCALE_SNATIVECTRYNAME,"Espa€a") +LOCVAL(LOCALE_SNATIVECTRYNAME,"República Dominicana") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ @@ -57,19 +57,19 @@ LOCVAL(LOCALE_SMONGROUPING,"3;0") LOCVAL(LOCALE_SDAYNAME1,"lunes") LOCVAL(LOCALE_SDAYNAME2,"martes") -LOCVAL(LOCALE_SDAYNAME3,"mi?rcoles") +LOCVAL(LOCALE_SDAYNAME3,"miércoles") LOCVAL(LOCALE_SDAYNAME4,"jueves") LOCVAL(LOCALE_SDAYNAME5,"viernes") -LOCVAL(LOCALE_SDAYNAME6,"s?abado") +LOCVAL(LOCALE_SDAYNAME6,"sábado") LOCVAL(LOCALE_SDAYNAME7,"domingo") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"mi?") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") +LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") +LOCVAL(LOCALE_SABBREVDAYNAME3,"mié") +LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") +LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") +LOCVAL(LOCALE_SABBREVDAYNAME6,"sáb") +LOCVAL(LOCALE_SABBREVDAYNAME7,"dom") LOCVAL(LOCALE_SMONTHNAME1,"enero") LOCVAL(LOCALE_SMONTHNAME2,"febrero") @@ -99,8 +99,8 @@ LOCVAL(LOCALE_SABBREVMONTHNAME11,"nov") LOCVAL(LOCALE_SABBREVMONTHNAME12,"dic") LOCVAL(LOCALE_SABBREVMONTHNAME13,"") -/* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ -/* LOCVAL(LOCALE_SNEGATIVESIGN, "") */ +LOCVAL(LOCALE_SPOSITIVESIGN, "") +LOCVAL(LOCALE_SNEGATIVESIGN, "-") /* LOCVAL(LOCALE_IPOSSIGNPOSN, "") */ /* LOCVAL(LOCALE_INEGSIGNPOSN, "") */ /* LOCVAL(LOCALE_IPOSSYMPRECEDES, "") */ diff --git a/ole/nls/ese.nls b/ole/nls/ese.nls index 9a410accd49..97cb09298ec 100644 --- a/ole/nls/ese.nls +++ b/ole/nls/ese.nls @@ -4,18 +4,18 @@ */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -/* LOCVAL(LOCALE_SLANGUAGE,"") */ +LOCVAL(LOCALE_SLANGUAGE,"Español") LOCVAL(LOCALE_SENGLANGUAGE,"Spanish") LOCVAL(LOCALE_SABBREVLANGNAME,"ese") -LOCVAL(LOCALE_SNATIVELANGNAME,"Espa€ol") +LOCVAL(LOCALE_SNATIVELANGNAME,"Español") /* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ +LOCVAL(LOCALE_SCOUNTRY,"El Salvador") LOCVAL(LOCALE_SENGCOUNTRY,"El Salvador") LOCVAL(LOCALE_SABBREVCTRYNAME,"SVD") -LOCVAL(LOCALE_SNATIVECTRYNAME,"Espa€a") +LOCVAL(LOCALE_SNATIVECTRYNAME,"El Salvador") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ @@ -57,19 +57,19 @@ LOCVAL(LOCALE_SMONGROUPING,"3;0") LOCVAL(LOCALE_SDAYNAME1,"lunes") LOCVAL(LOCALE_SDAYNAME2,"martes") -LOCVAL(LOCALE_SDAYNAME3,"mi?rcoles") +LOCVAL(LOCALE_SDAYNAME3,"miércoles") LOCVAL(LOCALE_SDAYNAME4,"jueves") LOCVAL(LOCALE_SDAYNAME5,"viernes") -LOCVAL(LOCALE_SDAYNAME6,"s?abado") +LOCVAL(LOCALE_SDAYNAME6,"sábado") LOCVAL(LOCALE_SDAYNAME7,"domingo") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"mi?") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") +LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") +LOCVAL(LOCALE_SABBREVDAYNAME3,"mié") +LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") +LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") +LOCVAL(LOCALE_SABBREVDAYNAME6,"sáb") +LOCVAL(LOCALE_SABBREVDAYNAME7,"dom") LOCVAL(LOCALE_SMONTHNAME1,"enero") LOCVAL(LOCALE_SMONTHNAME2,"febrero") @@ -99,8 +99,8 @@ LOCVAL(LOCALE_SABBREVMONTHNAME11,"nov") LOCVAL(LOCALE_SABBREVMONTHNAME12,"dic") LOCVAL(LOCALE_SABBREVMONTHNAME13,"") -/* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ -/* LOCVAL(LOCALE_SNEGATIVESIGN, "") */ +LOCVAL(LOCALE_SPOSITIVESIGN, "") +LOCVAL(LOCALE_SNEGATIVESIGN, "-") /* LOCVAL(LOCALE_IPOSSIGNPOSN, "") */ /* LOCVAL(LOCALE_INEGSIGNPOSN, "") */ /* LOCVAL(LOCALE_IPOSSYMPRECEDES, "") */ diff --git a/ole/nls/esf.nls b/ole/nls/esf.nls index ee3fbeb0501..2784196fc3b 100644 --- a/ole/nls/esf.nls +++ b/ole/nls/esf.nls @@ -4,10 +4,10 @@ */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -/* LOCVAL(LOCALE_SLANGUAGE,"") */ +LOCVAL(LOCALE_SLANGUAGE,"Español") LOCVAL(LOCALE_SENGLANGUAGE,"Spanish") LOCVAL(LOCALE_SABBREVLANGNAME,"esf") -LOCVAL(LOCALE_SNATIVELANGNAME,"Espa€ol") +LOCVAL(LOCALE_SNATIVELANGNAME,"Español") /* LOCVAL(LOCALE_ICOUNTRY,"") */ LOCVAL(LOCALE_SCOUNTRY,"Ecuador") LOCVAL(LOCALE_SENGCOUNTRY,"Ecuador") @@ -15,7 +15,7 @@ LOCVAL(LOCALE_SABBREVCTRYNAME,"ECU") LOCVAL(LOCALE_SNATIVECTRYNAME,"Ecuador") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ @@ -57,21 +57,21 @@ LOCVAL(LOCALE_SMONGROUPING, "3;0") LOCVAL(LOCALE_SDAYNAME1,"lunes") LOCVAL(LOCALE_SDAYNAME2,"martes") -LOCVAL(LOCALE_SDAYNAME3,"mi?rcoles") +LOCVAL(LOCALE_SDAYNAME3,"miércoles") LOCVAL(LOCALE_SDAYNAME4,"jueves") LOCVAL(LOCALE_SDAYNAME5,"viernes") -LOCVAL(LOCALE_SDAYNAME6,"s?abado") +LOCVAL(LOCALE_SDAYNAME6,"sábado") LOCVAL(LOCALE_SDAYNAME7,"domingo") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"mi?") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") +LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") +LOCVAL(LOCALE_SABBREVDAYNAME3,"mié") +LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") +LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") +LOCVAL(LOCALE_SABBREVDAYNAME6,"sáb") +LOCVAL(LOCALE_SABBREVDAYNAME7,"dom") -/* LOCVAL(LOCALE_SMONTHNAME1,"") */ +LOCVAL(LOCALE_SMONTHNAME1,"enero") LOCVAL(LOCALE_SMONTHNAME2,"febrero") LOCVAL(LOCALE_SMONTHNAME3,"marzo") LOCVAL(LOCALE_SMONTHNAME4,"abril") @@ -99,8 +99,8 @@ LOCVAL(LOCALE_SABBREVMONTHNAME11,"nov") LOCVAL(LOCALE_SABBREVMONTHNAME12,"dic") LOCVAL(LOCALE_SABBREVMONTHNAME13,"") -/* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ -/* LOCVAL(LOCALE_SNEGATIVESIGN, "") */ +LOCVAL(LOCALE_SPOSITIVESIGN, "") +LOCVAL(LOCALE_SNEGATIVESIGN, "-") /* LOCVAL(LOCALE_IPOSSIGNPOSN, "") */ /* LOCVAL(LOCALE_INEGSIGNPOSN, "") */ /* LOCVAL(LOCALE_IPOSSYMPRECEDES, "") */ diff --git a/ole/nls/esg.nls b/ole/nls/esg.nls index cee3e236412..073c58820d0 100644 --- a/ole/nls/esg.nls +++ b/ole/nls/esg.nls @@ -4,10 +4,10 @@ */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -/* LOCVAL(LOCALE_SLANGUAGE,"") */ +LOCVAL(LOCALE_SLANGUAGE,"Español") LOCVAL(LOCALE_SENGLANGUAGE,"Spanish") LOCVAL(LOCALE_SABBREVLANGNAME,"esg") -LOCVAL(LOCALE_SNATIVELANGNAME,"Espa€ol") +LOCVAL(LOCALE_SNATIVELANGNAME,"Español") /* LOCVAL(LOCALE_ICOUNTRY,"") */ LOCVAL(LOCALE_SCOUNTRY,"Guatemala") LOCVAL(LOCALE_SENGCOUNTRY,"Guatemala") @@ -15,7 +15,7 @@ LOCVAL(LOCALE_SABBREVCTRYNAME,"GTM") LOCVAL(LOCALE_SNATIVECTRYNAME,"Guatemala") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ @@ -57,21 +57,21 @@ LOCVAL(LOCALE_SMONGROUPING, "3;0") LOCVAL(LOCALE_SDAYNAME1,"lunes") LOCVAL(LOCALE_SDAYNAME2,"martes") -LOCVAL(LOCALE_SDAYNAME3,"mi?rcoles") +LOCVAL(LOCALE_SDAYNAME3,"miércoles") LOCVAL(LOCALE_SDAYNAME4,"jueves") LOCVAL(LOCALE_SDAYNAME5,"viernes") -LOCVAL(LOCALE_SDAYNAME6,"s?abado") +LOCVAL(LOCALE_SDAYNAME6,"sábado") LOCVAL(LOCALE_SDAYNAME7,"domingo") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"mi?") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"lun") +LOCVAL(LOCALE_SABBREVDAYNAME2,"mar") +LOCVAL(LOCALE_SABBREVDAYNAME3,"mié") +LOCVAL(LOCALE_SABBREVDAYNAME4,"jue") +LOCVAL(LOCALE_SABBREVDAYNAME5,"vie") +LOCVAL(LOCALE_SABBREVDAYNAME6,"sáb") +LOCVAL(LOCALE_SABBREVDAYNAME7,"dom") -/* LOCVAL(LOCALE_SMONTHNAME1,"") */ +LOCVAL(LOCALE_SMONTHNAME1,"enero") LOCVAL(LOCALE_SMONTHNAME2,"febrero") LOCVAL(LOCALE_SMONTHNAME3,"marzo") LOCVAL(LOCALE_SMONTHNAME4,"abril") @@ -99,8 +99,8 @@ LOCVAL(LOCALE_SABBREVMONTHNAME11,"nov") LOCVAL(LOCALE_SABBREVMONTHNAME12,"dic") LOCVAL(LOCALE_SABBREVMONTHNAME13,"") -/* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ -/* LOCVAL(LOCALE_SNEGATIVESIGN, "") */ +LOCVAL(LOCALE_SPOSITIVESIGN, "") +LOCVAL(LOCALE_SNEGATIVESIGN, "-") /* LOCVAL(LOCALE_IPOSSIGNPOSN, "") */ /* LOCVAL(LOCALE_INEGSIGNPOSN, "") */ /* LOCVAL(LOCALE_IPOSSYMPRECEDES, "") */ diff --git a/ole/nls/esh.nls b/ole/nls/esh.nls index bd2e743c156..46adb1c7dcb 100644 --- a/ole/nls/esh.nls +++ b/ole/nls/esh.nls @@ -4,10 +4,10 @@ */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -LOCVAL(LOCALE_SLANGUAGE,"Español (Honduras)") -LOCVAL(LOCALE_SENGLANGUAGE,"Spanish (Honduras)") +LOCVAL(LOCALE_SLANGUAGE,"Español") +LOCVAL(LOCALE_SENGLANGUAGE,"Spanish") LOCVAL(LOCALE_SABBREVLANGNAME,"esh") -LOCVAL(LOCALE_SNATIVELANGNAME,"Español (Honduras)") +LOCVAL(LOCALE_SNATIVELANGNAME,"Español") /* LOCVAL(LOCALE_ICOUNTRY,"") */ LOCVAL(LOCALE_SCOUNTRY,"Honduras") LOCVAL(LOCALE_SENGCOUNTRY,"Honduras") diff --git a/ole/nls/esi.nls b/ole/nls/esi.nls index 57b05389e28..0ca82d3a34c 100644 --- a/ole/nls/esi.nls +++ b/ole/nls/esi.nls @@ -4,10 +4,10 @@ */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -LOCVAL(LOCALE_SLANGUAGE,"Español (Nicaragua)") -LOCVAL(LOCALE_SENGLANGUAGE,"Spanish (Nicaragua)") +LOCVAL(LOCALE_SLANGUAGE,"Español") +LOCVAL(LOCALE_SENGLANGUAGE,"Spanish") LOCVAL(LOCALE_SABBREVLANGNAME,"esi") -LOCVAL(LOCALE_SNATIVELANGNAME,"Español (Nicaragua)") +LOCVAL(LOCALE_SNATIVELANGNAME,"Español") /* LOCVAL(LOCALE_ICOUNTRY,"") */ LOCVAL(LOCALE_SCOUNTRY,"Nicaragua") LOCVAL(LOCALE_SENGCOUNTRY,"Nicaragua") diff --git a/ole/nls/fos.nls b/ole/nls/fos.nls index 5a4beaf3d59..1ece8c69d98 100644 --- a/ole/nls/fos.nls +++ b/ole/nls/fos.nls @@ -8,7 +8,7 @@ LOCVAL(LOCALE_SLANGUAGE,"") LOCVAL(LOCALE_SENGLANGUAGE,"Faroese") LOCVAL(LOCALE_SABBREVLANGNAME,"fos") LOCVAL(LOCALE_SNATIVELANGNAME,"f?royskt") -/* LOCVAL(LOCALE_ICOUNTRY,"49") */ +LOCVAL(LOCALE_ICOUNTRY,"298") LOCVAL(LOCALE_SCOUNTRY,"") LOCVAL(LOCALE_SENGCOUNTRY,"Faroe Islands") LOCVAL(LOCALE_SABBREVCTRYNAME,"FRS") @@ -55,19 +55,19 @@ LOCVAL(LOCALE_ITLZERO,"1") /* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */ /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */ -LOCVAL(LOCALE_SDAYNAME1,"m€nadagur") -LOCVAL(LOCALE_SDAYNAME2,"?osdagur") +LOCVAL(LOCALE_SDAYNAME1,"mánadagur") +LOCVAL(LOCALE_SDAYNAME2,"týsdagur") LOCVAL(LOCALE_SDAYNAME3,"mikudagur") -LOCVAL(LOCALE_SDAYNAME4,"h?sdagur") -LOCVAL(LOCALE_SDAYNAME5,"fr?ggjadagur") +LOCVAL(LOCALE_SDAYNAME4,"hósdagur") +LOCVAL(LOCALE_SDAYNAME5,"fríggjadagur") LOCVAL(LOCALE_SDAYNAME6,"leygardagur") LOCVAL(LOCALE_SDAYNAME7,"sunnudagur") -LOCVAL(LOCALE_SABBREVDAYNAME1,"m?n") -LOCVAL(LOCALE_SABBREVDAYNAME2,"t?s") +LOCVAL(LOCALE_SABBREVDAYNAME1,"mán") +LOCVAL(LOCALE_SABBREVDAYNAME2,"týs") LOCVAL(LOCALE_SABBREVDAYNAME3,"mik") -LOCVAL(LOCALE_SABBREVDAYNAME4,"h?s") -LOCVAL(LOCALE_SABBREVDAYNAME5,"fr?") +LOCVAL(LOCALE_SABBREVDAYNAME4,"hós") +LOCVAL(LOCALE_SABBREVDAYNAME5,"frí") LOCVAL(LOCALE_SABBREVDAYNAME6,"ley") LOCVAL(LOCALE_SABBREVDAYNAME7,"sun") diff --git a/ole/nls/fra.nls b/ole/nls/fra.nls index a6188d923b0..eb41c0720b8 100644 --- a/ole/nls/fra.nls +++ b/ole/nls/fra.nls @@ -11,7 +11,7 @@ LOCVAL(LOCALE_SNATIVELANGNAME,"Fran LOCVAL(LOCALE_ICOUNTRY,"33") LOCVAL(LOCALE_SCOUNTRY,"France") LOCVAL(LOCALE_SENGCOUNTRY,"France") -LOCVAL(LOCALE_SABBREVCTRYNAME,"Fr") +LOCVAL(LOCALE_SABBREVCTRYNAME,"FRA") LOCVAL(LOCALE_SNATIVECTRYNAME,"France") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ @@ -108,4 +108,4 @@ LOCVAL(LOCALE_SNEGATIVESIGN, "-") /* LOCVAL(LOCALE_INEGSYMPRECEDES, "") */ /* LOCVAL(LOCALE_INEGSEPBYSPACE, "") */ -/* calendrier gr€gorien */ +/* calendrier grégorien */ diff --git a/ole/nls/frb.nls b/ole/nls/frb.nls index be64b1bbf94..dbbd7b61262 100644 --- a/ole/nls/frb.nls +++ b/ole/nls/frb.nls @@ -11,7 +11,7 @@ LOCVAL(LOCALE_SNATIVELANGNAME,"Fran LOCVAL(LOCALE_ICOUNTRY,"32") LOCVAL(LOCALE_SCOUNTRY,"Belgique") LOCVAL(LOCALE_SENGCOUNTRY,"Belgium") -LOCVAL(LOCALE_SABBREVCTRYNAME,"Be") +LOCVAL(LOCALE_SABBREVCTRYNAME,"BEL") LOCVAL(LOCALE_SNATIVECTRYNAME,"Belgique") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ diff --git a/ole/nls/frc.nls b/ole/nls/frc.nls index 3829012ba9b..ffcdd46db82 100644 --- a/ole/nls/frc.nls +++ b/ole/nls/frc.nls @@ -7,9 +7,9 @@ /* LOCVAL(LOCALE_SLANGUAGE,"") */ LOCVAL(LOCALE_SENGLANGUAGE,"French") LOCVAL(LOCALE_SABBREVLANGNAME,"frc") -LOCVAL(LOCALE_SNATIVELANGNAME,"fran€ais") +LOCVAL(LOCALE_SNATIVELANGNAME,"français") /* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ +LOCVAL(LOCALE_SCOUNTRY,"Canada") LOCVAL(LOCALE_SENGCOUNTRY,"Canada") LOCVAL(LOCALE_SABBREVCTRYNAME,"CAN") LOCVAL(LOCALE_SNATIVECTRYNAME,"Canada") @@ -72,31 +72,31 @@ LOCVAL(LOCALE_SABBREVDAYNAME6,"sam") LOCVAL(LOCALE_SABBREVDAYNAME7,"dim") LOCVAL(LOCALE_SMONTHNAME1,"janvier") -LOCVAL(LOCALE_SMONTHNAME2,"f€vrier") +LOCVAL(LOCALE_SMONTHNAME2,"février") LOCVAL(LOCALE_SMONTHNAME3,"mars") LOCVAL(LOCALE_SMONTHNAME4,"avril") LOCVAL(LOCALE_SMONTHNAME5,"mai") LOCVAL(LOCALE_SMONTHNAME6,"juin") LOCVAL(LOCALE_SMONTHNAME7,"juillet") -LOCVAL(LOCALE_SMONTHNAME8,"ao€t") +LOCVAL(LOCALE_SMONTHNAME8,"août") LOCVAL(LOCALE_SMONTHNAME9,"septembre") LOCVAL(LOCALE_SMONTHNAME10,"octobre") LOCVAL(LOCALE_SMONTHNAME11,"novembre") -LOCVAL(LOCALE_SMONTHNAME12,"d€cembre") +LOCVAL(LOCALE_SMONTHNAME12,"décembre") LOCVAL(LOCALE_SMONTHNAME13,"") LOCVAL(LOCALE_SABBREVMONTHNAME1,"janv") -LOCVAL(LOCALE_SABBREVMONTHNAME2,"f€vr") +LOCVAL(LOCALE_SABBREVMONTHNAME2,"févr") LOCVAL(LOCALE_SABBREVMONTHNAME3,"mars") LOCVAL(LOCALE_SABBREVMONTHNAME4,"avr") LOCVAL(LOCALE_SABBREVMONTHNAME5,"mai") LOCVAL(LOCALE_SABBREVMONTHNAME6,"juin") LOCVAL(LOCALE_SABBREVMONTHNAME7,"juil") -LOCVAL(LOCALE_SABBREVMONTHNAME8,"ao€t") +LOCVAL(LOCALE_SABBREVMONTHNAME8,"août") LOCVAL(LOCALE_SABBREVMONTHNAME9,"sept") LOCVAL(LOCALE_SABBREVMONTHNAME10,"oct") LOCVAL(LOCALE_SABBREVMONTHNAME11,"nov") -LOCVAL(LOCALE_SABBREVMONTHNAME12,"d€c") +LOCVAL(LOCALE_SABBREVMONTHNAME12,"déc") LOCVAL(LOCALE_SABBREVMONTHNAME13,"") /* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ @@ -108,4 +108,4 @@ LOCVAL(LOCALE_SABBREVMONTHNAME13,"") /* LOCVAL(LOCALE_INEGSYMPRECEDES, "") */ /* LOCVAL(LOCALE_INEGSEPBYSPACE, "") */ -/* calendrier gr€gorien */ +/* calendrier grégorien */ diff --git a/ole/nls/frl.nls b/ole/nls/frl.nls index a70cc5d8582..b857123735a 100644 --- a/ole/nls/frl.nls +++ b/ole/nls/frl.nls @@ -4,18 +4,18 @@ */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -/* LOCVAL(LOCALE_SLANGUAGE,"") */ +LOCVAL(LOCALE_SLANGUAGE,"Français") LOCVAL(LOCALE_SENGLANGUAGE,"French") LOCVAL(LOCALE_SABBREVLANGNAME,"frl") -LOCVAL(LOCALE_SNATIVELANGNAME,"fran€ais") -/* LOCVAL(LOCALE_ICOUNTRY,"") */ +LOCVAL(LOCALE_SNATIVELANGNAME,"français") +LOCVAL(LOCALE_ICOUNTRY,"352") LOCVAL(LOCALE_SCOUNTRY,"Luxembourg") LOCVAL(LOCALE_SENGCOUNTRY,"Luxemburg") LOCVAL(LOCALE_SABBREVCTRYNAME,"LUX") LOCVAL(LOCALE_SNATIVECTRYNAME,"Luxembourg") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ @@ -72,31 +72,31 @@ LOCVAL(LOCALE_SABBREVDAYNAME6,"sam") LOCVAL(LOCALE_SABBREVDAYNAME7,"dim") LOCVAL(LOCALE_SMONTHNAME1,"janvier") -LOCVAL(LOCALE_SMONTHNAME2,"f€vrier") +LOCVAL(LOCALE_SMONTHNAME2,"février") LOCVAL(LOCALE_SMONTHNAME3,"mars") LOCVAL(LOCALE_SMONTHNAME4,"avril") LOCVAL(LOCALE_SMONTHNAME5,"mai") LOCVAL(LOCALE_SMONTHNAME6,"juin") LOCVAL(LOCALE_SMONTHNAME7,"juillet") -LOCVAL(LOCALE_SMONTHNAME8,"ao€t") +LOCVAL(LOCALE_SMONTHNAME8,"août") LOCVAL(LOCALE_SMONTHNAME9,"septembre") LOCVAL(LOCALE_SMONTHNAME10,"octobre") LOCVAL(LOCALE_SMONTHNAME11,"novembre") -LOCVAL(LOCALE_SMONTHNAME12,"d€cembre") +LOCVAL(LOCALE_SMONTHNAME12,"décembre") LOCVAL(LOCALE_SMONTHNAME13,"") LOCVAL(LOCALE_SABBREVMONTHNAME1,"janv") -LOCVAL(LOCALE_SABBREVMONTHNAME2,"f€vr") +LOCVAL(LOCALE_SABBREVMONTHNAME2,"févr") LOCVAL(LOCALE_SABBREVMONTHNAME3,"mars") LOCVAL(LOCALE_SABBREVMONTHNAME4,"avr") LOCVAL(LOCALE_SABBREVMONTHNAME5,"mai") LOCVAL(LOCALE_SABBREVMONTHNAME6,"juin") LOCVAL(LOCALE_SABBREVMONTHNAME7,"juil") -LOCVAL(LOCALE_SABBREVMONTHNAME8,"ao€t") +LOCVAL(LOCALE_SABBREVMONTHNAME8,"août") LOCVAL(LOCALE_SABBREVMONTHNAME9,"sept") LOCVAL(LOCALE_SABBREVMONTHNAME10,"oct") LOCVAL(LOCALE_SABBREVMONTHNAME11,"nov") -LOCVAL(LOCALE_SABBREVMONTHNAME12,"dec") +LOCVAL(LOCALE_SABBREVMONTHNAME12,"déc") LOCVAL(LOCALE_SABBREVMONTHNAME13,"") /* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ @@ -108,4 +108,4 @@ LOCVAL(LOCALE_SABBREVMONTHNAME13,"") /* LOCVAL(LOCALE_INEGSYMPRECEDES, "") */ /* LOCVAL(LOCALE_INEGSEPBYSPACE, "") */ -/* calendrier gr€gorien */ +/* calendrier grégorien */ diff --git a/ole/nls/frs.nls b/ole/nls/frs.nls index 9c794f0479a..a96a0205c9c 100644 --- a/ole/nls/frs.nls +++ b/ole/nls/frs.nls @@ -8,10 +8,10 @@ LOCVAL(LOCALE_SLANGUAGE,"Fran LOCVAL(LOCALE_SENGLANGUAGE,"French (Switzerland)") LOCVAL(LOCALE_SABBREVLANGNAME,"frs") LOCVAL(LOCALE_SNATIVELANGNAME,"Français (Suisse)") -/* LOCVAL(LOCALE_ICOUNTRY,"") */ +LOCVAL(LOCALE_ICOUNTRY,"41") LOCVAL(LOCALE_SCOUNTRY,"Suisse") LOCVAL(LOCALE_SENGCOUNTRY,"Switzerland") -LOCVAL(LOCALE_SABBREVCTRYNAME,"Ch") +/* LOCVAL(LOCALE_SABBREVCTRYNAME,"") */ LOCVAL(LOCALE_SNATIVECTRYNAME,"Suisse") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ diff --git a/ole/nls/grc.nls b/ole/nls/grc.nls index 11fd0666567..54f81aad051 100644 --- a/ole/nls/grc.nls +++ b/ole/nls/grc.nls @@ -1,6 +1,7 @@ /* * OLE2NLS library * Greek + * (Greek strings in iso-8859-7) */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ @@ -8,9 +9,9 @@ LOCVAL(LOCALE_SENGLANGUAGE,"Greek") LOCVAL(LOCALE_SABBREVLANGNAME,"grc") /* LOCVAL(LOCALE_SNATIVELANGNAME,"") */ -/* LOCVAL(LOCALE_ICOUNTRY,"") */ +LOCVAL(LOCALE_ICOUNTRY,"30") /* LOCVAL(LOCALE_SCOUNTRY,"") */ -/* LOCVAL(LOCALE_SENGCOUNTRY,"") */ +LOCVAL(LOCALE_SENGCOUNTRY,"Greece") /* LOCVAL(LOCALE_SABBREVCTRYNAME,"") */ /* LOCVAL(LOCALE_SNATIVECTRYNAME,"") */ /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ @@ -26,7 +27,7 @@ LOCVAL(LOCALE_SABBREVLANGNAME,"grc") /* LOCVAL(LOCALE_ILZERO,"1") */ /* LOCVAL(LOCALE_INEGNUMBER) */ LOCVAL(LOCALE_SNATIVEDIGITS, "0123456789") -/* LOCVAL(LOCALE_SCURRENCY,"") */ +LOCVAL(LOCALE_SCURRENCY,"äñ÷") LOCVAL(LOCALE_SINTLSYMBOL, "GRD") /* LOCVAL(LOCALE_SMONDECIMALSEP,",") */ /* LOCVAL(LOCALE_SMONTHOUSANDSEP,".") */ @@ -55,48 +56,48 @@ LOCVAL(LOCALE_SMONGROUPING, "3;0") /* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */ /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */ -/* LOCVAL(LOCALE_SDAYNAME1,"") */ -/* LOCVAL(LOCALE_SDAYNAME2,"") */ -/* LOCVAL(LOCALE_SDAYNAME3,"") */ -/* LOCVAL(LOCALE_SDAYNAME4,"") */ -/* LOCVAL(LOCALE_SDAYNAME5,"") */ -/* LOCVAL(LOCALE_SDAYNAME6,"") */ -/* LOCVAL(LOCALE_SDAYNAME7,"") */ +LOCVAL(LOCALE_SDAYNAME1,"ÄåõôÝñá") +LOCVAL(LOCALE_SDAYNAME2,"Ôñßôç") +LOCVAL(LOCALE_SDAYNAME3,"ÔåôÜñôç") +LOCVAL(LOCALE_SDAYNAME4,"ÐÝìðôç") +LOCVAL(LOCALE_SDAYNAME5,"ÐáñáóêåõÞ") +LOCVAL(LOCALE_SDAYNAME6,"ÓáââÜôï") +LOCVAL(LOCALE_SDAYNAME7,"Êõñéáêç") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"Ma") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"Ti") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"On") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"To") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"Fr") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"Lø") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"Sø") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"Äåõ") +LOCVAL(LOCALE_SABBREVDAYNAME2,"Ôñé") +LOCVAL(LOCALE_SABBREVDAYNAME3,"Ôåô") +LOCVAL(LOCALE_SABBREVDAYNAME4,"Ðåì") +LOCVAL(LOCALE_SABBREVDAYNAME5,"Ðáñ") +LOCVAL(LOCALE_SABBREVDAYNAME6,"Óáâ") +LOCVAL(LOCALE_SABBREVDAYNAME7,"Êõñ") -/* LOCVAL(LOCALE_SMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SMONTHNAME12,"") */ +LOCVAL(LOCALE_SMONTHNAME1,"ÉáíïÜñéïò") +LOCVAL(LOCALE_SMONTHNAME2,"ÖåâñïÜñéïò") +LOCVAL(LOCALE_SMONTHNAME3,"ÌÜñôéïò") +LOCVAL(LOCALE_SMONTHNAME4,"Áðñßëéïò") +LOCVAL(LOCALE_SMONTHNAME5,"ÌÜéïò") +LOCVAL(LOCALE_SMONTHNAME6,"Éïýíéïò") +LOCVAL(LOCALE_SMONTHNAME7,"Éïýëéïò") +LOCVAL(LOCALE_SMONTHNAME8,"Áýãïõóôïò") +LOCVAL(LOCALE_SMONTHNAME9,"ÓåðôÝìâñéïò") +LOCVAL(LOCALE_SMONTHNAME10,"Ïêôþâñéïò") +LOCVAL(LOCALE_SMONTHNAME11,"ÍïÝìâñéïò") +LOCVAL(LOCALE_SMONTHNAME12,"ÄåêÝìâñéïò") /* LOCVAL(LOCALE_SMONTHNAME13,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME12,"") */ +LOCVAL(LOCALE_SABBREVMONTHNAME1,"Éáí") +LOCVAL(LOCALE_SABBREVMONTHNAME2,"Öåâ") +LOCVAL(LOCALE_SABBREVMONTHNAME3,"ÌÜñ") +LOCVAL(LOCALE_SABBREVMONTHNAME4,"Áðñ") +LOCVAL(LOCALE_SABBREVMONTHNAME5,"ÌÜé") +LOCVAL(LOCALE_SABBREVMONTHNAME6,"Éïýí") +LOCVAL(LOCALE_SABBREVMONTHNAME7,"Éïýë") +LOCVAL(LOCALE_SABBREVMONTHNAME8,"Áýã") +LOCVAL(LOCALE_SABBREVMONTHNAME9,"Óåð") +LOCVAL(LOCALE_SABBREVMONTHNAME10,"Ïêô") +LOCVAL(LOCALE_SABBREVMONTHNAME11,"ÍïÝ") +LOCVAL(LOCALE_SABBREVMONTHNAME12,"Äåê") /* LOCVAL(LOCALE_SABBREVMONTHNAME13,"") */ /* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ diff --git a/ole/nls/hrv.nls b/ole/nls/hrv.nls index 36d4314660d..b9f42e85986 100644 --- a/ole/nls/hrv.nls +++ b/ole/nls/hrv.nls @@ -1,6 +1,7 @@ /* * OLE2NLS library * Croatia + * (Croatian strings in iso-8859-2) */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ @@ -11,7 +12,7 @@ LOCVAL(LOCALE_SNATIVELANGNAME,"hrvatski") /* LOCVAL(LOCALE_ICOUNTRY,"") */ /* LOCVAL(LOCALE_SCOUNTRY,"") */ LOCVAL(LOCALE_SENGCOUNTRY,"Croatia") -/* LOCVAL(LOCALE_SABBREVCTRYNAME,"HRV") +LOCVAL(LOCALE_SABBREVCTRYNAME,"HRV") LOCVAL(LOCALE_SNATIVECTRYNAME,"Hrvatska") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ @@ -55,49 +56,48 @@ LOCVAL(LOCALE_SMONGROUPING,"3;0") /* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */ /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */ -/* LOCVAL(LOCALE_SDAYNAME1,"ponedj") */ -/* LOCVAL(LOCALE_SDAYNAME2,"eljak") */ -/* LOCVAL(LOCALE_SDAYNAME3,"utorak") */ -/* LOCVAL(LOCALE_SDAYNAME4,"srijeda") */ -/* LOCVAL(LOCALE_SDAYNAME5,"etvrtak") */ -/* LOCVAL(LOCALE_SDAYNAME6,"petak") */ -/* LOCVAL(LOCALE_SDAYNAME7,"subota") */ -/* LOCVAL(LOCALE_SDAYNAME?,"nedjelja") */ +LOCVAL(LOCALE_SDAYNAME1,"ponedeljak") +LOCVAL(LOCALE_SDAYNAME2,"utorak") +LOCVAL(LOCALE_SDAYNAME3,"sreda") +LOCVAL(LOCALE_SDAYNAME4,"èetvrtak") +LOCVAL(LOCALE_SDAYNAME5,"petak") +LOCVAL(LOCALE_SDAYNAME6,"subota") +LOCVAL(LOCALE_SDAYNAME7,"nedelja") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"pon") +LOCVAL(LOCALE_SABBREVDAYNAME2,"tor") +LOCVAL(LOCALE_SABBREVDAYNAME3,"sre") +LOCVAL(LOCALE_SABBREVDAYNAME4,"èet") +LOCVAL(LOCALE_SABBREVDAYNAME5,"pet") +LOCVAL(LOCALE_SABBREVDAYNAME6,"sub") +LOCVAL(LOCALE_SABBREVDAYNAME7,"ned") -LOCVAL(LOCALE_SMONTHNAME1,"sije?anj") -LOCVAL(LOCALE_SMONTHNAME2,"velja") -LOCVAL(LOCALE_SMONTHNAME3,"o?ujak") -LOCVAL(LOCALE_SMONTHNAME4,"travanj") -LOCVAL(LOCALE_SMONTHNAME5,"svibanj") -LOCVAL(LOCALE_SMONTHNAME6,"lipanj") -LOCVAL(LOCALE_SMONTHNAME7,"srpanj") -LOCVAL(LOCALE_SMONTHNAME7,"kolovoz") -LOCVAL(LOCALE_SMONTHNAME9,"rujan") -LOCVAL(LOCALE_SMONTHNAME10,"listopad") -LOCVAL(LOCALE_SMONTHNAME11,"studeni") -LOCVAL(LOCALE_SMONTHNAME12,"prosinac") +LOCVAL(LOCALE_SMONTHNAME1,"januar") +LOCVAL(LOCALE_SMONTHNAME2,"februar") +LOCVAL(LOCALE_SMONTHNAME3,"mart") +LOCVAL(LOCALE_SMONTHNAME4,"april") +LOCVAL(LOCALE_SMONTHNAME5,"maj") +LOCVAL(LOCALE_SMONTHNAME6,"jun") +LOCVAL(LOCALE_SMONTHNAME7,"jul") +LOCVAL(LOCALE_SMONTHNAME7,"august") +LOCVAL(LOCALE_SMONTHNAME9,"septembar") +LOCVAL(LOCALE_SMONTHNAME10,"oktobar") +LOCVAL(LOCALE_SMONTHNAME11,"novembar") +LOCVAL(LOCALE_SMONTHNAME12,"decembar") LOCVAL(LOCALE_SMONTHNAME12,"") -LOCVAL(LOCALE_SABBREVMONTHNAME1,"sij") -LOCVAL(LOCALE_SABBREVMONTHNAME2,"vel") -LOCVAL(LOCALE_SABBREVMONTHNAME3,"o?u") -LOCVAL(LOCALE_SABBREVMONTHNAME4,"tra") -LOCVAL(LOCALE_SABBREVMONTHNAME5,"svi") -LOCVAL(LOCALE_SABBREVMONTHNAME6,"lip") -LOCVAL(LOCALE_SABBREVMONTHNAME7,"srp") -LOCVAL(LOCALE_SABBREVMONTHNAME8,"kol") -LOCVAL(LOCALE_SABBREVMONTHNAME9,"ruj") -LOCVAL(LOCALE_SABBREVMONTHNAME10,"lis") -LOCVAL(LOCALE_SABBREVMONTHNAME11,"stu") -LOCVAL(LOCALE_SABBREVMONTHNAME12,"pro") +LOCVAL(LOCALE_SABBREVMONTHNAME1,"jan") +LOCVAL(LOCALE_SABBREVMONTHNAME2,"feb") +LOCVAL(LOCALE_SABBREVMONTHNAME3,"mar") +LOCVAL(LOCALE_SABBREVMONTHNAME4,"apr") +LOCVAL(LOCALE_SABBREVMONTHNAME5,"maj") +LOCVAL(LOCALE_SABBREVMONTHNAME6,"jun") +LOCVAL(LOCALE_SABBREVMONTHNAME7,"jul") +LOCVAL(LOCALE_SABBREVMONTHNAME8,"aug") +LOCVAL(LOCALE_SABBREVMONTHNAME9,"sep") +LOCVAL(LOCALE_SABBREVMONTHNAME10,"okt") +LOCVAL(LOCALE_SABBREVMONTHNAME11,"nov") +LOCVAL(LOCALE_SABBREVMONTHNAME12,"dec") LOCVAL(LOCALE_SABBREVMONTHNAME13,"") /* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ diff --git a/ole/nls/hun.nls b/ole/nls/hun.nls index 7db35f0496f..9bec0b726cb 100644 --- a/ole/nls/hun.nls +++ b/ole/nls/hun.nls @@ -1,6 +1,7 @@ /* * OLE2NLS library * Hungarian + * (Hungarian strings in iso-8859-2) */ LOCVAL(LOCALE_ILANGUAGE,"9") diff --git a/ole/nls/irl.nls b/ole/nls/irl.nls index cf96e6fd414..f7b1266f46a 100644 --- a/ole/nls/irl.nls +++ b/ole/nls/irl.nls @@ -8,13 +8,13 @@ LOCVAL(LOCALE_SLANGUAGE, "English") LOCVAL(LOCALE_SENGLANGUAGE, "English") LOCVAL(LOCALE_SABBREVLANGNAME, "irl") LOCVAL(LOCALE_SNATIVELANGNAME, "English") -LOCVAL(LOCALE_ICOUNTRY, "1") +LOCVAL(LOCALE_ICOUNTRY, "353") LOCVAL(LOCALE_SCOUNTRY, "Ireland") LOCVAL(LOCALE_SENGCOUNTRY, "Ireland") LOCVAL(LOCALE_SABBREVCTRYNAME, "IRL") LOCVAL(LOCALE_SNATIVECTRYNAME, "Eire") LOCVAL(LOCALE_IDEFAULTLANGUAGE, "0409") -LOCVAL(LOCALE_IDEFAULTCOUNTRY, "1") +LOCVAL(LOCALE_IDEFAULTCOUNTRY, "353") LOCVAL(LOCALE_IDEFAULTCODEPAGE, "437") LOCVAL(LOCALE_IDEFAULTANSICODEPAGE, "1252") LOCVAL(LOCALE_SLIST, ",") @@ -108,4 +108,4 @@ LOCVAL(LOCALE_IPOSSEPBYSPACE, "0") LOCVAL(LOCALE_INEGSYMPRECEDES, "1") LOCVAL(LOCALE_INEGSEPBYSPACE, "0") -/* Gregorian Calendar */ \ No newline at end of file +/* Gregorian Calendar */ diff --git a/ole/nls/isl.nls b/ole/nls/isl.nls index ca7a579ac58..2c7562058a7 100644 --- a/ole/nls/isl.nls +++ b/ole/nls/isl.nls @@ -1,20 +1,21 @@ /* * OLE2NLS library * Iceland + * (Icelandic strings in iso-8859-1) */ LOCVAL(LOCALE_ILANGUAGE,"9") -LOCVAL(LOCALE_SLANGUAGE,"€slensk") +LOCVAL(LOCALE_SLANGUAGE,"Íslensk") LOCVAL(LOCALE_SENGLANGUAGE,"Icelandic") LOCVAL(LOCALE_SABBREVLANGNAME,"isl") -LOCVAL(LOCALE_SNATIVELANGNAME,"€slenska") -/* LOCVAL(LOCALE_ICOUNTRY,"49") */ -LOCVAL(LOCALE_SCOUNTRY,"€sland") +LOCVAL(LOCALE_SNATIVELANGNAME,"Íslenska") +LOCVAL(LOCALE_ICOUNTRY,"354") +LOCVAL(LOCALE_SCOUNTRY,"Ísland") LOCVAL(LOCALE_SENGCOUNTRY,"Iceland") LOCVAL(LOCALE_SABBREVCTRYNAME,"Is") -LOCVAL(LOCALE_SNATIVECTRYNAME,"€sland") +LOCVAL(LOCALE_SNATIVECTRYNAME,"Ísland") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9") */ -/* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"40") */ +LOCVAL(LOCALE_IDEFAULTCOUNTRY,"354") /* LOCVAL(LOCALE_IDEFAULTCODEPAGE,"851") */ /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ LOCVAL(LOCALE_SLIST,";") @@ -55,47 +56,47 @@ LOCVAL(LOCALE_ITLZERO,"1") /* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */ /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */ -LOCVAL(LOCALE_SDAYNAME1,"m€nudagur") -LOCVAL(LOCALE_SDAYNAME2,"?hridjudagur") -LOCVAL(LOCALE_SDAYNAME3,"mi?vikudagur") +LOCVAL(LOCALE_SDAYNAME1,"mánudagur") +LOCVAL(LOCALE_SDAYNAME2,"þriðjudagur") +LOCVAL(LOCALE_SDAYNAME3,"miðvikudagur") LOCVAL(LOCALE_SDAYNAME4,"fimmtudagur") -LOCVAL(LOCALE_SDAYNAME5,"f€studagur") +LOCVAL(LOCALE_SDAYNAME5,"föstudagur") LOCVAL(LOCALE_SDAYNAME6,"laugardagur") LOCVAL(LOCALE_SDAYNAME7,"sunnudagur") -LOCVAL(LOCALE_SABBREVDAYNAME1,"m€n") -LOCVAL(LOCALE_SABBREVDAYNAME2,"?ri") -LOCVAL(LOCALE_SABBREVDAYNAME3,"mi?") +LOCVAL(LOCALE_SABBREVDAYNAME1,"mán") +LOCVAL(LOCALE_SABBREVDAYNAME2,"þri") +LOCVAL(LOCALE_SABBREVDAYNAME3,"mið") LOCVAL(LOCALE_SABBREVDAYNAME4,"fim") -LOCVAL(LOCALE_SABBREVDAYNAME5,"f€s") +LOCVAL(LOCALE_SABBREVDAYNAME5,"fös") LOCVAL(LOCALE_SABBREVDAYNAME6,"lau") LOCVAL(LOCALE_SABBREVDAYNAME7,"sun") -LOCVAL(LOCALE_SMONTHNAME1,"jan€ar") -LOCVAL(LOCALE_SMONTHNAME2,"febr€ar") +LOCVAL(LOCALE_SMONTHNAME1,"janúar") +LOCVAL(LOCALE_SMONTHNAME2,"febrúar") LOCVAL(LOCALE_SMONTHNAME3,"mars") LOCVAL(LOCALE_SMONTHNAME4,"april") -LOCVAL(LOCALE_SMONTHNAME5,"ma€") -LOCVAL(LOCALE_SMONTHNAME6,"j€n€") -LOCVAL(LOCALE_SMONTHNAME7,"j€l€") -LOCVAL(LOCALE_SMONTHNAME8,"€gst") +LOCVAL(LOCALE_SMONTHNAME5,"maí") +LOCVAL(LOCALE_SMONTHNAME6,"júní") +LOCVAL(LOCALE_SMONTHNAME7,"júlí") +LOCVAL(LOCALE_SMONTHNAME8,"ágúst") LOCVAL(LOCALE_SMONTHNAME9,"september") -LOCVAL(LOCALE_SMONTHNAME10,"okt€ber") -LOCVAL(LOCALE_SMONTHNAME11,"november") +LOCVAL(LOCALE_SMONTHNAME10,"október") +LOCVAL(LOCALE_SMONTHNAME11,"nóvember") LOCVAL(LOCALE_SMONTHNAME12,"desember") LOCVAL(LOCALE_SMONTHNAME13,"") LOCVAL(LOCALE_SABBREVMONTHNAME1,"jan") LOCVAL(LOCALE_SABBREVMONTHNAME2,"feb") -LOCVAL(LOCALE_SABBREVMONTHNAME3,"mär") +LOCVAL(LOCALE_SABBREVMONTHNAME3,"mar") LOCVAL(LOCALE_SABBREVMONTHNAME4,"apr") -LOCVAL(LOCALE_SABBREVMONTHNAME5,"ma€") -LOCVAL(LOCALE_SABBREVMONTHNAME6,"j€n") -LOCVAL(LOCALE_SABBREVMONTHNAME7,"j€l") -LOCVAL(LOCALE_SABBREVMONTHNAME8,"€g€") +LOCVAL(LOCALE_SABBREVMONTHNAME5,"maí") +LOCVAL(LOCALE_SABBREVMONTHNAME6,"jún") +LOCVAL(LOCALE_SABBREVMONTHNAME7,"júl") +LOCVAL(LOCALE_SABBREVMONTHNAME8,"ágú") LOCVAL(LOCALE_SABBREVMONTHNAME9,"sep") LOCVAL(LOCALE_SABBREVMONTHNAME10,"okt") -LOCVAL(LOCALE_SABBREVMONTHNAME11,"n€v") +LOCVAL(LOCALE_SABBREVMONTHNAME11,"nóv") LOCVAL(LOCALE_SABBREVMONTHNAME12,"des") LOCVAL(LOCALE_SABBREVMONTHNAME13,"") diff --git a/ole/nls/ita.nls b/ole/nls/ita.nls index 282a85790f6..c878be3cfc1 100644 --- a/ole/nls/ita.nls +++ b/ole/nls/ita.nls @@ -15,7 +15,7 @@ LOCVAL(LOCALE_SABBREVCTRYNAME,"ITL") LOCVAL(LOCALE_SNATIVECTRYNAME,"Italia") LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9") LOCVAL(LOCALE_IDEFAULTCOUNTRY,"39") -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ LOCVAL(LOCALE_SLIST,";") LOCVAL(LOCALE_IMEASURE,"0") @@ -55,11 +55,11 @@ LOCVAL(LOCALE_ITLZERO,"1") /* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */ /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */ -LOCVAL(LOCALE_SDAYNAME1,"Lunedi'") -LOCVAL(LOCALE_SDAYNAME2,"Martedi'") -LOCVAL(LOCALE_SDAYNAME3,"Mercoledi'") -LOCVAL(LOCALE_SDAYNAME4,"Giovedi'") -LOCVAL(LOCALE_SDAYNAME5,"Venerdi'") +LOCVAL(LOCALE_SDAYNAME1,"Lunedì") +LOCVAL(LOCALE_SDAYNAME2,"Martedì") +LOCVAL(LOCALE_SDAYNAME3,"Mercoledì") +LOCVAL(LOCALE_SDAYNAME4,"Giovedì") +LOCVAL(LOCALE_SDAYNAME5,"Venerdì") LOCVAL(LOCALE_SDAYNAME6,"Sabato") LOCVAL(LOCALE_SDAYNAME7,"Domenica") diff --git a/ole/nls/its.nls b/ole/nls/its.nls index 8c4b3fb7ae4..764dcfd4dbd 100644 --- a/ole/nls/its.nls +++ b/ole/nls/its.nls @@ -15,7 +15,7 @@ LOCVAL(LOCALE_SABBREVCTRYNAME,"CHE") LOCVAL(LOCALE_SNATIVECTRYNAME,"Svizzera") LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9") LOCVAL(LOCALE_IDEFAULTCOUNTRY,"41") -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) /* +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ LOCVAL(LOCALE_SLIST,";") LOCVAL(LOCALE_IMEASURE,"0") @@ -55,11 +55,11 @@ LOCVAL(LOCALE_ITLZERO,"1") /* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */ /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */ -LOCVAL(LOCALE_SDAYNAME1,"lunedi'") -LOCVAL(LOCALE_SDAYNAME2,"martedi'") -LOCVAL(LOCALE_SDAYNAME3,"mercoledi'") -LOCVAL(LOCALE_SDAYNAME4,"giovedi'") -LOCVAL(LOCALE_SDAYNAME5,"venerdi'") +LOCVAL(LOCALE_SDAYNAME1,"lunedì") +LOCVAL(LOCALE_SDAYNAME2,"martedì") +LOCVAL(LOCALE_SDAYNAME3,"mercoledì") +LOCVAL(LOCALE_SDAYNAME4,"giovedì") +LOCVAL(LOCALE_SDAYNAME5,"venerdì") LOCVAL(LOCALE_SDAYNAME6,"sabato") LOCVAL(LOCALE_SDAYNAME7,"domenica") diff --git a/ole/nls/jpn.nls b/ole/nls/jpn.nls index 941cf813a4d..0226808f076 100644 --- a/ole/nls/jpn.nls +++ b/ole/nls/jpn.nls @@ -1,20 +1,21 @@ /* * OLE2NLS library * Japanese + * (Japanese strings in EUC-JP) */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -/* LOCVAL(LOCALE_SLANGUAGE,"") */ +LOCVAL(LOCALE_SLANGUAGE,"ÆüËܸì") LOCVAL(LOCALE_SENGLANGUAGE,"Japanese") LOCVAL(LOCALE_SABBREVLANGNAME,"jpn") -/* LOCVAL(LOCALE_SNATIVELANGNAME,"") */ -/* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ +LOCVAL(LOCALE_SNATIVELANGNAME,"ÆüËܸì") +LOCVAL(LOCALE_ICOUNTRY,"81") +LOCVAL(LOCALE_SCOUNTRY,"ÆüËÜ") LOCVAL(LOCALE_SENGCOUNTRY,"Japan") LOCVAL(LOCALE_SABBREVCTRYNAME,"JPN") -/* LOCVAL(LOCALE_SNATIVECTRYNAME,"") */ +LOCVAL(LOCALE_SNATIVECTRYNAME,"ÆüËÜ") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ -/* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ +LOCVAL(LOCALE_IDEFAULTCOUNTRY,"81") /* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ @@ -26,7 +27,7 @@ LOCVAL(LOCALE_SGROUPING,"3;0") /* LOCVAL(LOCALE_ILZERO,"1") */ /* LOCVAL(LOCALE_INEGNUMBER) */ LOCVAL(LOCALE_SNATIVEDIGITS,"0123456789") -/* LOCVAL(LOCALE_SCURRENCY,"") */ +LOCVAL(LOCALE_SCURRENCY,"±ß") LOCVAL(LOCALE_SINTLSYMBOL, "JPY") /* LOCVAL(LOCALE_SMONDECIMALSEP,",") */ /* LOCVAL(LOCALE_SMONTHOUSANDSEP,".") */ @@ -37,8 +38,8 @@ LOCVAL(LOCALE_SINTLSYMBOL, "JPY") /* LOCVAL(LOCALE_INEGCURR,"8") */ /* LOCVAL(LOCALE_SDATE,".") */ /* LOCVAL(LOCALE_STIME,":") */ -/* LOCVAL(LOCALE_SSHORTDATE,"dd/MM-yyyy") */ -/* LOCVAL(LOCALE_SLONGDATE,"ddd, d. MMMM yyyy") */ +LOCVAL(LOCALE_SSHORTDATE,"yyyy.MM.dd") +LOCVAL(LOCALE_SLONGDATE,"yyyyǯMMMMd.Æü¤Îddd") /* LOCVAL(LOCALE_STIMEFORMAT) */ /* LOCVAL(LOCALE_IDATE,"1") */ /* LOCVAL(LOCALE_ILDATE) */ @@ -55,48 +56,48 @@ LOCVAL(LOCALE_SINTLSYMBOL, "JPY") /* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */ /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */ -/* LOCVAL(LOCALE_SDAYNAME1,"") */ -/* LOCVAL(LOCALE_SDAYNAME2,"") */ -/* LOCVAL(LOCALE_SDAYNAME3,"") */ -/* LOCVAL(LOCALE_SDAYNAME4,"") */ -/* LOCVAL(LOCALE_SDAYNAME5,"") */ -/* LOCVAL(LOCALE_SDAYNAME6,"") */ -/* LOCVAL(LOCALE_SDAYNAME7,"") */ +LOCVAL(LOCALE_SDAYNAME1,"·îÍËÆü") +LOCVAL(LOCALE_SDAYNAME2,"²ÐÍËÆü") +LOCVAL(LOCALE_SDAYNAME3,"¿åÍËÆü") +LOCVAL(LOCALE_SDAYNAME4,"ÌÚÍËÆü") +LOCVAL(LOCALE_SDAYNAME5,"¶âÍËÆü") +LOCVAL(LOCALE_SDAYNAME6,"ÅÚÍËÆü") +LOCVAL(LOCALE_SDAYNAME7,"ÆüÍËÆü") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"·î") +LOCVAL(LOCALE_SABBREVDAYNAME2,"²Ð") +LOCVAL(LOCALE_SABBREVDAYNAME3,"¿å") +LOCVAL(LOCALE_SABBREVDAYNAME4,"ÌÚ") +LOCVAL(LOCALE_SABBREVDAYNAME5,"¶â") +LOCVAL(LOCALE_SABBREVDAYNAME6,"ÅÚ") +LOCVAL(LOCALE_SABBREVDAYNAME7,"Æü") -/* LOCVAL(LOCALE_SMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SMONTHNAME12,"") */ +LOCVAL(LOCALE_SMONTHNAME1,"°ì·î") +LOCVAL(LOCALE_SMONTHNAME2,"Æó·î") +LOCVAL(LOCALE_SMONTHNAME3,"»°·î") +LOCVAL(LOCALE_SMONTHNAME4,"»Í·î") +LOCVAL(LOCALE_SMONTHNAME5,"¸Þ·î") +LOCVAL(LOCALE_SMONTHNAME6,"Ï»·î") +LOCVAL(LOCALE_SMONTHNAME7,"¼··î") +LOCVAL(LOCALE_SMONTHNAME8,"Ȭ·î") +LOCVAL(LOCALE_SMONTHNAME9,"¶å·î") +LOCVAL(LOCALE_SMONTHNAME10,"½½·î") +LOCVAL(LOCALE_SMONTHNAME11,"½½°ì·î") +LOCVAL(LOCALE_SMONTHNAME12,"½½Æó·î") /* LOCVAL(LOCALE_SMONTHNAME13,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME12,"") */ +LOCVAL(LOCALE_SABBREVMONTHNAME1,"1·î") +LOCVAL(LOCALE_SABBREVMONTHNAME2,"2·î") +LOCVAL(LOCALE_SABBREVMONTHNAME3,"3·î") +LOCVAL(LOCALE_SABBREVMONTHNAME4,"4·î") +LOCVAL(LOCALE_SABBREVMONTHNAME5,"5·î") +LOCVAL(LOCALE_SABBREVMONTHNAME6,"6·î") +LOCVAL(LOCALE_SABBREVMONTHNAME7,"7·î") +LOCVAL(LOCALE_SABBREVMONTHNAME8,"8·î") +LOCVAL(LOCALE_SABBREVMONTHNAME9,"9·î") +LOCVAL(LOCALE_SABBREVMONTHNAME10,"10·î") +LOCVAL(LOCALE_SABBREVMONTHNAME11,"11·î") +LOCVAL(LOCALE_SABBREVMONTHNAME12,"12·î") /* LOCVAL(LOCALE_SABBREVMONTHNAME13,"") */ /* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ diff --git a/ole/nls/lth.nls b/ole/nls/lth.nls index 051c1413256..aaf5aebdbaf 100644 --- a/ole/nls/lth.nls +++ b/ole/nls/lth.nls @@ -1,16 +1,17 @@ /* * OLE2NLS library * Lithuanian + * (Lithuanian strings in BALTIC charset) */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ /* LOCVAL(LOCALE_SLANGUAGE,"") */ -/* LOCVAL(LOCALE_SENGLANGUAGE,"") */ +LOCVAL(LOCALE_SENGLANGUAGE,"Lithuanian") LOCVAL(LOCALE_SABBREVLANGNAME,"lth") /* LOCVAL(LOCALE_SNATIVELANGNAME,"") */ /* LOCVAL(LOCALE_ICOUNTRY,"") */ /* LOCVAL(LOCALE_SCOUNTRY,"") */ -/* LOCVAL(LOCALE_SENGCOUNTRY,"") */ +LOCVAL(LOCALE_SENGCOUNTRY,"Lithuania") /* LOCVAL(LOCALE_SABBREVCTRYNAME,"") */ /* LOCVAL(LOCALE_SNATIVECTRYNAME,"") */ /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ @@ -26,10 +27,10 @@ LOCVAL(LOCALE_SABBREVLANGNAME,"lth") /* LOCVAL(LOCALE_ILZERO,"1") */ /* LOCVAL(LOCALE_INEGNUMBER) */ /* LOCVAL(LOCALE_SNATIVEDIGITS) */ -/* LOCVAL(LOCALE_SCURRENCY,"") */ -/* LOCVAL(LOCALE_SINTLSYMBOL) */ -/* LOCVAL(LOCALE_SMONDECIMALSEP,",") */ -/* LOCVAL(LOCALE_SMONTHOUSANDSEP,".") */ +LOCVAL(LOCALE_SCURRENCY,"Lt") +LOCVAL(LOCALE_SINTLSYMBOL,"LTL") +LOCVAL(LOCALE_SMONDECIMALSEP,",") +LOCVAL(LOCALE_SMONTHOUSANDSEP,".") /* LOCVAL(LOCALE_SMONGROUPING) */ /* LOCVAL(LOCALE_ICURRDIGITS,"2") */ /* LOCVAL(LOCALE_IINTLCURRDIGITS) */ @@ -55,48 +56,48 @@ LOCVAL(LOCALE_SABBREVLANGNAME,"lth") /* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */ /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */ -/* LOCVAL(LOCALE_SDAYNAME1,"") */ -/* LOCVAL(LOCALE_SDAYNAME2,"") */ -/* LOCVAL(LOCALE_SDAYNAME3,"") */ -/* LOCVAL(LOCALE_SDAYNAME4,"") */ -/* LOCVAL(LOCALE_SDAYNAME5,"") */ -/* LOCVAL(LOCALE_SDAYNAME6,"") */ -/* LOCVAL(LOCALE_SDAYNAME7,"") */ +LOCVAL(LOCALE_SDAYNAME1,"Pirmadienis") +LOCVAL(LOCALE_SDAYNAME2,"Antradienis") +LOCVAL(LOCALE_SDAYNAME3,"Treçiadienis") +LOCVAL(LOCALE_SDAYNAME4,"Ketvirtadienis") +LOCVAL(LOCALE_SDAYNAME5,"Penktadienis") +LOCVAL(LOCALE_SDAYNAME6,"Ùeùtadienis") +LOCVAL(LOCALE_SDAYNAME7,"Sekmadienis") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"Pr") +LOCVAL(LOCALE_SABBREVDAYNAME2,"An") +LOCVAL(LOCALE_SABBREVDAYNAME3,"Tr") +LOCVAL(LOCALE_SABBREVDAYNAME4,"Kt") +LOCVAL(LOCALE_SABBREVDAYNAME5,"Pn") +LOCVAL(LOCALE_SABBREVDAYNAME6,"Ùt") +LOCVAL(LOCALE_SABBREVDAYNAME7,"Sk") -/* LOCVAL(LOCALE_SMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SMONTHNAME12,"") */ +LOCVAL(LOCALE_SMONTHNAME1,"sausio") +LOCVAL(LOCALE_SMONTHNAME2,"vasario") +LOCVAL(LOCALE_SMONTHNAME3,"kovo") +LOCVAL(LOCALE_SMONTHNAME4,"balandêio") +LOCVAL(LOCALE_SMONTHNAME5,"geguêás") +LOCVAL(LOCALE_SMONTHNAME6,"birêelio") +LOCVAL(LOCALE_SMONTHNAME7,"liepos") +LOCVAL(LOCALE_SMONTHNAME8,"rugpjûçio") +LOCVAL(LOCALE_SMONTHNAME9,"rugséio") +LOCVAL(LOCALE_SMONTHNAME10,"spalio") +LOCVAL(LOCALE_SMONTHNAME11,"lapkriçio") +LOCVAL(LOCALE_SMONTHNAME12,"gruodêio") /* LOCVAL(LOCALE_SMONTHNAME13,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME12,"") */ +LOCVAL(LOCALE_SABBREVMONTHNAME1,"Sau") +LOCVAL(LOCALE_SABBREVMONTHNAME2,"Vas") +LOCVAL(LOCALE_SABBREVMONTHNAME3,"Kov") +LOCVAL(LOCALE_SABBREVMONTHNAME4,"Bal") +LOCVAL(LOCALE_SABBREVMONTHNAME5,"Geg") +LOCVAL(LOCALE_SABBREVMONTHNAME6,"Bir") +LOCVAL(LOCALE_SABBREVMONTHNAME7,"Lie") +LOCVAL(LOCALE_SABBREVMONTHNAME8,"Rgp") +LOCVAL(LOCALE_SABBREVMONTHNAME9,"Rgs") +LOCVAL(LOCALE_SABBREVMONTHNAME10,"Spa") +LOCVAL(LOCALE_SABBREVMONTHNAME11,"Lap") +LOCVAL(LOCALE_SABBREVMONTHNAME12,"Grd") /* LOCVAL(LOCALE_SABBREVMONTHNAME13,"") */ /* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ diff --git a/ole/nls/lvi.nls b/ole/nls/lvi.nls index 67863c7c6e4..3a0a1b60ffc 100644 --- a/ole/nls/lvi.nls +++ b/ole/nls/lvi.nls @@ -1,16 +1,17 @@ /* * OLE2NLS library * Latvia + * (Latvian strings in BALTIC charset) */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ /* LOCVAL(LOCALE_SLANGUAGE,"") */ -/* LOCVAL(LOCALE_SENGLANGUAGE,"") */ +LOCVAL(LOCALE_SENGLANGUAGE,"Latvian") LOCVAL(LOCALE_SABBREVLANGNAME,"lvi") /* LOCVAL(LOCALE_SNATIVELANGNAME,"") */ /* LOCVAL(LOCALE_ICOUNTRY,"") */ /* LOCVAL(LOCALE_SCOUNTRY,"") */ -/* LOCVAL(LOCALE_SENGCOUNTRY,"") */ +LOCVAL(LOCALE_SENGCOUNTRY,"Latvia") /* LOCVAL(LOCALE_SABBREVCTRYNAME,"") */ /* LOCVAL(LOCALE_SNATIVECTRYNAME,"") */ /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ @@ -26,8 +27,8 @@ LOCVAL(LOCALE_SABBREVLANGNAME,"lvi") /* LOCVAL(LOCALE_ILZERO,"1") */ /* LOCVAL(LOCALE_INEGNUMBER) */ /* LOCVAL(LOCALE_SNATIVEDIGITS) */ -/* LOCVAL(LOCALE_SCURRENCY,"") */ -/* LOCVAL(LOCALE_SINTLSYMBOL) */ +LOCVAL(LOCALE_SCURRENCY,"Ls") +LOCVAL(LOCALE_SINTLSYMBOL,"LVL") /* LOCVAL(LOCALE_SMONDECIMALSEP,",") */ /* LOCVAL(LOCALE_SMONTHOUSANDSEP,".") */ /* LOCVAL(LOCALE_SMONGROUPING) */ @@ -55,48 +56,48 @@ LOCVAL(LOCALE_SABBREVLANGNAME,"lvi") /* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */ /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */ -/* LOCVAL(LOCALE_SDAYNAME1,"") */ -/* LOCVAL(LOCALE_SDAYNAME2,"") */ -/* LOCVAL(LOCALE_SDAYNAME3,"") */ -/* LOCVAL(LOCALE_SDAYNAME4,"") */ -/* LOCVAL(LOCALE_SDAYNAME5,"") */ -/* LOCVAL(LOCALE_SDAYNAME6,"") */ -/* LOCVAL(LOCALE_SDAYNAME7,"") */ +LOCVAL(LOCALE_SDAYNAME1,"pirmdiena") +LOCVAL(LOCALE_SDAYNAME2,"otrdiena") +LOCVAL(LOCALE_SDAYNAME3,"treùdiena") +LOCVAL(LOCALE_SDAYNAME4,"ceturtdiena") +LOCVAL(LOCALE_SDAYNAME5,"piektdiena") +LOCVAL(LOCALE_SDAYNAME6,"sestdiena") +LOCVAL(LOCALE_SDAYNAME7,"svìtdiena") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"P ") +LOCVAL(LOCALE_SABBREVDAYNAME2,"O ") +LOCVAL(LOCALE_SABBREVDAYNAME3,"T ") +LOCVAL(LOCALE_SABBREVDAYNAME4,"C ") +LOCVAL(LOCALE_SABBREVDAYNAME5,"P ") +LOCVAL(LOCALE_SABBREVDAYNAME6,"S ") +LOCVAL(LOCALE_SABBREVDAYNAME7,"Sv") -/* LOCVAL(LOCALE_SMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SMONTHNAME12,"") */ +LOCVAL(LOCALE_SMONTHNAME1,"janvâris") +LOCVAL(LOCALE_SMONTHNAME2,"februâris") +LOCVAL(LOCALE_SMONTHNAME3,"marts") +LOCVAL(LOCALE_SMONTHNAME4,"aprîlis") +LOCVAL(LOCALE_SMONTHNAME5,"maijs") +LOCVAL(LOCALE_SMONTHNAME6,"jûlijs") +LOCVAL(LOCALE_SMONTHNAME7,"jûnijs") +LOCVAL(LOCALE_SMONTHNAME8,"augusts") +LOCVAL(LOCALE_SMONTHNAME9,"septembris") +LOCVAL(LOCALE_SMONTHNAME10,"oktobris") +LOCVAL(LOCALE_SMONTHNAME11,"novembris") +LOCVAL(LOCALE_SMONTHNAME12,"decembris") /* LOCVAL(LOCALE_SMONTHNAME13,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME12,"") */ +LOCVAL(LOCALE_SABBREVMONTHNAME1,"jan") +LOCVAL(LOCALE_SABBREVMONTHNAME2,"feb") +LOCVAL(LOCALE_SABBREVMONTHNAME3,"mar") +LOCVAL(LOCALE_SABBREVMONTHNAME4,"apr") +LOCVAL(LOCALE_SABBREVMONTHNAME5,"mai") +LOCVAL(LOCALE_SABBREVMONTHNAME6,"jûn") +LOCVAL(LOCALE_SABBREVMONTHNAME7,"jûl") +LOCVAL(LOCALE_SABBREVMONTHNAME8,"aug") +LOCVAL(LOCALE_SABBREVMONTHNAME9,"sep") +LOCVAL(LOCALE_SABBREVMONTHNAME10,"okt") +LOCVAL(LOCALE_SABBREVMONTHNAME11,"nov") +LOCVAL(LOCALE_SABBREVMONTHNAME12,"dec") /* LOCVAL(LOCALE_SABBREVMONTHNAME13,"") */ /* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ diff --git a/ole/nls/nlb.nls b/ole/nls/nlb.nls index f99805956b5..10f9393fb04 100644 --- a/ole/nls/nlb.nls +++ b/ole/nls/nlb.nls @@ -4,18 +4,18 @@ */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -/* LOCVAL(LOCALE_SLANGUAGE,"") */ +LOCVAL(LOCALE_SLANGUAGE,"Nederlands") LOCVAL(LOCALE_SENGLANGUAGE,"Dutch") LOCVAL(LOCALE_SABBREVLANGNAME,"nlb") LOCVAL(LOCALE_SNATIVELANGNAME,"Nederlands") -/* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ +LOCVAL(LOCALE_ICOUNTRY,"32") +LOCVAL(LOCALE_SCOUNTRY,"België") LOCVAL(LOCALE_SENGCOUNTRY,"Belgium") LOCVAL(LOCALE_SABBREVCTRYNAME,"BEL") -/* LOCVAL(LOCALE_SNATIVECTRYNAME,"Belgi") */ +LOCVAL(LOCALE_SNATIVECTRYNAME,"België") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ -/* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCOUNTRY,"32") +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ @@ -28,8 +28,8 @@ LOCVAL(LOCALE_SABBREVCTRYNAME,"BEL") LOCVAL(LOCALE_SNATIVEDIGITS,"0123456789") LOCVAL(LOCALE_SCURRENCY,"BF") LOCVAL(LOCALE_SINTLSYMBOL,"BEF") -/* LOCVAL(LOCALE_SMONDECIMALSEP,",") */ -/* LOCVAL(LOCALE_SMONTHOUSANDSEP,".") */ +LOCVAL(LOCALE_SMONDECIMALSEP,",") +LOCVAL(LOCALE_SMONTHOUSANDSEP,".") LOCVAL(LOCALE_SMONGROUPING,"3;0") /* LOCVAL(LOCALE_ICURRDIGITS,"2") */ /* LOCVAL(LOCALE_IINTLCURRDIGITS) */ diff --git a/ole/nls/nld.nls b/ole/nls/nld.nls index a701df3c4bd..109c6454cbd 100644 --- a/ole/nls/nld.nls +++ b/ole/nls/nld.nls @@ -4,18 +4,18 @@ */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -/* LOCVAL(LOCALE_SLANGUAGE,"") */ +LOCVAL(LOCALE_SLANGUAGE,"Nederlands") LOCVAL(LOCALE_SENGLANGUAGE,"Dutch") LOCVAL(LOCALE_SABBREVLANGNAME,"nld") LOCVAL(LOCALE_SNATIVELANGNAME,"Nederlands") -/* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ +LOCVAL(LOCALE_ICOUNTRY,"31") +LOCVAL(LOCALE_SCOUNTRY,"Nederland") LOCVAL(LOCALE_SENGCOUNTRY,"Netherlands") LOCVAL(LOCALE_SABBREVCTRYNAME,"NLD") LOCVAL(LOCALE_SNATIVECTRYNAME,"Nederland") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ -/* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCOUNTRY,"31") +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ diff --git a/ole/nls/nls.nls b/ole/nls/nls.nls index bbd56cd9e78..6da7b87ccdc 100644 --- a/ole/nls/nls.nls +++ b/ole/nls/nls.nls @@ -1,6 +1,6 @@ /* * OLE2NLS library - * Dutch + * Dutch (Surinam ?) */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ @@ -15,7 +15,7 @@ LOCVAL(LOCALE_SABBREVLANGNAME,"nls") /* LOCVAL(LOCALE_SNATIVECTRYNAME,"") */ /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ diff --git a/ole/nls/non.nls b/ole/nls/non.nls index c6ab9152f4b..8b41d64292e 100644 --- a/ole/nls/non.nls +++ b/ole/nls/non.nls @@ -8,14 +8,14 @@ LOCVAL(LOCALE_SLANGUAGE,"Norwegian (Nynorsk)") LOCVAL(LOCALE_SENGLANGUAGE,"Norwegian") LOCVAL(LOCALE_SABBREVLANGNAME,"non") LOCVAL(LOCALE_SNATIVELANGNAME,"nynorsk") -/* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ +LOCVAL(LOCALE_ICOUNTRY,"47") +/ LOCVAL(LOCALE_SCOUNTRY,"") */ LOCVAL(LOCALE_SENGCOUNTRY,"Norway") LOCVAL(LOCALE_SABBREVCTRYNAME,"NOR") LOCVAL(LOCALE_SNATIVECTRYNAME,"Noreg") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ -/* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCOUNTRY,"47") +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ @@ -26,8 +26,8 @@ LOCVAL(LOCALE_SNATIVECTRYNAME,"Noreg") /* LOCVAL(LOCALE_ILZERO,"1") */ /* LOCVAL(LOCALE_INEGNUMBER) */ LOCVAL(LOCALE_SNATIVEDIGITS,"0123456789") -/* LOCVAL(LOCALE_SCURRENCY,"kr") */ -/* LOCVAL(LOCALE_SINTLSYMBOL,"NOK") */ +LOCVAL(LOCALE_SCURRENCY,"kr") +LOCVAL(LOCALE_SINTLSYMBOL,"NOK") /* LOCVAL(LOCALE_SMONDECIMALSEP,",") */ /* LOCVAL(LOCALE_SMONTHOUSANDSEP,".") */ LOCVAL(LOCALE_SMONGROUPING,"3;0") diff --git a/ole/nls/nor.nls b/ole/nls/nor.nls index 2727ae6bf6c..49256488553 100644 --- a/ole/nls/nor.nls +++ b/ole/nls/nor.nls @@ -1,21 +1,22 @@ /* * OLE2NLS library - * Norway (Bokm?l) + * Norway (Bokmael) + * (Norwegian strings in iso-8859-1) */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -/* LOCVAL(LOCALE_SLANGUAGE,"Norwegian (Bokm?l)") */ -/* LOCVAL(LOCALE_SENGLANGUAGE,"Norwegian") */ +LOCVAL(LOCALE_SLANGUAGE,"Norsk (Bokmæl)") +LOCVAL(LOCALE_SENGLANGUAGE,"Norwegian (Bokmael)") LOCVAL(LOCALE_SABBREVLANGNAME,"nor") -LOCVAL(LOCALE_SNATIVELANGNAME,"bokm?l") -/* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ +LOCVAL(LOCALE_SNATIVELANGNAME,"bokmæl") +LOCVAL(LOCALE_ICOUNTRY,"47") +LOCVAL(LOCALE_SCOUNTRY,"Norge") LOCVAL(LOCALE_SENGCOUNTRY,"Norway") LOCVAL(LOCALE_SABBREVCTRYNAME,"NOR") LOCVAL(LOCALE_SNATIVECTRYNAME,"Norge") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ -/* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCOUNTRY,"47") +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ @@ -60,16 +61,16 @@ LOCVAL(LOCALE_SDAYNAME2,"tirsdag") LOCVAL(LOCALE_SDAYNAME3,"onsdag") LOCVAL(LOCALE_SDAYNAME4,"torsdag") LOCVAL(LOCALE_SDAYNAME5,"fredag") -LOCVAL(LOCALE_SDAYNAME6,"l?rdag") -LOCVAL(LOCALE_SDAYNAME7,"s?ndag") +LOCVAL(LOCALE_SDAYNAME6,"lørdag") +LOCVAL(LOCALE_SDAYNAME7,"søndag") LOCVAL(LOCALE_SABBREVDAYNAME1,"ma") LOCVAL(LOCALE_SABBREVDAYNAME2,"ti") LOCVAL(LOCALE_SABBREVDAYNAME3,"on") LOCVAL(LOCALE_SABBREVDAYNAME4,"to") LOCVAL(LOCALE_SABBREVDAYNAME5,"fr") -LOCVAL(LOCALE_SABBREVDAYNAME6,"l?") -LOCVAL(LOCALE_SABBREVDAYNAME7,"s?") +LOCVAL(LOCALE_SABBREVDAYNAME6,"lø") +LOCVAL(LOCALE_SABBREVDAYNAME7,"sø") LOCVAL(LOCALE_SMONTHNAME1,"januar") LOCVAL(LOCALE_SMONTHNAME2,"februar") diff --git a/ole/nls/plk.nls b/ole/nls/plk.nls index 5d861847d4d..9ce6f288010 100644 --- a/ole/nls/plk.nls +++ b/ole/nls/plk.nls @@ -1,6 +1,7 @@ /* * OLE2NLS library * Poland + * (Polish strings in iso-8859-2) */ LOCVAL(LOCALE_ILANGUAGE,"9") @@ -27,7 +28,7 @@ LOCVAL(LOCALE_ILZERO,"1") /* LOCVAL(LOCALE_INEGNUMBER) */ LOCVAL(LOCALE_SNATIVEDIGITS,"0123456789") LOCVAL(LOCALE_SCURRENCY,"z\xB3") -/* LOCVAL(LOCALE_SINTLSYMBOL) */ +LOCVAL(LOCALE_SINTLSYMBOL,"PLZ") /* LOCVAL(LOCALE_SMONDECIMALSEP) */ /* LOCVAL(LOCALE_SMONTHOUSANDSEP) */ LOCVAL(LOCALE_SMONGROUPING,"3;0") @@ -57,9 +58,9 @@ LOCVAL(LOCALE_ITLZERO,"1") LOCVAL(LOCALE_SDAYNAME1,"Poniedzia\263ek") LOCVAL(LOCALE_SDAYNAME2,"Wtorek") -LOCVAL(LOCALE_SDAYNAME3,"Sroda") +LOCVAL(LOCALE_SDAYNAME3,"¦roda") LOCVAL(LOCALE_SDAYNAME4,"Czwartek") -LOCVAL(LOCALE_SDAYNAME5,"Pi\xB9tek") +LOCVAL(LOCALE_SDAYNAME5,"Pi±tek") LOCVAL(LOCALE_SDAYNAME6,"Sobota") LOCVAL(LOCALE_SDAYNAME7,"Niedziela") @@ -80,7 +81,7 @@ LOCVAL(LOCALE_SMONTHNAME6,"Czerwiec") LOCVAL(LOCALE_SMONTHNAME7,"Lipiec") LOCVAL(LOCALE_SMONTHNAME8,"Sierpie\xF1") LOCVAL(LOCALE_SMONTHNAME9,"Wrzesie\xF1") -LOCVAL(LOCALE_SMONTHNAME10,"Pa\237dziernik") +LOCVAL(LOCALE_SMONTHNAME10,"Pa¼dziernik") LOCVAL(LOCALE_SMONTHNAME11,"Listapad") LOCVAL(LOCALE_SMONTHNAME12,"Grudzie\xF1") LOCVAL(LOCALE_SMONTHNAME13,"") @@ -94,7 +95,7 @@ LOCVAL(LOCALE_SABBREVMONTHNAME6,"Cze") LOCVAL(LOCALE_SABBREVMONTHNAME7,"Lip") LOCVAL(LOCALE_SABBREVMONTHNAME8,"Sie") LOCVAL(LOCALE_SABBREVMONTHNAME9,"Wrz") -LOCVAL(LOCALE_SABBREVMONTHNAME10,"Pa\x9F") +LOCVAL(LOCALE_SABBREVMONTHNAME10,"Pa¼") LOCVAL(LOCALE_SABBREVMONTHNAME11,"Lis") LOCVAL(LOCALE_SABBREVMONTHNAME12,"Gru") LOCVAL(LOCALE_SABBREVMONTHNAME13,"") diff --git a/ole/nls/ptb.nls b/ole/nls/ptb.nls index d9ffc3aa9a3..899116ce410 100644 --- a/ole/nls/ptb.nls +++ b/ole/nls/ptb.nls @@ -8,13 +8,13 @@ LOCVAL(LOCALE_SLANGUAGE, "Portugu\352s (Brasil)") LOCVAL(LOCALE_SENGLANGUAGE, "Protuguese") LOCVAL(LOCALE_SABBREVLANGNAME, "ptb") LOCVAL(LOCALE_SNATIVELANGNAME, "Portugu\352s") -LOCVAL(LOCALE_ICOUNTRY, "1") +LOCVAL(LOCALE_ICOUNTRY, "55") LOCVAL(LOCALE_SCOUNTRY, "Brasil") LOCVAL(LOCALE_SENGCOUNTRY, "Brazil") LOCVAL(LOCALE_SABBREVCTRYNAME, "BRA") LOCVAL(LOCALE_SNATIVECTRYNAME, "Brasil") LOCVAL(LOCALE_IDEFAULTLANGUAGE, "0409") -LOCVAL(LOCALE_IDEFAULTCOUNTRY, "1") +LOCVAL(LOCALE_IDEFAULTCOUNTRY, "55") LOCVAL(LOCALE_IDEFAULTCODEPAGE, "850") LOCVAL(LOCALE_IDEFAULTANSICODEPAGE, "1252") LOCVAL(LOCALE_SLIST, ";") diff --git a/ole/nls/ptg.nls b/ole/nls/ptg.nls index 9dfd6c88499..98fa2e27e80 100644 --- a/ole/nls/ptg.nls +++ b/ole/nls/ptg.nls @@ -8,13 +8,13 @@ LOCVAL(LOCALE_SLANGUAGE, "Portugu\352s") LOCVAL(LOCALE_SENGLANGUAGE, "Protuguese") LOCVAL(LOCALE_SABBREVLANGNAME, "ptg") LOCVAL(LOCALE_SNATIVELANGNAME, "Portugu\352s") -LOCVAL(LOCALE_ICOUNTRY, "1") +LOCVAL(LOCALE_ICOUNTRY, "351") LOCVAL(LOCALE_SCOUNTRY, "Portugal") LOCVAL(LOCALE_SENGCOUNTRY, "Portugal") LOCVAL(LOCALE_SABBREVCTRYNAME, "PTG") LOCVAL(LOCALE_SNATIVECTRYNAME, "Portugal") LOCVAL(LOCALE_IDEFAULTLANGUAGE, "0409") -LOCVAL(LOCALE_IDEFAULTCOUNTRY, "1") +LOCVAL(LOCALE_IDEFAULTCOUNTRY, "351") LOCVAL(LOCALE_IDEFAULTCODEPAGE, "850") LOCVAL(LOCALE_IDEFAULTANSICODEPAGE, "1252") LOCVAL(LOCALE_SLIST, ";") diff --git a/ole/nls/rom.nls b/ole/nls/rom.nls index 85c13a73245..a85d2cb9f86 100644 --- a/ole/nls/rom.nls +++ b/ole/nls/rom.nls @@ -1,20 +1,21 @@ /* * OLE2NLS library * Romania + * (Romanian strings in iso-8859-2) */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ /* LOCVAL(LOCALE_SLANGUAGE,"") */ -/* LOCVAL(LOCALE_SENGLANGUAGE,"Romanian") */ +LOCVAL(LOCALE_SENGLANGUAGE,"Romanian") LOCVAL(LOCALE_SABBREVLANGNAME,"rom") /* LOCVAL(LOCALE_SNATIVELANGNAME,"") */ -/* LOCVAL(LOCALE_ICOUNTRY,"") */ +LOCVAL(LOCALE_ICOUNTRY,"40") /* LOCVAL(LOCALE_SCOUNTRY,"") */ LOCVAL(LOCALE_SENGCOUNTRY,"Romania") LOCVAL(LOCALE_SABBREVCTRYNAME,"ROM") /* LOCVAL(LOCALE_SNATIVECTRYNAME,"") */ /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ -/* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ +LOCVAL(LOCALE_IDEFAULTCOUNTRY,"40") /* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ @@ -27,7 +28,7 @@ LOCVAL(LOCALE_SABBREVCTRYNAME,"ROM") /* LOCVAL(LOCALE_INEGNUMBER) */ LOCVAL(LOCALE_SNATIVEDIGITS,"0123456789") LOCVAL(LOCALE_SCURRENCY,"LEI") -LOCVAL(LOCALE_SINTLSYMBOL,"ROL) +LOCVAL(LOCALE_SINTLSYMBOL,"ROL") /* LOCVAL(LOCALE_SMONDECIMALSEP,",") */ /* LOCVAL(LOCALE_SMONTHOUSANDSEP,".") */ LOCVAL(LOCALE_SMONGROUPING,"3;0") @@ -56,25 +57,25 @@ LOCVAL(LOCALE_SMONGROUPING,"3;0") /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */ LOCVAL(LOCALE_SDAYNAME1,"luni") -LOCVAL(LOCALE_SDAYNAME2,"marci") +LOCVAL(LOCALE_SDAYNAME2,"marþi") LOCVAL(LOCALE_SDAYNAME3,"miercuri") LOCVAL(LOCALE_SDAYNAME4,"joi") LOCVAL(LOCALE_SDAYNAME5,"vineri") -LOCVAL(LOCALE_SDAYNAME6,"s?mb?t") -LOCVAL(LOCALE_SDAYNAME7,"duminic?") +LOCVAL(LOCALE_SDAYNAME6,"sîmbãtã") +LOCVAL(LOCALE_SDAYNAME7,"duminicã") -LOCVAL(LOCALE_SABBREVDAYNAME1,"L?") +LOCVAL(LOCALE_SABBREVDAYNAME1,"L ") LOCVAL(LOCALE_SABBREVDAYNAME2,"Ma") LOCVAL(LOCALE_SABBREVDAYNAME3,"Mi") -LOCVAL(LOCALE_SABBREVDAYNAME4,"J?") -LOCVAL(LOCALE_SABBREVDAYNAME5,"V?") -LOCVAL(LOCALE_SABBREVDAYNAME6,"S?") -LOCVAL(LOCALE_SABBREVDAYNAME7,"D?") +LOCVAL(LOCALE_SABBREVDAYNAME4,"J ") +LOCVAL(LOCALE_SABBREVDAYNAME5,"V ") +LOCVAL(LOCALE_SABBREVDAYNAME6,"S ") +LOCVAL(LOCALE_SABBREVDAYNAME7,"D ") LOCVAL(LOCALE_SMONTHNAME1,"ianuarie") LOCVAL(LOCALE_SMONTHNAME2,"februarie") LOCVAL(LOCALE_SMONTHNAME3,"martie") -LOCVAL(LOCALE_SMONTHNAME4,"arpilie") +LOCVAL(LOCALE_SMONTHNAME4,"aprilie") LOCVAL(LOCALE_SMONTHNAME5,"mai") LOCVAL(LOCALE_SMONTHNAME6,"iunie") LOCVAL(LOCALE_SMONTHNAME7,"iulie") diff --git a/ole/nls/rus.nls b/ole/nls/rus.nls index 63fb68588eb..d5c2f636d96 100644 --- a/ole/nls/rus.nls +++ b/ole/nls/rus.nls @@ -1,6 +1,7 @@ /* * OLE2NLS library * Russia + * (russian strings in koi8-r) */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ @@ -9,10 +10,10 @@ LOCVAL(LOCALE_SENGLANGUAGE,"Russian") LOCVAL(LOCALE_SABBREVLANGNAME,"rus") /* LOCVAL(LOCALE_SNATIVELANGNAME,"") */ /* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ +LOCVAL(LOCALE_SCOUNTRY,"òÏÓÓÉÊÑ") LOCVAL(LOCALE_SENGCOUNTRY,"Russia") -/* LOCVAL(LOCALE_SABBREVCTRYNAME,"") */ -/* LOCVAL(LOCALE_SNATIVECTRYNAME,"") */ +LOCVAL(LOCALE_SABBREVCTRYNAME,"RUS") +LOCVAL(LOCALE_SNATIVECTRYNAME,"òÏÓÓÉÊÑ") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ /* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ @@ -26,7 +27,7 @@ LOCVAL(LOCALE_SENGCOUNTRY,"Russia") /* LOCVAL(LOCALE_ILZERO,"1") */ /* LOCVAL(LOCALE_INEGNUMBER) */ LOCVAL(LOCALE_SNATIVEDIGITS,"0123456789") -/* LOCVAL(LOCALE_SCURRENCY,"") */ +LOCVAL(LOCALE_SCURRENCY,"ÒÕÂ") LOCVAL(LOCALE_SINTLSYMBOL,"RUR") /* LOCVAL(LOCALE_SMONDECIMALSEP,",") */ /* LOCVAL(LOCALE_SMONTHOUSANDSEP,".") */ @@ -55,52 +56,52 @@ LOCVAL(LOCALE_SMONGROUPING,"3;0") /* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */ /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */ -/* LOCVAL(LOCALE_SDAYNAME1,"") */ -/* LOCVAL(LOCALE_SDAYNAME2,"") */ -/* LOCVAL(LOCALE_SDAYNAME3,"") */ -/* LOCVAL(LOCALE_SDAYNAME4,"") */ -/* LOCVAL(LOCALE_SDAYNAME5,"") */ -/* LOCVAL(LOCALE_SDAYNAME6,"") */ -/* LOCVAL(LOCALE_SDAYNAME7,"") */ +LOCVAL(LOCALE_SDAYNAME1,"ðÏÎÅÄÅÌØÎÉË") +LOCVAL(LOCALE_SDAYNAME2,"÷ÔÏÒÎÉË") +LOCVAL(LOCALE_SDAYNAME3,"óÒÅÄÁ") +LOCVAL(LOCALE_SDAYNAME4,"þÅÔ×ÅÒÇ") +LOCVAL(LOCALE_SDAYNAME5,"ðÑÔÎÉÃÁ") +LOCVAL(LOCALE_SDAYNAME6,"óÕÂÂÏÔÁ") +LOCVAL(LOCALE_SDAYNAME7,"÷ÏÓËÒÅÓÅÎØÅ") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"ðÎÄ") +LOCVAL(LOCALE_SABBREVDAYNAME2,"÷ÔÒ") +LOCVAL(LOCALE_SABBREVDAYNAME3,"ãÒÄ") +LOCVAL(LOCALE_SABBREVDAYNAME4,"þÔ×") +LOCVAL(LOCALE_SABBREVDAYNAME5,"ðÔÎ") +LOCVAL(LOCALE_SABBREVDAYNAME6,"óÕÂ") +LOCVAL(LOCALE_SABBREVDAYNAME7,"÷ÓË") -/* LOCVAL(LOCALE_SMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SMONTHNAME12,"") */ -/* LOCVAL(LOCALE_SMONTHNAME13,"") */ +LOCVAL(LOCALE_SMONTHNAME1,"ñÎ×ÁÒÑ") +LOCVAL(LOCALE_SMONTHNAME2,"æÅ×ÒÁÌÑ") +LOCVAL(LOCALE_SMONTHNAME3,"íÁÒÔ") +LOCVAL(LOCALE_SMONTHNAME4,"áÐÒÅÌÑ") +LOCVAL(LOCALE_SMONTHNAME5,"íÁÊ") +LOCVAL(LOCALE_SMONTHNAME6,"éÀÎÑ") +LOCVAL(LOCALE_SMONTHNAME7,"éÀÌÑ") +LOCVAL(LOCALE_SMONTHNAME8,"á×ÇÕÓÔÁ") +LOCVAL(LOCALE_SMONTHNAME9,"óÅÎÔÑÂÒÑ") +LOCVAL(LOCALE_SMONTHNAME10,"ïËÔÑÂÒÑ") +LOCVAL(LOCALE_SMONTHNAME11,"îÏÑÂÒÑ") +LOCVAL(LOCALE_SMONTHNAME12,"äÅËÁÂÒÑ") +LOCVAL(LOCALE_SMONTHNAME13,"") -/* LOCVAL(LOCALE_SABBREVMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME12,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME13,"") */ +LOCVAL(LOCALE_SABBREVMONTHNAME1,"ñÎ×") +LOCVAL(LOCALE_SABBREVMONTHNAME2,"æÅ×") +LOCVAL(LOCALE_SABBREVMONTHNAME3,"íÁÒ") +LOCVAL(LOCALE_SABBREVMONTHNAME4,"áÐÒ") +LOCVAL(LOCALE_SABBREVMONTHNAME5,"íÁÊ") +LOCVAL(LOCALE_SABBREVMONTHNAME6,"éÀÎ") +LOCVAL(LOCALE_SABBREVMONTHNAME7,"éÀÌ") +LOCVAL(LOCALE_SABBREVMONTHNAME8,"á×Ç") +LOCVAL(LOCALE_SABBREVMONTHNAME9,"óÅÎ") +LOCVAL(LOCALE_SABBREVMONTHNAME10,"ïËÔ") +LOCVAL(LOCALE_SABBREVMONTHNAME11,"îÏÑ") +LOCVAL(LOCALE_SABBREVMONTHNAME12,"äÅË") +LOCVAL(LOCALE_SABBREVMONTHNAME13,"") -/* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ -/* LOCVAL(LOCALE_SNEGATIVESIGN, "") */ +LOCVAL(LOCALE_SPOSITIVESIGN, "") +LOCVAL(LOCALE_SNEGATIVESIGN, "-") /* LOCVAL(LOCALE_IPOSSIGNPOSN, "") */ /* LOCVAL(LOCALE_INEGSIGNPOSN, "") */ /* LOCVAL(LOCALE_IPOSSYMPRECEDES, "") */ @@ -108,3 +109,4 @@ LOCVAL(LOCALE_SMONGROUPING,"3;0") /* LOCVAL(LOCALE_INEGSYMPRECEDES, "") */ /* LOCVAL(LOCALE_INEGSEPBYSPACE, "") */ +/* calendario gregoriano */ diff --git a/ole/nls/sky.nls b/ole/nls/sky.nls index d6f9d88a12b..90f7e0568c7 100644 --- a/ole/nls/sky.nls +++ b/ole/nls/sky.nls @@ -1,21 +1,22 @@ /* * OLE2NLS library * Slovakia + * (Slovakian strings in iso-8859-2) */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ -/* LOCVAL(LOCALE_SLANGUAGE,"") */ -/* LOCVAL(LOCALE_SENGLANGUAGE,"") */ +LOCVAL(LOCALE_SLANGUAGE,"Slovenèina") +LOCVAL(LOCALE_SENGLANGUAGE,"Slovak") LOCVAL(LOCALE_SABBREVLANGNAME,"sky") -/* LOCVAL(LOCALE_SNATIVELANGNAME,"") */ +LOCVAL(LOCALE_SNATIVELANGNAME,"Slovenský jazyk") /* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ -/* LOCVAL(LOCALE_SENGCOUNTRY,"") */ +LOCVAL(LOCALE_SCOUNTRY,"Slovensko") +LOCVAL(LOCALE_SENGCOUNTRY,"Slovakia") /* LOCVAL(LOCALE_SABBREVCTRYNAME,"") */ -/* LOCVAL(LOCALE_SNATIVECTRYNAME,"") */ +LOCVAL(LOCALE_SNATIVECTRYNAME,"Slovenská Republika") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"895") /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ /* LOCVAL(LOCALE_SLIST,"") */ /* LOCVAL(LOCALE_IMEASURE,"") */ diff --git a/ole/nls/slv.nls b/ole/nls/slv.nls index 6fcd1c0669e..dba39d96f50 100644 --- a/ole/nls/slv.nls +++ b/ole/nls/slv.nls @@ -1,16 +1,17 @@ /* * OLE2NLS library * Slovenia + * (Slovenian strings in iso-8859-2) */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ /* LOCVAL(LOCALE_SLANGUAGE,"") */ -/* LOCVAL(LOCALE_SENGLANGUAGE,"") */ +LOCVAL(LOCALE_SENGLANGUAGE,"Slovenian") LOCVAL(LOCALE_SABBREVLANGNAME,"slv") /* LOCVAL(LOCALE_SNATIVELANGNAME,"") */ /* LOCVAL(LOCALE_ICOUNTRY,"") */ /* LOCVAL(LOCALE_SCOUNTRY,"") */ -/* LOCVAL(LOCALE_SENGCOUNTRY,"") */ +LOCVAL(LOCALE_SENGCOUNTRY,"Slovenia") /* LOCVAL(LOCALE_SABBREVCTRYNAME,"") */ /* LOCVAL(LOCALE_SNATIVECTRYNAME,"") */ /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ @@ -55,52 +56,52 @@ LOCVAL(LOCALE_SABBREVLANGNAME,"slv") /* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */ /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */ -/* LOCVAL(LOCALE_SDAYNAME1,"") */ -/* LOCVAL(LOCALE_SDAYNAME2,"") */ -/* LOCVAL(LOCALE_SDAYNAME3,"") */ -/* LOCVAL(LOCALE_SDAYNAME4,"") */ -/* LOCVAL(LOCALE_SDAYNAME5,"") */ -/* LOCVAL(LOCALE_SDAYNAME6,"") */ -/* LOCVAL(LOCALE_SDAYNAME7,"") */ +LOCVAL(LOCALE_SDAYNAME1,"ponedeljek") +LOCVAL(LOCALE_SDAYNAME2,"torek") +LOCVAL(LOCALE_SDAYNAME3,"sreda") +LOCVAL(LOCALE_SDAYNAME4,"èetrtek") +LOCVAL(LOCALE_SDAYNAME5,"petek") +LOCVAL(LOCALE_SDAYNAME6,"sobota") +LOCVAL(LOCALE_SDAYNAME7,"nedelja") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"pon") +LOCVAL(LOCALE_SABBREVDAYNAME2,"tor") +LOCVAL(LOCALE_SABBREVDAYNAME3,"sre") +LOCVAL(LOCALE_SABBREVDAYNAME4,"èet") +LOCVAL(LOCALE_SABBREVDAYNAME5,"pet") +LOCVAL(LOCALE_SABBREVDAYNAME6,"sob") +LOCVAL(LOCALE_SABBREVDAYNAME7,"ned") -/* LOCVAL(LOCALE_SMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SMONTHNAME12,"") */ -/* LOCVAL(LOCALE_SMONTHNAME13,"") */ +LOCVAL(LOCALE_SMONTHNAME1,"januar") +LOCVAL(LOCALE_SMONTHNAME2,"februar") +LOCVAL(LOCALE_SMONTHNAME3,"marec") +LOCVAL(LOCALE_SMONTHNAME4,"april") +LOCVAL(LOCALE_SMONTHNAME5,"maj") +LOCVAL(LOCALE_SMONTHNAME6,"juni") +LOCVAL(LOCALE_SMONTHNAME7,"juli") +LOCVAL(LOCALE_SMONTHNAME8,"avgust") +LOCVAL(LOCALE_SMONTHNAME9,"september") +LOCVAL(LOCALE_SMONTHNAME10,"oktober") +LOCVAL(LOCALE_SMONTHNAME11,"november") +LOCVAL(LOCALE_SMONTHNAME12,"december") +LOCVAL(LOCALE_SMONTHNAME13,"") -/* LOCVAL(LOCALE_SABBREVMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME12,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME13,"") */ +LOCVAL(LOCALE_SABBREVMONTHNAME1,"jan") +LOCVAL(LOCALE_SABBREVMONTHNAME2,"feb") +LOCVAL(LOCALE_SABBREVMONTHNAME3,"mar") +LOCVAL(LOCALE_SABBREVMONTHNAME4,"apr") +LOCVAL(LOCALE_SABBREVMONTHNAME5,"maj") +LOCVAL(LOCALE_SABBREVMONTHNAME6,"jun") +LOCVAL(LOCALE_SABBREVMONTHNAME7,"jul") +LOCVAL(LOCALE_SABBREVMONTHNAME8,"avg") +LOCVAL(LOCALE_SABBREVMONTHNAME9,"sep") +LOCVAL(LOCALE_SABBREVMONTHNAME10,"okt") +LOCVAL(LOCALE_SABBREVMONTHNAME11,"nov") +LOCVAL(LOCALE_SABBREVMONTHNAME12,"dec") +LOCVAL(LOCALE_SABBREVMONTHNAME13,"") -/* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ -/* LOCVAL(LOCALE_SNEGATIVESIGN, "") */ +LOCVAL(LOCALE_SPOSITIVESIGN, "") +LOCVAL(LOCALE_SNEGATIVESIGN, "-") /* LOCVAL(LOCALE_IPOSSIGNPOSN, "") */ /* LOCVAL(LOCALE_INEGSIGNPOSN, "") */ /* LOCVAL(LOCALE_IPOSSYMPRECEDES, "") */ @@ -108,3 +109,4 @@ LOCVAL(LOCALE_SABBREVLANGNAME,"slv") /* LOCVAL(LOCALE_INEGSYMPRECEDES, "") */ /* LOCVAL(LOCALE_INEGSEPBYSPACE, "") */ +/* calendario gregoriano */ diff --git a/ole/nls/sve.nls b/ole/nls/sve.nls index 7e0051d9b44..c0767301738 100644 --- a/ole/nls/sve.nls +++ b/ole/nls/sve.nls @@ -15,8 +15,8 @@ LOCVAL(LOCALE_SABBREVCTRYNAME,"SVE") LOCVAL(LOCALE_SNATIVECTRYNAME,"Sverige") LOCVAL(LOCALE_IDEFAULTLANGUAGE,"1d") LOCVAL(LOCALE_IDEFAULTCOUNTRY,"45") -/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ -/* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */ +LOCVAL(LOCALE_IDEFAULTCODEPAGE,"850") +LOCVAL(LOCALE_IDEFAULTANSICODEPAGE,"1252") LOCVAL(LOCALE_SLIST,";") LOCVAL(LOCALE_IMEASURE,"0") LOCVAL(LOCALE_SDECIMAL,",") @@ -27,7 +27,7 @@ LOCVAL(LOCALE_ILZERO,"1") /* LOCVAL(LOCALE_INEGNUMBER) */ LOCVAL(LOCALE_SNATIVEDIGITS, "0123456789") LOCVAL(LOCALE_SCURRENCY,"kr") -/* LOCVAL(LOCALE_SINTLSYMBOL) */ +LOCVAL(LOCALE_SINTLSYMBOL,"SEK") LOCVAL(LOCALE_SMONDECIMALSEP,",") LOCVAL(LOCALE_SMONTHOUSANDSEP,".") /* LOCVAL(LOCALE_SMONGROUPING) */ diff --git a/ole/nls/trk.nls b/ole/nls/trk.nls index d90462b14ea..c1cecedde95 100644 --- a/ole/nls/trk.nls +++ b/ole/nls/trk.nls @@ -1,18 +1,19 @@ /* * OLE2NLS library * Turkey + * (Turkish strings in iso-8859-9) */ /* LOCVAL(LOCALE_ILANGUAGE,"") */ /* LOCVAL(LOCALE_SLANGUAGE,"") */ -/* LOCVAL(LOCALE_SENGLANGUAGE,"") */ +LOCVAL(LOCALE_SENGLANGUAGE,"Turkish") LOCVAL(LOCALE_SABBREVLANGNAME,"trk") /* LOCVAL(LOCALE_SNATIVELANGNAME,"") */ /* LOCVAL(LOCALE_ICOUNTRY,"") */ -/* LOCVAL(LOCALE_SCOUNTRY,"") */ -/* LOCVAL(LOCALE_SENGCOUNTRY,"") */ +LOCVAL(LOCALE_SCOUNTRY,"Türkiye") +LOCVAL(LOCALE_SENGCOUNTRY,"Turkey") /* LOCVAL(LOCALE_SABBREVCTRYNAME,"") */ -/* LOCVAL(LOCALE_SNATIVECTRYNAME,"") */ +LOCVAL(LOCALE_SNATIVECTRYNAME,"Türkiye") /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ /* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"") */ /* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */ @@ -26,8 +27,8 @@ LOCVAL(LOCALE_SABBREVLANGNAME,"trk") /* LOCVAL(LOCALE_ILZERO,"1") */ /* LOCVAL(LOCALE_INEGNUMBER) */ /* LOCVAL(LOCALE_SNATIVEDIGITS) */ -/* LOCVAL(LOCALE_SCURRENCY,"") */ -/* LOCVAL(LOCALE_SINTLSYMBOL) */ +LOCVAL(LOCALE_SCURRENCY,"TL") +LOCVAL(LOCALE_SINTLSYMBOL,"TRL") /* LOCVAL(LOCALE_SMONDECIMALSEP,",") */ /* LOCVAL(LOCALE_SMONTHOUSANDSEP,".") */ /* LOCVAL(LOCALE_SMONGROUPING) */ @@ -55,52 +56,52 @@ LOCVAL(LOCALE_SABBREVLANGNAME,"trk") /* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */ /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */ -/* LOCVAL(LOCALE_SDAYNAME1,"") */ -/* LOCVAL(LOCALE_SDAYNAME2,"") */ -/* LOCVAL(LOCALE_SDAYNAME3,"") */ -/* LOCVAL(LOCALE_SDAYNAME4,"") */ -/* LOCVAL(LOCALE_SDAYNAME5,"") */ -/* LOCVAL(LOCALE_SDAYNAME6,"") */ -/* LOCVAL(LOCALE_SDAYNAME7,"") */ +LOCVAL(LOCALE_SDAYNAME1,"Pazartesi") +LOCVAL(LOCALE_SDAYNAME2,"Salý") +LOCVAL(LOCALE_SDAYNAME3,"Çarþamba") +LOCVAL(LOCALE_SDAYNAME4,"Perþembe") +LOCVAL(LOCALE_SDAYNAME5,"Cuma") +LOCVAL(LOCALE_SDAYNAME6,"Cumartesi") +LOCVAL(LOCALE_SDAYNAME7,"Pazar") -/* LOCVAL(LOCALE_SABBREVDAYNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVDAYNAME7,"") */ +LOCVAL(LOCALE_SABBREVDAYNAME1,"Pzt") +LOCVAL(LOCALE_SABBREVDAYNAME2,"Sal") +LOCVAL(LOCALE_SABBREVDAYNAME3,"Çrþ") +LOCVAL(LOCALE_SABBREVDAYNAME4,"Prþ") +LOCVAL(LOCALE_SABBREVDAYNAME5,"Cum") +LOCVAL(LOCALE_SABBREVDAYNAME6,"Cts") +LOCVAL(LOCALE_SABBREVDAYNAME7,"Paz") -/* LOCVAL(LOCALE_SMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SMONTHNAME12,"") */ -/* LOCVAL(LOCALE_SMONTHNAME13,"") */ +LOCVAL(LOCALE_SMONTHNAME1,"Ocak") +LOCVAL(LOCALE_SMONTHNAME2,"Þubat") +LOCVAL(LOCALE_SMONTHNAME3,"Mart") +LOCVAL(LOCALE_SMONTHNAME4,"Nisan") +LOCVAL(LOCALE_SMONTHNAME5,"Mayýs") +LOCVAL(LOCALE_SMONTHNAME6,"Haziran") +LOCVAL(LOCALE_SMONTHNAME7,"Temmus") +LOCVAL(LOCALE_SMONTHNAME8,"Aðustos") +LOCVAL(LOCALE_SMONTHNAME9,"Eylül") +LOCVAL(LOCALE_SMONTHNAME10,"Ekim") +LOCVAL(LOCALE_SMONTHNAME11,"Kasým") +LOCVAL(LOCALE_SMONTHNAME12,"Aralýk") +LOCVAL(LOCALE_SMONTHNAME13,"") -/* LOCVAL(LOCALE_SABBREVMONTHNAME1,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME2,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME3,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME4,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME5,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME6,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME7,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME8,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME9,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME10,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME11,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME12,"") */ -/* LOCVAL(LOCALE_SABBREVMONTHNAME13,"") */ +LOCVAL(LOCALE_SABBREVMONTHNAME1,"Oca") +LOCVAL(LOCALE_SABBREVMONTHNAME2,"Þub") +LOCVAL(LOCALE_SABBREVMONTHNAME3,"Mar") +LOCVAL(LOCALE_SABBREVMONTHNAME4,"Nis") +LOCVAL(LOCALE_SABBREVMONTHNAME5,"May") +LOCVAL(LOCALE_SABBREVMONTHNAME6,"Haz") +LOCVAL(LOCALE_SABBREVMONTHNAME7,"Tem") +LOCVAL(LOCALE_SABBREVMONTHNAME8,"Aðu") +LOCVAL(LOCALE_SABBREVMONTHNAME9,"Eyl") +LOCVAL(LOCALE_SABBREVMONTHNAME10,"Eki") +LOCVAL(LOCALE_SABBREVMONTHNAME11,"Kas") +LOCVAL(LOCALE_SABBREVMONTHNAME12,"Ara") +LOCVAL(LOCALE_SABBREVMONTHNAME13,"") -/* LOCVAL(LOCALE_SPOSITIVESIGN, "") */ -/* LOCVAL(LOCALE_SNEGATIVESIGN, "") */ +LOCVAL(LOCALE_SPOSITIVESIGN, "") +LOCVAL(LOCALE_SNEGATIVESIGN, "-") /* LOCVAL(LOCALE_IPOSSIGNPOSN, "") */ /* LOCVAL(LOCALE_INEGSIGNPOSN, "") */ /* LOCVAL(LOCALE_IPOSSYMPRECEDES, "") */ @@ -108,3 +109,4 @@ LOCVAL(LOCALE_SABBREVLANGNAME,"trk") /* LOCVAL(LOCALE_INEGSYMPRECEDES, "") */ /* LOCVAL(LOCALE_INEGSEPBYSPACE, "") */ +/* calendario gregoriano */ diff --git a/ole/nls/ukr.nls b/ole/nls/ukr.nls index b1e8b421334..d2c27f3a2ea 100644 --- a/ole/nls/ukr.nls +++ b/ole/nls/ukr.nls @@ -5,12 +5,12 @@ /* LOCVAL(LOCALE_ILANGUAGE,"") */ /* LOCVAL(LOCALE_SLANGUAGE,"") */ -/* LOCVAL(LOCALE_SENGLANGUAGE,"") */ +LOCVAL(LOCALE_SENGLANGUAGE,"Ukrainian") LOCVAL(LOCALE_SABBREVLANGNAME,"ukr") /* LOCVAL(LOCALE_SNATIVELANGNAME,"") */ /* LOCVAL(LOCALE_ICOUNTRY,"") */ /* LOCVAL(LOCALE_SCOUNTRY,"") */ -/* LOCVAL(LOCALE_SENGCOUNTRY,"") */ +LOCVAL(LOCALE_SENGCOUNTRY,"Ukrainia") /* LOCVAL(LOCALE_SABBREVCTRYNAME,"") */ /* LOCVAL(LOCALE_SNATIVECTRYNAME,"") */ /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"") */ diff --git a/ole/ole2disp.c b/ole/ole2disp.c index 169f30ce3cd..5948f8a08d4 100644 --- a/ole/ole2disp.c +++ b/ole/ole2disp.c @@ -120,7 +120,11 @@ int WINAPI SysStringLen16(BSTR16 str) return strlen(BSTR_GetAddr(str)); } -OLESTATUS WINAPI CreateDispTypeInfo(INTERFACEDATA * pidata,LCID lcid,LPVOID/*ITypeInfo*/ * * pptinfo) { +OLESTATUS WINAPI CreateDispTypeInfo( + INTERFACEDATA *pidata, + LCID lcid, + LPVOID **pptinfo /*ITypeInfo*/ +) { FIXME(ole,"(%p,%ld,%p),stub\n",pidata,lcid,pptinfo); return 0; } diff --git a/ole/ole2nls.c b/ole/ole2nls.c index bf4b7327ef4..7d18e99736e 100644 --- a/ole/ole2nls.c +++ b/ole/ole2nls.c @@ -1222,34 +1222,6 @@ DWORD WINAPI VerLanguageName32W(UINT32 langid,LPWSTR langname, return langnamelen; } -static int is_punctuation(unsigned char c) -{ - /* punctuation characters are : - 1-8, 14-31, 39, 45, 127-129, 141-144, 150-151, 157-158, 173 - - "punctuation character" in this context is a character which is - considered "less important" during word sort comparison. - See LCMapString for the precise definition of "less important". */ - if (c>=141) - { - if (c<=151) - return (c<=144) || (c>=150); - if (c<=158) - return (c>=157); - return (c==173); - } - if (c>=127) - return (c<=129); - if (c>=14) - return (c<=31) || (c==39) || (c==45); - return (c<=8); -} - -static int identity(int c) -{ - return c; -} - static const unsigned char LCM_Unicode_LUT[] = { 6 , 3, /* - 1 */ 6 , 4, /* - 2 */ @@ -1639,7 +1611,24 @@ static const unsigned char LCM_Diacritic_LUT[] = { 19, /* ÿ - 255 */ } ; +static int is_punctuation(unsigned char c) +{ + /* "punctuation character" in this context is a character which is + considered "less important" during word sort comparison. + See LCMapString implementation for the precise definition + of "less important". */ + + return (LCM_Unicode_LUT[-2+2*c]==6); +} + +static int identity(int c) +{ + return c; +} + /************************************************************************* + * LCMapString32A [KERNEL32.492] + * * Convert a string, or generate a sort key from it. * * If (mapflags & LCMAP_SORTKEY), the function will generate diff --git a/relay32/Makefile.in b/relay32/Makefile.in index a8aa55b704d..0ce4e4924c9 100644 --- a/relay32/Makefile.in +++ b/relay32/Makefile.in @@ -26,6 +26,7 @@ DLLS = \ oleaut32.spec \ olecli32.spec \ olesvr32.spec \ + rasapi32.spec \ shell32.spec \ tapi32.spec \ user32.spec \ diff --git a/relay32/advapi32.spec b/relay32/advapi32.spec index 2c95902b4e0..ca2cf3cf9f4 100644 --- a/relay32/advapi32.spec +++ b/relay32/advapi32.spec @@ -183,8 +183,8 @@ type win32 0179 stub ReportEventW 0180 stub RevertToSelf 0181 stub SetAclInformation -0182 stub SetFileSecurityA -0183 stub SetFileSecurityW +0182 stdcall SetFileSecurityA(str long ptr ) SetFileSecurity32A +0183 stdcall SetFileSecurityW(wstr long ptr) SetFileSecurity32W 0184 stub SetKernelObjectSecurity 0185 stub SetPrivateObjectSecurity 0186 stdcall SetSecurityDescriptorDacl(ptr long ptr long) RtlSetDaclSecurityDescriptor diff --git a/relay32/builtin32.c b/relay32/builtin32.c index afac993f178..e5f96951136 100644 --- a/relay32/builtin32.c +++ b/relay32/builtin32.c @@ -48,6 +48,7 @@ extern const BUILTIN32_DESCRIPTOR OLE32_Descriptor; extern const BUILTIN32_DESCRIPTOR OLEAUT32_Descriptor; extern const BUILTIN32_DESCRIPTOR OLECLI32_Descriptor; extern const BUILTIN32_DESCRIPTOR OLESVR32_Descriptor; +extern const BUILTIN32_DESCRIPTOR RASAPI32_Descriptor; extern const BUILTIN32_DESCRIPTOR SHELL32_Descriptor; extern const BUILTIN32_DESCRIPTOR TAPI32_Descriptor; extern const BUILTIN32_DESCRIPTOR USER32_Descriptor; @@ -81,6 +82,7 @@ static BUILTIN32_DLL BuiltinDLLs[] = { &OLEAUT32_Descriptor, FALSE }, { &OLECLI32_Descriptor, FALSE }, { &OLESVR32_Descriptor, FALSE }, + { &RASAPI32_Descriptor, FALSE }, { &SHELL32_Descriptor, TRUE }, { &TAPI32_Descriptor, FALSE }, { &USER32_Descriptor, TRUE }, diff --git a/relay32/comctl32.spec b/relay32/comctl32.spec index 67fe6170800..87e4439c97a 100644 --- a/relay32/comctl32.spec +++ b/relay32/comctl32.spec @@ -108,7 +108,7 @@ type win32 169 stub FindMRUData 233 stub Str_GetPtrA -234 stub Str_SetPtrA +234 stdcall Str_SetPtrA(long long) COMCTL32_Str_SetPtrA 235 stub Str_GetPtrW 236 stub Str_SetPtrW diff --git a/relay32/comdlg32.spec b/relay32/comdlg32.spec index c9006ce9e07..520b7ccd4e5 100644 --- a/relay32/comdlg32.spec +++ b/relay32/comdlg32.spec @@ -14,7 +14,7 @@ type win32 10 stdcall GetOpenFileNameA(ptr) GetOpenFileName32A 11 stdcall GetOpenFileNameW(ptr) GetOpenFileName32W 12 stdcall GetSaveFileNameA(ptr) GetSaveFileName32A -13 stdcall GetSaveFileNameW(ptr) GetSaveFileName32A +13 stdcall GetSaveFileNameW(ptr) GetSaveFileName32W 14 stub LoadAlterBitmap 15 stdcall PageSetupDlgA(ptr) PageSetupDlg32A 16 stub PageSetupDlgW diff --git a/relay32/ole32.spec b/relay32/ole32.spec index cbbf8327e56..bb6197c51a5 100644 --- a/relay32/ole32.spec +++ b/relay32/ole32.spec @@ -55,7 +55,7 @@ type win32 52 stub CreateBindCtx 53 stub CreateDataAdviseHolder 54 stub CreateDataCache - 55 stub CreateFileMoniker + 55 stdcall CreateFileMoniker(ptr ptr) CreateFileMoniker32 56 stub CreateGenericComposite 57 stub CreateILockBytesOnHGlobal 58 stub CreateItemMoniker diff --git a/relay32/rasapi32.spec b/relay32/rasapi32.spec new file mode 100644 index 00000000000..bb6ff06d786 --- /dev/null +++ b/relay32/rasapi32.spec @@ -0,0 +1,73 @@ +name rasapi32 +type win32 + +500 stub RnaEngineRequest +501 stub DialEngineRequest +502 stub SuprvRequest +503 stub DialInMessage +504 stub RnaEnumConnEntries +505 stub RnaGetConnEntry +506 stub RnaFreeConnEntry +507 stub RnaSaveConnEntry +508 stub RnaDeleteConnEntry +509 stub RnaRenameConnEntry +510 stub RnaValidateEntryName +511 stub RnaEnumDevices +512 stub RnaGetDeviceInfo +513 stub RnaGetDefaultDevConfig +514 stub RnaBuildDevConfig +515 stub RnaDevConfigDlg +516 stub RnaFreeDevConfig +517 stub RnaActivateEngine +518 stub RnaDeactivateEngine +519 stub SuprvEnumAccessInfo +520 stub SuprvGetAccessInfo +521 stub SuprvSetAccessInfo +522 stub SuprvGetAdminConfig +523 stub SuprvInitialize +524 stub SuprvDeInitialize +525 stub RnaUIDial +526 stub RnaImplicitDial +527 stub RasDial16 +528 stub RnaSMMInfoDialog +529 stub RnaEnumerateMacNames +530 stub RnaEnumCountryInfo +531 stub RnaGetAreaCodeList +532 stub RnaFindDriver +533 stub RnaInstallDriver +534 stub RnaGetDialSettings +535 stub RnaSetDialSettings +536 stub RnaGetIPInfo +537 stub RnaSetIPInfo +538 stub RasCreatePhonebookEntryA +539 stub RasCreatePhonebookEntryW +540 stub RasDialA +541 stub RasDialW +542 stub RasEditPhonebookEntryA +543 stub RasEditPhonebookEntryW +544 stub RasEnumConnectionsA +545 stub RasEnumConnectionsW +546 stub RasEnumEntriesA +547 stub RasEnumEntriesW +548 stub RasGetConnectStatusA +549 stub RasGetConnectStatusW +550 stub RasGetEntryDialParamsA +551 stub RasGetEntryDialParamsW +552 stub RasGetErrorStringA +553 stub RasGetErrorStringW +554 stub RasGetProjectionInfoA +555 stub RasGetProjectionInfoW +556 stub RasHangUpA +557 stub RasHangUpW +558 stub RasSetEntryDialParamsA +559 stub RasSetEntryDialParamsW +560 stub RnaCloseMac +561 stub RnaComplete +562 stub RnaGetDevicePort +563 stub RnaGetUserProfile +564 stub RnaOpenMac +565 stub RnaSessInitialize +566 stub RnaStartCallback +567 stub RnaTerminate +568 stub RnaUICallbackDialog +569 stub RnaUIUsernamePassword diff --git a/relay32/shell32.spec b/relay32/shell32.spec index 894ff22d6a2..524063a4ff6 100644 --- a/relay32/shell32.spec +++ b/relay32/shell32.spec @@ -7,32 +7,32 @@ type win32 # This list was updated to dll version 4.72 2 stdcall SHChangeNotifyRegister(long long long long long long) SHChangeNotifyRegister - 3 stub CheckEscapesA # exported by name - 4 stub SHChangeNotifyDeregister - 5 stub SHChangeNotifyUpdateEntryList - 6 stub CheckEscapesW # exported by name + 3 stub CheckEscapesA@8 # exported by name + 4 stdcall SHChangeNotifyDeregister (long long) SHChangeNotifyDeregister + 5 stub SHChangeNotifyUpdateEntryList@16 + 6 stub CheckEscapesW@8 # exported by name 7 stdcall CommandLineToArgvW(wstr ptr) CommandLineToArgvW # exported by name - 8 stub Control_FillCache_RunDLL # exported by name - 9 stub PifMgr_OpenProperties - 10 stub PifMgr_GetProperties - 11 stub PifMgr_SetProperties + 8 stub Control_FillCache_RunDLL@16 # exported by name + 9 stub PifMgr_OpenProperties@16 + 10 stub PifMgr_GetProperties@20 + 11 stub PifMgr_SetProperties@20 12 stub Control_FillCache_RunDLLA # exported by name - 13 stub PifMgr_CloseProperties - 14 stub Control_FillCache_RunDLLW # exported by name + 13 stub PifMgr_CloseProperties@8 + 14 stub Control_FillCache_RunDLLW@16 # exported by name 15 stdcall ILGetDisplayName(ptr ptr) ILGetDisplayName 16 stdcall ILFindLastID(ptr) ILFindLastID - 17 stub ILRemoveLastID + 17 stub ILRemoveLastID@4 18 stdcall ILClone(ptr) ILClone - 19 stub ILCloneFirst - 20 stub ILGlobalClone - 21 stub ILIsEqual + 19 stub ILCloneFirst@4 + 20 stub ILGlobalClone@4 + 21 stub ILIsEqual@8 22 stdcall Control_RunDLL(long long long long) Control_RunDLL # exported by name - 23 stub ILIsParent - 24 stub ILFindChild + 23 stub ILIsParent@12 + 24 stub ILFindChild@8 25 stdcall ILCombine(ptr ptr) ILCombine - 26 stub ILLoadFromStream - 27 stub ILSaveToStream - 28 stub SHILCreateFromPath + 26 stub ILLoadFromStream@8 + 27 stub ILSaveToStream@8 + 28 stub SHILCreateFromPath@12 29 stdcall PathIsRoot(str) PathIsRoot 30 stdcall PathBuildRoot(ptr long) PathBuildRoot 31 stdcall PathFindExtension(str) PathFindExtension @@ -82,9 +82,8 @@ type win32 75 stdcall PathYetAnotherMakeUniqueName(ptr ptr) PathYetAnotherMakeUniqueName 76 stub DragQueryInfo 77 stdcall SHMapPIDLToSystemImageListIndex(long long long) SHMapPIDLToSystemImageListIndex - 78 stub OleStrToStrN@16 -# 79 stub StrToOleStrN@16 - 79 stdcall SHELL32_79(str ptr) SHELL32_79 + 78 stdcall OleStrToStrN(str long wstr long) OleStrToStrN + 79 stdcall StrToOleStrN(wstr long str long) StrToOleStrN 80 stub DragFinish # exported by name 81 stub DragQueryFile # exported by name 82 stub DragQueryFileA # exported by name @@ -179,7 +178,7 @@ type win32 171 stub PathCleanupSpec 172 stub SHCreateLinks 173 stub SHValidateUNC - 174 stub SHCreateShellFolderViewEx + 174 stdcall SHCreateShellFolderViewEx (ptr ptr) SHCreateShellFolderViewEx32 175 stdcall SHGetSpecialFolderPath(long long long long) SHGetSpecialFolderPath 176 stub SHSetInstanceExplorer 177 stub DAD_SetDragImageFromListView @@ -239,15 +238,15 @@ type win32 231 stub RealShellExecuteExW # exported by name 232 stub RealShellExecuteW # exported by name 233 stub RegenerateUserEnvironment@8 # exported by name - 234 stub SHAddToRecentDocs@8 # exported by name + 234 stdcall SHAddToRecentDocs (long ptr) SHAddToRecentDocs32 # exported by name 235 stdcall SHAppBarMessage(long ptr) SHAppBarMessage32 # exported by name - 236 stub SHBrowseForFolder@4 # exported by name + 236 stdcall SHBrowseForFolder(ptr) SHBrowseForFolder32A # exported by name 237 stdcall SHBrowseForFolderA(ptr) SHBrowseForFolder32A # exported by name 238 stub SHBrowseForFolderW@4 # exported by name - 239 stub SHChangeNotify@16 # exported by name + 239 stdcall SHChangeNotify (long long ptr ptr) SHChangeNotify32 # exported by name 240 stub SHEmptyRecycleBinA@12 # exported by name 241 stub SHEmptyRecycleBinW@12 # exported by name - 242 stub SHFileOperation@4 # exported by name + 242 stdcall SHFileOperation(ptr) SHFileOperation32 # exported by name 243 stub SHFileOperationA@4 # exported by name 244 stub SHFileOperationW@4 # exported by name 245 stub SHFormatDrive@16 # exported by name @@ -256,7 +255,7 @@ type win32 248 stub SHGetDataFromIDListW@20 # exported by name 249 stub PathParseIconLocation@4 250 stub PathRemoveExtension@4 - 251 stub PathRemoveArgs@5 + 251 stub PathRemoveArgs@4 252 stdcall SHGetDesktopFolder(ptr) SHGetDesktopFolder # exported by name 253 stdcall SHGetFileInfo(ptr long ptr long long) SHGetFileInfo32A # exported by name 254 stdcall SHGetFileInfoA(ptr long ptr long long) SHGetFileInfo32A # exported by name @@ -265,9 +264,9 @@ type win32 257 stdcall SHGetMalloc(ptr) SHGetMalloc # exported by name 258 stub SHGetNewLinkInfo@20 # exported by name 259 stdcall SHGetPathFromIDList(ptr ptr) SHGetPathFromIDList # exported by name - 260 stub SHGetPathFromIDList@8 # exported by name - 261 stub SHGetPathFromIDListA@8 # exported by name - 262 stub SHGetPathFromIDListW@8 # exported by name + 260 stub SHGetPathFromIDList@8 # exported by name + 261 stdcall SHGetPathFromIDListA (long long) SHGetPathFromIDList32A # exported by name + 262 stdcall SHGetPathFromIDListW (long long) SHGetPathFromIDList32W # exported by name 263 stdcall SHGetSpecialFolderLocation(long long ptr) SHGetSpecialFolderLocation # exported by name 264 stdcall SHHelpShortcuts_RunDLL(long long long long) SHHelpShortcuts_RunDLL # exported by name 265 stub SHHelpShortcuts_RunDLLA@16 # exported by name diff --git a/relay32/snoop.c b/relay32/snoop.c index f4a12fb6c62..534607d5fa8 100644 --- a/relay32/snoop.c +++ b/relay32/snoop.c @@ -290,8 +290,10 @@ REGS_ENTRYPOINT(SNOOP_Entry) { */ LPBYTE reteip = (LPBYTE)CALLER1REF; - if ((reteip[0]==0x83)&&(reteip[1]==0xc4)) - fun->nrofargs=reteip[2]/4; + if (reteip) { + if ((reteip[0]==0x83)&&(reteip[1]==0xc4)) + fun->nrofargs=reteip[2]/4; + } } while (*rets) { @@ -334,7 +336,7 @@ REGS_ENTRYPOINT(SNOOP_Entry) { ret->args = HeapAlloc(SystemHeap,0,16*sizeof(DWORD)); memcpy(ret->args,(LPBYTE)(ESP_reg(context)+8),sizeof(DWORD)*16); } - DPRINTF(") ret=%08lx fs=%04lx\n",(DWORD)(*rets)->entry[i].origreturn,FS_reg(context)); + DPRINTF(") ret=%08lx fs=%04lx\n",ret->origreturn,FS_reg(context)); } REGS_ENTRYPOINT(SNOOP_Return) { diff --git a/relay32/user32.spec b/relay32/user32.spec index fe241afe64c..ad34414e9e9 100644 --- a/relay32/user32.spec +++ b/relay32/user32.spec @@ -83,10 +83,8 @@ type win32 80 stdcall CreateMDIWindowW(ptr ptr long long long long long long long long) CreateMDIWindowW 81 stdcall CreateMenu() CreateMenu32 82 stdcall CreatePopupMenu() CreatePopupMenu32 - 83 stdcall CreateWindowExA(long str str long long long long long - long long long ptr) CreateWindowEx32A - 84 stdcall CreateWindowExW(long wstr wstr long long long long long - long long long ptr) CreateWindowEx32W + 83 stdcall CreateWindowExA(long str str long long long long long long long long ptr) CreateWindowEx32A + 84 stdcall CreateWindowExW(long wstr wstr long long long long long long long long ptr) CreateWindowEx32W 85 stub CreateWindowStationA 86 stub CreateWindowStationW 87 stub DdeAbandonTransaction @@ -592,7 +590,7 @@ type win32 587 stdcall wvsprintfA(ptr str ptr) wvsprintf32A 588 stdcall wvsprintfW(ptr wstr ptr) wvsprintf32W #late additions -589 stub ChangeDisplaySettingsA +589 stdcall ChangeDisplaySettingsA(ptr long) ChangeDisplaySettings32A 590 stub ChangeDisplaySettingsW 591 stub EnumDesktopWindows 592 stdcall EnumDisplaySettingsA(str long ptr) EnumDisplaySettings32A diff --git a/relay32/wnaspi32.spec b/relay32/wnaspi32.spec index e9349ba3648..77f30f1b524 100644 --- a/relay32/wnaspi32.spec +++ b/relay32/wnaspi32.spec @@ -1,6 +1,6 @@ name wnaspi32 type win32 -0 stub GetASPI32SupportInfo +0 stdcall GetASPI32SupportInfo() GetASPI32SupportInfo 1 stub SendASPI32Command 3 stub GetASPI32DLLVersion diff --git a/scheduler/client.c b/scheduler/client.c index c7910b37f8e..98f4f753b95 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -17,6 +18,10 @@ #include "server.h" #include "winerror.h" +/* Some versions of glibc don't define this */ +#ifndef SCM_RIGHTS +#define SCM_RIGHTS 1 +#endif /*********************************************************************** * CLIENT_SendRequest_v @@ -27,21 +32,16 @@ static void CLIENT_SendRequest_v( enum request req, int pass_fd, struct iovec *vec, int veclen ) { THDB *thdb = THREAD_Current(); - struct { struct cmsghdr hdr; int fd; } cmsg = - { { sizeof(cmsg), SOL_SOCKET, SCM_RIGHTS }, pass_fd }; - struct msghdr msghdr; +#ifndef HAVE_MSGHDR_ACCRIGHTS + struct cmsg_fd cmsg = { sizeof(cmsg), SOL_SOCKET, SCM_RIGHTS, pass_fd }; +#endif + struct msghdr msghdr = { NULL, 0, vec, veclen, }; struct header head; int i, ret, len; - msghdr.msg_name = NULL; - msghdr.msg_namelen = 0; - assert( veclen > 0 ); - - vec[0].iov_base = &head; - vec[0].iov_len = sizeof(head); - msghdr.msg_iov = vec; - msghdr.msg_iovlen = veclen; + vec[0].iov_base = &head; + vec[0].iov_len = sizeof(head); for (i = len = 0; i < veclen; i++) len += vec[i].iov_len; assert( len <= MAX_MSG_LENGTH ); @@ -49,15 +49,15 @@ static void CLIENT_SendRequest_v( enum request req, int pass_fd, head.len = len; head.seq = thdb->seq++; - if (pass_fd == -1) /* no fd to pass */ + if (pass_fd != -1) /* we have an fd to send */ { - msghdr.msg_control = NULL; - msghdr.msg_controllen = 0; - } - else - { - msghdr.msg_control = &cmsg; +#ifdef HAVE_MSGHDR_ACCRIGHTS + msghdr.msg_accrights = (void *)&pass_fd; + msghdr.msg_accrightslen = sizeof(pass_fd); +#else + msghdr.msg_control = &cmsg; msghdr.msg_controllen = sizeof(cmsg); +#endif } if ((ret = sendmsg( thdb->socket, &msghdr, 0 )) < len) @@ -107,21 +107,19 @@ static unsigned int CLIENT_WaitReply_v( int *len, int *passed_fd, struct iovec *vec, int veclen ) { THDB *thdb = THREAD_Current(); - struct { struct cmsghdr hdr; int fd; } cmsg = - { { sizeof(cmsg), SOL_SOCKET, SCM_RIGHTS }, -1 }; - struct msghdr msghdr; + int pass_fd = -1; +#ifdef HAVE_MSGHDR_ACCRIGHTS + struct msghdr msghdr = { NULL, 0, vec, veclen, (void*)&pass_fd, sizeof(int) }; +#else + struct cmsg_fd cmsg = { sizeof(cmsg), SOL_SOCKET, SCM_RIGHTS, -1 }; + struct msghdr msghdr = { NULL, 0, vec, veclen, &cmsg, sizeof(cmsg), 0 }; +#endif struct header head; int ret, remaining; assert( veclen > 0 ); vec[0].iov_base = &head; vec[0].iov_len = sizeof(head); - msghdr.msg_name = NULL; - msghdr.msg_namelen = 0; - msghdr.msg_iov = vec; - msghdr.msg_iovlen = veclen; - msghdr.msg_control = &cmsg; - msghdr.msg_controllen = sizeof(cmsg); if ((ret = recvmsg( thdb->socket, &msghdr, 0 )) == -1) { @@ -150,18 +148,22 @@ static unsigned int CLIENT_WaitReply_v( int *len, int *passed_fd, ExitThread(1); } +#ifndef HAVE_MSGHDR_ACCRIGHTS + pass_fd = cmsg.fd; +#endif + if (head.type != ERROR_SUCCESS) { SetLastError( head.type ); } else if (passed_fd) { - *passed_fd = cmsg.fd; - cmsg.fd = -1; + *passed_fd = pass_fd; + pass_fd = -1; } if (len) *len = ret - sizeof(head); - if (cmsg.fd != -1) close( cmsg.fd ); + if (pass_fd != -1) close( pass_fd ); remaining = head.len - ret; while (remaining > 0) /* drop remaining data */ { @@ -216,7 +218,7 @@ static int send_new_thread( THDB *thdb ) struct new_thread_reply reply; int len, fd[2]; - if (socketpair( AF_UNIX, SOCK_STREAM, PF_UNIX, fd ) == -1) + if (socketpair( AF_UNIX, SOCK_STREAM, 0, fd ) == -1) { SetLastError( ERROR_TOO_MANY_OPEN_FILES ); /* FIXME */ return -1; @@ -254,7 +256,7 @@ int CLIENT_NewThread( THDB *thdb ) int tmpfd[2]; char buffer[16]; - if (socketpair( AF_UNIX, SOCK_STREAM, PF_UNIX, tmpfd ) == -1) + if (socketpair( AF_UNIX, SOCK_STREAM, 0, tmpfd ) == -1) { perror("socketpair"); exit(1); diff --git a/scheduler/critsection.c b/scheduler/critsection.c index aceb2c9a194..e154abe3a86 100644 --- a/scheduler/critsection.c +++ b/scheduler/critsection.c @@ -123,7 +123,9 @@ void WINAPI DeleteCriticalSection( CRITICAL_SECTION *crit ) */ void WINAPI EnterCriticalSection( CRITICAL_SECTION *crit ) { - if ((crit->Reserved==-1) && !(crit->LockSemaphore)) { + if ( (crit->Reserved==-1) && !(crit->LockSemaphore) && + (crit!=HEAP_SystemLock) + ) { FIXME(win32,"entering uninitialized section(%p)?\n",crit); InitializeCriticalSection(crit); } diff --git a/server/socket.c b/server/socket.c index eca5e1c13a7..3dd73c93774 100644 --- a/server/socket.c +++ b/server/socket.c @@ -18,9 +18,15 @@ #include #include +#include "config.h" #include "server.h" #include "object.h" +/* Some versions of glibc don't define this */ +#ifndef SCM_RIGHTS +#define SCM_RIGHTS 1 +#endif + /* client state */ enum state { @@ -79,9 +85,11 @@ static int do_write( int client_fd ) { struct client *client = clients[client_fd]; struct iovec vec[2]; - struct { struct cmsghdr hdr; int fd; } cmsg = - { { sizeof(cmsg), SOL_SOCKET, SCM_RIGHTS }, client->pass_fd }; - struct msghdr msghdr = { NULL, 0, vec, 2, NULL, 0, 0 }; +#ifndef HAVE_MSGHDR_ACCRIGHTS + struct cmsg_fd cmsg = { sizeof(cmsg), SOL_SOCKET, SCM_RIGHTS, + client->pass_fd }; +#endif + struct msghdr msghdr = { NULL, 0, vec, 2, }; int ret; /* make sure we have something to send */ @@ -102,11 +110,15 @@ static int do_write( int client_fd ) vec[0].iov_len = client->head.len - client->count; msghdr.msg_iovlen = 1; } - if (client->pass_fd != -1) + if (client->pass_fd != -1) /* we have an fd to send */ { - /* we have an fd to send */ +#ifdef HAVE_MSGHDR_ACCRIGHTS + msghdr.msg_accrights = (void *)&client->pass_fd; + msghdr.msg_accrightslen = sizeof(client->pass_fd); +#else msghdr.msg_control = &cmsg; msghdr.msg_controllen = sizeof(cmsg); +#endif } ret = sendmsg( client_fd, &msghdr, 0 ); if (ret == -1) @@ -138,9 +150,13 @@ static int do_read( int client_fd ) { struct client *client = clients[client_fd]; struct iovec vec; - struct { struct cmsghdr hdr; int fd; } cmsg = { { sizeof(cmsg), SOL_SOCKET, - SCM_RIGHTS }, -1 }; + int pass_fd = -1; +#ifdef HAVE_MSGHDR_ACCRIGHTS + struct msghdr msghdr = { NULL, 0, &vec, 1, (void*)&pass_fd, sizeof(int) }; +#else + struct cmsg_fd cmsg = { sizeof(cmsg), SOL_SOCKET, SCM_RIGHTS, -1 }; struct msghdr msghdr = { NULL, 0, &vec, 1, &cmsg, sizeof(cmsg), 0 }; +#endif int ret; if (client->state == RUNNING) client->state = SENDING; @@ -166,11 +182,14 @@ static int do_read( int client_fd ) perror("recvmsg"); return -1; } - if (cmsg.fd != -1) +#ifndef HAVE_MSGHDR_ACCRIGHTS + pass_fd = cmsg.fd; +#endif + if (pass_fd != -1) { /* can only receive one fd per message */ if (client->pass_fd != -1) close( client->pass_fd ); - client->pass_fd = cmsg.fd; + client->pass_fd = pass_fd; } else if (!ret) return -1; /* closed pipe */ diff --git a/tools/make_X11wrappers b/tools/make_X11wrappers index 80babeed6ba..1a1c08bd973 100755 --- a/tools/make_X11wrappers +++ b/tools/make_X11wrappers @@ -17,7 +17,7 @@ $X11_include_dir = "/usr/X11R6/include"; $outdir = "tsx11"; $wantfile = "$outdir/X11_calls"; -@dolist = ("Xlib", "Xresource", "Xutil", "xpm", "XShm"); +@dolist = ("Xlib", "Xresource", "Xutil", "xpm", "XShm", "xf86dga"); # First read list of wanted function names. @@ -44,11 +44,19 @@ foreach $name (@dolist) { $x11_incl = ""; $extensions_dir = ""; + $pre_file = ""; + $post_file = ""; if($name eq "Xutil" || $name eq "Xresource" || $name eq "XShm") { $x11_incl = "#include \n"; # For Xutil, we need X11/Xresource.h for XUniqueContext(). $x11_incl .= "#include \n" if $name eq "Xutil"; } + if($name eq "xf86dga") { + $x11_incl = "#include \n"; + $extensions_dir = "extensions/"; + $pre_file = "#include \"config.h\"\n#ifdef HAVE_LIBXXF86DGA\n"; + $post_file = "#endif"; + } if($name eq "XShm") { $extensions_dir = "extensions/"; } @@ -75,7 +83,7 @@ END * This file was generated automatically by tools/make_X11wrappers * DO NOT EDIT! */ - +$pre_file $x11_incl#include #include "x11drv.h" #include "debug.h" @@ -101,6 +109,52 @@ END output_fn("XShmPutImage", Status, "Display *, Drawable, GC, XImage *, int, int, int, int, unsigned int, unsigned int, Bool", "Display *a0, Drawable a1, GC a2, XImage *a3, int a4, int a5, int a6, int a7, unsigned int a8, unsigned int a9, Bool a10", "a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10"); + } elsif($name eq "xf86dga") { + output_fn("XF86DGAQueryVersion",Bool, + "Display*,int*,int*", + "Display*a0,int*a1,int*a2", + "a0,a1,a2" + ); + output_fn("XF86DGAQueryExtension",Bool, + "Display*,int*,int*", + "Display*a0,int*a1,int*a2", + "a0,a1,a2" + ); + output_fn("XF86DGAGetVideo",Status, + "Display*,int,char**,int*,int*,int*", + "Display*a0,int a1,char**a2,int*a3,int*a4,int*a5", + "a0,a1,a2,a3,a4,a5" + ); + output_fn("XF86DGADirectVideo",Status, + "Display*,int,int", + "Display*a0,int a1,int a2", + "a0,a1,a2" + ); + output_fn("XF86DGAGetViewPortSize",Status, + "Display*,int,int*,int*", + "Display*a0,int a1,int *a2,int *a3", + "a0,a1,a2,a3" + ); + output_fn("XF86DGASetViewPort",Status, + "Display*,int,int,int", + "Display*a0,int a1,int a2,int a3", + "a0,a1,a2,a3" + ); + output_fn("XF86DGAInstallColormap",Status, + "Display*,int,Colormap", + "Display*a0,int a1,Colormap a2", + "a0,a1,a2" + ); + output_fn("XF86DGAQueryDirectVideo",Status, + "Display*,int,int*", + "Display*a0,int a1,int *a2", + "a0,a1,a2" + ); + output_fn("XF86DGAViewPortChanged",Status, + "Display*,int,int", + "Display*a0,int a1,int a2", + "a0,a1,a2" + ); } else { open(IN, "echo \"$x11_incl#include \" | gcc -L$X11_include_dir -E - | grep -v '^[ \t]*\$'|") || die "open"; @@ -176,6 +230,11 @@ END #endif /* __WINE_TS$ucname\_H */ END + print OUTC < +#include +#include "x11drv.h" +#include "debug.h" + +Bool TSXF86DGAQueryVersion(Display*a0,int*a1,int*a2) +{ + Bool r; + TRACE(x11, "Call XF86DGAQueryVersion\n"); + EnterCriticalSection( &X11DRV_CritSection ); + r = XF86DGAQueryVersion(a0,a1,a2); + LeaveCriticalSection( &X11DRV_CritSection ); + TRACE(x11, "Ret XF86DGAQueryVersion\n"); + return r; +} + +Bool TSXF86DGAQueryExtension(Display*a0,int*a1,int*a2) +{ + Bool r; + TRACE(x11, "Call XF86DGAQueryExtension\n"); + EnterCriticalSection( &X11DRV_CritSection ); + r = XF86DGAQueryExtension(a0,a1,a2); + LeaveCriticalSection( &X11DRV_CritSection ); + TRACE(x11, "Ret XF86DGAQueryExtension\n"); + return r; +} + +Status TSXF86DGAGetVideo(Display*a0,int a1,char**a2,int*a3,int*a4,int*a5) +{ + Status r; + TRACE(x11, "Call XF86DGAGetVideo\n"); + EnterCriticalSection( &X11DRV_CritSection ); + r = XF86DGAGetVideo(a0,a1,a2,a3,a4,a5); + LeaveCriticalSection( &X11DRV_CritSection ); + TRACE(x11, "Ret XF86DGAGetVideo\n"); + return r; +} + +Status TSXF86DGADirectVideo(Display*a0,int a1,int a2) +{ + Status r; + TRACE(x11, "Call XF86DGADirectVideo\n"); + EnterCriticalSection( &X11DRV_CritSection ); + r = XF86DGADirectVideo(a0,a1,a2); + LeaveCriticalSection( &X11DRV_CritSection ); + TRACE(x11, "Ret XF86DGADirectVideo\n"); + return r; +} + +Status TSXF86DGAGetViewPortSize(Display*a0,int a1,int *a2,int *a3) +{ + Status r; + TRACE(x11, "Call XF86DGAGetViewPortSize\n"); + EnterCriticalSection( &X11DRV_CritSection ); + r = XF86DGAGetViewPortSize(a0,a1,a2,a3); + LeaveCriticalSection( &X11DRV_CritSection ); + TRACE(x11, "Ret XF86DGAGetViewPortSize\n"); + return r; +} + +Status TSXF86DGASetViewPort(Display*a0,int a1,int a2,int a3) +{ + Status r; + TRACE(x11, "Call XF86DGASetViewPort\n"); + EnterCriticalSection( &X11DRV_CritSection ); + r = XF86DGASetViewPort(a0,a1,a2,a3); + LeaveCriticalSection( &X11DRV_CritSection ); + TRACE(x11, "Ret XF86DGASetViewPort\n"); + return r; +} + +Status TSXF86DGAInstallColormap(Display*a0,int a1,Colormap a2) +{ + Status r; + TRACE(x11, "Call XF86DGAInstallColormap\n"); + EnterCriticalSection( &X11DRV_CritSection ); + r = XF86DGAInstallColormap(a0,a1,a2); + LeaveCriticalSection( &X11DRV_CritSection ); + TRACE(x11, "Ret XF86DGAInstallColormap\n"); + return r; +} + +Status TSXF86DGAQueryDirectVideo(Display*a0,int a1,int *a2) +{ + Status r; + TRACE(x11, "Call XF86DGAQueryDirectVideo\n"); + EnterCriticalSection( &X11DRV_CritSection ); + r = XF86DGAQueryDirectVideo(a0,a1,a2); + LeaveCriticalSection( &X11DRV_CritSection ); + TRACE(x11, "Ret XF86DGAQueryDirectVideo\n"); + return r; +} + +Status TSXF86DGAViewPortChanged(Display*a0,int a1,int a2) +{ + Status r; + TRACE(x11, "Call XF86DGAViewPortChanged\n"); + EnterCriticalSection( &X11DRV_CritSection ); + r = XF86DGAViewPortChanged(a0,a1,a2); + LeaveCriticalSection( &X11DRV_CritSection ); + TRACE(x11, "Ret XF86DGAViewPortChanged\n"); + return r; +} +#endif diff --git a/tsx11/ts_xlib.c b/tsx11/ts_xlib.c index 2e163dfb670..40d727f8992 100644 --- a/tsx11/ts_xlib.c +++ b/tsx11/ts_xlib.c @@ -798,17 +798,6 @@ int TSXGetWindowAttributes(Display* a0, Window a1, XWindowAttributes* a2) return r; } -int TSXGrabPointer(Display* a0, Window a1, int a2, unsigned int a3, int a4, int a5, Window a6, Cursor a7, Time a8) -{ - int r; - TRACE(x11, "Call XGrabPointer\n"); - EnterCriticalSection( &X11DRV_CritSection ); - r = XGrabPointer(a0, a1, a2, a3, a4, a5, a6, a7, a8); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE(x11, "Ret XGrabPointer\n"); - return r; -} - int TSXGrabServer(Display* a0) { int r; @@ -1150,6 +1139,17 @@ int TSXSetSubwindowMode(Display* a0, GC a1, int a2) return r; } +int TSXSetWindowColormap(Display* a0, Window a1, Colormap a2) +{ + int r; + TRACE(x11, "Call XSetWindowColormap\n"); + EnterCriticalSection( &X11DRV_CritSection ); + r = XSetWindowColormap(a0, a1, a2); + LeaveCriticalSection( &X11DRV_CritSection ); + TRACE(x11, "Ret XSetWindowColormap\n"); + return r; +} + int TSXStoreColor(Display* a0, Colormap a1, XColor* a2) { int r; @@ -1205,17 +1205,6 @@ int TSXTextWidth(XFontStruct* a0, const char* a1, int a2) return r; } -int TSXUngrabPointer(Display* a0, Time a1) -{ - int r; - TRACE(x11, "Call XUngrabPointer\n"); - EnterCriticalSection( &X11DRV_CritSection ); - r = XUngrabPointer(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE(x11, "Ret XUngrabPointer\n"); - return r; -} - int TSXUngrabServer(Display* a0) { int r; @@ -1281,3 +1270,4 @@ void TS_XInitImageFuncPtrs(XImage *a0) LeaveCriticalSection( &X11DRV_CritSection ); TRACE(x11, "Ret _XInitImageFuncPtrs\n"); } + diff --git a/tsx11/ts_xpm.c b/tsx11/ts_xpm.c index cb252b4a105..ca5e33422b7 100644 --- a/tsx11/ts_xpm.c +++ b/tsx11/ts_xpm.c @@ -29,3 +29,4 @@ int TSXpmAttributesSize(void) TRACE(x11, "Ret XpmAttributesSize\n"); return r; } + diff --git a/tsx11/ts_xresource.c b/tsx11/ts_xresource.c index 6aee90d01cb..5bb5e8b21bb 100644 --- a/tsx11/ts_xresource.c +++ b/tsx11/ts_xresource.c @@ -70,3 +70,4 @@ void TSXrmParseCommand(XrmDatabase* a0, XrmOptionDescList a1, int a2, const ch LeaveCriticalSection( &X11DRV_CritSection ); TRACE(x11, "Ret XrmParseCommand\n"); } + diff --git a/tsx11/ts_xshm.c b/tsx11/ts_xshm.c index dfe94341cc6..b6705aba699 100644 --- a/tsx11/ts_xshm.c +++ b/tsx11/ts_xshm.c @@ -63,3 +63,4 @@ Status TSXShmPutImage(Display *a0, Drawable a1, GC a2, XImage *a3, int a4, int a TRACE(x11, "Ret XShmPutImage\n"); return r; } + diff --git a/tsx11/ts_xutil.c b/tsx11/ts_xutil.c index 9556c826d16..0f17ea3d749 100644 --- a/tsx11/ts_xutil.c +++ b/tsx11/ts_xutil.c @@ -357,3 +357,4 @@ XContext TSXUniqueContext(void) TRACE(x11, "Ret XUniqueContext\n"); return r; } + diff --git a/win32/Makefile.in b/win32/Makefile.in index 39798aa6801..d79c670cad5 100644 --- a/win32/Makefile.in +++ b/win32/Makefile.in @@ -21,8 +21,7 @@ C_SRCS = \ security.c \ struct32.c \ thread.c \ - time.c \ - user32.c + time.c all: $(MODULE).o diff --git a/win32/advapi.c b/win32/advapi.c index d2ff65fe3f9..9110af83bea 100644 --- a/win32/advapi.c +++ b/win32/advapi.c @@ -245,6 +245,32 @@ BOOL32 WINAPI GetFileSecurity32W( LPCWSTR lpFileName, return TRUE; } +/****************************************************************************** + * SetFileSecurityA [32.182] + * Sets the security of a file or directory + */ + +BOOL32 WINAPI SetFileSecurity32A( LPCSTR lpFileName, + SECURITY_INFORMATION RequestedInformation, + LPSECURITY_DESCRIPTOR pSecurityDescriptor) +{ + FIXME(advapi, "(%s) : stub\n", debugstr_a(lpFileName)); + return TRUE; +} + +/****************************************************************************** + * SetFileSecurityW [32.183] + * Sets the security of a file or directory + */ + +BOOL32 WINAPI SetFileSecurity32W( LPCWSTR lpFileName, + SECURITY_INFORMATION RequestedInformation, + LPSECURITY_DESCRIPTOR pSecurityDescriptor) +{ + FIXME(advapi, "(%s) : stub\n", debugstr_w(lpFileName) ); + return TRUE; +} + /****************************************************************************** * OpenService32A [ADVAPI32.112] */ diff --git a/win32/user32.c b/win32/user32.c deleted file mode 100644 index 2a1fda11654..00000000000 --- a/win32/user32.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Win32 user functions - * - * Copyright 1995 Martin von Loewis - */ - -/* This file contains only wrappers to existing Wine functions or trivial - stubs. 'Real' implementations go into context specific files */ - -#include -#include -#include "windows.h" -#include "winerror.h" -#include "heap.h" -#include "struct32.h" -#include "win.h" -#include "debug.h" - -/*********************************************************************** - * GetMessage32A (USER32.270) - */ -BOOL32 WINAPI GetMessage32A(MSG32* lpmsg,HWND32 hwnd,UINT32 min,UINT32 max) -{ - BOOL32 ret; - MSG16 *msg = SEGPTR_NEW(MSG16); - if (!msg) return 0; - ret=GetMessage16(SEGPTR_GET(msg),(HWND16)hwnd,min,max); - /* FIXME */ - STRUCT32_MSG16to32(msg,lpmsg); - SEGPTR_FREE(msg); - return ret; -} - -/*********************************************************************** - * GetMessage32W (USER32.274) - */ -BOOL32 WINAPI GetMessage32W(MSG32* lpmsg,HWND32 hwnd,UINT32 min,UINT32 max) -{ - BOOL32 ret; - MSG16 *msg = SEGPTR_NEW(MSG16); - if (!msg) return 0; - ret=GetMessage16(SEGPTR_GET(msg),(HWND16)hwnd,min,max); - /* FIXME */ - STRUCT32_MSG16to32(msg,lpmsg); - SEGPTR_FREE(msg); - return ret; -} - -/*********************************************************************** - * PeekMessageA - */ -BOOL32 WINAPI PeekMessage32A( LPMSG32 lpmsg, HWND32 hwnd, - UINT32 min,UINT32 max,UINT32 wRemoveMsg) -{ - MSG16 msg; - BOOL32 ret; - ret=PeekMessage16(&msg,hwnd,min,max,wRemoveMsg); - /* FIXME: should translate the message to Win32 */ - STRUCT32_MSG16to32(&msg,lpmsg); - return ret; -} - -/*********************************************************************** - * PeekMessageW - */ -BOOL32 WINAPI PeekMessage32W( LPMSG32 lpmsg, HWND32 hwnd, - UINT32 min,UINT32 max,UINT32 wRemoveMsg) -{ - /* FIXME: Should perform Unicode translation on specific messages */ - return PeekMessage32A(lpmsg,hwnd,min,max,wRemoveMsg); -} diff --git a/windows/event.c b/windows/event.c index 3257d3db8ff..3caa4b9b686 100644 --- a/windows/event.c +++ b/windows/event.c @@ -387,19 +387,22 @@ BOOL32 EVENT_WaitNetEvent( BOOL32 sleep, BOOL32 peek ) /* Process current X event (and possibly others that occurred in the meantime) */ - while (TSXPending( display )) + EnterCriticalSection(&X11DRV_CritSection); + while (XPending( display )) { #ifdef CONFIG_IPC if (DDE_GetRemoteMessage()) { + LeaveCriticalSection(&X11DRV_CritSection); while(DDE_GetRemoteMessage()) ; return TRUE; } #endif /* CONFIG_IPC */ - TSXNextEvent( display, &event ); + XNextEvent( display, &event ); + LeaveCriticalSection(&X11DRV_CritSection); if( peek ) { WND* pWnd; @@ -433,7 +436,9 @@ BOOL32 EVENT_WaitNetEvent( BOOL32 sleep, BOOL32 peek ) } } else EVENT_ProcessEvent( &event ); + EnterCriticalSection(&X11DRV_CritSection); } + LeaveCriticalSection(&X11DRV_CritSection); return TRUE; } @@ -447,12 +452,20 @@ void EVENT_Synchronize() { XEvent event; - TSXSync( display, False ); - while (TSXPending( display )) + /* Use of the X critical section is needed or we have a small + * race between XPending() and XNextEvent(). + */ + EnterCriticalSection( &X11DRV_CritSection ); + XSync( display, False ); + while (XPending( display )) { - TSXNextEvent( display, &event ); + XNextEvent( display, &event ); + /* unlock X critsection for EVENT_ProcessEvent() might switch tasks */ + LeaveCriticalSection( &X11DRV_CritSection ); EVENT_ProcessEvent( &event ); + EnterCriticalSection( &X11DRV_CritSection ); } + LeaveCriticalSection( &X11DRV_CritSection ); } /*********************************************************************** @@ -1126,18 +1139,13 @@ HWND32 EVENT_Capture(HWND32 hwnd, INT16 ht) if (!hwnd) { - TSXUngrabPointer(display, CurrentTime ); - captureWnd = NULL; captureHT = 0; + captureWnd = NULL; + captureHT = 0; } - else if ((win = WIN_GetXWindow( hwnd ))) + else { WND* wndPtr = WIN_FindWndPtr( hwnd ); - - if ( wndPtr && - (TSXGrabPointer(display, win, False, - ButtonPressMask | ButtonReleaseMask | PointerMotionMask, - GrabModeAsync, GrabModeAsync, - None, None, CurrentTime ) == GrabSuccess) ) + if (wndPtr) { TRACE(win, "(0x%04x)\n", hwnd ); captureWnd = hwnd; diff --git a/windows/keyboard.c b/windows/keyboard.c index 1e203394724..ac4b5424831 100644 --- a/windows/keyboard.c +++ b/windows/keyboard.c @@ -169,6 +169,7 @@ BOOL32 KEYBOARD_Init(void) KeyCode *kcp; XKeyEvent e2; WORD vkey, OEMvkey; + int keyc; TSXDisplayKeycodes(display, &min_keycode, &max_keycode); ksp = TSXGetKeyboardMapping(display, min_keycode, @@ -210,8 +211,9 @@ BOOL32 KEYBOARD_Init(void) e2.state = 0; OEMvkey = VK_OEM_7; /* next is available. */ - for (e2.keycode=min_keycode; e2.keycode<=max_keycode; e2.keycode++) + for (keyc = min_keycode; keyc <= max_keycode; keyc++) { + e2.keycode = (KeyCode)keyc; TSXLookupString(&e2, NULL, 0, &keysym, NULL); vkey = 0; if (keysym) /* otherwise, keycode not used */ @@ -979,7 +981,7 @@ UINT16 WINAPI MapVirtualKey16(UINT16 wCode, UINT16 wMapType) switch(wMapType) { case 0: { /* vkey-code to scan-code */ /* let's do vkey -> keycode -> scan */ - KeyCode keyc; + int keyc; for (keyc=min_keycode; keyc<=max_keycode; keyc++) /* see event.c */ if ((keyc2vkey[keyc] & 0xFF)== wCode) returnMVK (keyc - 8); @@ -1099,7 +1101,7 @@ INT32 WINAPI ToAscii32( UINT32 virtKey,UINT32 scanCode,LPBYTE lpKeyState, KeySym keysym; static XComposeStatus cs; INT32 ret; - WORD keyc; + int keyc; e.display = display; e.keycode = 0; diff --git a/windows/mdi.c b/windows/mdi.c index b305ba0ab39..3478cb4300f 100644 --- a/windows/mdi.c +++ b/windows/mdi.c @@ -621,9 +621,11 @@ static LONG MDICascade(WND* clientWnd, MDICLIENTINFO *ci) if( total < ci->nActiveChildren ) delta = SYSMETRICS_CYICONSPACING + SYSMETRICS_CYICON; - /* walk the list and move windows */ - while ( *ppWnd ) + /* walk the list (backwards) and move windows */ + while (*ppWnd) ppWnd++; + while (ppWnd != heapPtr) { + ppWnd--; TRACE(mdi, "move %04x to (%d,%d) size [%d,%d]\n", (*ppWnd)->hwndSelf, pos[0].x, pos[0].y, pos[1].x, pos[1].y); @@ -631,7 +633,6 @@ static LONG MDICascade(WND* clientWnd, MDICLIENTINFO *ci) SetWindowPos32( (*ppWnd)->hwndSelf, 0, pos[0].x, pos[0].y, pos[1].x, pos[1].y, SWP_DRAWFRAME | SWP_NOACTIVATE | SWP_NOZORDER); - ppWnd++; } } HeapFree( SystemHeap, 0, heapPtr ); diff --git a/windows/message.c b/windows/message.c index 82638edde70..fa351b02fd2 100644 --- a/windows/message.c +++ b/windows/message.c @@ -26,6 +26,7 @@ #include "process.h" #include "thread.h" #include "options.h" +#include "struct32.h" #include "debug.h" #define WM_NCMOUSEFIRST WM_NCMOUSEMOVE @@ -927,6 +928,29 @@ BOOL16 WINAPI PeekMessage16( LPMSG16 msg, HWND16 hwnd, UINT16 first, return MSG_PeekMessage( msg, hwnd, first, last, flags, TRUE ); } +/*********************************************************************** + * PeekMessageA + */ +BOOL32 WINAPI PeekMessage32A( LPMSG32 lpmsg, HWND32 hwnd, + UINT32 min,UINT32 max,UINT32 wRemoveMsg) +{ + MSG16 msg; + BOOL32 ret; + ret=PeekMessage16(&msg,hwnd,min,max,wRemoveMsg); + /* FIXME: should translate the message to Win32 */ + STRUCT32_MSG16to32(&msg,lpmsg); + return ret; +} + +/*********************************************************************** + * PeekMessageW + */ +BOOL32 WINAPI PeekMessage32W( LPMSG32 lpmsg, HWND32 hwnd, + UINT32 min,UINT32 max,UINT32 wRemoveMsg) +{ + /* FIXME: Should perform Unicode translation on specific messages */ + return PeekMessage32A(lpmsg,hwnd,min,max,wRemoveMsg); +} /*********************************************************************** * GetMessage16 (USER.108) @@ -943,6 +967,36 @@ BOOL16 WINAPI GetMessage16( SEGPTR msg, HWND16 hwnd, UINT16 first, UINT16 last) return (lpmsg->message != WM_QUIT); } +/*********************************************************************** + * GetMessage32A (USER32.270) + */ +BOOL32 WINAPI GetMessage32A(MSG32* lpmsg,HWND32 hwnd,UINT32 min,UINT32 max) +{ + BOOL32 ret; + MSG16 *msg = SEGPTR_NEW(MSG16); + if (!msg) return 0; + ret=GetMessage16(SEGPTR_GET(msg),(HWND16)hwnd,min,max); + /* FIXME */ + STRUCT32_MSG16to32(msg,lpmsg); + SEGPTR_FREE(msg); + return ret; +} + +/*********************************************************************** + * GetMessage32W (USER32.274) + */ +BOOL32 WINAPI GetMessage32W(MSG32* lpmsg,HWND32 hwnd,UINT32 min,UINT32 max) +{ + BOOL32 ret; + MSG16 *msg = SEGPTR_NEW(MSG16); + if (!msg) return 0; + ret=GetMessage16(SEGPTR_GET(msg),(HWND16)hwnd,min,max); + /* FIXME */ + STRUCT32_MSG16to32(msg,lpmsg); + SEGPTR_FREE(msg); + return ret; +} + /*********************************************************************** * PostMessage16 (USER.110) diff --git a/windows/nonclient.c b/windows/nonclient.c index f9917eecd94..8ab8abf6530 100644 --- a/windows/nonclient.c +++ b/windows/nonclient.c @@ -26,14 +26,9 @@ #include "options.h" -int NC_CaptionLeftNudge; -int NC_CaptionTopNudge; -int NC_SysControlNudge; int NC_MaxControlNudge; int NC_MinControlNudge; UINT32 NC_CaptionTextFlags; -HBRUSH32 NC_WinHighlight95; -HBRUSH32 NC_WinShadow95; static HBITMAP16 hbitmapClose = 0; static HBITMAP16 hbitmapCloseD = 0; @@ -176,7 +171,6 @@ NC_AdjustRectOuter95 (LPRECT16 rect, DWORD style, BOOL32 menu, DWORD exStyle) rect->top -= SYSMETRICS_CYSMCAPTION; else rect->top -= SYSMETRICS_CYCAPTION; -// rect->top -= sysMetrics[SM_CYCAPTION]; } if (menu) @@ -570,7 +564,7 @@ LONG NC_DoNCHitTest (WND *wndPtr, POINT16 pt ) * * Handle a WM_NCHITTEST message. Called from NC_HandleNCHitTest(). * - * FIXME: Just a copy of the Win 3.1 version. + * FIXME: Just a modified copy of the Win 3.1 version. */ LONG @@ -828,11 +822,15 @@ NC_DrawSysButton95 (HWND32 hwnd, HDC32 hdc, BOOL32 down) hIcon = wndPtr->class->hIconSm; else if (wndPtr->class->hIcon) hIcon = wndPtr->class->hIcon; +// else +// hIcon = LoadIcon32A (0, IDI_APPLICATION); if (hIcon) DrawIconEx32 (hdc, rect.left + 2, rect.top + 1, hIcon, - sysMetrics[SM_CYCAPTION] - 3, - sysMetrics[SM_CYCAPTION] - 3, 0, 0, DI_NORMAL); + sysMetrics[SM_CXSMICON], + sysMetrics[SM_CYSMICON], + 0, 0, DI_NORMAL); + return (hIcon != 0); } return FALSE; diff --git a/windows/user.c b/windows/user.c index 0a6611adc16..97cc7739965 100644 --- a/windows/user.c +++ b/windows/user.c @@ -304,6 +304,33 @@ BOOL32 WINAPI ExitWindowsEx( UINT32 flags, DWORD reserved ) return FALSE; } + +/*********************************************************************** + * ChangeDisplaySettingA (USER32.589) + */ +LONG WINAPI ChangeDisplaySettings32A( LPDEVMODE32A devmode, DWORD flags ) +{ + FIXME(system, ": stub\n"); + if (devmode==NULL) + FIXME(system," devmode=NULL (return to default mode)\n"); + else if ( (devmode->dmBitsPerPel != DefaultDepthOfScreen(screen)) + || (devmode->dmPelsHeight != screenHeight) + || (devmode->dmPelsWidth != screenWidth) ) + + { + + if (devmode->dmFields & DM_BITSPERPEL) + FIXME(system," bpp=%ld\n",devmode->dmBitsPerPel); + if (devmode->dmFields & DM_PELSWIDTH) + FIXME(system," width=%ld\n",devmode->dmPelsWidth); + if (devmode->dmFields & DM_PELSHEIGHT) + FIXME(system," height=%ld\n",devmode->dmPelsHeight); + FIXME(system," (Putting X in this mode beforehand might help)\n"); + } + return DISP_CHANGE_SUCCESSFUL; +} + + /*********************************************************************** * EnumDisplaySettingsA (USER32.592) */