#define TRUE (1)\r
#define FALSE (0)\r
#endif\r
-
-static const char *gErrorMsg32Bit = "ERROR - A long is not 4 bytes. Are we running on a 64-bit machine?!\n";
\r
#ifdef PF_EMBEDDED\r
int main( void )\r
{\r
char IfInit = 0; \r
const char *DicName = NULL;\r
- const char *SourceName = NULL;
- // Check to make sure we are running in 32-bit mode.
- if( sizeof(long) != 4 )
- {
- pfMessage(gErrorMsg32Bit);
- return 1;
- }\r
+ const char *SourceName = NULL;\r
pfMessage("\npForth Embedded\n");\r
return pfDoForth( DicName, SourceName, IfInit);\r
}\r
const char *SourceName = NULL;\r
char IfInit = FALSE;\r
char *s;\r
- int32 i;\r
+ cell_t i;\r
int Result;\r
-
- // Check to make sure we are running in 32-bit mode.
- if( sizeof(long) != 4 )
- {
- ERR((gErrorMsg32Bit));
- return 1;
- }
- \r
+\r
/* For Metroworks on Mac */\r
#ifdef __MWERKS__\r
argc = ccommand(&argv);\r
#endif\r
-\r
+ \r
+ pfSetQuiet( FALSE );\r
/* Parse command line. */\r
for( i=1; i<argc; i++ )\r
{\r
\r
case 'd':\r
if( *s != '\0' ) DicName = s;\r
- // Allow space after -d (Thanks Aleksej Saushev)\r
- // Make sure there is another argument.\r
+ /* Allow space after -d (Thanks Aleksej Saushev) */\r
+ /* Make sure there is another argument. */\r
else if( (i+1) < argc )\r
{\r
DicName = argv[++i];\r
DicName = NULL;\r
#endif\r
\r
+#ifdef PF_UNIT_TEST\r
+ if( (Result = pfUnitTest()) != 0 )\r
+ {\r
+ ERR(("pForth stopping on unit test failure.\n"));\r
+ goto on_error;\r
+ }\r
+#endif\r
+ \r
Result = pfDoForth( DicName, SourceName, IfInit);\r
\r
on_error:\r