 SYMBOL: root
 
 : init-locale ( -- )
-   LC_ALL "" setlocale [ "setlocale() failed" throw ] unless
-   XSupportsLocale [ "XSupportsLocale() failed" throw ] unless ;
+   LC_ALL "" setlocale [ "setlocale() failed" print flush ] unless
+   XSupportsLocale [ "XSupportsLocale() failed" print flush ] unless ;
 
 : flush-dpy ( -- ) dpy get XFlush drop ;
 

: close-x ( -- ) dpy get XCloseDisplay drop ;

: with-x ( display-string quot -- )
    >r initialize-x r> [ close-x ] [ ] cleanup ;


USING: kernel arrays alien alien.c-types alien.strings
alien.syntax math math.bitwise words sequences namespaces
continuations io io.encodings.ascii ;
IN: x11.xlib

LIBRARY: xlib
