| 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! |
| 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 |
| drop r> tuck - ; |
drop r> tuck - ; |
| |
|
| : reworkdir |
: reworkdir |
| expandtopic |
remove~+ |
| ofile count compact// compact.. |
ofile count compact// compact.. |
| nip ofile c! ; |
nip ofile c! ; |
| |
|
| >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 |