Index: trunk/src/win32k/include/dev32.h
===================================================================
--- trunk/src/win32k/include/dev32.h	(revision 1268)
+++ trunk/src/win32k/include/dev32.h	(revision 1269)
@@ -1,3 +1,4 @@
-/*
+/* $Id: dev32.h,v 1.2 1999-10-14 01:16:49 bird Exp $
+ *
  * dev32 - header file for 32-bit part of the driver.
  *
Index: trunk/src/win32k/include/ldr.h
===================================================================
--- trunk/src/win32k/include/ldr.h	(revision 1268)
+++ trunk/src/win32k/include/ldr.h	(revision 1269)
@@ -1,3 +1,3 @@
-/* $Id: ldr.h,v 1.1 1999-09-06 02:19:58 bird Exp $
+/* $Id: ldr.h,v 1.2 1999-10-14 01:16:49 bird Exp $
  *
  * ldr - loader header file.
@@ -19,37 +19,14 @@
         #define MAX_FILE_HANDLES 0x10000
 
-        extern unsigned char ahStates[MAX_FILE_HANDLES/4];
+        extern unsigned char achHandleStates[MAX_FILE_HANDLES/8];
 
-        #define HSTATE_UNUSED       0x00    /* nowhere */
-        #define HSTATE_CHECK        0x01    /* look in uncertain files */
-        #define HSTATE_NOT_PE       0x02    /* nowhere */
-        #define HSTATE_PE           0x03    /* look in PE handles */
-        #define HSTATE_MASK         0xFC
-        #define HSTATE_UMASK        0x03
+        #define HSTATE_UNUSED       0x00    /* Handle not used (or OS/2). */
+        #define HSTATE_OS2          0x00    /* OS/2 module filehandle. */
+        #define HSTATE_OUR          0x01    /* Our module filehandle. */
+        #define HSTATE_MASK         0xFE
+        #define HSTATE_UMASK        0x01
 
-        #define GetState(a)         (HSTATE_UMASK & (ahStates[a/4] >> (a%4)*2))
-        #define SetState(a,b)       (ahStates[a/4] = (ahStates[a/4] & (HSTATE_MASK << (a%4)*2 | HSTATE_MASK >> 8-(a%4)*2) | b << (a%4)*2))
-
-
-
-        /*********************/
-        /* uncertain file(s) */
-        /*********************/
-        #define MAX_UNCERTAIN_FILES 0x10 /* probably never more that one uncertain file at the time */
-
-        typedef struct _uncertain
-        {
-            SFN             hFile;
-            ULONG           offsetNEHdr;
-            PSZ             pszName;
-            unsigned int    fMZ:1;
-            unsigned int    fPE:1;
-        } UNCERTAIN, *PUNCERTAIN;
-
-        extern UNCERTAIN ahUncertain[MAX_UNCERTAIN_FILES];
-
-        ULONG getFreeUncertainEntry(void);
-        ULONG freeUncertainEntry(SFN hFile);
-        ULONG findUncertainEntry(SFN hFile);
+        #define GetState(a)         (HSTATE_UMASK & (achHandleStates[(a)/8] >> ((a)%8)))
+        #define SetState(a,b)       (achHandleStates[(a)/8] = (achHandleStates[(a)/8] & (HSTATE_MASK << ((a)%8) | HSTATE_MASK >> 8-((a)%8)) | ((b) & 0x1) << ((a)%8)))
 
 
@@ -69,6 +46,6 @@
             PMTE pMTE;                      /* pointer to MTE if we got one - may be NULL */
 
-            /* LXFile object */
-            LXFile lxfile;
+            /* Pe2Lx object */
+            Pe2Lx *pPe2Lx;
         } PENODE, *PPENODE;
 
@@ -76,9 +53,10 @@
 
         ULONG       insertNode(PPENODE pNode);
-        ULONG       deleteNode(SFN key);
+        ULONG       deleteNode(SFN key);        /* removes from tree and freeNode */
         PPENODE     getNodePtr(SFN key);
         PPENODE     findNodePtr(const char *pszFilename);
         ULONG       depthPE(void);
         PPENODE     allocateNode(void);
+        ULONG       freeNode(PPENODE pNode);    /* don't remove from tree! */
 
         /* if sequential insertion - this will give a lower tree. */
