Merge branch 'master' of git://factorcode.org/git/factor
commit
37906ed524
|
@ -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" ] }
|
||||
|
|
|
@ -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 ;
|
||||
|
|
Loading…
Reference in New Issue