[OpenBIOS] r521 - cpu/ppc cpu/ppc/olpc cpu/x86 cpu/x86/pc/biosload cpu/x86/pc/lxdevel cpu/x86/pc/olpc forth/lib

svn at openbios.org svn at openbios.org
Fri Aug 3 02:55:32 CEST 2007


Author: wmb
Date: 2007-08-03 02:55:32 +0200 (Fri, 03 Aug 2007)
New Revision: 521

Modified:
   cpu/ppc/basefw.bth
   cpu/ppc/builder.bth
   cpu/ppc/loadmach.fth
   cpu/ppc/olpc/fw.bth
   cpu/ppc/savefort.fth
   cpu/ppc/tools.bth
   cpu/x86/basefw.bth
   cpu/x86/catchexc.fth
   cpu/x86/loadmach.fth
   cpu/x86/pc/biosload/fw.bth
   cpu/x86/pc/lxdevel/fw.bth
   cpu/x86/pc/olpc/fw.bth
   cpu/x86/pc/olpc/spiflash.bth
   cpu/x86/saveexp.fth
   cpu/x86/savefort.fth
   cpu/x86/tools.bth
   forth/lib/filetool.fth
Log:
Deleted the last (I hope) vestiges of the long-obsolete "pstr" format
for save-forth and some file creation operators.


Modified: cpu/ppc/basefw.bth
===================================================================
--- cpu/ppc/basefw.bth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/ppc/basefw.bth	2007-08-03 00:55:32 UTC (rev 521)
@@ -85,7 +85,7 @@
 [then]
 
 [ifndef] no-heads
-.( --- Saving basefw.dic --- )  cr "" basefw.dic save-forth
+.( --- Saving basefw.dic --- )  cr " basefw.dic" $save-forth
 [then]
 
 \ LICENSE_BEGIN

Modified: cpu/ppc/builder.bth
===================================================================
--- cpu/ppc/builder.bth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/ppc/builder.bth	2007-08-03 00:55:32 UTC (rev 521)
@@ -8,7 +8,7 @@
 fload ${BP}/ofw/tokenizer/tokenize.fth
 fload ${BP}/forth/lib/builder.fth
 
-.( --- Saving builder.dic --- )  cr "" builder.dic save-forth
+.( --- Saving builder.dic --- )  cr " builder.dic" $save-forth
 
 \ LICENSE_BEGIN
 \ Copyright (c) 2007 FirmWorks

Modified: cpu/ppc/loadmach.fth
===================================================================
--- cpu/ppc/loadmach.fth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/ppc/loadmach.fth	2007-08-03 00:55:32 UTC (rev 521)
@@ -18,7 +18,7 @@
 [ifndef] partial-no-heads	transient  [then]
 fload ${BP}/forth/lib/binhdr.fth
 fload ${BP}/cpu/ppc/savefort.fth
-\ alias save-forth save-forth
+\ alias $save-forth $save-forth
 [ifndef] partial-no-heads	resident  [then]
 
 fload ${BP}/forth/lib/instdis.fth

Modified: cpu/ppc/olpc/fw.bth
===================================================================
--- cpu/ppc/olpc/fw.bth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/ppc/olpc/fw.bth	2007-08-03 00:55:32 UTC (rev 521)
@@ -270,7 +270,7 @@
 
 install-rom-cold
 
-.( --- Saving fw.dic ---) cr  p" fw.dic" save-forth
+.( --- Saving fw.dic ---) cr  " fw.dic" $save-forth
 
 \ LICENSE_BEGIN
 \ Copyright (c) 2007 FirmWorks

Modified: cpu/ppc/savefort.fth
===================================================================
--- cpu/ppc/savefort.fth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/ppc/savefort.fth	2007-08-03 00:55:32 UTC (rev 521)
@@ -1,10 +1,10 @@
 purpose: Save the Forth dictionary to a file
 \ See license at end of file
 
-\ save-forth  ( filename -- )
+\ $save-forth  ( filename$ -- )
 \	Saves the Forth dictionary to a file so it may be later used under Unix
 \
-\ save-image  ( header-adr header-len filename -- )
+\ $save-image  ( header-adr header-len filename$ -- )
 \	Primitive save routine.  Saves the dictionary image to a file.
 \	The header is placed at the start of the file.  The latest definition
 \	whose name is the same as the "init-routine-name" argument is
@@ -30,10 +30,10 @@
    loop                          ( adr )
    drop
 ;
