Merge branch 'master' of git://factorcode.org/git/factor
commit
43ab7947ae
|
@ -1,9 +1,13 @@
|
|||
USING: alien alien.c-types alien.syntax kernel system combinators ;
|
||||
USING: alien alien.c-types alien.syntax kernel system
|
||||
combinators ;
|
||||
IN: math.blas.cblas
|
||||
|
||||
<<
|
||||
: load-atlas ( -- )
|
||||
"atlas" "libatlas.so" "cdecl" add-library ;
|
||||
: load-fortran ( -- )
|
||||
"I77" "libI77.so" "cdecl" add-library
|
||||
"F77" "libF77.so" "cdecl" add-library ;
|
||||
: load-blas ( -- )
|
||||
"blas" "libblas.so" "cdecl" add-library ;
|
||||
|
||||
|
@ -11,6 +15,10 @@ IN: math.blas.cblas
|
|||
{ [ os macosx? ] [ "libblas.dylib" "cdecl" add-library ] }
|
||||
{ [ os windows? ] [ "blas.dll" "cdecl" add-library ] }
|
||||
{ [ os openbsd? ] [ "libcblas.so" "cdecl" add-library load-blas ] }
|
||||
{ [ os netbsd? ] [
|
||||
load-fortran load-blas
|
||||
"/usr/local/lib/libcblas.so" "cdecl" add-library
|
||||
] }
|
||||
{ [ os freebsd? ] [ "libcblas.so" "cdecl" add-library load-atlas ] }
|
||||
[ "libblas.so" "cdecl" add-library ]
|
||||
} cond
|
||||
|
|
|
@ -5,3 +5,34 @@ cell-bits {
|
|||
{ 32 [ "unix.stat.netbsd.32" require ] }
|
||||
{ 64 [ "unix.stat.netbsd.64" require ] }
|
||||
} case
|
||||
|
||||
: _VFS_NAMELEN 32 ; inline
|
||||
: _VFS_MNAMELEN 1024 ; inline
|
||||
|
||||
C-STRUCT: statvfs
|
||||
{ "ulong" "f_flag" }
|
||||
{ "ulong" "f_bsize" }
|
||||
{ "ulong" "f_frsize" }
|
||||
{ "ulong" "f_iosize" }
|
||||
{ "fsblkcnt_t" "f_blocks" }
|
||||
{ "fsblkcnt_t" "f_bfree" }
|
||||
{ "fsblkcnt_t" "f_bavail" }
|
||||
{ "fsblkcnt_t" "f_bresvd" }
|
||||
{ "fsfilcnt_t" "f_files" }
|
||||
{ "fsfilcnt_t" "f_ffree" }
|
||||
{ "fsfilcnt_t" "f_favail" }
|
||||
{ "fsfilcnt_t" "f_fresvd" }
|
||||
{ "uint64_t" "f_syncreads" }
|
||||
{ "uint64_t" "f_syncwrites" }
|
||||
{ "uint64_t" "f_asyncreads" }
|
||||
{ "uint64_t" "f_asyncwrites" }
|
||||
{ "fsid_t" "f_fsidx" }
|
||||
{ "ulong" "f_fsid" }
|
||||
{ "ulong" "f_namemax" }
|
||||
{ "uid_t" "f_owner" }
|
||||
{ { "uint32_t" 4 } "f_spare" }
|
||||
{ { "char" _VFS_NAMELEN } "f_fstypename" }
|
||||
{ { "char" _VFS_NAMELEN } "f_mntonname" }
|
||||
{ { "char" _VFS_NAMELEN } "f_mntfromname" } ;
|
||||
|
||||
FUNCTION: int statvfs ( char* path, statvfs* buf ) ;
|
||||
|
|
|
@ -157,7 +157,7 @@ M: seq-rule handle-rule-start
|
|||
mark-token
|
||||
add-remaining-token
|
||||
tuck body-token>> next-token,
|
||||
get-delegate [ push-context ] when* ;
|
||||
delegate>> [ push-context ] when* ;
|
||||
|
||||
UNION: abstract-span-rule span-rule eol-span-rule ;
|
||||
|
||||
|
@ -168,7 +168,7 @@ M: abstract-span-rule handle-rule-start
|
|||
tuck rule-match-token* next-token,
|
||||
! ... end subst ...
|
||||
dup context get (>>in-rule)
|
||||
get-delegate push-context ;
|
||||
delegate>> push-context ;
|
||||
|
||||
M: span-rule handle-rule-end
|
||||
2drop ;
|
||||
|
|
|
@ -4,7 +4,7 @@ sbufs math ;
|
|||
IN: strings
|
||||
|
||||
ARTICLE: "strings" "Strings"
|
||||
"A string is a fixed-size mutable sequence of Unicode 5.0 code points."
|
||||
"A string is a fixed-size mutable sequence of Unicode 5.1 code points."
|
||||
$nl
|
||||
"Characters are not a first-class type; they are simply represented as integers between 0 and 16777216 (2^24). Only characters up to 2097152 (2^21) have a defined meaning in Unicode."
|
||||
$nl
|
||||
|
|
Loading…
Reference in New Issue