#include "xcbext.h"
#include "xcbint.h"
+static const int error_connection = 1;
+
int XCBPopcount(CARD32 mask)
{
unsigned long y;
XCBAuthInfo auth;
if(!XCBParseDisplay(displayname, &host, &display, screenp))
- return 0;
+ return (XCBConnection *) &error_connection;
fd = _xcb_open(host, display);
free(host);
if(fd == -1)
- return 0;
+ return (XCBConnection *) &error_connection;
_xcb_get_auth_info(fd, &auth);
c = XCBConnectToFD(fd, &auth);
char *host;
if(!XCBParseDisplay(displayname, &host, &display, screenp))
- return 0;
+ return (XCBConnection *) &error_connection;
fd = _xcb_open(host, display);
free(host);
if(fd == -1)
- return 0;
+ return (XCBConnection *) &error_connection;
return XCBConnectToFD(fd, auth);
}