Index: trunk/src/win32k/include/log.h
===================================================================
--- trunk/src/win32k/include/log.h	(revision 1268)
+++ trunk/src/win32k/include/log.h	(revision 1269)
@@ -1,4 +1,6 @@
-/* $Id: log.h,v 1.1 1999-09-06 02:19:58 bird Exp $
+/* $Id: log.h,v 1.2 1999-10-14 01:16:50 bird Exp $
+ *
  * log - C-style logging - kprintf.
+ * Dual mode, RING0 and RING3.
  *
  * Copyright (c) 1998-1999 knut st. osmundsen
@@ -16,23 +18,16 @@
 #define OUTPUT_COM2 0x2f8
 
-#ifndef RELEASE
-    #ifndef RING0_DEBUG_IN_RING3
-        void _kprintf(const char *, ...);
-        #define kprintf(a)          _kprintf a
-        #define kernel_printf(a)    kprintf a; _kprintf("\n")
-    #else
-        #include <stdio.h>
-        #define kprintf(a)          printf a; flushall()
-        #define kernel_printf(a)    printf a; printf("\n"); flushall()
-    #endif
+/*
+ * output macros
+ */
+#define dprintf kprintf
+#ifdef DEBUG
+    #include <stdarg.h>
+    #include "vprintf.h"
+    #define kprintf(a)          printf a
+    #define kernel_printf(a)    printf a, printf("\n") /* obsolete */
 #else
-    #ifndef RING0_DEBUG_IN_RING3
-        #define kprintf(a)          Yield()
-        #define kernel_printf(a)    Yield()
-    #else
-        #include <stdio.h>
-        #define kprintf(a)          (void)0
-        #define kernel_printf(a)    (void)0
-    #endif
+    #define kprintf(a)          (void)0
+    #define kernel_printf(a)    (void)0
 #endif
 
Index: trunk/src/win32k/include/malloc.h
===================================================================
--- trunk/src/win32k/include/malloc.h	(revision 1268)
+++ trunk/src/win32k/include/malloc.h	(revision 1269)
@@ -1,3 +1,3 @@
-/* $Id: malloc.h,v 1.1 1999-09-06 02:19:58 bird Exp $
+/* $Id: malloc.h,v 1.2 1999-10-14 01:16:50 bird Exp $
  *
  * Heap.
@@ -13,4 +13,8 @@
 #ifndef _MALLOC_H_
 #define _MALLOC_H_
+#ifdef __MALLOC_H
+    #error("A different version of malloc.h has allready been loaded!")
+#endif
+#define __malloc_h
 
 #ifdef __cplusplus
@@ -44,5 +48,5 @@
 #define HEAP_SIZE 0x00600000U /* 10MB of heap */
 
-/* HeapPointer assert */
+/* HeapPointer assert - old ones... */
 #define ltasserthp(a)         if (!_validptr((void*)(a))){ _ltasserthp((void*)(a), #a,__FILE__,__LINE__); return FALSE;}
 #define ltasserthp2(a,b)      if (!_validptr((void*)(a))){ _ltasserthp((void*)(a), #a,__FILE__,__LINE__); b; return FALSE;}
Index: trunk/src/win32k/include/new.h
===================================================================
--- trunk/src/win32k/include/new.h	(revision 1268)
+++ trunk/src/win32k/include/new.h	(revision 1269)
@@ -1,3 +1,3 @@
-/* $Id: new.h,v 1.1 1999-09-06 02:19:59 bird Exp $
+/* $Id: new.h,v 1.2 1999-10-14 01:16:50 bird Exp $
  *
  * new - new and delete operators.
@@ -7,15 +7,12 @@
  */
 
-#ifdef __new_h
-    #error("wrong version of new allready loaded!")
-#endif
-
-#ifdef __DEBUG_ALLOC__
-    #error("__DEBUG_ALLOC__ is not supported!")
-#endif
-
-
 #ifndef _new_h_
 #define _new_h_
+
+/* check for IBMCPP new.h */
+#ifdef __new_h
+    #error("A different version of new.h has allready been loaded!")
+#endif
+#define __new_h /* Defined to prevent IBMCPP new.h from being loaded. */
 
 /* size_t */
@@ -25,4 +22,5 @@
 #endif
 
+#ifndef __DEBUG_ALLOC__
 /* The standard favourites */
 void *operator new(size_t size);
@@ -34,4 +32,16 @@
 void operator delete(void *location);
 void operator delete[](void *location);           /* stub */
+#endif
+
+#ifdef __DEBUG_ALLOC__
+void *operator new(size_t size, const char *filename, size_t lineno);
+void *operator new(size_t size, const char *filename, size_t lineno, void *location);
+
+void *operator new[](size_t size, const char *filename, size_t lineno);
+void *operator new[](size_t size, const char *filename, size_t lineno, void *location);
+
+void operator delete(void *location, const char *filename, size_t lineno);
+void operator delete[](void *location, const char *filename, size_t lineno);
+#endif
 
 #endif
