Release 950706

Wed Jul  5 19:06:35 1995  Alexandre Julliard  <julliard@sunsite.unc.edu>

	* [controls/scroll.c]
	Fixed drawing bug that caused part of a non-client scroll bar
	to be painted even when the scroll-bar was hidden.

	* [debugger/break.c] [debugger/dbg.y]
	Rewrote breakpoint handling to work in 16-bit mode.
	Implemented single-stepping ('step' and 'next' instructions).

	* [debugger/debug.l]
	Format specifier is now a separate token.
	Entering an empty line at the debugger prompt causes the previous
	command to be repeated, like under gdb.
	
	* [debugger/debug.l] [debugger/registers.c]
	Differentiate 16-bit and 32-bit registers without taking current
	mode into account ($eax is always 32-bit, $ax always 16-bit).

	* [debugger/stack.c]
	Fixed stack information routines to differentiate between 16-bit
	and 32-bit stacks.

	* [loader/task.c]
	Option -debug now sets a breakpoint at the first instruction of
	every loaded task.

	* [miscemu/instr.c]
	Added handling of lock, repe and repne prefixes.

	* [objects/dib.c]
	Changed StretchDIBits() to do the correct thing, even if it's still
	not really optimal.

	* [windows/graphics.c]
	Fixes in RoundRect(), thanks to Babak Masalehdan.

	* [windows/message.c]
	Tried to fix mouse event handling with respect to disabled
	windows.

	* [windows/painting.c]
	Clear WIN_NEEDS_NCPAINT flag before sending WM_NCPAINT to avoid
	infinite loops.

	* [windows/win.c]
	Fixed IsWindowVisible() to return FALSE when one of the parent
	windows is hidden.

Sat Jul  1 22:08:21 1995   Martin von Loewis <loewis@informatik.hu-berlin.de>

	* [if1632/compobj.spec][misc/compobj.c]
	CoGetMalloc: New function
	Added relay entries for COMPOBJ ordinals above 100
	CoInitialize: Changed parameter to DWORD

	* [if1632/ole2.spec]
	Exported implementation of OleBuildVersion

	* [if1632/ole2disp.spec][misc/ole2disp.c][misc/Imakefile]
	ole2disp.c: New file
	SysAllocString, SysReallocString, SysAllocStringLen,
	SysReAllocStringLen, SysFreeString, SysStringLen: new functions

	* [if1632/ole2nls.spec][include/winnls.h][misc/ole2nls.c]
	CompareStringA: New function

Thu Jun 29 19:42:02 1995  Marcus Meissner  <msmeissn@faui01.informatik.uni-erlangen.de>
	* [objects/font.c] [if1632/gdi.spec]
	New stubs for CreateScalableFontResource, GetGlyphOutline.

Thu Jun 29 13:47:08 GMT 1995  Göran Thyni  (goran@norrsken.bildbasen.se)

	* [misc/commdlg.c]
	Extensive changes and bug fixes to FileDialog handling,
        behaves more like native Windows.

Wed Jun 28 13:04:44 1995   Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>

        * [controls/listbox.c] [controls/combo.c]
	Some minor optimizations.
	
	* [memory/local.c]
	LOCAL_FindFreeBlock(): Never use the last one.
	
	* [memory/global.c]
	GlobalReAlloc(): GMEM_MODIFY must not be ignored when size==0.
	
	* [misc/file.c]
	read() returns an error when length==0. This is not what Windows
	programs expect, so pay attention to this in _lread(). Changed this
	in _lwrite(), _hread(), _hwrite(), too.

	* [loader/resource.c]
	LoadIcon(): Ignore bih->biSizeImage, some icons have wrong values in
	there.
	
	* [if1632/shell.spec] [misc/shell.c]
	Wrong spec file entries caused havoc: HKEY has 32 bit, not 16.
	Accept some more combinations of parameters in the Reg..() functions.
	
	* [if1632/toolhelp.spec]
	Make InterruptRegister() and InterruptUnregister() return false.

	* [windows/hook.c]
	CallNextHookEx() used to crash when called with a null hhook. Fixed.

