remove win32? and win64? words

db4
Doug Coleman 2008-04-02 18:53:24 -05:00
parent 5db2e8570a
commit a9cd31704d
16 changed files with 49 additions and 75 deletions

View File

@ -388,6 +388,6 @@ M: long-long-type box-return ( type -- )
[ string>u16-alien ] "ushort*" c-type set-c-type-prep
win64? "longlong" "long" ? "ptrdiff_t" typedef
os winnt? cpu x86.64? and "longlong" "long" ? "ptrdiff_t" typedef
] with-compilation-unit

View File

@ -5,8 +5,6 @@ IN: system
ARTICLE: "os" "System interface"
"Operating system detection:"
{ $subsection os }
{ $subsection win32? }
{ $subsection win64? }
"Processor detection:"
{ $subsection cpu }
"Reading environment variables:"
@ -86,14 +84,6 @@ HELP: set-os-envs
{ os-env os-envs set-os-envs } related-words
HELP: win32?
{ $values { "?" "a boolean" } }
{ $description "Tests if Factor is running on 32-bit Windows." } ;
HELP: win64?
{ $values { "?" "a boolean" } }
{ $description "Tests if Factor is running on 64-bit Windows." } ;
HELP: image
{ $values { "path" "a pathname string" } }
{ $description "Outputs the pathname of the currently running Factor image." } ;

View File

@ -64,14 +64,6 @@ PRIVATE>
: vm ( -- path ) 14 getenv ;
: win32? ( -- ? )
os winnt?
cell 4 = and ; foldable
: win64? ( -- ? )
os winnt?
cell 8 = and ; foldable
: embedded? ( -- ? ) 15 getenv ;
: os-envs ( -- assoc )

View File

