From: Jos v.d.V. <jo...@us...> - 2006-08-26 15:27:24
|
Update of /cvsroot/win32forth/win32forth/doc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17812/doc Modified Files: Paths.htm Log Message: Jos: Adapted to the new search-path. Index: Paths.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/Paths.htm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Paths.htm 5 Aug 2006 12:27:39 -0000 1.4 --- Paths.htm 26 Aug 2006 15:27:21 -0000 1.5 *************** *** 1,19 **** ! <html> <head> ! <meta http-equiv="Content-Language" content="en-gb"> ! <meta name="GENERATOR" content="dexh00"> ! <meta name="ProgId" content="FrontPage.Editor.Document"> ! <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> ! <title> ! </title><style><!-- ! h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } ! h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> ! <body><h1 align="center"> ! <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id$"> ! <img border="0" src="TELLUS.gif" align="left" width="32" height="32"></a> ! <img border="0" src="FORTHPRO.gif" ! width="32" height="32"> Win32Forth</h1> <hr /><h1>Paths -- Multiple search path support </h1><hr /><h2>Glossary --- 1,15 ---- ! <?xml version="1.0"?> ! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ! "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ! <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> ! <meta http-equiv="Content-Type" content="text/xml; charset=iso-8859-1" /> ! <meta name="GENERATOR" content="DexH v03" /> ! <style type="text/css"> </style> + <title> + </title> </head> ! <body> <hr /><h1>Paths -- Multiple search path support </h1><hr /><h2>Glossary *************** *** 38,102 **** followed by 0. <br /> In runtime it returns adres of the counted string of a path ! </p><pre><b><a name="8">: path-source ( path-ptr - 2variable_path-source ) </a></b></pre><p>Path-source points to a substring in a path. <br /> Path-source returns this adress. ! </p><pre><b><a name="9">path: path-ptr ! </a></b></pre><p>Path-ptr defines the path buffer for Forth. Applications that let Forth compile should not change it in a way that Forth is not able too compile. ! </p><pre><b><a name="10">: next-path" ( path-ptr -- a1 n1 ) </a></b></pre><p>Get the next path from dir list. ! </p><pre><b><a name="11">: reset-path-source ( path-ptr -- ) </a></b></pre><p>Points the path-source to the whole path. ! </p><pre><b><a name="12">: first-path" ( path-ptr -- a1 n1 ) </a></b></pre><p>Get the first forth directory path. ! </p><pre><b><a name="13">: "path+ ( a1 n1 path-ptr -- ) </a></b></pre><p>Append a directory to a path. ! </p><pre><b><a name="14">: "fpath+ ( a1 n1 -- ) </a></b></pre><p>Append a directory to the Forth path. ! </p><pre><b><a name="15">: fpath+ ( -<directory>- ) </a></b></pre><p>Append a directory to the Forth path. ! </p><pre><b><a name="16">: .path ( path-ptr -- ) </a></b></pre><p>Display a directory search path list. ! </p><pre><b><a name="17">: .fpath ( -- ) </a></b></pre><p>Display the Forth directory search path list. ! </p><pre><b><a name="18">: volume-indication? ( adr - flag ) </a></b></pre><p>True when the counted string at adr starts with x: or \name ! </p><pre><b><a name="19">: full-path { a1 n1 path-ptr \ searchpath$ filename$ current$ -- a2 n2 f1 } </a></b></pre><p>Find file a1,n1 in a path and return the full path. <br /> a2,n2 and f1=false, succeeded. ! </p><pre><b><a name="20">: program-path-init ( -- ) </a></b></pre><p>Initialize the Forth directory search path list. Automatically done at program initialization and when Paths.f is loaded. ! </p><pre><b><a name="21">: "path-file { a1 n1 \ current$ -- a2 n2 f1 } </a></b></pre><p>Find file a1,n1 in the Forth path and return the full path. <br /> a2,n2 and f1=false, succeeded. ! </p><pre><b><a name="22">: n"open ( a1 n1 -- handle f1 ) </a></b></pre><p>Open file a1,n1 with a Forth path search. ! </p><pre><b><a name="23">: MakeAbsolutePath ( a1 n1 a2 n2 -- a3 ) </a></b></pre><p>Make path a1 n1 absolute to path a2 n2. ! </p><pre><b><a name="24">: IsPathRelativeTo? { a1 n1 a2 n2 -- f } </a></b></pre><p>Return true if path a1 n1 is relative to path a2 n2 ! </p><pre><b><a name="25">: MakePathRelativeTo ( a1 n1 a2 n2 -- a3 ) </a></b></pre><p>Make path a1 n1 relative to path a2 n2. ! </p><pre><b><a name="26">: FindRelativePath ( a1 n1 path-ptr - a2 n2 ) ! </a></b></pre><p>Returns a relative path for file a1 n1 in path-ptr ( first part ). <br /> n2=0 means not in search path. ! </p><pre><b><a name="27">: FindRelativeName ( a1 n1 path-ptr - a2 n2 f ) ! </a></b></pre><p>Returns a releative name for file a1 n1 in path-ptr ( last-part ). <br /> n2=0 means not in search path. ! </p><pre><b><a name="28">: "LOADED? ( addr len -- flag ) ! </a></b></pre><p>True if a file addr len is loaded. The filename must cointain a full path. ! </p><pre><b><a name="29">: LOADED? ( -<name>- -- flag ) { \ current$ } </a></b></pre><p>True if the following file is loaded. The filename may be relative. ! </p><pre><b><a name="30">: \LOADED- ( -<name>- ) </a></b></pre><p>If the following file IS NOT LOADED interpret line. ! </p><pre><b><a name="31">: \LOADED ( -<name>- ) </a></b></pre><p> If the following file IS LOADED interpret line. ! </p><pre><b><a name="32">: NEEDS ( -<name>- ) </a></b></pre><p>Conditionally load file "name" if not loaded. ! </p><pre><b><a name="33">synonym Require needs </a></b></pre><p>Forth 200X name for needs. ! </p><pre><b><a name="34">: "file-clip" { adr len limit \ temp$ pre -- 'adr 'len } </a></b></pre><p>Clip filename to limit. ! </p><hr><p>Document $Id$</p> </body></html> --- 34,104 ---- followed by 0. <br /> In runtime it returns adres of the counted string of a path ! </p><pre><b><a name="8">: path-source ( path - 2variable_path-source ) </a></b></pre><p>Path-source points to a substring in a path. <br /> Path-source returns this adress. ! </p><pre><b><a name="9">path: path-ptr deprecated ! </a></b></pre><p>The old functionality had the bad habbit to pass a pointer through a ! value instead of passing the parameter over the stack. <br /> ! Use win32forth\src\Compat\OldPaths.f for the old functionality. <br /> ! Words like first-path" and next-path" are now able to handle ! each path separate without saving and restoring a path-ptr. ! </p><pre><b><a name="10">path: search-path ! </a></b></pre><p>search-path defines the path buffer for Forth.<br /> Applications that let Forth compile should not change it in a way that Forth is not able too compile. ! </p><pre><b><a name="11">: next-path" ( path -- a1 n1 ) </a></b></pre><p>Get the next path from dir list. ! </p><pre><b><a name="12">: reset-path-source ( path -- ) </a></b></pre><p>Points the path-source to the whole path. ! </p><pre><b><a name="13">: first-path" ( path -- a1 n1 ) </a></b></pre><p>Get the first forth directory path. ! </p><pre><b><a name="14">: "path+ ( a1 n1 path -- ) </a></b></pre><p>Append a directory to a path. ! </p><pre><b><a name="15">: "fpath+ ( a1 n1 -- ) </a></b></pre><p>Append a directory to the Forth path. ! </p><pre><b><a name="16">: fpath+ ( -<directory>- ) </a></b></pre><p>Append a directory to the Forth path. ! </p><pre><b><a name="17">: .path ( path -- ) </a></b></pre><p>Display a directory search path list. ! </p><pre><b><a name="18">: .fpath ( -- ) </a></b></pre><p>Display the Forth directory search path list. ! </p><pre><b><a name="19">: volume-indication? ( adr - flag ) </a></b></pre><p>True when the counted string at adr starts with x: or \name ! </p><pre><b><a name="20">: full-path { a1 n1 path \ searchpath$ filename$ current$ -- a2 n2 f1 } </a></b></pre><p>Find file a1,n1 in a path and return the full path. <br /> a2,n2 and f1=false, succeeded. ! </p><pre><b><a name="21">: program-path-init ( -- ) </a></b></pre><p>Initialize the Forth directory search path list. Automatically done at program initialization and when Paths.f is loaded. ! </p><pre><b><a name="22">: "path-file { a1 n1 \ current$ -- a2 n2 f1 } </a></b></pre><p>Find file a1,n1 in the Forth path and return the full path. <br /> a2,n2 and f1=false, succeeded. ! </p><pre><b><a name="23">: n"open ( a1 n1 -- handle f1 ) </a></b></pre><p>Open file a1,n1 with a Forth path search. ! </p><pre><b><a name="24">: MakeAbsolutePath ( a1 n1 a2 n2 -- a3 ) </a></b></pre><p>Make path a1 n1 absolute to path a2 n2. ! </p><pre><b><a name="25">: IsPathRelativeTo? { a1 n1 a2 n2 -- f } </a></b></pre><p>Return true if path a1 n1 is relative to path a2 n2 ! </p><pre><b><a name="26">: MakePathRelativeTo ( a1 n1 a2 n2 -- a3 ) </a></b></pre><p>Make path a1 n1 relative to path a2 n2. ! </p><pre><b><a name="27">: FindRelativePath ( a1 n1 path - a2 n2 ) ! </a></b></pre><p>Returns a relative path for file a1 n1 in path ( first part ). <br /> n2=0 means not in search path. ! </p><pre><b><a name="28">: FindRelativeName ( a1 n1 path - a2 n2 f ) ! </a></b></pre><p>Returns a relative name for file a1 n1 in path ( last-part ). <br /> n2=0 means not in search path. ! </p><pre><b><a name="29">: "LOADED? ( addr len -- flag ) ! </a></b></pre><p>True if a file addr len is loaded. The filename must contain a full path. ! </p><pre><b><a name="30">: LOADED? ( -<name>- -- flag ) { \ current$ } </a></b></pre><p>True if the following file is loaded. The filename may be relative. ! </p><pre><b><a name="31">: \LOADED- ( -<name>- ) </a></b></pre><p>If the following file IS NOT LOADED interpret line. ! </p><pre><b><a name="32">: \LOADED ( -<name>- ) </a></b></pre><p> If the following file IS LOADED interpret line. ! </p><pre><b><a name="33">: NEEDS ( -<name>- ) </a></b></pre><p>Conditionally load file "name" if not loaded. ! </p><pre><b><a name="34">synonym Require needs </a></b></pre><p>Forth 200X name for needs. ! </p><pre><b><a name="35">: "file-clip" { adr len limit \ temp$ pre -- 'adr 'len } </a></b></pre><p>Clip filename to limit. ! </p><hr /> </body></html> |