Hi, the xcb-requests man page is missing the string end double-quote in the printf() line in the COOKIES section: void my_example(xcb_connection *conn) { xcb_intern_atom_cookie_t cookie; xcb_intern_atom_reply_t *reply; cookie = xcb_intern_atom(conn, 0, strlen("_NET_WM_NAME"), "_NET_WM_NAME"); /* ... do other work here if possible ... */ if ((reply = xcb_intern_atom_reply(conn, cookie, NULL))) { printf("The _NET_WM_NAME atom has ID %u0, reply->atom); // <==== } free(reply); } Needed change would be: - printf("The _NET_WM_NAME atom has ID %u0, reply->atom); + printf("The _NET_WM_NAME atom has ID %u0", reply->atom); Kind regards, Stefan
The string is correct in the man page sources: printf("The _NET_WM_NAME atom has ID %u\n", reply->atom); but \n is an nroff command to "Interpolates number register x" (where x is the character following the \n sequence), thus the replacement of \n" with 0. We need to instead use the nroff escape sequence \e to print \ there.
Actually, it looks like \\n is enough, and is used in other statements in that man page already.
Patch submitted for review: http://patchwork.freedesktop.org/patch/48313/
Fix pushed To ssh://git.freedesktop.org/git/xcb/libxcb a90be99..c49aa98 master -> master
Thank you Alan
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.