Moved the few remaining functions in wprocs.dll to kernel.dll.
No longer load wprocs.dll unconditionally.
Restored default interrupt handler behavior (reported by Andreas Mohr).

diff --git a/loader/ne/module.c b/loader/ne/module.c
index a292389..ec4bce9 100644
--- a/loader/ne/module.c
+++ b/loader/ne/module.c
@@ -13,7 +13,6 @@
 #include "wine/winbase16.h"
 #include "winerror.h"
 #include "module.h"
-#include "neexe.h"
 #include "toolhelp.h"
 #include "file.h"
 #include "ldt.h"
@@ -30,6 +29,17 @@
 
 DEFAULT_DEBUG_CHANNEL(module);
 
+/*
+ * Segment table entry
+ */
+struct ne_segment_table_entry_s
+{
+    WORD seg_data_offset;   /* Sector offset of segment data	*/
+    WORD seg_data_length;   /* Length of segment data		*/
+    WORD seg_flags;         /* Flags associated with this segment	*/
+    WORD min_alloc;         /* Minimum allocation size for this	*/
+};
+
 #define hFirstModule (pThhook->hExeHead)
 
 static NE_MODULE *pCachedModule = 0;  /* Module cached by NE_OpenFile */
@@ -111,8 +121,8 @@
         DPRINTF( "Alignment: %d\n", *pword++ );
         while (*pword)
         {
-            struct resource_typeinfo_s *ptr = (struct resource_typeinfo_s *)pword;
-            struct resource_nameinfo_s *pname = (struct resource_nameinfo_s *)(ptr + 1);
+            NE_TYPEINFO *ptr = (NE_TYPEINFO *)pword;
+            NE_NAMEINFO *pname = (NE_NAMEINFO *)(ptr + 1);
             DPRINTF( "id=%04x count=%d\n", ptr->type_id, ptr->count );
             for (i = 0; i < ptr->count; i++, pname++)
                 DPRINTF( "offset=%d len=%d id=%04x\n",
@@ -284,11 +294,11 @@
 
 
 /***********************************************************************
- *           NE_GetEntryPoint   (WPROCS.27)
+ *           NE_GetEntryPoint / EntryAddrProc16   (KERNEL Wine-specific export)
  *
  * Return the entry point for a given ordinal.
  */
-FARPROC16 WINAPI WIN16_NE_GetEntryPoint( HMODULE16 hModule, WORD ordinal )
+FARPROC16 WINAPI EntryAddrProc16( HMODULE16 hModule, WORD ordinal )
 {
     FARPROC16 ret = NE_GetEntryPointEx( hModule, ordinal, TRUE );
     CURRENT_STACK16->ecx = hModule; /* FIXME: might be incorrect value */
@@ -1215,15 +1225,8 @@
  */
 static BOOL16 MODULE_CallWEP( HMODULE16 hModule )
 {
-    FARPROC16 WEP = (FARPROC16)0;
-    WORD ordinal = NE_GetOrdinal( hModule, "WEP" );
-
-    if (ordinal) WEP = NE_GetEntryPoint( hModule, ordinal );
-    if (!WEP)
-    {
-	WARN("module %04x doesn't have a WEP\n", hModule );
-	return FALSE;
-    }
+    FARPROC16 WEP = GetProcAddress16( hModule, "WEP" );
+    if (!WEP) return FALSE;
     return NE_CallTo16_word_w( WEP, WEP_FREE_DLL );
 }
 
diff --git a/loader/ne/segment.c b/loader/ne/segment.c
index a50664c..2b780db 100644
--- a/loader/ne/segment.c
+++ b/loader/ne/segment.c
@@ -16,7 +16,6 @@
 #include <string.h>
 
 #include "wine/winbase16.h"
-#include "neexe.h"
 #include "global.h"
 #include "task.h"
 #include "file.h"
@@ -30,6 +29,37 @@
 DECLARE_DEBUG_CHANNEL(module);
 DECLARE_DEBUG_CHANNEL(segment);
 
+/*
+ * Relocation table entry
+ */
+struct relocation_entry_s
+{
+    BYTE address_type;    /* Relocation address type */
+    BYTE relocation_type; /* Relocation type */
+    WORD offset;          /* Offset in segment to fixup */
+    WORD target1;         /* Target specification */
+    WORD target2;         /* Target specification */
+};
+
+/*
+ * Relocation address types
+ */
+#define NE_RADDR_LOWBYTE      0
+#define NE_RADDR_SELECTOR     2
+#define NE_RADDR_POINTER32    3
+#define NE_RADDR_OFFSET16     5
+#define NE_RADDR_POINTER48    11
+#define NE_RADDR_OFFSET32     13
+
+/*
+ * Relocation types
+ */
+#define NE_RELTYPE_INTERNAL  0
+#define NE_RELTYPE_ORDINAL   1
+#define NE_RELTYPE_NAME      2
+#define NE_RELTYPE_OSFIXUP   3
+#define NE_RELFLAG_ADDITIVE  4
+
 #define SEL(x) ((x)|1)
 
 static void NE_FixupSegmentPrologs(NE_MODULE *pModule, WORD segnum);
@@ -398,7 +428,7 @@
         HFILE16 hFile16;
         /* Handle self-loading modules */
         SELFLOADHEADER *selfloadheader;
-        HMODULE16 hselfload = GetModuleHandle16("WPROCS");
+        HMODULE16 mod = GetModuleHandle16("KERNEL");
         DWORD oldstack;
 
         TRACE_(module)("%.*s is a self-loading module!\n",
@@ -407,9 +437,9 @@
         if (!NE_LoadSegment( pModule, 1 )) return FALSE;
         selfloadheader = (SELFLOADHEADER *)
                           PTR_SEG_OFF_TO_LIN(SEL(pSegTable->hSeg), 0);
-        selfloadheader->EntryAddrProc = NE_GetEntryPoint(hselfload,27);
-        selfloadheader->MyAlloc  = NE_GetEntryPoint(hselfload,28);
-        selfloadheader->SetOwner = NE_GetEntryPoint(GetModuleHandle16("KERNEL"),403);
+        selfloadheader->EntryAddrProc = GetProcAddress16(mod,"EntryAddrProc");
+        selfloadheader->MyAlloc       = GetProcAddress16(mod,"MyAlloc");
+        selfloadheader->SetOwner      = GetProcAddress16(mod,"FarSetOwner");
         pModule->self_loading_sel = SEL(GLOBAL_Alloc(GMEM_ZEROINIT, 0xFF00, pModule->self, WINE_LDT_FLAGS_DATA));
         oldstack = NtCurrentTeb()->cur_stack;
         NtCurrentTeb()->cur_stack = PTR_SEG_OFF_TO_SEGPTR(pModule->self_loading_sel,
@@ -671,12 +701,10 @@
 {
     WORD hInst, ds, heap;
     FARPROC16 entryPoint;
-    WORD ordinal;
 
     if (!(pModule->flags & NE_FFLAGS_LIBMODULE)) return;
     if (!(pModule->flags & NE_FFLAGS_BUILTIN) && pModule->expected_version < 0x0400) return;
-    if (!(ordinal = NE_GetOrdinal( pModule->self, "DllEntryPoint" ))) return;
-    if (!(entryPoint = NE_GetEntryPoint( pModule->self, ordinal ))) return;
+    if (!(entryPoint = GetProcAddress16( pModule->self, "DllEntryPoint" ))) return;
 
     NE_GetDLLInitParams( pModule, &hInst, &ds, &heap );
 
@@ -796,11 +824,11 @@
 }
 
 /***********************************************************************
- *           NE_AllocateSegment (WPROCS.26)
+ *           MyAlloc16   (KERNEL Wine-specific export)
  *
  * MyAlloc() function for self-loading apps.
  */
-DWORD WINAPI NE_AllocateSegment( WORD wFlags, WORD wSize, WORD wElem )
+DWORD WINAPI MyAlloc16( WORD wFlags, WORD wSize, WORD wElem )
 {
     WORD size = wSize << wElem;
     HANDLE16 hMem = 0;