Release 970914
Thu Sep 11 18:24:56 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [objects/dc.c]
In DC_SetupGCForPatBlt, replace R2_NOT by GXxor with (black xor white).
Tue Sep 9 23:04:02 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
* [memory/virtual.c]
Do not write debugging info unconditionally to stderr.
* [files/profile.c]
Call PROFILE_GetSection in PROFILE_GetString for key_name "" too.
* [misc/crtdll.c]
Many new functions.
* [include/windows.h] [windows/winpos.c]
ClientToScreen16 doesn't have a return value.
Sun Sep 7 10:06:39 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [misc/main.c] [AUTHORS]
Update the list of contributors. Please let me know if I forgot
someone.
* [if1632/*.spec] [if1632/builtin.c] [tools/build.c]
Ordinal base for Win32 DLLs is now computed automatically from the
lowest ordinal found.
* [include/wintypes.h]
WINAPI is now defined as attribute((stdcall)). This will require
gcc to compile.
* [if1632/thunk.c]
Removed Win32 thunks (no longer needed with stdcall).
* [if1632/crtdll.spec] [misc/crtdll.c]
Make sure we only reference cdecl functions in the spec file.
* [objects/dc.c]
Use CapNotLast drawing style for 1-pixel wide lines.
* [tools/build.c]
Added 'double' argument type.
Added 'varargs' function type for Win32.
Made CallTo16_xxx functions stdcall.
Fri Sep 5 14:50:49 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [tools/build.c] [windows/win.c] [windows/event.c] [windows/message.c]
More fixes to get message exchange closer to the original.
* [misc/spy.c]
Message logs now contain window names.
* [loader/resource.c] [loader/ne_resource.c] [loader/task.c]
[objects/cursoricon.c] [windows/user.c]
Added some obscure features to fix memory leaks.
Fri Sep 5 00:46:28 1997 Jan Willamowius <jan@janhh.shnet.org>
* [if1632/kernel32.spec] [win32/newfns.c]
Added stub for UTRegister() and UTUnRegister().
Thu Sep 4 12:03:12 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c]
Allow ASCII codes > 127 in WM_CHAR.
Mon Sep 1 17:23:24 1997 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [controls/widgets.c]
In InitCommonControls, remember the name of the class
because lpszClassName was made to point to a local array
Added the ProgressBar to the list of implemented controls.
Call InitCommonControls from WIDGETS_Init to register all
implemented Common Controls.
* [include/commctrl.h]
Added misc decl for the Progress Bar.
* [controls/progress.c] [include/progress.h]
First attempt at implementiong the Progress Bar class.
* [objects/brush.h]
Implementation for GetSysColorBrush[16|32]
* [controls/status.c]
Use DrawEdge to draw the borders and fill the background
* [controls/uitools.c]
Added DrawDiagEdge32 and DrawRectEdge32
* [graphics/painting.c]
Implement DrawEdge[16|32]
Started DrawFrameControl32
Mon Sep 1 10:07:09 1997 Lawson Whitney <lawson_whitney@juno.com>
* [misc/comm.c] [include/windows.h]
SetCommEventMask returns a SEGPTR.
Sun Aug 31 23:28:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][loader/module.c][include/pe_image.h]
[include/module.h]
Cleaned up the whole Win32 library mess (a bit).
* [debugger/stabs.c]
If 'wine' has no absolute path and isn't found, check $PATH too.
* [misc/ole2nls.c]
Some fixes.
* [misc/ver.c]
Added support for PE style version resources.
* [memory/string.c]
Check for NULL pointers to _lstr* functions, just as Windows95 does.
* [multimedia/time.c]
Made list of timers a simple linked list.
* [loader/resource.c]
Netscape 3 seems to pass NEGATIVE resource Ids (in an
unsigned int, yes). Don't know why, fixed it anyway.
* [objects/bitmap.c]
LoadImageW added.
* [include/win.h][windows/win.c]
Change wIDmenu from UINT16 to UINT32 and changed the
SetWindow(Long|Word) accordingly.
Thu Aug 28 19:30:08 1997 Morten Welinder <terra@diku.dk>
* [include/windows.h]
Add a few more colors defined for Win95.
Add a few more brush styles.
* [windows/syscolor.c]
Add error checks for SYSCOLOR_SetColor, SYSCOLOR_Init,
GetSysColor16, GetSysColor32. Add support for above colors.
Sun Aug 24 16:22:57 1997 Andrew Taylor <andrew@riscan.com>
* [multimedia/mmsystem.c]
Changed mmioDescend to use mmio functions for file I/O, neccessary
for memory files.
diff --git a/memory/global.c b/memory/global.c
index 45088c2..ce11ed2 100644
--- a/memory/global.c
+++ b/memory/global.c
@@ -17,6 +17,7 @@
#include "miscemu.h"
#include "dde_mem.h"
#include "stackframe.h"
+#include "module.h"
#include "options.h"
#include "stddebug.h"
#include "debug.h"
@@ -206,6 +207,7 @@
{
ptr = HeapAlloc( SystemHeap, 0, size );
}
+ /* FIXME: free discardable blocks and try again? */
if (!ptr) return 0;
/* Allocate the selector(s) */
@@ -274,7 +276,7 @@
HANDLE16 owner = GetCurrentPDB();
if (flags & GMEM_DDESHARE)
- owner = GetExePtr(owner); /* Make it a module handle */
+ owner = MODULE_HANDLEtoHMODULE16(owner); /* Make it a module handle */
return GLOBAL_Alloc( flags, size, owner, FALSE, FALSE, FALSE );
}
@@ -313,8 +315,11 @@
(pArena->lockCount > 0) || (pArena->pageLockCount > 0)) return 0;
HeapFree( SystemHeap, 0, (void *)pArena->base );
pArena->base = 0;
- /* Note: we rely on the fact that SELECTOR_ReallocBlock won't */
- /* change the selector if we are shrinking the block */
+
+ /* Note: we rely on the fact that SELECTOR_ReallocBlock won't
+ * change the selector if we are shrinking the block.
+ * FIXME: shouldn't we keep selectors until the block is deleted?
+ */
SELECTOR_ReallocBlock( sel, 0, 1, SEGMENT_DATA, 0, 0 );
return handle;
}
@@ -411,15 +416,20 @@
{
dprintf_global( stddeb, "WIN16_GlobalLock16(%04x) -> %08lx\n",
handle, MAKELONG( 0, GlobalHandleToSel(handle)) );
- if (!handle) return 0;
+ if (handle)
+ {
+ if (handle == (HGLOBAL16)-1) handle = CURRENT_DS;
#ifdef CONFIG_IPC
- if (is_dde_handle(handle))
- return PTR_SEG_OFF_TO_SEGPTR( DDE_GlobalHandleToSel(handle), 0 );
+ if (is_dde_handle(handle))
+ return PTR_SEG_OFF_TO_SEGPTR( DDE_GlobalHandleToSel(handle), 0 );
#endif /* CONFIG_IPC */
- if (!GET_ARENA_PTR(handle)->base) return (SEGPTR)0;
- return PTR_SEG_OFF_TO_SEGPTR( GlobalHandleToSel(handle), 0 );
+ if (!GET_ARENA_PTR(handle)->base) return (SEGPTR)0;
+ return PTR_SEG_OFF_TO_SEGPTR( GlobalHandleToSel(handle), 0 );
+ /* FIXME: put segment value in CX as well */
+ }
+ return (SEGPTR)0;
}
diff --git a/memory/local.c b/memory/local.c
index 894beba..c0062dc 100644
--- a/memory/local.c
+++ b/memory/local.c
@@ -16,6 +16,7 @@
#include <string.h>
#include "windows.h"
#include "ldt.h"
+#include "task.h"
#include "global.h"
#include "heap.h"
#include "instance.h"
@@ -333,7 +334,7 @@
if (start == 0) {
/* Check if the segment is the DGROUP of a module */
- if ((pModule = MODULE_GetPtr( GetExePtr( selector ) )))
+ if ((pModule = MODULE_GetPtr( selector )))
{
SEGTABLEENTRY *pSeg = NE_SEG_TABLE( pModule ) + pModule->dgroup - 1;
if (pModule->dgroup && (pSeg->selector == selector)) {
@@ -1582,7 +1583,6 @@
NE_MODULE *pModule;
WORD ds;
- module = GetExePtr( module );
if (!(pModule = MODULE_GetPtr( module ))) return 0;
ds = (NE_SEG_TABLE( pModule ) + pModule->dgroup - 1)->selector;
return MAKELONG( LOCAL_CountFree( ds ), LOCAL_HeapSize( ds ) );
diff --git a/memory/string.c b/memory/string.c
index 72efb86..60194a3 100644
--- a/memory/string.c
+++ b/memory/string.c
@@ -8,6 +8,7 @@
#include <ctype.h>
#include <string.h>
#include "windows.h"
+#include "winerror.h"
#include "ldt.h"
#include "stddebug.h"
#include "debug.h"
@@ -147,6 +148,12 @@
*/
INT32 WINAPI lstrcmp32A( LPCSTR str1, LPCSTR str2 )
{
+ /* Win95 KERNEL32.DLL does it that way. Hands off! */
+ if (!str1 || !str2) {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+
dprintf_string(stddeb,"strcmp: '%s' and '%s'\n",
(str1)?str1:"NULL",(str2)?str2:"NULL");
return (INT32)strcmp( str1, str2 );
@@ -158,6 +165,10 @@
*/
INT32 WINAPI lstrcmp32W( LPCWSTR str1, LPCWSTR str2 )
{
+ if (!str1 || !str2) {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
while (*str1 && (*str1 == *str2)) { str1++; str2++; }
return (INT32)(*str1 - *str2);
}
@@ -179,6 +190,10 @@
{
INT32 res;
+ if (!str1 || !str2) {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
dprintf_string(stddeb,"strcmpi '%s' and '%s'\n",
(str1)?str1:"NULL",(str2)?str2:"NULL");
while (*str1)
@@ -198,6 +213,10 @@
{
INT32 res;
+ if (!str1 || !str2) {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
while (*str1)
{
/* FIXME: Unicode */
diff --git a/memory/virtual.c b/memory/virtual.c
index f3765b2..0788836 100644
--- a/memory/virtual.c
+++ b/memory/virtual.c
@@ -118,19 +118,19 @@
UINT32 addr = view->base;
BYTE prot = view->prot[0];
- fprintf( stderr, "View: %08x - %08x%s",
+ dprintf_virtual( stddeb, "View: %08x - %08x%s",
view->base, view->base + view->size - 1,
(view->flags & VFLAG_SYSTEM) ? " (system)" : "" );
if (view->mapping && view->mapping->file)
- fprintf( stderr, " %s @ %08x\n",
+ dprintf_virtual( stddeb, " %s @ %08x\n",
view->mapping->file->unix_name, view->offset );
else
- fprintf( stderr, " (anonymous)\n");
+ dprintf_virtual( stddeb, " (anonymous)\n");
for (count = i = 1; i < view->size >> page_shift; i++, count++)
{
if (view->prot[i] == prot) continue;
- fprintf( stderr, " %08x - %08x %s\n",
+ dprintf_virtual( stddeb, " %08x - %08x %s\n",
addr, addr + (count << page_shift) - 1,
VIRTUAL_GetProtStr(prot) );
addr += (count << page_shift);
@@ -138,7 +138,7 @@
count = 0;
}
if (count)
- fprintf( stderr, " %08x - %08x %s\n",
+ dprintf_virtual( stddeb, " %08x - %08x %s\n",
addr, addr + (count << page_shift) - 1,
VIRTUAL_GetProtStr(prot) );
}
@@ -150,7 +150,7 @@
void VIRTUAL_Dump(void)
{
FILE_VIEW *view = VIRTUAL_FirstView;
- fprintf( stderr, "\nDump of all virtual memory views:\n\n" );
+ dprintf_virtual( stddeb, "\nDump of all virtual memory views:\n\n" );
while (view)
{
VIRTUAL_DumpView( view );