Diff for /gforth/kernel/paths.fs between versions 1.12 and 1.13

version 1.12, 1999/03/23 20:24:26 version 1.13, 1999/05/17 14:55:50
Line 152  Create tfile 0 c, 255 chars allot Line 152  Create tfile 0 c, 255 chars allot
     ofile count 2 min s" ./" compare 0=      ofile count 2 min s" ./" compare 0=
     IF      IF
         ofile count 1 /string tfile place          ofile count 1 /string tfile place
         0 ofile c! sourcefilename extractpath ofile place need/          0 ofile c! sourcefilename extractpath ofile place
           \ care of / only if there is a directory
           ofile c@ IF need/ THEN
         tfile count over c@ pathsep? IF 1 /string THEN          tfile count over c@ pathsep? IF 1 /string THEN
         ofile +place          ofile +place
     THEN ;      THEN ;
Line 195  Create tfile 0 c, 255 chars allot Line 197  Create tfile 0 c, 255 chars allot
   r> r> ofile +place    r> r> ofile +place
   open-ofile ;    open-ofile ;
   
 \ !! returns 2 stack items if file is not found, not just the ior  
 : open-path-file ( addr1 u1 path-addr -- wfileid addr2 u2 0 | ior ) \ gforth  : open-path-file ( addr1 u1 path-addr -- wfileid addr2 u2 0 | ior ) \ gforth
     \G Look in path @var{path-addr} for the file specified by @var{addr1 u1}.      \G Look in path @var{path-addr} for the file specified by @var{addr1 u1}.
     \G If found, the resulting path and an open file descriptor      \G If found, the resulting path and an open file descriptor
Line 213  Create tfile 0 c, 255 chars allot Line 214  Create tfile 0 c, 255 chars allot
         2drop 2drop 2drop -&38          2drop 2drop 2drop -&38
   THEN ;    THEN ;
   
 \ !! returns 2 stack items if file is not found, not just the ior  
 : open-fpath-file ( addr1 u1 -- wfileid addr2 u2 0 | ior ) \ gforth  : open-fpath-file ( addr1 u1 -- wfileid addr2 u2 0 | ior ) \ gforth
     \G Look in the Forth search path for the file specified by @var{addr1 u1}.      \G Look in the Forth search path for the file specified by @var{addr1 u1}.
     \G If found, the resulting path and an open file descriptor      \G If found, the resulting path and an open file descriptor

Removed from v.1.12  
changed lines
  Added in v.1.13


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>