Tue May 17 23:03:16 1994 Bob Amstadt (bob@pooh) * [windows/dce.c] Fixed bug with dce initialization that was causing dialog boxes to not be displayed. * [if1632/callback.c] Better fix for bug found by Martin. Sat May 14 19:48:39 1994 Rick Sladkey (jrs@world.std.com) * [ memory/heap.c ] Redirect HEAP_ReAlloc calls with NULL argument to HEAP_Alloc. May 16, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [objects/font.c] Make EnumFonts() calling a callback with dummy fonts ... :-) * [objects/text.c] Add Empty Stub for ExtTextOut(), which temporarely call Textout(). * [if1632/callback.c] Temporarely go around bug in CallWindowProc(), you will see printfs. * [controls/edit.c] Make EDIT controls focused by a mouse click. * [misc/property.c] Bug Fix in function EnumProps(), better use of CallBack16(). * [misc/mmsystem.c] Basic Skelton's for MCI messages dispatching function. Sun May 15 16:15:17 1994 Erik Bos (erik@hacktic.nl) * [windows/utility.c] Added windows_wsprintf() for the emulator, wsprintf() is for libwine. Sat May 14 22:16:40 1994 Rick Sladkey (jrs@world.std.com) * [misc/cursor.c] Fix pointer problems in LoadCursor leading to heap corruption. * [ controls/menu.c ] Fix two NULL dereferencing bugs. Sun May 15 20:07:48 1994 Rick Sladkey (jrs@world.std.com) * [objects/font.c] Fix NULL pointer dereferencing bug in GetCharWidth. * [loader/resource.c] Fix under-allocation of memory in LoadAccelerators. * [windows/class.c] Ignore negative sizes for extra fields in RegisterClass. Sun May 15 06:35:03 1994 David Metcalfe <david@prism.demon.co.uk> * [objects/metafile.c] [include/metafile.h] [include/windows.h] [objects/gdiobj.c] [objects/brush.c] [objects/pen.c] [objects/text.c] [objects/dcvalues.c] [windows/graphics.c] [windows/dc.c] [windows/mapping.c] Beginnings of metafile support. * [misc/file.c] Corrected spelling of _lcreat. * [controls/edit.c] Minor bug fixes.
85 lines
2.9 KiB
C
85 lines
2.9 KiB
C
/* $Id: heap.h,v 1.2 1993/07/04 04:04:21 root Exp root $
|
|
*/
|
|
/*
|
|
* Copyright Robert J. Amstadt, 1993
|
|
*/
|
|
#ifndef HEAP_H
|
|
#define HEAP_H
|
|
|
|
#include "segmem.h"
|
|
#include "regfunc.h"
|
|
#include "atom.h"
|
|
|
|
/**********************************************************************
|
|
* LOCAL HEAP STRUCTURES AND FUNCTIONS
|
|
*/
|
|
typedef struct heap_mem_desc_s
|
|
{
|
|
struct heap_mem_desc_s *prev, *next;
|
|
unsigned short length;
|
|
unsigned char lock;
|
|
unsigned char flags;
|
|
} MDESC;
|
|
|
|
typedef struct heap_local_heap_s
|
|
{
|
|
struct heap_local_heap_s *next;
|
|
MDESC *free_list;
|
|
ATOMTABLE *local_table;
|
|
unsigned short selector;
|
|
} LHEAP;
|
|
|
|
extern void HEAP_Init(MDESC **free_list, void *start, int length);
|
|
extern void *HEAP_Alloc(MDESC **free_list, int flags, int bytes);
|
|
extern int HEAP_Free(MDESC **free_list, void *block);
|
|
extern void *HEAP_ReAlloc(MDESC **free_list, void *old_block,
|
|
int new_size, unsigned int flags);
|
|
extern LHEAP *HEAP_LocalFindHeap(unsigned short owner);
|
|
|
|
#define HEAP_OWNER (Segments[Stack16Frame[11] >> 3].owner)
|
|
#define LOCALHEAP() (&HEAP_LocalFindHeap(HEAP_OWNER)->free_list)
|
|
#define LOCALATOMTABLE() (&HEAP_LocalFindHeap(HEAP_OWNER)->local_table)
|
|
|
|
/**********************************************************************
|
|
* GLOBAL HEAP STRUCTURES AND FUNCTIONS:
|
|
*
|
|
* Global memory pool descriptor. Segments MUST be maintained in segment
|
|
* ascending order. If not the reallocation routine will die a horrible
|
|
* death.
|
|
*
|
|
* handle = 0, this descriptor contains the address of a free pool.
|
|
* != 0, this describes an allocated block.
|
|
*
|
|
* sequence = 0, this is not a huge block
|
|
* > 0, this is a portion of a huge block
|
|
* =-1, this is a free segment
|
|
*
|
|
* addr - address of this memory block.
|
|
*
|
|
* length - used to maintain huge blocks.
|
|
*/
|
|
typedef struct global_mem_desc_s
|
|
{
|
|
struct global_mem_desc_s *next; /* Next GDESC in list */
|
|
struct global_mem_desc_s *prev; /* Previous GDESC in list */
|
|
unsigned short handle; /* Handle of this block. */
|
|
short sequence; /* Block sequence # in huge block */
|
|
void *addr; /* Address allocated with mmap() */
|
|
int length; /* Length of block */
|
|
int lock_count; /* Block lock count */
|
|
unsigned short alias; /* Offset-zero alias selector */
|
|
unsigned int alias_key; /* Offset-zero alias sh. mem. key */
|
|
void *linear_addr; /* Linear address of huge block */
|
|
int linear_key; /* Linear shared memory key */
|
|
int linear_count; /* Linear lock count */
|
|
} GDESC;
|
|
|
|
extern GDESC *GlobalList;
|
|
|
|
extern void *GlobalQuickAlloc(int size);
|
|
extern unsigned int GlobalHandleFromPointer(void *block);
|
|
extern GDESC *GlobalGetGDesc(unsigned int block);
|
|
extern void *GlobalLinearLock(unsigned int block);
|
|
extern unsigned int GlobalLinearUnlock(unsigned int block);
|
|
|
|
#endif /* HEAP_H */
|