X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_hc.c;h=316b86b90faf716c0466f1a2210116bbfe38c00f;hb=07ada6cbfb76cc2c43feb0225d0b1f82408ca8bf;hp=afe6e3101dfc6a9ec1003aebdb29b2fb0171eb12;hpb=fe54ff5710fd1720312e29985ba4e67709ce48a1;p=16.git diff --git a/src/lib/16_hc.c b/src/lib/16_hc.c old mode 100644 new mode 100755 index afe6e310..316b86b9 --- a/src/lib/16_hc.c +++ b/src/lib/16_hc.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * @@ -420,7 +420,7 @@ void heapdump(global_game_variables_t *gvar) for(;;) { heap_status = _nheapwalk( &nh_info ); if( heap_status != _HEAPOK ) break; - strcpy(scratch," "); strcat(scratch,(h_info._useflag == _USEDENTRY ? "USED" : "FREE")); strcat(scratch," block at "); ultoa((dword)h_info._pentry,str,16); strcat(scratch,str); strcat(scratch," of size "); ultoa(h_info._size,str,10); strcat(scratch,str); strcat(scratch,"\n"); + strcpy(scratch," "); strcat(scratch,(h_info._useflag == _USEDENTRY ? "USED" : "FREE")); strcat(scratch," block at "); ultoa((dword)nh_info._pentry,str,16); strcat(scratch,str); strcat(scratch," of size "); ultoa(nh_info._size,str,10); strcat(scratch,str); strcat(scratch,"\n"); /* printf( " %s block at %Fp of size %4.4X\n", (nh_info._useflag == _USEDENTRY ? "USED" : "FREE"), nh_info._pentry, nh_info._size );*/ @@ -439,7 +439,7 @@ nh_info._pentry, nh_info._size );*/ for(;;) { heap_status = _fheapwalk( &fh_info ); if( heap_status != _HEAPOK ) break; - strcpy(scratch," "); strcat(scratch,(h_info._useflag == _USEDENTRY ? "USED" : "FREE")); strcat(scratch," block at "); ultoa((dword)h_info._pentry,str,16); strcat(scratch,str); strcat(scratch," of size "); ultoa(h_info._size,str,10); strcat(scratch,str); strcat(scratch,"\n"); + strcpy(scratch," "); strcat(scratch,(h_info._useflag == _USEDENTRY ? "USED" : "FREE")); strcat(scratch," block at "); ultoa((dword)fh_info._pentry,str,16); strcat(scratch,str); strcat(scratch," of size "); ultoa(fh_info._size,str,10); strcat(scratch,str); strcat(scratch,"\n"); /*printf( " %s block at %Fp of size %4.4X\n", (fh_info._useflag == _USEDENTRY ? "USED" : "FREE"), fh_info._pentry, fh_info._size );*/ @@ -521,8 +521,14 @@ void heapstat0(int heap_status) */ void HC_OpenDebug(global_game_variables_t *gvar) { - unlink("heap.16"); - gvar->handle.heaphandle = open("heap.16", O_CREAT | O_WRONLY | O_TEXT); +#ifdef __BORLANDC__ + unlink("heap.16b"); + gvar->handle.heaphandle = open("heap.16b", O_CREAT | O_WRONLY | O_TEXT); +#endif +#ifdef __WATCOMC__ + unlink("heap.16w"); + gvar->handle.heaphandle = open("heap.16w", O_CREAT | O_WRONLY | O_TEXT); +#endif } void HC_CloseDebug(global_game_variables_t *gvar)