Merge branch 'master' of git://factorcode.org/git/factor

db4
Slava Pestov 2008-03-19 23:32:56 -05:00
commit 37906ed524
2 changed files with 14 additions and 15 deletions

View File

@ -13,7 +13,7 @@ USING: alien alien.syntax combinators system ;
IN: cairo.ffi
<< "cairo" {
{ [ win32? ] [ "cairo.dll" ] }
{ [ win32? ] [ "libcairo-2.dll" ] }
! { [ macosx? ] [ "libcairo.dylib" ] }
{ [ macosx? ] [ "/opt/local/lib/libcairo.dylib" ] }
{ [ unix? ] [ "libcairo.so.2" ] }

View File

@ -1,22 +1,21 @@
USING: calendar.backend namespaces alien.c-types
windows windows.kernel32 kernel math ;
windows windows.kernel32 kernel math combinators.cleave
combinators ;
IN: calendar.windows
TUPLE: windows-calendar ;
T{ windows-calendar } calendar-backend set-global
: TIME_ZONE_ID_INVALID HEX: ffffffff ; inline
M: windows-calendar gmt-offset ( -- hours minutes seconds )
0 0 0 ;
! "TIME_ZONE_INFORMATION" <c-object>
! dup GetTimeZoneInformation {
! { [ dup TIME_ZONE_ID_INVALID = ] [ win32-error ] }
! { [ dup { TIME_ZONE_ID_UNKNOWN TIME_ZONE_ID_STANDARD } member? ]
! [ TIME_ZONE_INFORMATION-Bias 60 / neg ] }
! { [ dup TIME_ZONE_ID_DAYLIGHT = ] [
! [ TIME_ZONE_INFORMATION-Bias 60 / neg ]
! [ TIME_ZONE_INFORMATION-DaylightBias ] bi
! ] }
! } cond ;
"TIME_ZONE_INFORMATION" <c-object>
dup GetTimeZoneInformation {
{ [ dup TIME_ZONE_ID_INVALID = ] [ win32-error-string throw ] }
{ [ dup [ TIME_ZONE_ID_UNKNOWN = ] [ TIME_ZONE_ID_STANDARD = ] bi or ] [
drop TIME_ZONE_INFORMATION-Bias ] }
{ [ dup TIME_ZONE_ID_DAYLIGHT = ] [
drop
[ TIME_ZONE_INFORMATION-Bias ]
[ TIME_ZONE_INFORMATION-DaylightBias ] bi +
] }
} cond neg 60 /mod 0 ;