Make ficl work on sparc64. The assumption that int == long == void * is

very pervasive in this code.  This fixes a few of those assumptions and
band-aids over some others.

Tested on: ia32 alpha sparc64

Reviewed by:	peter jake (in concept)
This commit is contained in:
Scott Long 2002-08-31 01:04:53 +00:00
parent 88268f8f47
commit f1757c6ee7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=102657
2 changed files with 9 additions and 9 deletions

View File

@ -104,7 +104,7 @@ int ficlParsePrefix(FICL_VM *pVM, STRINGINFO si)
vmSetTibIndex(pVM, si.cp + n - pVM->tib.cp );
vmExecute(pVM, pFW);
return FICL_TRUE;
return (int)FICL_TRUE;
}
pFW = pFW->link;
}

View File

@ -732,7 +732,7 @@ static void ficlSprintf(FICL_VM *pVM) /* */
int base = 10;
int unsignedInteger = FALSE;
int append = FICL_TRUE;
FICL_INT append = FICL_TRUE;
while (format < formatStop)
{
@ -816,7 +816,7 @@ static void ficlSprintf(FICL_VM *pVM) /* */
}
}
if (append == FICL_TRUE)
if (append != FICL_FALSE)
{
if (!desiredLength)
desiredLength = actualLength;
@ -1262,7 +1262,7 @@ static void ifParen(FICL_VM *pVM)
}
else
{ /* take branch (to else/endif/begin) */
vmBranchRelative(pVM, *(int *)(pVM->ip));
vmBranchRelative(pVM, (uintptr_t)*(pVM->ip));
}
return;
@ -1311,7 +1311,7 @@ static void elseCoIm(FICL_VM *pVM)
static void branchParen(FICL_VM *pVM)
{
vmBranchRelative(pVM, *(int *)(pVM->ip));
vmBranchRelative(pVM, (uintptr_t)*(pVM->ip));
return;
}
@ -1473,7 +1473,7 @@ static int ficlParseWord(FICL_VM *pVM, STRINGINFO si)
}
vmExecute(pVM, tempFW);
return FICL_TRUE;
return (int)FICL_TRUE;
}
}
@ -1489,7 +1489,7 @@ static int ficlParseWord(FICL_VM *pVM, STRINGINFO si)
{
dictAppendCell(dp, LVALUEtoCELL(tempFW));
}
return FICL_TRUE;
return (int)FICL_TRUE;
}
}
@ -1922,7 +1922,7 @@ static void loopParen(FICL_VM *pVM)
else
{ /* update index, branch to loop head */
stackSetTop(pVM->rStack, LVALUEtoCELL(index));
vmBranchRelative(pVM, *(int *)(pVM->ip));
vmBranchRelative(pVM, (uintptr_t)*(pVM->ip));
}
return;
@ -1957,7 +1957,7 @@ static void plusLoopParen(FICL_VM *pVM)
else
{ /* update index, branch to loop head */
stackSetTop(pVM->rStack, LVALUEtoCELL(index));
vmBranchRelative(pVM, *(int *)(pVM->ip));
vmBranchRelative(pVM, (uintptr_t)*(pVM->ip));
}
return;