From: Phil Burk Date: Sun, 19 May 2019 21:55:10 +0000 (-0700) Subject: Merge branch 'master' into build64 X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/commitdiff_plain/c1a87b8298475c3fdd007b14a1413d2a6fd0fa61?hp=--cc Merge branch 'master' into build64 --- c1a87b8298475c3fdd007b14a1413d2a6fd0fa61 diff --cc csrc/pf_inner.c index 8a31b0e,57559bd..97fb004 --- a/csrc/pf_inner.c +++ b/csrc/pf_inner.c @@@ -199,8 -193,26 +193,26 @@@ static void TraceNames( ExecToken Token /* Use local copy of CODE_BASE for speed. */ #define LOCAL_CODEREL_TO_ABS( a ) ((cell_t *) (((cell_t) a) + CodeBase)) + /* Truncate the unsigned double cell integer LO/HI to an uint64_t. */ + static uint64_t UdToUint64( ucell_t Lo, ucell_t Hi ) + { + return (( 2 * sizeof(ucell_t) == sizeof(uint64_t) ) + ? (((uint64_t)Lo) | (((uint64_t)Hi) >> (sizeof(ucell_t) * 8))) + : Lo); + } + + /* Return TRUE if the unsigned double cell integer LO/HI is not greater + * then the greatest uint64_t. + */ + static int UdIsUint64( ucell_t Lo, ucell_t Hi ) + { + return (( 2 * sizeof(ucell_t) == sizeof(uint64_t) ) + ? TRUE + : Hi == 0); + } + -static const char *pfSelectFileModeCreate(cell_t fam ); -static const char *pfSelectFileModeOpen(cell_t fam ); +static const char *pfSelectFileModeCreate( cell_t fam ); +static const char *pfSelectFileModeOpen( cell_t fam ); /**************************************************************/ static const char *pfSelectFileModeCreate( cell_t fam )