Implement SAVE-INPUT and RESTORE-INPUT
[pforth] / csrc / pfcompil.c
index 9397fa3..467d1e8 100644 (file)
@@ -343,6 +343,8 @@ PForthDictionary pfBuildDictionary( cell_t HeaderSize, cell_t CodeSize )
     CreateDicEntryC( ID_SOURCE_ID, "SOURCE-ID",  0 );
     CreateDicEntryC( ID_SOURCE_ID_PUSH, "PUSH-SOURCE-ID",  0 );
     CreateDicEntryC( ID_SOURCE_ID_POP, "POP-SOURCE-ID",  0 );
     CreateDicEntryC( ID_SOURCE_ID, "SOURCE-ID",  0 );
     CreateDicEntryC( ID_SOURCE_ID_PUSH, "PUSH-SOURCE-ID",  0 );
     CreateDicEntryC( ID_SOURCE_ID_POP, "POP-SOURCE-ID",  0 );
+    CreateDicEntryC( ID_SOURCE_LINE_NUMBER_FETCH, "SOURCE-LINE-NUMBER@",  0 );
+    CreateDicEntryC( ID_SOURCE_LINE_NUMBER_STORE, "SOURCE-LINE-NUMBER!",  0 );
     CreateDicEntryC( ID_SWAP, "SWAP",  0 );
     CreateDicEntryC( ID_TEST1, "TEST1",  0 );
     CreateDicEntryC( ID_TEST2, "TEST2",  0 );
     CreateDicEntryC( ID_SWAP, "SWAP",  0 );
     CreateDicEntryC( ID_TEST1, "TEST1",  0 );
     CreateDicEntryC( ID_TEST2, "TEST2",  0 );
@@ -661,7 +663,7 @@ void ffDefer( void )
 }
 
 /* Unsmudge the word to make it visible. */
 }
 
 /* Unsmudge the word to make it visible. */
-void ffUnSmudge( void )
+static void ffUnSmudge( void )
 {
     *(char*)gVarContext &= ~FLAG_SMUDGE;
 }
 {
     *(char*)gVarContext &= ~FLAG_SMUDGE;
 }
@@ -737,7 +739,7 @@ void ffFPLiteral( PF_FLOAT fnum )
 #endif /* PF_SUPPORT_FP */
 
 /**************************************************************/
 #endif /* PF_SUPPORT_FP */
 
 /**************************************************************/
-ThrowCode FindAndCompile( const char *theWord )
+static ThrowCode FindAndCompile( const char *theWord )
 {
     cell_t Flag;
     ExecToken XT;
 {
     cell_t Flag;
     ExecToken XT;
@@ -831,7 +833,7 @@ ThrowCode ffInterpret( void )
     {
 
         pfDebugMessage("ffInterpret: calling ffWord(()\n");
     {
 
         pfDebugMessage("ffInterpret: calling ffWord(()\n");
-        theWord = ffWord( BLANK );
+        theWord = ffLWord( BLANK );
         DBUG(("ffInterpret: theWord = 0x%x, Len = %d\n", theWord, *theWord ));
 
         if( *theWord > 0 )
         DBUG(("ffInterpret: theWord = 0x%x, Len = %d\n", theWord, *theWord ));
 
         if( *theWord > 0 )