[gforth] / gforth / mkdir.fs  

gforth: gforth/mkdir.fs

Diff for /gforth/mkdir.fs between version 1.4 and 1.5

version 1.4, Mon Oct 6 21:21:20 2008 UTC version 1.5, Mon Oct 6 21:46:15 2008 UTC
Line 18 
Line 18 
 \ along with this program. If not, see http://www.gnu.org/licenses/.  \ along with this program. If not, see http://www.gnu.org/licenses/.
   
 \ there is now a primitive =MKDIR  \ there is now a primitive =MKDIR
 \ require cstr.fs  [IFUNDEF] =mkdir
 \ c-library mkdir      [IFUNDEF] c-library
 \ \c #include <sys/stat.h>          \ define dummy mkdir
 \ \c #include <sys/types.h>          : =mkdir ( c-addr u mode -- ior )
 \ c-function mkdir mkdir a n -- n ( pathname\0 mode -- f )              2drop drop 0 ;
 \ \c #include <errno.h>      [ELSE]
 \ \c #define IOR(flag)  ((flag)? -512-errno : 0)          require cstr.fs
 \ c-function f>ior IOR n -- n ( f -- ior )          c-library mkdir
           \c #include <sys/stat.h>
           \c #include <sys/types.h>
           c-function mkdir mkdir a n -- n ( pathname\0 mode -- f )
           \c #include <errno.h>
           \c #define IOR(flag)    ((flag)? -512-errno : 0)
           c-function f>ior IOR n -- n ( f -- ior )
   
 \ : =mkdir ( c-addr u mode -- ior )          : =mkdir ( c-addr u mode -- ior )
 \     >r 1 tilde_cstr r> mkdir f>ior ;          >r 1 tilde_cstr r> mkdir f>ior ;
 \ end-c-library          end-c-library
       [THEN]
   [THEN]
   
 : mkdir-parents { c-addr u mode -- ior }  : mkdir-parents { c-addr u mode -- ior }
     \G create the directory @i{c-addr u} and all its parents with      \G create the directory @i{c-addr u} and all its parents with


Generate output suitable for use with a patch program
Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help