x11: convert XSupportsLocale return value to factor bool before testing (bug reported by ceninan)

db4
Joe Groff 2010-05-12 18:07:33 -07:00
parent db2db6a1a6
commit 8b9f33e040
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
USING: alien.strings continuations io
io.encodings.ascii kernel namespaces x11.xlib x11.io
vocabs vocabs.loader ;
FROM: alien.c-types => c-bool> ;
IN: x11
SYMBOL: dpy
@ -11,7 +12,7 @@ SYMBOL: root
: init-locale ( -- )
LC_ALL "" setlocale [ "setlocale() failed" print flush ] unless
XSupportsLocale [ "XSupportsLocale() failed" print flush ] unless ;
XSupportsLocale c-bool> [ "XSupportsLocale() failed" print flush ] unless ;
: flush-dpy ( -- ) dpy get XFlush drop ;