svn commit: r358954 - head/share/man/man3
Mateusz Piotrowski
0mp at FreeBSD.org
Fri Mar 13 11:07:49 UTC 2020
Author: 0mp (doc,ports committer)
Date: Fri Mar 13 11:07:48 2020
New Revision: 358954
URL: https://svnweb.freebsd.org/changeset/base/358954
Log:
CMSG_DATA.3: Fix formatting of printf escape sequences
Escape sequences like "\n" have to be escaped twice in examples in our
mdoc(7)-based manual pages in order to be displayed properly. The problem
is that otherwise they are interpreted by mdoc(7), which results in:
printf("parent: received '%s'0, buf);
being shown to the user instead of:
printf("parent: received '%s'\n", buf);
Approved by: bcr (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24056
Modified:
head/share/man/man3/CMSG_DATA.3
Modified: head/share/man/man3/CMSG_DATA.3
==============================================================================
--- head/share/man/man3/CMSG_DATA.3 Fri Mar 13 10:29:31 2020 (r358953)
+++ head/share/man/man3/CMSG_DATA.3 Fri Mar 13 11:07:48 2020 (r358954)
@@ -2,7 +2,7 @@
.\" Public domain, July 3, 2005
.\"
.\" $FreeBSD$
-.Dd November 1, 2018
+.Dd March 13, 2020
.Dt CMSG_DATA 3
.Os
.Sh NAME
@@ -142,7 +142,7 @@ main()
cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_RIGHTS) {
hellofd[1] = *(int *)CMSG_DATA(cmsg);
- printf("child: sending '%s'\n", buf);
+ printf("child: sending '%s'\\n", buf);
if (write(hellofd[1], buf, HELLOLEN) == -1)
err(EX_IOERR, "failed to send 'hello'");
}
@@ -166,7 +166,7 @@ main()
if (read(hellofd[0], buf, HELLOLEN) == -1)
err(EX_IOERR, "faild to receive 'hello'");
- printf("parent: received '%s'\n", buf);
+ printf("parent: received '%s'\\n", buf);
break;
}
More information about the svn-src-head
mailing list