-: save-image  ( header header-len filename -- )
+: $save-image  ( header header-len filename$ -- )
    ['] ($find-next) is $find-next
 
-   new-file   ( header header-len )
+   $new-file   ( header header-len )
    in-little-endian?  if
        ( header header-len )  be-fputs		\ Write header
        origin   text-size     ?be-fputs		\ Write dictionary
@@ -62,16 +62,16 @@
 ;
 
 \ Save an image of the target system in a file.
-: save-forth  ( str -- )
+: $save-forth  ( name$ -- )
    8 (align)			\ Make sure image is 8 byte aligned
 
-   >r
+   2>r
 
    make-bin-header
 
    " sys-init-io" $find-name is init-io
    " sys-init"  init-save
-   bin-header  /bin-header  r>  save-image
+   bin-header  /bin-header  2r>  $save-image
 ;
 
 only forth also definitions

Modified: cpu/ppc/tools.bth
===================================================================
--- cpu/ppc/tools.bth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/ppc/tools.bth	2007-08-03 00:55:32 UTC (rev 521)
@@ -21,7 +21,7 @@
 fload ${BP}/cpu/ppc/loadmach.fth	\ CPU and OS-specific extensions
 
 [ifndef] no-heads
-.( --- Saving tools.dic --- )  "" tools.dic save-forth cr
+.( --- Saving tools.dic --- )  " tools.dic" $save-forth cr
 [then]
 
 \ LICENSE_BEGIN

Modified: cpu/x86/basefw.bth
===================================================================
--- cpu/x86/basefw.bth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/x86/basefw.bth	2007-08-03 00:55:32 UTC (rev 521)
@@ -106,7 +106,7 @@
 [ifndef] no-heads
 resident   dispose   0 0 set-transize   \ true is suppress-transient
 
-cr .( --- Saving basefw.dic --- )  "" basefw.dic save-forth  cr
+cr .( --- Saving basefw.dic --- )  " basefw.dic" $save-forth  cr
 [then]
 
 \ LICENSE_BEGIN

Modified: cpu/x86/catchexc.fth
===================================================================
--- cpu/x86/catchexc.fth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/x86/catchexc.fth	2007-08-03 00:55:32 UTC (rev 521)
@@ -360,11 +360,11 @@
    ['] noop is uncatch-exceptions
 ;
 
-: save-forth  ( pstr -- )
+: $save-forth  ( name$ -- )
    ['] uncatch-exceptions behavior  ['] (uncatch-exceptions) =  if 
-      uncatch-exceptions  save-forth  catch-exceptions
+      uncatch-exceptions  $save-forth  catch-exceptions
    else
-      save-forth
+      $save-forth
    then
 ;
 

Modified: cpu/x86/loadmach.fth
===================================================================
--- cpu/x86/loadmach.fth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/x86/loadmach.fth	2007-08-03 00:55:32 UTC (rev 521)
@@ -19,7 +19,7 @@
 [ifndef] partial-no-heads       transient   [then]
 fload ${BP}/cpu/x86/saveexp.fth
 fload ${BP}/cpu/x86/savefort.fth
-\ alias save-forth save-forth
+\ alias $save-forth $save-forth
 [ifndef] partial-no-heads	resident  [then]
 
 [ifdef] resident-packages

Modified: cpu/x86/pc/biosload/fw.bth
===================================================================
--- cpu/x86/pc/biosload/fw.bth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/x86/pc/biosload/fw.bth	2007-08-03 00:55:32 UTC (rev 521)
@@ -310,7 +310,7 @@
 " dhcp" ' ip-address  set-config-string-default
 
 .( Saving fw.dic ...)
-"" fw.dic save-forth cr
+" fw.dic" $save-forth cr
 
 .( Saving fw.img ...)
 " fw.img"  RAMbase save-abs-rom cr

Modified: cpu/x86/pc/lxdevel/fw.bth
===================================================================
--- cpu/x86/pc/lxdevel/fw.bth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/x86/pc/lxdevel/fw.bth	2007-08-03 00:55:32 UTC (rev 521)
@@ -510,7 +510,7 @@
 previous previous definitions
 
 .( --- Saving fw.dic ...)
-"" fw.dic save-forth cr
+" fw.dic" $save-forth cr
 
 \ patch foo decimal cold
 

Modified: cpu/x86/pc/olpc/fw.bth
===================================================================
--- cpu/x86/pc/olpc/fw.bth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/x86/pc/olpc/fw.bth	2007-08-03 00:55:32 UTC (rev 521)
@@ -589,7 +589,7 @@
 previous previous definitions
 
 .( --- Saving fw.dic ...)
-"" fw.dic save-forth cr
+" fw.dic" $save-forth cr
 
 \ patch foo decimal cold
 

Modified: cpu/x86/pc/olpc/spiflash.bth
===================================================================
--- cpu/x86/pc/olpc/spiflash.bth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/x86/pc/olpc/spiflash.bth	2007-08-03 00:55:32 UTC (rev 521)
@@ -70,4 +70,4 @@
 
 alias quit bye
 
-"" spiflash.dic save-forth
+" spiflash.dic" $save-forth

Modified: cpu/x86/saveexp.fth
===================================================================
--- cpu/x86/saveexp.fth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/x86/saveexp.fth	2007-08-03 00:55:32 UTC (rev 521)
@@ -48,11 +48,11 @@
    checksum   12 hw!			\ Checksum
 ;   
 
-: save-image  ( pstr base-adr len -- )
-   is code-size  is code-adr	( pstr )
-   makeheader			( pstr )
+: $save-image  ( name$ base-adr len -- )
+   is code-size  is code-adr	( name$ )
+   makeheader			( name$ )
 
-   new-file
+   $new-file
 
    exp-header  /exp-header  		 ofd @  fputs
    code-adr    code-size    		 ofd @  fputs

Modified: cpu/x86/savefort.fth
===================================================================
--- cpu/x86/savefort.fth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/x86/savefort.fth	2007-08-03 00:55:32 UTC (rev 521)
@@ -3,8 +3,8 @@
 
 only forth also definitions
 
-: save-forth  ( pstr -- )
-   " sys-init-io" $find-name  is init-io           ( pstr )
+: $save-forth  ( name$ -- )
+   " sys-init-io" $find-name  is init-io           ( name$ )
    " sys-init"    init-save
    ['] noop is set-relocation-bit	\ Turn off until relo map is allocated
 
@@ -12,9 +12,9 @@
    origin  origin h# 1c +  le-l!	\ Set relocation base address
 
    \ Set user initialization table
-   up@ init-user-area origin + user-size  move  ( pstr )
+   up@ init-user-area origin + user-size  move  ( name$ )
 
-   origin  here over -  save-image
+   origin  here over -  $save-image
 ;
 only forth also definitions
 

Modified: cpu/x86/tools.bth
===================================================================
--- cpu/x86/tools.bth	2007-08-03 00:47:34 UTC (rev 520)
+++ cpu/x86/tools.bth	2007-08-03 00:55:32 UTC (rev 521)
@@ -38,7 +38,7 @@
 \ .(   zeroed: ) dot
 
 ' noop is include-hook  ' noop is include-exit-hook
-.( --- Saving tools.dic --- )  "" tools.dic save-forth cr
+.( --- Saving tools.dic --- )  " tools.dic" $save-forth cr
 [then]
 \ LICENSE_BEGIN
 \ Copyright (c) 2006 FirmWorks

Modified: forth/lib/filetool.fth
===================================================================
--- forth/lib/filetool.fth	2007-08-03 00:47:34 UTC (rev 520)
+++ forth/lib/filetool.fth	2007-08-03 00:55:32 UTC (rev 521)
@@ -38,6 +38,8 @@
    ofd !                       ( name$ )
    2drop
 ;
+: modifying  ( "filename" -- )  safe-parse-word $write-open  ;
+
 : $new-file  ( name$ -- )
    2dup r/w create-file  if    ( name$ x )
       drop  ." Can't create " type  cr abort
@@ -71,15 +73,6 @@
    note-string  2drop   \ Mark as a sequence of bytes
 ;
 
-\ Backwards compatibility ...
-
-: read-open     ( name-pstr -- )  count $read-open    ;
-: write-open    ( name-pstr -- )  count $write-open   ;
-: new-file      ( name-pstr -- )  count $new-file     ;
-: append-open   ( name-pstr -- )  count $append-open  ;
-: file-exists?  ( name-pstr -- flag ) \ True if the named file already exists
-   read fopen  ( fd )   dup   if  fclose true  then
-;
 \ LICENSE_BEGIN
 \ Copyright (c) 2006 FirmWorks
 \ 




More information about the OpenBIOS mailing list