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.
88 lines
2.1 KiB
C
88 lines
2.1 KiB
C
/* $Id: segmem.h,v 1.3 1993/07/04 04:04:21 root Exp root $
|
|
*/
|
|
/*
|
|
* Copyright Robert J. Amstadt, 1993
|
|
*/
|
|
#ifndef SEGMEM_H
|
|
#define SEGMEM_H
|
|
|
|
#include "wine.h"
|
|
|
|
#ifdef __linux__
|
|
#define HAVE_IPC
|
|
#include <sys/ipc.h>
|
|
#include <sys/shm.h>
|
|
#endif
|
|
|
|
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
|
#define HAVE_IPC
|
|
#include <sys/types.h>
|
|
#include <sys/ipc.h>
|
|
#include <sys/shm.h>
|
|
#define SHMSEG 32 /* XXX SEMMNI /usr/src/sys/conf/param.h */
|
|
#define SHM_RANGE_START 0x40000000
|
|
#endif
|
|
|
|
/*
|
|
* Array to track selector allocation.
|
|
*/
|
|
#define MAX_SELECTORS 512
|
|
#define SELECTOR_ISFREE 0x8000
|
|
#define SELECTOR_INDEXMASK 0x0fff
|
|
|
|
extern unsigned short SelectorMap[MAX_SELECTORS];
|
|
|
|
#ifdef HAVE_IPC
|
|
#define SAFEMAKEPTR(s, o) (((int) (s) << 16) | ((o) & 0xffff))
|
|
#define FIXPTR(p) (p)
|
|
#else
|
|
#define SAFEMAKEPTR(s, o) \
|
|
(((int) SelectorMap[SelectorMap[(s) >> 3] & SELECTOR_INDEXMASK] << 19) \
|
|
| 0x70000 | ((o) & 0xffff))
|
|
#define FIXPTR(p) SAFEMAKEPTR((unsigned long) (p) >> 16, (p))
|
|
#endif
|
|
|
|
/*
|
|
* Structure to hold info about each selector we create.
|
|
*/
|
|
|
|
typedef struct segment_descriptor_s
|
|
{
|
|
void *base_addr; /* Pointer to segment in flat memory */
|
|
unsigned int length; /* Length of segment */
|
|
unsigned int flags; /* Segment flags (see neexe.h and below)*/
|
|
unsigned short selector; /* Selector used to access this segment */
|
|
unsigned short owner; /* Handle of owner program */
|
|
unsigned char type; /* DATA or CODE */
|
|
#ifdef HAVE_IPC
|
|
key_t shm_key; /* Shared memory key or IPC_PRIVATE */
|
|
#endif
|
|
} SEGDESC;
|
|
|
|
extern int IPCCopySelector(int i_old, unsigned long new, int swap_type);
|
|
|
|
/*
|
|
* Additional flags
|
|
*/
|
|
#define NE_SEGFLAGS_MALLOCED 0x00010000 /* Memory allocated with malloc() */
|
|
|
|
/*
|
|
* Global memory flags
|
|
*/
|
|
#define GLOBAL_FLAGS_MOVEABLE 0x0002
|
|
#define GLOBAL_FLAGS_ZEROINIT 0x0040
|
|
#define GLOBAL_FLAGS_CODE 0x00010000
|
|
#define GLOBAL_FLAGS_EXECUTEONLY 0x00020000
|
|
#define GLOBAL_FLAGS_READONLY 0x00020000
|
|
|
|
#define FIRST_SELECTOR 8
|
|
|
|
static __inline__ int Is16bitAddress(void *address)
|
|
{
|
|
return ((unsigned int) address
|
|
>= (((FIRST_SELECTOR << 3) | 0x0007) << 16));
|
|
}
|
|
|
|
extern SEGDESC Segments[];
|
|
|
|
#endif /* SEGMEM_H */
|