]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_hc.c
OK i think the borland C version and watcom version behave the same way! ^^
[16.git] / src / lib / 16_hc.c
index df9602d8542e10e39bab97ff7146978caf0c7756..d72b334d89b1f76832e0eafa0f3d2ed57c444833 100644 (file)
 
 int heaphandle;
 
+#ifdef __BORLANDC__
+void * LargestFreeBlock(size_t* Size)
+#endif
+#ifdef __WATCOMC__
 void __near* LargestFreeBlock(size_t* Size)
+#endif
 {
        size_t s0, s1;
+#ifdef __BORLANDC__
+       void * p;
+#endif
+#ifdef __WATCOMC__
        void __near* p;
+#endif
 
        s0 = ~(size_t)0 ^ (~(size_t)0 >> 1);
 #ifdef __BORLANDC__
@@ -89,7 +99,7 @@ size_t _coreleft(void)
        for(;;)
        {
                size_t largest;
-               void __near* p = LargestFreeBlock(&largest);
+               void __near* p = (void __near *)LargestFreeBlock(&largest);
                if (largest < sizeof(void __near*))
                {
                        if (p != NULL)