Wed Jun 28 10:14:34 1995  Martin von Loewis  <martin@informatik.hu-berlin.de>

	* [include/neexe.h][loader/ne_image.c]
	NE_LoadSegment: Detect iterated segments

	* [misc/ole2nls.c]
	LOCALE_SLONGDATE: fixed typo

	* [miscemu/int5c.c]
	Reordered include files to avoid conflicts with Linux libc.5.1

	* [rc/winerc.c]
	Added -b option to process binary resource files into C arrays

	* [include/callback.h]
	CallWndProc: Added dummy ds parameter for libwine

	* [include/gdi.h][include/user.h]
	USER_HEAP_ALLOC, GDI_HEAP_ALLOC: dropped flags parameter

	* [include/ldt.h][include/stackframe.h]
	defined segment conversion macros for libwine

	* [misc/atom.c]
	Defined USER_HeapSel for libwine

	* [misc/main.c]
	Disable -dll option for libwine

	* [misc/user.c]
	removed GetFreeSystemResources, SystemHeapInfo from libwine for now

	* [toolkit/heap.c]
	fixed LocalLock prototype

	* [toolkit/sup.c]
	sync'ed load_mz_header, load_ne_header with structures

	* [toolkit/winmain.c]
	Disabled resource DLLs for libwine for now

Mon Jun 26 19:30:24 1995  Hans de Graaff  (graaff@twi72.twi.tudelft.nl)

	* [misc/main.c]
	Fixed -enhanced option to report a 386 CPU instead of a 286.

Fri Jun 23 23:18:25 1995  Marcus Meissner  <msmeissn@faui01.informatik.uni-erlangen.de>

	* [misc/dos_fs.c]
	Remove maximum open dosdirent limit (fixing the winfile.exe
 	problem) by using telldir()/seekdir().
	
Fri Jun 23 13:42:25 1995  Hans de Graaff  (graaff@twi72.twi.tudelft.nl)

	* [misc/profile.c]
	Fixed problem parsing empty lines within sections in .ini files.
diff --git a/objects/bitblt.c b/objects/bitblt.c
index 12f8167..38074db 100644
--- a/objects/bitblt.c
+++ b/objects/bitblt.c
@@ -1034,6 +1034,16 @@
     yDst      = dcDst->w.DCOrgY + YLPTODP( dcDst, yDst );
     widthDst  = widthDst * dcDst->w.VportExtX / dcDst->w.WndExtX;
     heightDst = heightDst * dcDst->w.VportExtY / dcDst->w.WndExtY;
