x11: convert XSupportsLocale return value to factor bool before testing (bug reported by ceninan)
parent
db2db6a1a6
commit
8b9f33e040
|
@ -3,6 +3,7 @@
|
||||||
USING: alien.strings continuations io
|
USING: alien.strings continuations io
|
||||||
io.encodings.ascii kernel namespaces x11.xlib x11.io
|
io.encodings.ascii kernel namespaces x11.xlib x11.io
|
||||||
vocabs vocabs.loader ;
|
vocabs vocabs.loader ;
|
||||||
|
FROM: alien.c-types => c-bool> ;
|
||||||
IN: x11
|
IN: x11
|
||||||
|
|
||||||
SYMBOL: dpy
|
SYMBOL: dpy
|
||||||
|
@ -11,7 +12,7 @@ SYMBOL: root
|
||||||
|
|
||||||
: init-locale ( -- )
|
: init-locale ( -- )
|
||||||
LC_ALL "" setlocale [ "setlocale() failed" print flush ] unless
|
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 ;
|
: flush-dpy ( -- ) dpy get XFlush drop ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue