1993-07-08 17:37:25 +00:00
|
|
|
|
static char RCSId[] = "$Id: heap.c,v 1.3 1993/07/04 04:04:21 root Exp root $";
|
1993-06-29 16:33:12 +00:00
|
|
|
|
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include "prototypes.h"
|
1993-07-08 17:37:25 +00:00
|
|
|
|
#include "segmem.h"
|
|
|
|
|
#include "heap.h"
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
#include "regfunc.h"
|
1993-06-29 16:33:12 +00:00
|
|
|
|
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
typedef struct heap_local_heap_s
|
|
|
|
|
{
|
|
|
|
|
struct heap_local_heap_s *next;
|
|
|
|
|
MDESC *free_list;
|
|
|
|
|
unsigned short selector;
|
|
|
|
|
} LHEAP;
|
|
|
|
|
|
|
|
|
|
LHEAP *LocalHeaps = NULL;
|
1993-06-29 16:33:12 +00:00
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
1993-07-08 17:37:25 +00:00
|
|
|
|
* HEAP_Init
|
1993-06-29 16:33:12 +00:00
|
|
|
|
*/
|
|
|
|
|
void
|
1993-07-08 17:37:25 +00:00
|
|
|
|
HEAP_Init(MDESC **free_list, void *start, int length)
|
1993-06-29 16:33:12 +00:00
|
|
|
|
{
|
1993-07-08 17:37:25 +00:00
|
|
|
|
*free_list = (MDESC *) start;
|
|
|
|
|
(*free_list)->prev = NULL;
|
|
|
|
|
(*free_list)->next = NULL;
|
|
|
|
|
(*free_list)->length = length - sizeof(MDESC);
|
1993-06-29 16:33:12 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
1993-07-08 17:37:25 +00:00
|
|
|
|
* HEAP_Alloc
|
1993-06-29 16:33:12 +00:00
|
|
|
|
*/
|
|
|
|
|
void *
|
1993-07-08 17:37:25 +00:00
|
|
|
|
HEAP_Alloc(MDESC **free_list, int flags, int bytes)
|
1993-06-29 16:33:12 +00:00
|
|
|
|
{
|
|
|
|
|
MDESC *m, *m_new;
|
|
|
|
|
|
1993-07-08 17:37:25 +00:00
|
|
|
|
#ifdef DEBUG_HEAP
|
|
|
|
|
printf("HeapAlloc: free_list %08x, flags %x, bytes %d\n",
|
|
|
|
|
free_list, flags, bytes);
|
1993-06-29 16:33:12 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Find free block big enough.
|
|
|
|
|
*/
|
1993-07-08 17:37:25 +00:00
|
|
|
|
for (m = *free_list; m != NULL; m = m->next)
|
1993-06-29 16:33:12 +00:00
|
|
|
|
{
|
1993-07-08 17:37:25 +00:00
|
|
|
|
if (m->length >= bytes && m->length < bytes + 4 * sizeof(MDESC))
|
1993-06-29 16:33:12 +00:00
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
else if (m->length > bytes)
|
|
|
|
|
{
|
|
|
|
|
m_new = m + (bytes / sizeof(MDESC)) + 2;
|
|
|
|
|
if (m->prev == NULL)
|
1993-07-08 17:37:25 +00:00
|
|
|
|
*free_list = m_new;
|
1993-06-29 16:33:12 +00:00
|
|
|
|
else
|
|
|
|
|
m->prev->next = m_new;
|
|
|
|
|
|
|
|
|
|
if (m->next != NULL)
|
|
|
|
|
m->next->prev = m_new;
|
|
|
|
|
|
|
|
|
|
m_new->next = m->next;
|
|
|
|
|
m_new->prev = m->prev;
|
|
|
|
|
m_new->length = m->length - ((int) m_new - (int) m);
|
|
|
|
|
m->length -= (m_new->length + sizeof(MDESC));
|
|
|
|
|
|
1993-07-08 17:37:25 +00:00
|
|
|
|
m->prev = m;
|
|
|
|
|
m->next = m;
|
1993-09-04 10:09:32 +00:00
|
|
|
|
m->lock = 0;
|
|
|
|
|
m->flags = 0;
|
Release 0.2.0
Tue Jul 13 20:31:31 1993 Bob Amstadt (bob at pooh)
* [global.c]
Completed global memory pool API
Sun Jul 11 16:59:52 1993 Alexandre Julliard
* [message.c] [user.c] [user.spec] [windows.h]
Added emulation of Windows message queue.
Thu Jul 8 19:29:27 1993 Bob Amstadt (bob at pooh)
* [build.c] Original by Bob Amstadt
* [callback.c] Original by Bob Amstadt, updates by
Alexandre Julliard
* [dump.c] Original by Bob Amstadt
* [global.c] Original by Bob Amstadt
* [heap.c] Original by Bob Amstadt
* [kernel.c] Original by Bob Amstadt
* [ldt.c] Original by Bob Amstadt
* [ldtlib.c] Original by Bob Amstadt
* [relay.c] Original by Bob Amstadt
* [resource.c] Original by Bob Amstadt, updates by
Alexandre Juliard
* [selector.c] Original by Bob Amstadt, updates by Eric Youngdale
* [user.c] Original by Bob Amstadt
* [wine.c] Original by Bob Amstadt, updates by Eric Youngdale and
Alexandre Julliard
* [wintcl.c] Original by Regents of the University of California,
updates by Peter MacDonald and Alexandre Julliard
* [callback.h] Original by Bob Amstadt
* [dlls.h] Original by Bob Amstadt
* [heap.h] Original by Bob Amstadt
* [neexe.h] Original by Bob Amstadt
* [prototypes.h] Original by Bob Amstadt, updates by
Eric Youngdale
* [segmem.h] Original by Bob Amstadt
* [tkInt.h] Original by Regents of the University of California
* [windows.h] Original by Peter MacDonald, updates by
Alexandre Julliard and Bob Amstadt
* [wine.h] Original by Eric Youngdale
* [kernel.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [gdi.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [shell.spec] Original by Bob Amstadt
* [unixlib.spec] Original by Bob Amstadt
* [user.spec] Original by Bob Amstadt, updates by Alexandre Julliard
* [win87em.spec] Original by Bob Amstadt
* [Windows.tcl] Original by Peter MacDonald, updates by
Alexandre Julliard
* [build-spec.txt] Original by Bob Amstadt
* [if1632.S] Original by Bob Amstadt, updates by Eric Youngdale
1993-07-15 11:13:45 +00:00
|
|
|
|
if (flags & GLOBAL_FLAGS_ZEROINIT)
|
|
|
|
|
memset(m + 1, 0, bytes);
|
|
|
|
|
#ifdef DEBUG_HEAP
|
|
|
|
|
printf("HeapAlloc: returning %08x\n", (m + 1));
|
|
|
|
|
#endif
|
1993-06-29 16:33:12 +00:00
|
|
|
|
return (void *) (m + 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (m != NULL)
|
|
|
|
|
{
|
|
|
|
|
if (m->prev == NULL)
|
1993-07-08 17:37:25 +00:00
|
|
|
|
*free_list = m->next;
|
1993-06-29 16:33:12 +00:00
|
|
|
|
else
|
|
|
|
|
m->prev->next = m->next;
|
|
|
|
|
|
|
|
|
|
if (m->next != NULL)
|
|
|
|
|
m->next->prev = m->prev;
|
|
|
|
|
|
1993-07-08 17:37:25 +00:00
|
|
|
|
m->prev = m;
|
|
|
|
|
m->next = m;
|
1993-09-04 10:09:32 +00:00
|
|
|
|
m->lock = 0;
|
|
|
|
|
m->flags = 0;
|
Release 0.2.0
Tue Jul 13 20:31:31 1993 Bob Amstadt (bob at pooh)
* [global.c]
Completed global memory pool API
Sun Jul 11 16:59:52 1993 Alexandre Julliard
* [message.c] [user.c] [user.spec] [windows.h]
Added emulation of Windows message queue.
Thu Jul 8 19:29:27 1993 Bob Amstadt (bob at pooh)
* [build.c] Original by Bob Amstadt
* [callback.c] Original by Bob Amstadt, updates by
Alexandre Julliard
* [dump.c] Original by Bob Amstadt
* [global.c] Original by Bob Amstadt
* [heap.c] Original by Bob Amstadt
* [kernel.c] Original by Bob Amstadt
* [ldt.c] Original by Bob Amstadt
* [ldtlib.c] Original by Bob Amstadt
* [relay.c] Original by Bob Amstadt
* [resource.c] Original by Bob Amstadt, updates by
Alexandre Juliard
* [selector.c] Original by Bob Amstadt, updates by Eric Youngdale
* [user.c] Original by Bob Amstadt
* [wine.c] Original by Bob Amstadt, updates by Eric Youngdale and
Alexandre Julliard
* [wintcl.c] Original by Regents of the University of California,
updates by Peter MacDonald and Alexandre Julliard
* [callback.h] Original by Bob Amstadt
* [dlls.h] Original by Bob Amstadt
* [heap.h] Original by Bob Amstadt
* [neexe.h] Original by Bob Amstadt
* [prototypes.h] Original by Bob Amstadt, updates by
Eric Youngdale
* [segmem.h] Original by Bob Amstadt
* [tkInt.h] Original by Regents of the University of California
* [windows.h] Original by Peter MacDonald, updates by
Alexandre Julliard and Bob Amstadt
* [wine.h] Original by Eric Youngdale
* [kernel.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [gdi.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [shell.spec] Original by Bob Amstadt
* [unixlib.spec] Original by Bob Amstadt
* [user.spec] Original by Bob Amstadt, updates by Alexandre Julliard
* [win87em.spec] Original by Bob Amstadt
* [Windows.tcl] Original by Peter MacDonald, updates by
Alexandre Julliard
* [build-spec.txt] Original by Bob Amstadt
* [if1632.S] Original by Bob Amstadt, updates by Eric Youngdale
1993-07-15 11:13:45 +00:00
|
|
|
|
if (flags & GLOBAL_FLAGS_ZEROINIT)
|
|
|
|
|
memset(m + 1, 0, bytes);
|
|
|
|
|
#ifdef DEBUG_HEAP
|
|
|
|
|
printf("HeapAlloc: returning %08x\n", (m + 1));
|
|
|
|
|
#endif
|
1993-06-29 16:33:12 +00:00
|
|
|
|
return (void *) (m + 1);
|
|
|
|
|
}
|
|
|
|
|
|
Release 0.2.0
Tue Jul 13 20:31:31 1993 Bob Amstadt (bob at pooh)
* [global.c]
Completed global memory pool API
Sun Jul 11 16:59:52 1993 Alexandre Julliard
* [message.c] [user.c] [user.spec] [windows.h]
Added emulation of Windows message queue.
Thu Jul 8 19:29:27 1993 Bob Amstadt (bob at pooh)
* [build.c] Original by Bob Amstadt
* [callback.c] Original by Bob Amstadt, updates by
Alexandre Julliard
* [dump.c] Original by Bob Amstadt
* [global.c] Original by Bob Amstadt
* [heap.c] Original by Bob Amstadt
* [kernel.c] Original by Bob Amstadt
* [ldt.c] Original by Bob Amstadt
* [ldtlib.c] Original by Bob Amstadt
* [relay.c] Original by Bob Amstadt
* [resource.c] Original by Bob Amstadt, updates by
Alexandre Juliard
* [selector.c] Original by Bob Amstadt, updates by Eric Youngdale
* [user.c] Original by Bob Amstadt
* [wine.c] Original by Bob Amstadt, updates by Eric Youngdale and
Alexandre Julliard
* [wintcl.c] Original by Regents of the University of California,
updates by Peter MacDonald and Alexandre Julliard
* [callback.h] Original by Bob Amstadt
* [dlls.h] Original by Bob Amstadt
* [heap.h] Original by Bob Amstadt
* [neexe.h] Original by Bob Amstadt
* [prototypes.h] Original by Bob Amstadt, updates by
Eric Youngdale
* [segmem.h] Original by Bob Amstadt
* [tkInt.h] Original by Regents of the University of California
* [windows.h] Original by Peter MacDonald, updates by
Alexandre Julliard and Bob Amstadt
* [wine.h] Original by Eric Youngdale
* [kernel.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [gdi.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [shell.spec] Original by Bob Amstadt
* [unixlib.spec] Original by Bob Amstadt
* [user.spec] Original by Bob Amstadt, updates by Alexandre Julliard
* [win87em.spec] Original by Bob Amstadt
* [Windows.tcl] Original by Peter MacDonald, updates by
Alexandre Julliard
* [build-spec.txt] Original by Bob Amstadt
* [if1632.S] Original by Bob Amstadt, updates by Eric Youngdale
1993-07-15 11:13:45 +00:00
|
|
|
|
#ifdef DEBUG_HEAP
|
|
|
|
|
printf("HeapAlloc: returning %08x\n", 0);
|
|
|
|
|
#endif
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
|
* HEAP_ReAlloc
|
|
|
|
|
*/
|
|
|
|
|
void *
|
|
|
|
|
HEAP_ReAlloc(MDESC **free_list, void *old_block,
|
|
|
|
|
int new_size, unsigned int flags)
|
|
|
|
|
{
|
1993-09-04 10:09:32 +00:00
|
|
|
|
MDESC *m_free;
|
|
|
|
|
MDESC *m;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Check validity of block
|
|
|
|
|
*/
|
|
|
|
|
m = (MDESC *) old_block - 1;
|
|
|
|
|
if (m->prev != m || m->next != m ||
|
|
|
|
|
((int) m & 0xffff0000) != ((int) *free_list & 0xffff0000))
|
|
|
|
|
{
|
|
|
|
|
#ifdef DEBUG_HEAP
|
|
|
|
|
printf("Attempt to resize bad pointer, m = %08x, *free_list = %08x\n",
|
|
|
|
|
m, free_list);
|
|
|
|
|
#endif
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Check for grow block
|
|
|
|
|
*/
|
|
|
|
|
if (new_size > m->length)
|
|
|
|
|
{
|
|
|
|
|
m_free = m + 1 + m->length / sizeof(MDESC);
|
|
|
|
|
if (m_free->next != m_free ||
|
|
|
|
|
m_free->prev != m_free ||
|
|
|
|
|
m_free->length + sizeof(MDESC) < new_size)
|
|
|
|
|
{
|
|
|
|
|
void *new_p = HEAP_Alloc(free_list, flags, new_size);
|
|
|
|
|
|
|
|
|
|
if (new_p ==NULL)
|
|
|
|
|
return NULL;
|
|
|
|
|
memcpy(new_p, old_block, m->length);
|
|
|
|
|
HEAP_Free(free_list, old_block);
|
|
|
|
|
return new_p;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (m_free->prev == NULL)
|
|
|
|
|
*free_list = m_free->next;
|
|
|
|
|
else
|
|
|
|
|
m_free->prev->next = m_free->next;
|
|
|
|
|
|
|
|
|
|
if (m_free->next != NULL)
|
|
|
|
|
m_free->next->prev = m_free->prev;
|
|
|
|
|
|
|
|
|
|
m->length += sizeof(MDESC) + m_free->length;
|
|
|
|
|
if (flags & GLOBAL_FLAGS_ZEROINIT)
|
|
|
|
|
memset(m_free, '\0', sizeof(MDESC) + m_free->length);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Check for shrink block.
|
|
|
|
|
*/
|
|
|
|
|
if (new_size < m->length - 4 * sizeof(MDESC))
|
|
|
|
|
{
|
|
|
|
|
m_free = m + new_size / sizeof(MDESC) + 2;
|
|
|
|
|
m_free->next = m_free;
|
|
|
|
|
m_free->prev = m_free;
|
|
|
|
|
m_free->length = m->length - (int) m_free - (int) m;
|
|
|
|
|
m->length = (int) m_free - (int) (m + 1);
|
|
|
|
|
HEAP_Free(free_list, m_free + 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return old_block;
|
1993-06-29 16:33:12 +00:00
|
|
|
|
}
|
|
|
|
|
|
Release 0.2.0
Tue Jul 13 20:31:31 1993 Bob Amstadt (bob at pooh)
* [global.c]
Completed global memory pool API
Sun Jul 11 16:59:52 1993 Alexandre Julliard
* [message.c] [user.c] [user.spec] [windows.h]
Added emulation of Windows message queue.
Thu Jul 8 19:29:27 1993 Bob Amstadt (bob at pooh)
* [build.c] Original by Bob Amstadt
* [callback.c] Original by Bob Amstadt, updates by
Alexandre Julliard
* [dump.c] Original by Bob Amstadt
* [global.c] Original by Bob Amstadt
* [heap.c] Original by Bob Amstadt
* [kernel.c] Original by Bob Amstadt
* [ldt.c] Original by Bob Amstadt
* [ldtlib.c] Original by Bob Amstadt
* [relay.c] Original by Bob Amstadt
* [resource.c] Original by Bob Amstadt, updates by
Alexandre Juliard
* [selector.c] Original by Bob Amstadt, updates by Eric Youngdale
* [user.c] Original by Bob Amstadt
* [wine.c] Original by Bob Amstadt, updates by Eric Youngdale and
Alexandre Julliard
* [wintcl.c] Original by Regents of the University of California,
updates by Peter MacDonald and Alexandre Julliard
* [callback.h] Original by Bob Amstadt
* [dlls.h] Original by Bob Amstadt
* [heap.h] Original by Bob Amstadt
* [neexe.h] Original by Bob Amstadt
* [prototypes.h] Original by Bob Amstadt, updates by
Eric Youngdale
* [segmem.h] Original by Bob Amstadt
* [tkInt.h] Original by Regents of the University of California
* [windows.h] Original by Peter MacDonald, updates by
Alexandre Julliard and Bob Amstadt
* [wine.h] Original by Eric Youngdale
* [kernel.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [gdi.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [shell.spec] Original by Bob Amstadt
* [unixlib.spec] Original by Bob Amstadt
* [user.spec] Original by Bob Amstadt, updates by Alexandre Julliard
* [win87em.spec] Original by Bob Amstadt
* [Windows.tcl] Original by Peter MacDonald, updates by
Alexandre Julliard
* [build-spec.txt] Original by Bob Amstadt
* [if1632.S] Original by Bob Amstadt, updates by Eric Youngdale
1993-07-15 11:13:45 +00:00
|
|
|
|
|
1993-07-08 17:37:25 +00:00
|
|
|
|
/**********************************************************************
|
|
|
|
|
* HEAP_Free
|
|
|
|
|
*/
|
1993-09-04 10:09:32 +00:00
|
|
|
|
int
|
1993-07-08 17:37:25 +00:00
|
|
|
|
HEAP_Free(MDESC **free_list, void *block)
|
|
|
|
|
{
|
|
|
|
|
MDESC *m_free;
|
|
|
|
|
MDESC *m;
|
|
|
|
|
MDESC *m_prev;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Validate pointer.
|
|
|
|
|
*/
|
|
|
|
|
m_free = (MDESC *) block - 1;
|
|
|
|
|
if (m_free->prev != m_free || m_free->next != m_free ||
|
|
|
|
|
((int) m_free & 0xffff0000) != ((int) *free_list & 0xffff0000))
|
|
|
|
|
{
|
|
|
|
|
#ifdef DEBUG_HEAP
|
|
|
|
|
printf("Attempt to free bad pointer,"
|
|
|
|
|
"m_free = %08x, *free_list = %08x\n",
|
|
|
|
|
m_free, free_list);
|
|
|
|
|
#endif
|
1993-09-04 10:09:32 +00:00
|
|
|
|
return -1;
|
1993-07-08 17:37:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Find location in free list.
|
|
|
|
|
*/
|
|
|
|
|
m_prev = NULL;
|
|
|
|
|
for (m = *free_list; m != NULL && m < m_free; m = m->next)
|
|
|
|
|
m_prev = m;
|
|
|
|
|
|
|
|
|
|
if (m_prev != NULL && (int) m_prev + m_prev->length > (int) m_free)
|
|
|
|
|
{
|
|
|
|
|
#ifdef DEBUG_HEAP
|
|
|
|
|
printf("Attempt to free bad pointer,"
|
|
|
|
|
"m_free = %08x, m_prev = %08x (length %x)\n",
|
|
|
|
|
m_free, m_prev, m_prev->length);
|
|
|
|
|
#endif
|
1993-09-04 10:09:32 +00:00
|
|
|
|
return -1;
|
1993-07-08 17:37:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((m != NULL && (int) m_free + m_free->length > (int) m) ||
|
|
|
|
|
(int) m_free + m_free->length > ((int) m_free | 0xffff))
|
|
|
|
|
{
|
|
|
|
|
#ifdef DEBUG_HEAP
|
|
|
|
|
printf("Attempt to free bad pointer,"
|
|
|
|
|
"m_free = %08x (length %x), m = %08x\n",
|
|
|
|
|
m_free, m_free->length, m);
|
|
|
|
|
#endif
|
1993-09-04 10:09:32 +00:00
|
|
|
|
return -1;
|
1993-07-08 17:37:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Put block back in free list.
|
|
|
|
|
* Does it merge with the previos block?
|
|
|
|
|
*/
|
|
|
|
|
if (m_prev != NULL)
|
|
|
|
|
{
|
|
|
|
|
if ((int) m_prev + m_prev->length == (int) m_free)
|
|
|
|
|
{
|
|
|
|
|
m_prev->length += sizeof(MDESC) + m_free->length;
|
|
|
|
|
m_free = m_prev;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m_prev->next = m_free;
|
|
|
|
|
m_free->prev = m_prev;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
*free_list = m_free;
|
|
|
|
|
m_free->prev = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Does it merge with the next block?
|
|
|
|
|
*/
|
|
|
|
|
if (m != NULL)
|
|
|
|
|
{
|
|
|
|
|
if ((int) m_free + m_free->length == (int) m)
|
|
|
|
|
{
|
|
|
|
|
m_free->length += sizeof(MDESC) + m->length;
|
|
|
|
|
m_free->next = m->next;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m->prev = m_free;
|
|
|
|
|
m_free->next = m;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m_free->next = NULL;
|
|
|
|
|
}
|
1993-09-04 10:09:32 +00:00
|
|
|
|
|
|
|
|
|
return 0;
|
1993-07-08 17:37:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
/**********************************************************************
|
|
|
|
|
* HEAP_LocalFindHeap
|
|
|
|
|
*/
|
|
|
|
|
MDESC **
|
|
|
|
|
HEAP_LocalFindHeap(unsigned short owner)
|
|
|
|
|
{
|
|
|
|
|
LHEAP *lh;
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG_HEAP
|
|
|
|
|
printf("HEAP_LocalFindHeap: owner %04x\n", owner);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
for (lh = LocalHeaps; lh != NULL; lh = lh->next)
|
|
|
|
|
{
|
|
|
|
|
if (lh->selector == owner)
|
|
|
|
|
return &lh->free_list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#define LOCALHEAP() HEAP_LocalFindHeap(Segments[Stack16Frame[11] >> 3].owner)
|
|
|
|
|
|
1993-07-08 17:37:25 +00:00
|
|
|
|
/**********************************************************************
|
|
|
|
|
* HEAP_LocalInit
|
|
|
|
|
*/
|
|
|
|
|
void
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
HEAP_LocalInit(unsigned short owner, void *start, int length)
|
1993-07-08 17:37:25 +00:00
|
|
|
|
{
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
LHEAP *lh;
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG_HEAP
|
|
|
|
|
printf("HEAP_LocalInit: owner %04x, start %08x, length %04x\n",
|
|
|
|
|
owner, start, length);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
lh = (LHEAP *) malloc(sizeof(*lh));
|
|
|
|
|
if (lh == NULL)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
lh->selector = owner;
|
|
|
|
|
lh->next = LocalHeaps;
|
|
|
|
|
HEAP_Init(&lh->free_list, start, length);
|
|
|
|
|
LocalHeaps = lh;
|
1993-07-08 17:37:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
1993-09-04 10:09:32 +00:00
|
|
|
|
* LocalAlloc
|
1993-07-08 17:37:25 +00:00
|
|
|
|
*/
|
|
|
|
|
void *
|
1993-09-04 10:09:32 +00:00
|
|
|
|
LocalAlloc(int flags, int bytes)
|
1993-07-08 17:37:25 +00:00
|
|
|
|
{
|
|
|
|
|
void *m;
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG_HEAP
|
|
|
|
|
printf("LocalAlloc: flags %x, bytes %d\n", flags, bytes);
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
printf(" called from segment %04x\n", Stack16Frame[11]);
|
1993-07-08 17:37:25 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
m = HEAP_Alloc(LOCALHEAP(), flags, bytes);
|
1993-07-08 17:37:25 +00:00
|
|
|
|
|
|
|
|
|
#ifdef DEBUG_HEAP
|
|
|
|
|
printf("LocalAlloc: returning %x\n", (int) m);
|
|
|
|
|
#endif
|
|
|
|
|
return m;
|
|
|
|
|
}
|
Release 0.2.0
Tue Jul 13 20:31:31 1993 Bob Amstadt (bob at pooh)
* [global.c]
Completed global memory pool API
Sun Jul 11 16:59:52 1993 Alexandre Julliard
* [message.c] [user.c] [user.spec] [windows.h]
Added emulation of Windows message queue.
Thu Jul 8 19:29:27 1993 Bob Amstadt (bob at pooh)
* [build.c] Original by Bob Amstadt
* [callback.c] Original by Bob Amstadt, updates by
Alexandre Julliard
* [dump.c] Original by Bob Amstadt
* [global.c] Original by Bob Amstadt
* [heap.c] Original by Bob Amstadt
* [kernel.c] Original by Bob Amstadt
* [ldt.c] Original by Bob Amstadt
* [ldtlib.c] Original by Bob Amstadt
* [relay.c] Original by Bob Amstadt
* [resource.c] Original by Bob Amstadt, updates by
Alexandre Juliard
* [selector.c] Original by Bob Amstadt, updates by Eric Youngdale
* [user.c] Original by Bob Amstadt
* [wine.c] Original by Bob Amstadt, updates by Eric Youngdale and
Alexandre Julliard
* [wintcl.c] Original by Regents of the University of California,
updates by Peter MacDonald and Alexandre Julliard
* [callback.h] Original by Bob Amstadt
* [dlls.h] Original by Bob Amstadt
* [heap.h] Original by Bob Amstadt
* [neexe.h] Original by Bob Amstadt
* [prototypes.h] Original by Bob Amstadt, updates by
Eric Youngdale
* [segmem.h] Original by Bob Amstadt
* [tkInt.h] Original by Regents of the University of California
* [windows.h] Original by Peter MacDonald, updates by
Alexandre Julliard and Bob Amstadt
* [wine.h] Original by Eric Youngdale
* [kernel.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [gdi.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [shell.spec] Original by Bob Amstadt
* [unixlib.spec] Original by Bob Amstadt
* [user.spec] Original by Bob Amstadt, updates by Alexandre Julliard
* [win87em.spec] Original by Bob Amstadt
* [Windows.tcl] Original by Peter MacDonald, updates by
Alexandre Julliard
* [build-spec.txt] Original by Bob Amstadt
* [if1632.S] Original by Bob Amstadt, updates by Eric Youngdale
1993-07-15 11:13:45 +00:00
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
1993-09-04 10:09:32 +00:00
|
|
|
|
* LocalCompact
|
Release 0.2.0
Tue Jul 13 20:31:31 1993 Bob Amstadt (bob at pooh)
* [global.c]
Completed global memory pool API
Sun Jul 11 16:59:52 1993 Alexandre Julliard
* [message.c] [user.c] [user.spec] [windows.h]
Added emulation of Windows message queue.
Thu Jul 8 19:29:27 1993 Bob Amstadt (bob at pooh)
* [build.c] Original by Bob Amstadt
* [callback.c] Original by Bob Amstadt, updates by
Alexandre Julliard
* [dump.c] Original by Bob Amstadt
* [global.c] Original by Bob Amstadt
* [heap.c] Original by Bob Amstadt
* [kernel.c] Original by Bob Amstadt
* [ldt.c] Original by Bob Amstadt
* [ldtlib.c] Original by Bob Amstadt
* [relay.c] Original by Bob Amstadt
* [resource.c] Original by Bob Amstadt, updates by
Alexandre Juliard
* [selector.c] Original by Bob Amstadt, updates by Eric Youngdale
* [user.c] Original by Bob Amstadt
* [wine.c] Original by Bob Amstadt, updates by Eric Youngdale and
Alexandre Julliard
* [wintcl.c] Original by Regents of the University of California,
updates by Peter MacDonald and Alexandre Julliard
* [callback.h] Original by Bob Amstadt
* [dlls.h] Original by Bob Amstadt
* [heap.h] Original by Bob Amstadt
* [neexe.h] Original by Bob Amstadt
* [prototypes.h] Original by Bob Amstadt, updates by
Eric Youngdale
* [segmem.h] Original by Bob Amstadt
* [tkInt.h] Original by Regents of the University of California
* [windows.h] Original by Peter MacDonald, updates by
Alexandre Julliard and Bob Amstadt
* [wine.h] Original by Eric Youngdale
* [kernel.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [gdi.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [shell.spec] Original by Bob Amstadt
* [unixlib.spec] Original by Bob Amstadt
* [user.spec] Original by Bob Amstadt, updates by Alexandre Julliard
* [win87em.spec] Original by Bob Amstadt
* [Windows.tcl] Original by Peter MacDonald, updates by
Alexandre Julliard
* [build-spec.txt] Original by Bob Amstadt
* [if1632.S] Original by Bob Amstadt, updates by Eric Youngdale
1993-07-15 11:13:45 +00:00
|
|
|
|
*/
|
|
|
|
|
int
|
1993-09-04 10:09:32 +00:00
|
|
|
|
LocalCompact(int min_free)
|
Release 0.2.0
Tue Jul 13 20:31:31 1993 Bob Amstadt (bob at pooh)
* [global.c]
Completed global memory pool API
Sun Jul 11 16:59:52 1993 Alexandre Julliard
* [message.c] [user.c] [user.spec] [windows.h]
Added emulation of Windows message queue.
Thu Jul 8 19:29:27 1993 Bob Amstadt (bob at pooh)
* [build.c] Original by Bob Amstadt
* [callback.c] Original by Bob Amstadt, updates by
Alexandre Julliard
* [dump.c] Original by Bob Amstadt
* [global.c] Original by Bob Amstadt
* [heap.c] Original by Bob Amstadt
* [kernel.c] Original by Bob Amstadt
* [ldt.c] Original by Bob Amstadt
* [ldtlib.c] Original by Bob Amstadt
* [relay.c] Original by Bob Amstadt
* [resource.c] Original by Bob Amstadt, updates by
Alexandre Juliard
* [selector.c] Original by Bob Amstadt, updates by Eric Youngdale
* [user.c] Original by Bob Amstadt
* [wine.c] Original by Bob Amstadt, updates by Eric Youngdale and
Alexandre Julliard
* [wintcl.c] Original by Regents of the University of California,
updates by Peter MacDonald and Alexandre Julliard
* [callback.h] Original by Bob Amstadt
* [dlls.h] Original by Bob Amstadt
* [heap.h] Original by Bob Amstadt
* [neexe.h] Original by Bob Amstadt
* [prototypes.h] Original by Bob Amstadt, updates by
Eric Youngdale
* [segmem.h] Original by Bob Amstadt
* [tkInt.h] Original by Regents of the University of California
* [windows.h] Original by Peter MacDonald, updates by
Alexandre Julliard and Bob Amstadt
* [wine.h] Original by Eric Youngdale
* [kernel.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [gdi.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [shell.spec] Original by Bob Amstadt
* [unixlib.spec] Original by Bob Amstadt
* [user.spec] Original by Bob Amstadt, updates by Alexandre Julliard
* [win87em.spec] Original by Bob Amstadt
* [Windows.tcl] Original by Peter MacDonald, updates by
Alexandre Julliard
* [build-spec.txt] Original by Bob Amstadt
* [if1632.S] Original by Bob Amstadt, updates by Eric Youngdale
1993-07-15 11:13:45 +00:00
|
|
|
|
{
|
|
|
|
|
MDESC *m;
|
|
|
|
|
int max_block;
|
|
|
|
|
|
|
|
|
|
max_block = 0;
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
for (m = *LOCALHEAP(); m != NULL; m = m->next)
|
Release 0.2.0
Tue Jul 13 20:31:31 1993 Bob Amstadt (bob at pooh)
* [global.c]
Completed global memory pool API
Sun Jul 11 16:59:52 1993 Alexandre Julliard
* [message.c] [user.c] [user.spec] [windows.h]
Added emulation of Windows message queue.
Thu Jul 8 19:29:27 1993 Bob Amstadt (bob at pooh)
* [build.c] Original by Bob Amstadt
* [callback.c] Original by Bob Amstadt, updates by
Alexandre Julliard
* [dump.c] Original by Bob Amstadt
* [global.c] Original by Bob Amstadt
* [heap.c] Original by Bob Amstadt
* [kernel.c] Original by Bob Amstadt
* [ldt.c] Original by Bob Amstadt
* [ldtlib.c] Original by Bob Amstadt
* [relay.c] Original by Bob Amstadt
* [resource.c] Original by Bob Amstadt, updates by
Alexandre Juliard
* [selector.c] Original by Bob Amstadt, updates by Eric Youngdale
* [user.c] Original by Bob Amstadt
* [wine.c] Original by Bob Amstadt, updates by Eric Youngdale and
Alexandre Julliard
* [wintcl.c] Original by Regents of the University of California,
updates by Peter MacDonald and Alexandre Julliard
* [callback.h] Original by Bob Amstadt
* [dlls.h] Original by Bob Amstadt
* [heap.h] Original by Bob Amstadt
* [neexe.h] Original by Bob Amstadt
* [prototypes.h] Original by Bob Amstadt, updates by
Eric Youngdale
* [segmem.h] Original by Bob Amstadt
* [tkInt.h] Original by Regents of the University of California
* [windows.h] Original by Peter MacDonald, updates by
Alexandre Julliard and Bob Amstadt
* [wine.h] Original by Eric Youngdale
* [kernel.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [gdi.spec] Original by Bob Amstadt, updates by
Alexandre Julliard
* [shell.spec] Original by Bob Amstadt
* [unixlib.spec] Original by Bob Amstadt
* [user.spec] Original by Bob Amstadt, updates by Alexandre Julliard
* [win87em.spec] Original by Bob Amstadt
* [Windows.tcl] Original by Peter MacDonald, updates by
Alexandre Julliard
* [build-spec.txt] Original by Bob Amstadt
* [if1632.S] Original by Bob Amstadt, updates by Eric Youngdale
1993-07-15 11:13:45 +00:00
|
|
|
|
if (m->length > max_block)
|
|
|
|
|
max_block = m->length;
|
|
|
|
|
|
|
|
|
|
return max_block;
|
|
|
|
|
}
|
1993-09-04 10:09:32 +00:00
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
|
* LocalFlags
|
|
|
|
|
*/
|
|
|
|
|
unsigned int
|
|
|
|
|
LocalFlags(unsigned int handle)
|
|
|
|
|
{
|
|
|
|
|
MDESC *m;
|
|
|
|
|
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
m = (MDESC *) (((int) *LOCALHEAP() & 0xffff0000) |
|
1993-09-04 10:09:32 +00:00
|
|
|
|
(handle & 0xffff)) - 1;
|
|
|
|
|
if (m->next != m || m->prev != m)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
return m->lock;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
|
* LocalFree
|
|
|
|
|
*/
|
|
|
|
|
unsigned int
|
|
|
|
|
LocalFree(unsigned int handle)
|
|
|
|
|
{
|
|
|
|
|
unsigned int addr;
|
|
|
|
|
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
addr = ((int) *LOCALHEAP() & 0xffff0000) | (handle & 0xffff);
|
|
|
|
|
if (HEAP_Free(LOCALHEAP(), (void *) addr) < 0)
|
1993-09-04 10:09:32 +00:00
|
|
|
|
return handle;
|
|
|
|
|
else
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
|
* LocalInit
|
|
|
|
|
*/
|
|
|
|
|
unsigned int
|
|
|
|
|
LocalInit(unsigned int segment, unsigned int start, unsigned int end)
|
|
|
|
|
{
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
HEAP_Init(LOCALHEAP(),
|
1993-09-04 10:09:32 +00:00
|
|
|
|
(void *) ((segment << 16) | start), end - start + 1);
|
|
|
|
|
|
|
|
|
|
return segment;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
|
* LocalLock
|
|
|
|
|
*/
|
|
|
|
|
void *
|
|
|
|
|
LocalLock(unsigned int handle)
|
|
|
|
|
{
|
|
|
|
|
MDESC *m;
|
|
|
|
|
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
m = (MDESC *) (((int) *LOCALHEAP() & 0xffff0000) |
|
1993-09-04 10:09:32 +00:00
|
|
|
|
(handle & 0xffff)) - 1;
|
|
|
|
|
if (m->next != m || m->prev != m)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
m->lock++;
|
|
|
|
|
return (void *) (m + 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
|
* LocalReAlloc
|
|
|
|
|
*/
|
|
|
|
|
void *
|
|
|
|
|
LocalReAlloc(unsigned int handle, int flags, int bytes)
|
|
|
|
|
{
|
|
|
|
|
void *m;
|
|
|
|
|
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
m = HEAP_ReAlloc(LOCALHEAP(), (void *)
|
|
|
|
|
(((int) *LOCALHEAP() & 0xffff0000) | (handle & 0xffff)),
|
1993-09-04 10:09:32 +00:00
|
|
|
|
bytes, flags);
|
|
|
|
|
|
|
|
|
|
return m;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
|
* LocalSize
|
|
|
|
|
*/
|
|
|
|
|
unsigned int
|
|
|
|
|
LocalSize(unsigned int handle)
|
|
|
|
|
{
|
|
|
|
|
MDESC *m;
|
|
|
|
|
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
m = (MDESC *) (((int) *LOCALHEAP() & 0xffff0000) |
|
1993-09-04 10:09:32 +00:00
|
|
|
|
(handle & 0xffff)) - 1;
|
|
|
|
|
if (m->next != m || m->prev != m)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
return m->length;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
|
* LocalUnlock
|
|
|
|
|
*/
|
|
|
|
|
unsigned int
|
|
|
|
|
LocalUnlock(unsigned int handle)
|
|
|
|
|
{
|
|
|
|
|
MDESC *m;
|
|
|
|
|
|
Release 0.7
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu>
* [window/win.c]
Added functions EnableWindow, IsWindowEnabled, and helper
WIN_SetSensitive.
* [window/event.c]
Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify,
EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify,
EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and
button presses beep for a disabled window.
If anyone finds better places for these checks, please tell me.
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
Cleanup on buttons answer value returned.
* [control/combo.c]
Now use OBM_COMBO bitmap dropdown button.
Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl)
* [misc/comm/c]
A few bugfixes.
Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [loader/cursor.c]
Added X cursor for IDC_SIZENS and IDC_SIZEWE.
* [include/options.h] [misc/main.c] (New files)
Rewrote main() function to get rid of Xt application context,
and added command-line option parsing.
* [objects/color.c]
Use of a private map now configurable with command-line option.
* [windows/defwnd.c]
Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling.
* [windows/event.c]
Removed ConfigureNotify event handler (no longer needed).
* [windows/message.c]
Send WM_SETCURSOR message on mouse events.
* [windows/nonclient.c]
Use OEM bitmaps for the drawing of the non-client area.
Added caption bar buttons handling, and moving and resizing of
the window via the window frame (bypassing the window manager).
* [windows/painting.c]
Bug fix in BeginPaint().
* [windows/win.c]
Set the override_redirect flag for windows (to bypass window
manager).
* [windows/winpos.c]
Implemented WindowFromPoint(), ChildWindowFromPoint(),
BringWindowToTop(), Get/SetInternalWindowPos(),
Get/SetWindowPlacement().
Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh)
* [memory/heap.c]
Added support for multiple local heaps.
1994-01-18 23:04:40 +00:00
|
|
|
|
m = (MDESC *) (((int) *LOCALHEAP() & 0xffff0000) |
|
1993-09-04 10:09:32 +00:00
|
|
|
|
(handle & 0xffff)) - 1;
|
|
|
|
|
if (m->next != m || m->prev != m)
|
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
|
|
if (m->lock > 0)
|
|
|
|
|
m->lock--;
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|