Cleanup windows.

This commit is contained in:
Brad Nelson
2022-01-30 14:47:59 -08:00
parent da00c562e7
commit 8f4cec682d
2 changed files with 3 additions and 7 deletions

View File

@ -418,11 +418,6 @@ e: test-forth-namespace
out: resize out: resize
out: free out: free
out: allocate out: allocate
out: process-heap
out: HeapReAlloc
out: HeapFree
out: HeapAlloc
out: GetProcessHeap
out: ok out: ok
out: ms out: ms
check-files check-files

View File

@ -13,13 +13,14 @@
\ limitations under the License. \ limitations under the License.
( Words with OS assist ) ( Words with OS assist )
windows windows definitions
z" GetProcessHeap" 0 Kernel32 GetProcessHeap z" GetProcessHeap" 0 Kernel32 GetProcessHeap
z" HeapAlloc" 3 Kernel32 HeapAlloc z" HeapAlloc" 3 Kernel32 HeapAlloc
z" HeapFree" 3 Kernel32 HeapFree z" HeapFree" 3 Kernel32 HeapFree
z" HeapReAlloc" 4 Kernel32 HeapReAlloc z" HeapReAlloc" 4 Kernel32 HeapReAlloc
GetProcessHeap constant process-heap GetProcessHeap constant process-heap
forth definitions also windows
: allocate ( n -- a ior ) process-heap 0 rot HeapAlloc dup 0= ; : allocate ( n -- a ior ) process-heap 0 rot HeapAlloc dup 0= ;
: free ( a -- ior ) process-heap 0 rot HeapFree drop 0 ; : free ( a -- ior ) process-heap 0 rot HeapFree drop 0 ;
: resize ( a n -- a ior ) process-heap -rot 0 -rot HeapReAlloc dup 0= ; : resize ( a n -- a ior ) process-heap -rot 0 -rot HeapReAlloc dup 0= ;
forth only forth definitions