1 /*******************************************************************
3 ** Forth Inspired Command Language
4 ** Author: John Sadler (john_sadler@alum.mit.edu)
5 ** Created: 16 Oct 1997
6 ** Implementations of FICL external interface functions...
8 *******************************************************************/
20 ******************* FreeBSD P O R T B E G I N S H E R E ******************** Michael Smith
23 #if PORTABLE_LONGMULDIV == 0
24 DPUNS
ficlLongMul(FICL_UNS x
, FICL_UNS y
)
29 qx
= (uint64_t)x
* (uint64_t) y
;
31 q
.hi
= (uint32_t)( qx
>> 32 );
32 q
.lo
= (uint32_t)( qx
& 0xFFFFFFFFL
);
37 UNSQR
ficlLongDiv(DPUNS q
, FICL_UNS y
)
43 qx
= (qh
<< 32) | q
.lo
;
52 void ficlTextOut(FICL_VM
*pVM
, char *msg
, int fNewline
)
64 void *ficlMalloc (size_t size
)
69 void *ficlRealloc (void *p
, size_t size
)
71 return realloc(p
, size
);
74 void ficlFree (void *p
)
81 ** Stub function for dictionary access control - does nothing
82 ** by default, user can redefine to guarantee exclusive dict
83 ** access to a single thread for updates. All dict update code
84 ** is guaranteed to be bracketed as follows:
85 ** ficlLockDictionary(TRUE);
86 ** <code that updates dictionary>
87 ** ficlLockDictionary(FALSE);
89 ** Returns zero if successful, nonzero if unable to acquire lock
90 ** befor timeout (optional - could also block forever)
93 int ficlLockDictionary(short fLock
)
98 #endif /* FICL_MULTITHREAD */