Created
July 29, 2015 22:42
-
-
Save PuercoPop/be774f6e3d7f33c0ac64 to your computer and use it in GitHub Desktop.
xcb tripping on unix sockets filename as hostname
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Testing if "private/tmp/com.apple.launchd.EauNyeZmg1/org.macosforge.xquartz" is a valid display name | |
| For more information see: | |
| - http://www.x.org/releases/current/doc/libX11/libX11/libX11.html#XOpenDisplay | |
| - http://cgit.freedesktop.org/~chr/libxcb/tree/src/xcb_util.c | |
| */ | |
| #include <stdio.h> | |
| #include <xcb/xcbext.h> | |
| int | |
| main(argv, argc) { | |
| char *display_name = "private/tmp/com.apple.launchd.EauNyeZmg1/org.macosforge.xquartz"; | |
| char *host; | |
| int n = 0; | |
| int *screenp = NULL; | |
| // screenp | |
| xcb_parse_display(display_name, &host, &n, screenp); | |
| printf("display_name: %s\n", display_name); | |
| printf("host: %s\n", host); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment