diff --git a/extra/cairo/ffi/ffi.factor b/extra/cairo/ffi/ffi.factor index d7aa90c464..76ce27975b 100644 --- a/extra/cairo/ffi/ffi.factor +++ b/extra/cairo/ffi/ffi.factor @@ -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" ] } diff --git a/extra/calendar/windows/windows.factor b/extra/calendar/windows/windows.factor index 1609b9f260..6986902ff1 100755 --- a/extra/calendar/windows/windows.factor +++ b/extra/calendar/windows/windows.factor @@ -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" - ! 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" + 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 ;