Commit 08b0f196d8be3d01ce7e08b0a0834b7debb8ad0d

Stefan Reinauer 2010-04-26T13:06:48

This is toke / detok update from Matthias Kapffer: - display-status is obsolete - fix the three broken examples under toke/examples - drop calls to non-existent distclean git-svn-id: svn://coreboot.org/openbios/trunk/fcode-utils-devel@753 f158a5a8-5612-0410-a976-696ce0be7e32

diff --git a/Makefile b/Makefile
index bd97123..96fe07f 100644
--- a/Makefile
+++ b/Makefile
@@ -40,9 +40,6 @@ clean:
 	$(MAKE) -C testsuite clean
 
 distclean: clean
-	$(MAKE) -C toke distclean
-	$(MAKE) -C detok distclean
-	$(MAKE) -C romheaders distclean
 	$(MAKE) -C testsuite distclean
 	find . -name "*.gcda" -exec rm -f \{\} \;
 	find . -name "*.gcno" -exec rm -f \{\} \;
diff --git a/detok/Makefile b/detok/Makefile
index 897e0eb..80d397f 100644
--- a/detok/Makefile
+++ b/detok/Makefile
@@ -52,11 +52,11 @@ $(PROGRAM): $(OBJS)
 clean:
 	rm -f $(OBJS) *~
 	rm -f $(PROGRAM) .dependencies
-	
+
 .dependencies: *.c 
 	@$(CC) $(CFLAGS) $(INCLUDES) -MM *.c > .dependencies
 
-.PHONY: all clean distclean 
+.PHONY: all clean
 
 -include .dependencies
 
diff --git a/detok/dictionary.c b/detok/dictionary.c
index b3d7abf..f5850da 100644
--- a/detok/dictionary.c
+++ b/detok/dictionary.c
@@ -361,7 +361,7 @@ token_t detok_table[] = {
 	TOKEN_ENTRY(0x0da, "get-token"),
 	TOKEN_ENTRY(0x0db, "set-token"),
 	TOKEN_ENTRY(0x0dc, "state"),
-	TOKEN_ENTRY(0x0dd, "compile"),
+	TOKEN_ENTRY(0x0dd, "compile,"),
 	TOKEN_ENTRY(0x0de, "behavior"),
 	TOKEN_ENTRY(0x0f0, "start0"),
 	TOKEN_ENTRY(0x0f1, "start1"),
diff --git a/toke/Makefile b/toke/Makefile
index 82e7ab2..dc748eb 100644
--- a/toke/Makefile
+++ b/toke/Makefile
@@ -60,7 +60,7 @@ clean:
 documentation:: *.c *.h toke.doxygen
 	@doxygen toke.doxygen
 
-.PHONY: all clean distclean 
+.PHONY: all clean
 
 -include .dependencies
 
diff --git a/toke/dictionary.c b/toke/dictionary.c
index d22c218..5be935f 100644
--- a/toke/dictionary.c
+++ b/toke/dictionary.c
@@ -1119,7 +1119,7 @@ static tic_hdr_t tokens_table[] =
 	BUILTIN_FCODE( 0x0da, "get-token" ) ,
 	BUILTIN_FCODE( 0x0db, "set-token" ) ,
 	BI_FCODE_VRBLE( 0x0dc, "state" ) ,
-	BUILTIN_FCODE( 0x0dd, "compile" ) ,
+	BUILTIN_FCODE( 0x0dd, "compile," ) ,
 	BUILTIN_FCODE( 0x0de, "behavior" ) ,
 	BUILTIN_FCODE( 0x0f0, "start0" ) ,
 	BUILTIN_FCODE( 0x0f1, "start1" ) ,
@@ -1160,7 +1160,7 @@ static tic_hdr_t tokens_table[] =
 	BUILTIN_FCODE( 0x11e, "is-selftest" ) ,
 	BUILTIN_FCODE( 0x11f, "new-device" ) ,
 	BUILTIN_FCODE( 0x120, "diagnostic-mode?" ) ,
-	BUILTIN_FCODE( 0x121, "display-status" ) ,
+	OBSOLETE_FCODE( 0x121, "display-status" ) ,
 	BUILTIN_FCODE( 0x122, "memory-test-issue" ) ,
 	OBSOLETE_FCODE( 0x123, "group-code" ) ,
 	BI_FCODE_VRBLE( 0x124, "mask" ) ,
diff --git a/toke/examples/date.fs b/toke/examples/date.fs
index 8d0b28f..5702eba 100644
--- a/toke/examples/date.fs
+++ b/toke/examples/date.fs
@@ -2,8 +2,8 @@
 
 fcode-version2
     ." This program was tokenized on " 
-    fcode-date type
+    [fcode-date] type
     ." at "
-    fcode-time type
+    [fcode-time] type
 fcode-end
 
diff --git a/toke/examples/scsi-sample/overall.fs b/toke/examples/scsi-sample/overall.fs
index 5d2f61f..9361a82 100644
--- a/toke/examples/scsi-sample/overall.fs
+++ b/toke/examples/scsi-sample/overall.fs
@@ -1,5 +1,6 @@
 \ FCode driver for hypothetical SCSI host adapter
 
+fcode-version2
 hex
 " XYZI,scsi"          name          \ Name of device node
 " XYZI,12346-01"      model         \ Manufacturer's model number
diff --git a/toke/examples/scsi-sample/scsitape.fs b/toke/examples/scsi-sample/scsitape.fs
index ed27779..d39048a 100644
--- a/toke/examples/scsi-sample/scsitape.fs
+++ b/toke/examples/scsi-sample/scsitape.fs
@@ -111,9 +111,9 @@ true instance value first-install?      \ Used for rewind-on-first-open.
          0 false                                ( 0 false )
       else    \ Decode status buffer            ( xstatbuf )
          >r  #requested                         ( #requested ) ( r: xstatbuf )
-         r@ ili?  r@ eof? or  if                ( #requested ) ( r: xstatbuf 
-            r@ residue -                        ( #xfered )    ( r: xstatbuf 
-         then                                   ( #xfered )    ( r: xstatbuf 
+         r@ ili?  r@ eof? or  if                ( #requested ) ( r: xstatbuf )
+            r@ residue -                        ( #xfered )    ( r: xstatbuf )
+         then                                   ( #xfered )    ( r: xstatbuf )
          r> eof?                                ( #xfered flag )
       then
    else       \ no error, #request = #xfered    ( )