@ -7,13 +7,11 @@
! - most of the matrix stuff
! - most of the query functions
USING: alien alien.syntax combinators system ;
IN: cairo.ffi
<< "cairo" {
{ [ os win32? ] [ "libcairo-2.dll" ] }
{ [ os winnt? ] [ "libcairo-2.dll" ] }
! { [ os macosx? ] [ "libcairo.dylib" ] }
{ [ os macosx? ] [ "/opt/local/lib/libcairo.dylib" ] }
{ [ os unix? ] [ "libcairo.so.2" ] }

View File

@ -6,7 +6,7 @@ USING: alien alien.syntax combinators kernel system ;
IN: db.mysql.ffi
<< "mysql" {
{ [ os win32? ] [ "libmySQL.dll" "stdcall" ] }
{ [ os winnt? ] [ "libmySQL.dll" "stdcall" ] }
{ [ os macosx? ] [ "libmysqlclient.14.dylib" "cdecl" ] }
{ [ os unix? ] [ "libmysqlclient.so.14" "cdecl" ] }
} cond add-library >>

View File

@ -5,7 +5,7 @@ USING: alien alien.syntax combinators system ;
IN: db.postgresql.ffi
<< "postgresql" {
{ [ os win32? ] [ "libpq.dll" ] }
{ [ os winnt? ] [ "libpq.dll" ] }
{ [ os macosx? ] [ "/opt/local/lib/postgresql82/libpq.dylib" ] }
{ [ os unix? ] [ "libpq.so" ] }
} cond "cdecl" add-library >>

View File

@ -6,7 +6,7 @@ IN: ogg
<<
"ogg" {
{ [ os win32? ] [ "ogg.dll" ] }
{ [ os winnt? ] [ "ogg.dll" ] }
{ [ os macosx? ] [ "libogg.0.dylib" ] }
{ [ os unix? ] [ "libogg.so" ] }
} cond "cdecl" add-library

View File

@ -6,7 +6,7 @@ IN: ogg.theora
<<
"theora" {
{ [ os win32? ] [ "theora.dll" ] }
{ [ os winnt? ] [ "theora.dll" ] }
{ [ os macosx? ] [ "libtheora.0.dylib" ] }
{ [ os unix? ] [ "libtheora.so" ] }
} cond "cdecl" add-library

View File

@ -6,7 +6,7 @@ IN: ogg.vorbis
<<
"vorbis" {
{ [ os win32? ] [ "vorbis.dll" ] }
{ [ os winnt? ] [ "vorbis.dll" ] }
{ [ os macosx? ] [ "libvorbis.0.dylib" ] }
{ [ os unix? ] [ "libvorbis.so" ] }
} cond "cdecl" add-library

View File

@ -1,8 +1,4 @@
USING: namespaces ;
USING: namespaces system ;
IN: openal.backend
SYMBOL: openal-backend
HOOK: load-wav-file openal-backend ( filename -- format data size frequency )
TUPLE: other-openal-backend ;
T{ other-openal-backend } openal-backend set-global
HOOK: load-wav-file os ( filename -- format data size frequency )

View File

@ -1,18 +1,14 @@
! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
!
IN: openal.macosx
USING: alien.c-types kernel alien alien.syntax shuffle
combinators.lib openal.backend namespaces ;
TUPLE: macosx-openal-backend ;
LIBRARY: alut
T{ macosx-openal-backend } openal-backend set-global
FUNCTION: void alutLoadWAVFile ( ALbyte* fileName, ALenum* format, void** data, ALsizei* size, ALsizei* frequency ) ;
M: macosx-openal-backend load-wav-file ( path -- format data size frequency )
0 <int> f <void*> 0 <int> 0 <int>
[ alutLoadWAVFile ] 4keep
>r >r >r *int r> *void* r> *int r> *int ;
! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types kernel alien alien.syntax shuffle
combinators.lib openal.backend namespaces ;
IN: openal.macosx
LIBRARY: alut
FUNCTION: void alutLoadWAVFile ( ALbyte* fileName, ALenum* format, void** data, ALsizei* size, ALsizei* frequency ) ;
M: macosx load-wav-file ( path -- format data size frequency )
0 <int> f <void*> 0 <int> 0 <int>
[ alutLoadWAVFile ] 4keep
>r >r >r *int r> *void* r> *int r> *int ;

View File

@ -1,20 +1,23 @@
! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
!
IN: openal
USING: kernel alien system combinators alien.syntax namespaces
alien.c-types sequences vocabs.loader shuffle combinators.lib
openal.backend ;
IN: openal
<< "alut" {
{ [ os win32? ] [ "alut.dll" ] }
{ [ os macosx? ] [ "/System/Library/Frameworks/OpenAL.framework/OpenAL" ] }
{ [ os windows? ] [ "alut.dll" ] }
{ [ os macosx? ] [
"/System/Library/Frameworks/OpenAL.framework/OpenAL"
] }
{ [ os unix? ] [ "libalut.so" ] }
} cond "cdecl" add-library >>
<< "openal" {
{ [ os win32? ] [ "OpenAL32.dll" ] }
{ [ os macosx? ] [ "/System/Library/Frameworks/OpenAL.framework/OpenAL" ] }
{ [ os windows? ] [ "OpenAL32.dll" ] }
{ [ os macosx? ] [
"/System/Library/Frameworks/OpenAL.framework/OpenAL"
] }
{ [ os unix? ] [ "libopenal.so" ] }
} cond "cdecl" add-library >>
@ -290,4 +293,3 @@ os macosx? "openal.macosx" "openal.other" ? require
: source-playing? ( source -- bool )
AL_SOURCE_STATE get-source-param AL_PLAYING = ;

View File

@ -1,14 +1,14 @@
! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
!
IN: openal.other
USING: openal.backend alien.c-types kernel alien alien.syntax shuffle combinators.lib ;
LIBRARY: alut
FUNCTION: void alutLoadWAVFile ( ALbyte* fileName, ALenum* format, void** data, ALsizei* size, ALsizei* frequency, ALboolean* looping ) ;
M: other-openal-backend load-wav-file ( filename -- format data size frequency )
0 <int> f <void*> 0 <int> 0 <int>
[ 0 <char> alutLoadWAVFile ] 4keep
>r >r >r *int r> *void* r> *int r> *int ;
! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
USING: openal.backend alien.c-types kernel alien alien.syntax
shuffle combinators.lib ;
IN: openal.other
LIBRARY: alut
FUNCTION: void alutLoadWAVFile ( ALbyte* fileName, ALenum* format, void** data, ALsizei* size, ALsizei* frequency, ALboolean* looping ) ;
M: object load-wav-file ( filename -- format data size frequency )
0 <int> f <void*> 0 <int> 0 <int>
[ 0 <char> alutLoadWAVFile ] 4keep
>r >r >r *int r> *void* r> *int r> *int ;

View File

@ -11,7 +11,7 @@ IN: openssl.libcrypto
<<
"libcrypto" {
{ [ os win32? ] [ "libeay32.dll" "cdecl" ] }
{ [ os winnt? ] [ "libeay32.dll" "cdecl" ] }
{ [ os macosx? ] [ "libcrypto.dylib" "cdecl" ] }
{ [ os unix? ] [ "libcrypto.so" "cdecl" ] }
} cond add-library

View File

@ -10,7 +10,7 @@ USING: alien alien.syntax combinators kernel system ;
IN: openssl.libssl
<< "libssl" {
{ [ os win32? ] [ "ssleay32.dll" "cdecl" ] }
{ [ os winnt? ] [ "ssleay32.dll" "cdecl" ] }
{ [ os macosx? ] [ "libssl.dylib" "cdecl" ] }
{ [ os unix? ] [ "libssl.so" "cdecl" ] }
} cond add-library >>

View File

@ -12,7 +12,7 @@ USING: alien alien.syntax combinators kernel system ;
IN: oracle.liboci
"oci" {
{ [ os win32? ] [ "oci.dll" "stdcall" ] }
{ [ os winnt? ] [ "oci.dll" "stdcall" ] }
{ [ os macosx? ] [ "$DYLD_LIBRARY_PATH/libclntsh.dylib" "cdecl" ] }
{ [ os unix? ] [ "$DYLD_LIBRARY_PATH/libclntsh.so.10.1" "cdecl" ] }
} cond add-library