]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_mm.h
return of the colum and row drawer!
[16.git] / src / lib / 16_mm.h
index fecff72ca973b516be9aacc496f59ede6113b348..5889aaaaa23b7181ae32f690d6ddc1d771876929 100644 (file)
 #include "src/lib/lib_head.h"
 //++++mh       #include "src/lib/16_in.h"
 
-//****#if 1            // 1 == Debug/Dev  ;  0 == Production/final
+#ifdef __DEBUG__               // 1 == Debug/Dev  ;  0 == Production/final
 #define OUT_OF_MEM_MSG "MM_GetPtr: Out of memory!\nYou were short :%ld bytes"
-//****#else
-//****#define OUT_OF_MEM_MSG   "\npee\n"
-//****#endif
+#else
+#define OUT_OF_MEM_MSG "\npee\n"
+#endif
 
 
 #define SAVENEARHEAP   0x400           // space to leave in data segment
 #define        XMS_FREEUMB             0x11
 
 //==========================================================================
-
-typedef void /*__seg*/ * memptr;
+//I hope this is correct!
+//__segment                seg;
+typedef void __based(__self) * memptr; //__based(seg) * memptr;
 
 typedef struct
 {
-       long    nearheap,farheap,EMSmem,XMSmem,mainmem;
+       dword   nearheap,farheap,EMSmem,XMSmem,mainmem;
+       boolean         mmstarted, bombonerror, mmerror;
 } mminfotype;
 
 //==========================================================================
@@ -134,12 +136,11 @@ typedef struct mmblockstruct
 =============================================================================
 */
 
-static mminfotype      mminfo;
+/*static mminfotype    mminfo;
 static memptr          bufferseg;
-static boolean         mmerror;
 
 static void            (* beforesort) (void);
-static void            (* aftersort) (void);
+static void            (* aftersort) (void);*/
 
 /*
 =============================================================================
@@ -149,30 +150,25 @@ static void               (* aftersort) (void);
 =============================================================================
 */
 
-static boolean         mmstarted;
-
-static void huge       *hugeheap;
+/*static void huge     *hugeheap;
 static void far        *farheap;
 static void            *nearheap;
 
 static mmblocktype     far mmblocks[MAXBLOCKS]
                        ,far *mmhead,far *mmfree,far *mmrover,far *mmnew;
 
-static boolean         bombonerror;
 
 static unsigned        totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle;
+static unsigned int EMSVer;
 
 static void            (* XMSaddr) (void);             // far pointer to XMS driver
 
-static unsigned        numUMBs,UMBbase[MAXUMBS];
-
-static char *ParmStringsexmm[] = {"noems","noxms",""};
+static unsigned        numUMBs,UMBbase[MAXUMBS];*/
 
 //==========================================================================
 
 void MM_Startup (void);
 void MM_Shutdown (void);
-void MM_MapEMS (void);
 
 void MM_GetPtr (memptr *baseptr,dword size);
 void MM_FreePtr (memptr *baseptr);
@@ -183,8 +179,10 @@ void MM_SortMem (void);
 
 void MM_ShowMemory (void);
 
-long MM_UnusedMemory (void);
-long MM_TotalFree (void);
+dword MM_UnusedMemory (void);
+dword MM_TotalFree (void);
+void MM_Report(void);
+//int MM_EMSVer(void);
 
 void MM_BombOnError (boolean bomb);
 
@@ -195,15 +193,14 @@ void MM_BombOnError (boolean bomb);
 //
 
 boolean                MML_CheckForEMS (void);
+unsigned               MML_SetupEMS (void);
 void           MML_ShutdownEMS (void);
-void           MM_MapEMS (void);
+unsigned               MM_MapEMS (void);
 boolean        MML_CheckForXMS (void);
 void           MML_ShutdownXMS (void);
 void           MML_UseSpace (unsigned segstart, unsigned seglength);
 void           MML_ClearBlock (void);
 
-int US_CheckParm(char *parm,char **strings);
-
 //==========================================================================
 
 #endif