+
+    dprintf_bitblt( stddeb, "    vportdst=%d,%d-%d,%d wnddst=%d,%d-%d,%d\n",
+                   dcDst->w.VportOrgX, dcDst->w.VportOrgY,
+                   dcDst->w.VportExtX, dcDst->w.VportExtY,
+                   dcDst->w.WndOrgX, dcDst->w.WndOrgY,
+                   dcDst->w.WndExtX, dcDst->w.WndExtY );
+    dprintf_bitblt( stddeb, "    rectdst=%d,%d-%d,%d orgdst=%d,%d\n",
+                    xDst, yDst, widthDst, heightDst,
+                    dcDst->w.DCOrgX, dcDst->w.DCOrgY );
+
     if (useSrc)
     {
         xSrc      = dcSrc->w.DCOrgX + XLPTODP( dcSrc, xSrc );
@@ -1041,10 +1051,23 @@
         widthSrc  = widthSrc * dcSrc->w.VportExtX / dcSrc->w.WndExtX;
         heightSrc = heightSrc * dcSrc->w.VportExtY / dcSrc->w.WndExtY;
         fStretch  = (widthSrc != widthDst) || (heightSrc != heightDst);
+        dprintf_bitblt( stddeb,"    vportsrc=%d,%d-%d,%d wndsrc=%d,%d-%d,%d\n",
+                        dcSrc->w.VportOrgX, dcSrc->w.VportOrgY,
+                        dcSrc->w.VportExtX, dcSrc->w.VportExtY,
+                        dcSrc->w.WndOrgX, dcSrc->w.WndOrgY,
+                        dcSrc->w.WndExtX, dcSrc->w.WndExtY );
+        dprintf_bitblt( stddeb, "    rectsrc=%d,%d-%d,%d orgsrc=%d,%d\n",
+                        xSrc, ySrc, widthSrc, heightSrc,
+                        dcSrc->w.DCOrgX, dcSrc->w.DCOrgY );
         if (!BITBLT_GetVisRectangles( dcDst, xDst, yDst, widthDst, heightDst,
                                       dcSrc, xSrc, ySrc, widthSrc, heightSrc,
                                       &visRectSrc, &visRectDst ))
             return TRUE;
+        dprintf_bitblt( stddeb, "    vissrc=%d,%d-%d,%d visdst=%d,%d-%d,%d\n",
+                        visRectSrc.left, visRectSrc.top,
+                        visRectSrc.right, visRectSrc.bottom,
+                        visRectDst.left, visRectDst.top,
+                        visRectDst.right, visRectDst.bottom );
     }
     else
     {
@@ -1052,6 +1075,9 @@
         if (!BITBLT_GetVisRectangles( dcDst, xDst, yDst, widthDst, heightDst,
                                       NULL, 0, 0, 0, 0, NULL, &visRectDst ))
             return TRUE;
+        dprintf_bitblt( stddeb, "    vissrc=none visdst=%d,%d-%d,%d\n",
+                        visRectDst.left, visRectDst.top,
+                        visRectDst.right, visRectDst.bottom );
     }
 
     width  = visRectDst.right - visRectDst.left;
@@ -1240,12 +1266,7 @@
                 "BitBlt: %04x %d,%d %d bpp -> %04x %d,%d %dx%dx%d rop=%06lx\n",
                 hdcSrc, xSrc, ySrc, dcSrc ? dcSrc->w.bitsPerPixel : 0,
                 hdcDst, xDst, yDst, width, height, dcDst->w.bitsPerPixel, rop);
-    if (dcSrc != NULL) {
-	dprintf_bitblt(stddeb,"        src org=%d,%d",
-		       dcSrc->w.DCOrgX, dcSrc->w.DCOrgY);
-    }
-    dprintf_bitblt(stddeb,"  dst org=%d,%d\n", dcDst->w.DCOrgX, 
-		   dcDst->w.DCOrgY);
+
     return CallTo32_LargeStack( (int(*)())BITBLT_InternalStretchBlt, 11,
                                 dcDst, xDst, yDst, width, height,
                                 dcSrc, xSrc, ySrc, width, height, rop );
