unix.stat: Rename stat* and lstat*. Convert them to use

'unix-system-call'.
db4
Eduardo Cavazos 2008-05-13 13:32:55 -05:00
parent 94b0878fc9
commit a293b8a2c5
1 changed files with 8 additions and 10 deletions

View File

@ -60,14 +60,12 @@ FUNCTION: int mkdir ( char* path, mode_t mode ) ;
>>
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: check-status ( n -- ) io-error ;
: file-status ( pathname -- stat )
"stat" <c-object> dup >r
[ stat ] unix-system-call drop
r> ;
: stat* ( pathname -- stat )
"stat" <c-object> dup >r
stat check-status
r> ;
: lstat* ( pathname -- stat )
"stat" <c-object> dup >r
lstat check-status
r> ;
: link-status ( pathname -- stat )
"stat" <c-object> dup >r
[ lstat ] unix-system-call
r> ;