Release 940614

Tue Jun 14 08:09:14 1994  Bob Amstadt  (bob@pooh)

	* loader/selector.c (GetCurrentPDB): 
	Added trivial function GetCurrentPDB() which returns the program
	segment prefix selector.

	* memory/heap.c (HEAP_Free): 
	If free list is empty, make the freed block the free list.

Fri Jun 10 07:56:49 1994  Bob Amstadt  (bob@pooh)

	* controls/edit.c (EDIT_SetTextMsg): 
	Do not append a newline at the end of the last line.

	* windows/event.c (SetCapture): 
	Set winHasCursor if mouse capture succeeds.

Jun 13, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)

	* [controls/listbox.c]
	Fix bug in listbox : InsertString should call AddString if -1.

	* [controls/menu.c]
	New function GetMenuState().

	* [controls/scroll.c] [windows/nonclient.c]
	Try to make ShowScrollBar() recalc NC_ regions. Not finished !

	* [objects/text.c]
	Add Stub for TabbedTextOut(), which temporarely call Textout().

	* [windows/keyboard.c] [windows/event.c]
	New function GetKeyBoardState() with an KeyStateTable array
		& associated handling in function EVENT_key().

Mon Jun 13 16:45:24 MET DST 1994 (erik@hacktic.nl)

        * [controls/menu.c]
        IsMenu() added.

        * [loader/library.c]
        ModuleFirst(), ModuleNext(), ModuleFindName(), ModuleFindHandle()
        added.

        * [object/gdiobj.c]
        IsGDIObject() added.

        * [miscemu/int2[56].c]
        bugfix: both didn't leave flags pushed on 16bit-stack.
        (winfile gets a bit further)

        * [miscemu/int16.c]
        Added (empty).

Sat Jun 11 22:56:48 1994 Jon Tombs (jon@esix2.us.es)
	* windows/event.c:
	Added code to drop redundant motion Events in the XEvent queue.

Thu Jun  9 10:55:55 MET DST 1994  Jochen Hein ( Hein@Student.TU-Clausthal.de )

	* [misc/main.c misc/message.c include/texts.h]
	Removed the text-constants from message.c into variables
	which may be changed from X-resources.

	* [misc/main.c misc/message.c]
	added <locale.h> and setlocale() to main.c, used toupper() in message.c

Mon, 13 Jun 94 09:41:16 -0500 Paul Bramel <paulbr@comm.mot.com>

        * controls/button.c ( [CR]B_LButton* ) 
        left rc.right at full window width so click on label also 
        activates the control (MSWin behavior)

Sat Jun 11 19:05:40 1994  Olaf Flebbe  (flebbe@tat.physik.uni-tuebingen.de)

        * include/windows.h:
          functions pointers can not be packed.
          (annoying warnings with forthcomming gcc-2.6.x)
        
        * loader/main.c (InitDLL): 
          Fixed a printf statement. (for control.exe) 

          (InitializeLoadedDLLs): 
          deleted shadow definition of  *wpnt.
          (Breaks many programs, because now COMMDLG will be
           initialized :-(

        * windows/win.c (SetWindowText): 
          added missing breaks; (PENSATE starts) 

        * windows/graphics.c (FloodFill): 
          Proper boundarys. (BANGBANG starts) FloodFile_rec should
          be rewritten.

        * objects/font.c (FONT_GetMetrics): 
          TYPO: use font->perchar only if it is defined. (WRITE starts)

Sun June 12, Peter Broadhurst (pbr@ua.nwl.ac.uk)
        controls/scroll.c:
        Fixes for improved behaviour when dragging thumb;
        Added SB_THUMBPOSITION message when thumb is released.
diff --git a/miscemu/Imakefile b/miscemu/Imakefile
index 65c043f..27798bb 100644
--- a/miscemu/Imakefile
+++ b/miscemu/Imakefile
@@ -6,6 +6,7 @@
 	emulate.c \
 	int10.c \
 	int15.c \
+	int16.c \
 	int1a.c \
 	int21.c \
 	int25.c \
diff --git a/miscemu/int16.c b/miscemu/int16.c
new file mode 100644
index 0000000..88ff49d
--- /dev/null
+++ b/miscemu/int16.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "msdos.h"
+#include "wine.h"
+
+int do_int16(struct sigcontext_struct *context)
+{
+	switch((context->sc_eax >> 8) & 0xff)
+	{
+	case 0xc0:
+		
+	default:
+		IntBarf(0x16, context);
+	};
+	return 1;
+}
diff --git a/miscemu/int25.c b/miscemu/int25.c
index 89d188d..9a9a366 100644
--- a/miscemu/int25.c
+++ b/miscemu/int25.c
@@ -11,9 +11,7 @@
 	if( (ECX & 0xffff) == 0xffff)
 	{
 		begin = getdword(dataptr);
-
 		length = getword(&dataptr[4]);
-
 		dataptr = (BYTE *) getdword(&dataptr[6]);
 			
 	} else {
@@ -23,6 +21,19 @@
 	fprintf(stderr, "int25: abs diskread, drive %d, sector %d, "
 	"count %d, buffer %d\n", EAX & 0xff, begin, length, (int) dataptr);
 
+	memset(dataptr, 0, length * 512);
+
+	if (begin == 0 && length > 1) 
+		*(dataptr + 512) = 0xf8;
+
+	if (begin == 1) 
+		*dataptr = 0xf8;
+
 	ResetCflag;
+
+	/* push flags on stack */
+	SP -= sizeof(WORD);
+	setword(pointer(SS,SP), (WORD) EFL);
+
 	return 1;
 }
diff --git a/miscemu/int26.c b/miscemu/int26.c
index 5fb86a3..0308d37 100644
--- a/miscemu/int26.c
+++ b/miscemu/int26.c
@@ -23,5 +23,10 @@
 		" buffer %d\n", EAX & 0xff, begin, length, (int) dataptr);
 
 	ResetCflag;
+
+	/* push flags on stack */
+	SP -= sizeof(WORD);
+	setword(pointer(SS,SP), (WORD) EFL);
+
 	return 1;
 }
diff --git a/miscemu/int2f.c b/miscemu/int2f.c
index 8c50267..0a7d14e 100644
--- a/miscemu/int2f.c
+++ b/miscemu/int2f.c
@@ -5,11 +5,21 @@
 
 int do_int2f(struct sigcontext_struct *context)
 {
-	switch(context->sc_eax & 0xffff)
+	switch((context->sc_eax >> 8) & 0xff)
 	{
-	case 0x1600: /* windows enhanced mode install check */
-		/* don't return anything as we're running in standard mode */
-		break;
+	case 0x15: /* mscdex */
+		/* ignore requests */
+		return 1;
+
+	case 0x16:
+		switch(context->sc_eax & 0xff)
+		{
+		case 0x00: /* windows enhanced mode install check */
+			   /* don't return anything as we're running in standard mode */
+			return 1;
+
+		default:
+		}
 
 	default:
 		IntBarf(0x2f, context);