diff --git a/objects/dib.c b/objects/dib.c
index 34a202f..78ab1ee 100644
--- a/objects/dib.c
+++ b/objects/dib.c
@@ -541,9 +541,19 @@
 	WORD xSrc, WORD ySrc, WORD wSrcWidth, WORD wSrcHeight,
 	LPSTR bits, LPBITMAPINFO info, WORD wUsage, DWORD dwRop )
 {
-	printf("StretchDIBits // call SetDIBitsToDevice for now !!!!\n");
-	return SetDIBitsToDevice(hdc, xDest, yDest, wDestWidth, wDestHeight,
-		xSrc, ySrc, 1, 1, bits, info, wUsage);
+    HBITMAP hBitmap, hOldBitmap;
+    HDC hdcMem;
+
+    hBitmap = CreateDIBitmap( hdc, &info->bmiHeader, CBM_INIT,
+                              bits, info, wUsage );
+    hdcMem = CreateCompatibleDC( hdc );
+    hOldBitmap = SelectObject( hdcMem, hBitmap );
+    StretchBlt( hdc, xDest, yDest, wDestWidth, wDestHeight,
+                hdcMem, xSrc, ySrc, wSrcWidth, wSrcHeight, dwRop );
+    SelectObject( hdcMem, hOldBitmap );
+    DeleteDC( hdcMem );
+    DeleteObject( hBitmap );
+    return wSrcHeight;
 }
 
 /***********************************************************************
diff --git a/objects/font.c b/objects/font.c
index 57079f0..be92707 100644
--- a/objects/font.c
+++ b/objects/font.c
@@ -259,6 +259,34 @@
     metrics->tmAveCharWidth = average;
 }
 
+/***********************************************************************
+ *           GetGlyphOutLine    (GDI.309)
+ */
+DWORD GetGlyphOutLine(
+	HDC hdc, UINT uChar, UINT fuFormat, LPGLYPHMETRICS lpgm, 
+	DWORD cbBuffer, LPSTR lpBuffer, LPMAT2 lpmat2
+) {
+	dprintf_font(stdnimp,"GetGlyphOutLine(0x%x, '%c', 0x%x, %p, %d, %p, %p) // - empty stub!\n",
+		hdc,uChar,fuFormat,lpgm,cbBuffer,lpBuffer,lpmat2
+	);
+	return (DWORD)-1; /* failure */
+}
+/***********************************************************************
+ *           CreateScalableFontResource    (GDI.310)
+ */
+BOOL CreateScalableFontResource(
+	UINT fHidden,LPSTR lpszResourceFile,
+	LPSTR lpszFontFile,LPSTR lpszCurrentPath
+) {
+	/* fHidden=1 - only visible for the calling app, read-only, not
+	 * enumbered with EnumFonts/EnumFontFamilies
+	 * lpszCurrentPath can be NULL
+	 */
+	dprintf_font(stdnimp,"CreateScalableFontResource(%d,%s,%s,%x(%s)) // empty stub!\n",
+		fHidden,lpszResourceFile,lpszFontFile,lpszCurrentPath
+	);
+	return FALSE; /* create failed */
+}
 
 /***********************************************************************
  *           CreateFontIndirect    (GDI.57)
diff --git a/objects/oembitmap.c b/objects/oembitmap.c
index 87093f6..6bb2581 100644
--- a/objects/oembitmap.c
+++ b/objects/oembitmap.c
@@ -11,6 +11,7 @@
 #include <X11/xpm.h>
 #include "gdi.h"
 #include "bitmap.h"
+#include "callback.h"
 #include "color.h"
 #include "icon.h"
 #include "stddebug.h"
@@ -280,9 +281,10 @@
 
     if (!OBM_InitColorSymbols()) return 0;
     
-    if (!OBM_CreateBitmaps( OBM_Pixmaps_Data[id].data,
-                            OBM_Pixmaps_Data[id].color,
-                            FALSE, &hbitmap, &hbitmask ))
+    if (!CallTo32_LargeStack( (int(*)())OBM_CreateBitmaps, 5,
+                              OBM_Pixmaps_Data[id].data,
+                              OBM_Pixmaps_Data[id].color,
+                              FALSE, &hbitmap, &hbitmask ))
     {
         fprintf( stderr, "Error creating OEM bitmap %d\n", OBM_FIRST+id );
         return 0;
@@ -308,8 +310,9 @@
     if (!(hicon = GlobalAlloc( GMEM_MOVEABLE, sizeof(ICONALLOC) ))) return 0;
     pIcon = (ICONALLOC *)GlobalLock( hicon );
 
-    if (!OBM_CreateBitmaps( OBM_Icons_Data[id], TRUE, TRUE,
-                            &pIcon->hBitmap, &pIcon->hBitMask ))
+    if (!CallTo32_LargeStack( (int(*)())OBM_CreateBitmaps, 5,
+                              OBM_Icons_Data[id], TRUE, TRUE,
+                              &pIcon->hBitmap, &pIcon->hBitMask ))
     {
         fprintf( stderr, "Error creating OEM icon %d\n", OIC_FIRST+id );
         GlobalFree( hicon );