/***************************************************************/\r
void WriteCellBigEndian( uint8_t *addr, ucell_t data )\r
{\r
- // Write should be in order of increasing address\r
- // to optimize for burst writes to DRAM.\r
+ /* Write should be in order of increasing address \r
+ * to optimize for burst writes to DRAM. */\r
if( sizeof(ucell_t) == 8 )\r
{\r
*addr++ = (uint8_t) (data>>56);\r
/***************************************************************/\r
void WriteCellLittleEndian( uint8_t *addr, ucell_t data )\r
{\r
- // Write should be in order of increasing address\r
- // to optimize for burst writes to DRAM.\r
+ /* Write should be in order of increasing address \r
+ * to optimize for burst writes to DRAM. */\r
if( sizeof(ucell_t) == 8 )\r
{\r
- *addr++ = (uint8_t) data; // LSB at near end\r
+ *addr++ = (uint8_t) data; /* LSB at near end */\r
data = data >> 8;\r
*addr++ = (uint8_t) data;\r
data = data >> 8;\r
#ifndef PF_NO_FILEIO\r
\r
/***************************************************************/\r
-static uint32_t Read32FromFile( FileStream *fid, uint32_t *ValPtr )\r
+static int32_t Read32FromFile( FileStream *fid, uint32_t *ValPtr )\r
{\r
int32_t numr;\r
uint8_t pad[4];\r
gCurrentDictionary = dic;\r
if( sd->sd_NameSize > 0 )\r
{\r
- gVarContext = (char *) NAMEREL_TO_ABS(sd->sd_RelContext); /* Restore context. */\r
+ gVarContext = NAMEREL_TO_ABS(sd->sd_RelContext); /* Restore context. */\r
gCurrentDictionary->dic_HeaderPtr = (ucell_t)(uint8_t *)\r
NAMEREL_TO_ABS(sd->sd_RelHeaderPtr);\r
}\r
pfReportError("pfLoadDictionary", PF_ERR_NO_SHELL );\r
goto error;\r
#else\r
- if( NAME_BASE == NULL )\r
+ if( NAME_BASE == 0 )\r
{\r
pfReportError("pfLoadDictionary", PF_ERR_NO_NAMES );\r
goto error;\r
pfReportError("pfLoadDictionary", PF_ERR_TOO_BIG);\r
goto error;\r
}\r
- numr = sdReadFile( NAME_BASE, 1, ChunkSize, fid );\r
+ numr = sdReadFile( (char *) NAME_BASE, 1, ChunkSize, fid );\r
if( numr != ChunkSize ) goto read_error;\r
BytesLeft -= ChunkSize;\r
#endif /* PF_NO_SHELL */\r
pfReportError("pfLoadDictionary", PF_ERR_TOO_BIG);\r
goto error;\r
}\r
- numr = sdReadFile( CODE_BASE, 1, ChunkSize, fid );\r
+ numr = sdReadFile( (uint8_t *) CODE_BASE, 1, ChunkSize, fid );\r
if( numr != ChunkSize ) goto read_error;\r
BytesLeft -= ChunkSize;\r
break;\r
\r
sdCloseFile( fid );\r
\r
- if( NAME_BASE != NULL)\r
+ if( NAME_BASE != 0)\r
{\r
cell_t Result;\r
/* Find special words in dictionary for global XTs. */\r
gCurrentDictionary = dic = pfCreateDictionary( NewNameSize, NewCodeSize );\r
if( !dic ) goto nomem_error;\r
\r
- pfCopyMemory( dic->dic_HeaderBase, MinDicNames, sizeof(MinDicNames) );\r
- pfCopyMemory( dic->dic_CodeBase, MinDicCode, sizeof(MinDicCode) );\r
+ pfCopyMemory( (uint8_t *) dic->dic_HeaderBase, MinDicNames, sizeof(MinDicNames) );\r
+ pfCopyMemory( (uint8_t *) dic->dic_CodeBase, MinDicCode, sizeof(MinDicCode) );\r
DBUG(("Static data copied to newly allocated dictionaries.\n"));\r
\r
dic->dic_CodePtr.Byte = (uint8_t *) CODEREL_TO_ABS(CODEPTR);\r
gNumPrimitives = NUM_PRIMITIVES;\r
\r
- if( NAME_BASE != NULL)\r
+ if( NAME_BASE != 0)\r
{\r
/* Setup name space. */\r
dic->dic_HeaderPtr = (ucell_t)(uint8_t *) NAMEREL_TO_ABS(HEADERPTR);\r
- gVarContext = (char *) NAMEREL_TO_ABS(RELCONTEXT); /* Restore context. */\r
+ gVarContext = NAMEREL_TO_ABS(RELCONTEXT); /* Restore context. */\r
\r
/* Find special words in dictionary for global XTs. */\r
if( (Result = FindSpecialXTs()) < 0 )\r