Escape \n to display properly in xcb-requests man page

In nroff, \n is a macro that "Interpolates number register x" (where x
is the character following the \n sequence), thus the man page currently
prints 0 instead of \n" in several lines, leading to output such as:

 printf("The _NET_WM_NAME atom has ID %u0, reply-⁠>atom);

It needs to be escaped here, as \\n, as is done in other examples in
this man page already.

https://bugs.freedesktop.org/show_bug.cgi?id=90231

Reported-by: Stefan Merettig
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith 2015-04-29 23:23:05 -07:00
parent a90be9955d
commit c49aa98594

View File

@ -36,7 +36,7 @@ void my_example(xcb_connection *conn) {
cookie = xcb_intern_atom(conn, 0, strlen("_NET_WM_NAME"), "_NET_WM_NAME"); cookie = xcb_intern_atom(conn, 0, strlen("_NET_WM_NAME"), "_NET_WM_NAME");
/* ... do other work here if possible ... */ /* ... do other work here if possible ... */
if ((reply = xcb_intern_atom_reply(conn, cookie, NULL))) { if ((reply = xcb_intern_atom_reply(conn, cookie, NULL))) {
printf("The _NET_WM_NAME atom has ID %u\n", reply->atom); printf("The _NET_WM_NAME atom has ID %u\\n", reply->atom);
} }
free(reply); free(reply);
} }
@ -118,7 +118,7 @@ void my_example(xcb_connection *conn, xcb_window_t window) {
cookie = xcb_intern_atom(c, 0, strlen("_NET_WM_NAME"), "_NET_WM_NAME"); cookie = xcb_intern_atom(c, 0, strlen("_NET_WM_NAME"), "_NET_WM_NAME");
/* ... do other work here if possible ... */ /* ... do other work here if possible ... */
if ((reply = xcb_intern_atom_reply(c, cookie, &error))) { if ((reply = xcb_intern_atom_reply(c, cookie, &error))) {
printf("The _NET_WM_NAME atom has ID %u\n", reply->atom); printf("The _NET_WM_NAME atom has ID %u\\n", reply->atom);
free(reply); free(reply);
} else { } else {
fprintf(stderr, "X11 Error %d\\n", error->error_code); fprintf(stderr, "X11 Error %d\\n", error->error_code);
@ -138,7 +138,7 @@ void my_example(xcb_connection *conn, xcb_window_t window) {
"_NET_WM_NAME"); "_NET_WM_NAME");
/* ... do other work here if possible ... */ /* ... do other work here if possible ... */
if ((reply = xcb_intern_atom_reply(c, cookie, NULL))) { if ((reply = xcb_intern_atom_reply(c, cookie, NULL))) {
printf("The _NET_WM_NAME atom has ID %u\n", reply->atom); printf("The _NET_WM_NAME atom has ID %u\\n", reply->atom);
free(reply); free(reply);
} }