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 *******************************************************************/
21 ******************* FreeBSD P O R T B E G I N S H E R E ******************** Michael Smith
24 #if PORTABLE_LONGMULDIV == 0
25 DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
30 qx = (u_int64_t)x * (u_int64_t) y;
32 q.hi = (u_int32_t)( qx >> 32 );
33 q.lo = (u_int32_t)( qx & 0xFFFFFFFFL);
38 UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
44 qx = (qh << 32) | q.lo;
53 void ficlTextOut(FICL_VM *pVM, char *msg, int fNewline)
65 void *ficlMalloc (size_t size)
70 void *ficlRealloc (void *p, size_t size)
72 return realloc(p, size);
75 void ficlFree (void *p)
82 ** Stub function for dictionary access control - does nothing
83 ** by default, user can redefine to guarantee exclusive dict
84 ** access to a single thread for updates. All dict update code
85 ** is guaranteed to be bracketed as follows:
86 ** ficlLockDictionary(TRUE);
87 ** <code that updates dictionary>
88 ** ficlLockDictionary(FALSE);
90 ** Returns zero if successful, nonzero if unable to acquire lock
91 ** befor timeout (optional - could also block forever)
94 int ficlLockDictionary(short fLock)
99 #endif /* FICL_MULTITHREAD */