]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/unix/statvfs/macosx/macosx.factor
use radix literals
[factor.git] / basis / unix / statvfs / macosx / macosx.factor
index 7078ff9f33ad3c587d703d5059ee50542f19ead6..79c9b0e3137c74bc4ce9341d07cb4ac6b7dfddfc 100644 (file)
@@ -1,23 +1,23 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.c-types alien.syntax classes.struct unix.types ;
 IN: unix.statvfs.macosx
 
-C-STRUCT: statvfs
-    { "ulong"   "f_bsize" }
-    { "ulong"   "f_frsize" }
-    { "fsblkcnt_t"  "f_blocks" }
-    { "fsblkcnt_t"  "f_bfree" }
-    { "fsblkcnt_t"  "f_bavail" }
-    { "fsfilcnt_t"  "f_files" }
-    { "fsfilcnt_t"  "f_ffree" }
-    { "fsfilcnt_t"  "f_favail" }
-    { "ulong"   "f_fsid" }
-    { "ulong"   "f_flag" }
-    { "ulong"   "f_namemax" } ;
+STRUCT: statvfs
+    { f_bsize ulong }
+    { f_frsize ulong }
+    { f_blocks fsblkcnt_t }
+    { f_bfree fsblkcnt_t }
+    { f_bavail fsblkcnt_t }
+    { f_files fsfilcnt_t }
+    { f_ffree fsfilcnt_t }
+    { f_favail fsfilcnt_t }
+    { f_fsid ulong }
+    { f_flag ulong }
+    { f_namemax ulong } ;
 
 ! Flags
-: ST_RDONLY   HEX: 1 ; inline ! Read-only file system
-: ST_NOSUID   HEX: 2 ; inline ! Does not honor setuid/setgid
+CONSTANT: ST_RDONLY   0x1 ! Read-only file system
+CONSTANT: ST_NOSUID   0x2 ! Does not honor setuid/setgid
 
-FUNCTION: int statvfs ( char* path, statvfs* buf ) ;
+FUNCTION: int statvfs ( c-string path, statvfs* buf ) ;