Closed PuercoPop closed 6 years ago
While implementing parse-display and checking against XCB's test I found that in the case of decnet addresses CLX's xlib::get-default-display differs from XCB. In that it doesn't consider the colon as part of the host.
xlib::get-default-display
In CL
XCB/TESTS> (xlib::get-default-display "myws::0") ;; => ("myws" 0 0 :DECNET)
While in XCB host is myws: as you can see from the test c snippet below as well as from the test suite
myws:
Given that I know next to nothing about decnet I'm not 100% sure it is a bug in CLX, I'm inclined to believe their test suite.
// Compile it with: // gcc scratch.c -o scratch -std=c99 -I/usr/include -I/usr/include/xcb/ -L/usr/lib/x86_64-linux-gnu -lc -lxcb #include <stdlib.h> #include <stdio.h> #include <xcb.h> #include <string.h> int main(int argc, char *argv[]) { int err; char *host = NULL; int display, screen; err = xcb_parse_display("myws::0", &host, &display, &screen); if (err == 0) perror("Failed to parse display"); printf("Host: %s\n", host); return EXIT_SUCCESS; }
I would follow what xcb does here – patches are welcome.
@dkochmanski submitted
While implementing parse-display and checking against XCB's test I found that in the case of decnet addresses CLX's
xlib::get-default-display
differs from XCB. In that it doesn't consider the colon as part of the host.In CL
While in XCB host is
myws:
as you can see from the test c snippet below as well as from the test suiteGiven that I know next to nothing about decnet I'm not 100% sure it is a bug in CLX, I'm inclined to believe their test suite.