Diff for /gforth/kernel/paths.fs between versions 1.3 and 1.4

version 1.3, 1998/05/02 21:29:09 version 1.4, 1998/05/31 19:29:33
Line 26  fpath= <path>|<path> makes complete now Line 26  fpath= <path>|<path> makes complete now
                         seperator is |                          seperator is |
 .fpath                  displays the search path  .fpath                  displays the search path
 remark I:   remark I: 
 a ~+ in the beginning of filename is expanded to the directory the  a ./ in the beginning of filename is expanded to the directory the
 current file comes from. ~+ can also be included in the search-path!  current file comes from. ./ can also be included in the search-path!
   ~+/ loads from the current directory
   
 remark II:  remark II:
 if there is no sufficient space for the search path increase it!  if there is no sufficient space for the search path increase it!
Line 142  Create tfile 0 c, 255 chars allot Line 143  Create tfile 0 c, 255 chars allot
         2dup + c@ pathsep? IF EXIT THEN          2dup + c@ pathsep? IF EXIT THEN
   REPEAT ;    REPEAT ;
   
   : remove~+ ( -- )
       ofile count 3 min s" ~+/" compare 0=
       IF
           ofile count 3 /string ofile place
       THEN ;
   
 : expandtopic  : expandtopic
   ofile count 2 min s" ~+" compare 0=    ofile count 2 min s" ./" compare 0=
   IF    ofile count 2 /string tfile place    IF    ofile count 1 /string tfile place
         0 ofile c! sourcefilename extractpath ofile place need/          0 ofile c! sourcefilename extractpath ofile place need/
         tfile count over c@ pathsep? IF 1 /string THEN          tfile count over c@ pathsep? IF 1 /string THEN
         ofile +place          ofile +place
Line 187  Create tfile 0 c, 255 chars allot Line 194  Create tfile 0 c, 255 chars allot
   drop r> tuck - ;    drop r> tuck - ;
   
 : reworkdir  : reworkdir
   expandtopic    remove~+
   ofile count compact// compact..    ofile count compact// compact..
   nip ofile c! ;    nip ofile c! ;
   
Line 204  Create tfile 0 c, 255 chars allot Line 211  Create tfile 0 c, 255 chars allot
   >r    >r
   2dup absolut-path?    2dup absolut-path?
   IF    rdrop    IF    rdrop
         ofile place reworkdir ofile count r/o open-file          ofile place expandtopic reworkdir ofile count r/o open-file
         dup 0= IF >r ofile count r> THEN EXIT          dup 0= IF >r ofile count r> THEN EXIT
   ELSE  r> path>counted    ELSE  r> path>counted
         BEGIN  next-path dup          BEGIN  next-path dup

Removed from v.1.3  
changed lines
  Added in v.1.4


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