locale.1, memusage.1, pldd.1, _syscall.2, add_key.2, bind.2, bpf.2, chown.2, clone.2, copy_file_range.2, eventfd.2, execve.2, futex.2, getdents.2, getrlimit.2, ioctl_fat.2, ioctl_ns.2, kcmp.2, kexec_load.2, keyctl.2, listxattr.2, lseek.2, membarrier.2, memfd_create.2, mmap.2, mprotect.2, msgop.2, open_by_handle_at.2, perf_event_open.2, pipe.2, readdir.2, readlink.2, readv.2, recvmmsg.2, request_key.2, sched_setaffinity.2, seccomp.2, select.2, select_tut.2, sendmmsg.2, setns.2, signalfd.2, spu_run.2, stat.2, sysctl.2, tee.2, timer_create.2, timerfd_create.2, truncate.2, uname.2, unshare.2, userfaultfd.2, ustat.2, wait.2, CPU_SET.3, __ppc_get_timebase.3, argz_add.3, asprintf.3, backtrace.3, basename.3, bswap.3, bzero.3, cacos.3, cacosh.3, catan.3, catanh.3, catgets.3, clock_getcpuclockid.3, confstr.3, ctime.3, dl_iterate_phdr.3, dlinfo.3, duplocale.3, encrypt.3, end.3, endian.3, fgetws.3, fmemopen.3, fopencookie.3, fputws.3, frexp.3, ftw.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getgrouplist.3, getifaddrs.3, getline.3, getlogin.3, getopt.3, getpass.3, getprotoent_r.3, getpwnam.3, getservent_r.3, getsubopt.3, glob.3, gnu_get_libc_version.3, hsearch.3, if_nameindex.3, index.3, inet.3, inet_net_pton.3, inet_pton.3, insque.3, iswblank.3, iswspace.3, makecontext.3, mallinfo.3, malloc_hook.3, malloc_info.3, mallopt.3, matherr.3, mbrtowc.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mcheck.3, memchr.3, mq_getattr.3, mq_notify.3, newlocale.3, nl_langinfo.3, offsetof.3, perror.3, posix_spawn.3, printf.3, pthread_attr_init.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_create.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_mutexattr_setrobust.3, pthread_setaffinity_np.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_sigmask.3, qsort.3, rand.3, readdir.3, regex.3, rpmatch.3, rtime.3, scanf.3, sem_wait.3, setaliasent.3, setbuf.3, stpcpy.3, stpncpy.3, strcat.3, strchr.3, strcpy.3, strdup.3, strerror.3, strfromd.3, strftime.3, strlen.3, strnlen.3, strsep.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, termios.3, tsearch.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscat.3, wcscpy.3, wcslen.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wcsstr.3, wcstok.3, wcstombs.3, wcwidth.3, wprintf.3, console_codes.4, dsp56k.4, full.4, initrd.4, loop.4, vcs.4, charmap.5, core.5, elf.5, locale.5, proc.5, repertoiremap.5, sysfs.5, termcap.5, aio.7, bpf-helpers.7, cgroups.7, charsets.7, complex.7, fanotify.7, feature_test_macros.7, inotify.7, locale.7, man-pages.7, man.7, pkeys.7, pthreads.7, rtld-audit.7, sock_diag.7, unix.7, user_namespaces.7, utf-8.7: Use '\e' rather than '\\' to get a backslash

Quoting Branden:

*roff escape sequences may sometimes look like C escapes, but that
is misleading.  *roff is in part a macro language and that means
recursive expansion to arbitrary depths.

You can get away with "\\" in a context where no macro expansion
is taking place, but try to spell a literal backslash this way in
the argument to a macro and you will likely be unhappy with
results.

Try viewing the attached file with "man -l".

"\e" is the preferred and portable way to get a portable "escape
literal" going back to CSTR #54, the original Bell Labs troff
paper.

groff(7) discusses the issue:

  \\     reduces to a single backslash; useful to delay its
         interpretation as escape character in copy mode.  For a
         printable backslash, use \e, or even better \[rs], to be
         independent from the current escape character.

As of groff 1.22.4, groff_man(7) does as well:

  \e     Widely used in man pages to represent a backslash output
         glyph.  It works reliably as long as the .ec request is
         not used, which should never happen in man pages, and it
         is slightly more portable than the more exact ‘\(rs’
         (“reverse solidus”) escape sequence.

People not concerned with portability to extremely old troffs should
probably just use \(rs (or \[rs]), as it means "the backslash
glyph", not "the glyph corresponding to whatever the current escape
character is".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2019-02-27 12:57:17 +01:00
parent 8fb01fdeac
commit d1a719857b
219 changed files with 891 additions and 891 deletions

View File

@ -198,7 +198,7 @@ subsequent user sessions:
$ \fBmkdir -p $HOME/.locale\fP
$ \fBI18NPATH=./wrk/ localedef -f UTF-8 -i fi_SE $HOME/.locale/fi_SE.UTF-8\fP
$ \fBLOCPATH=$HOME/.locale LC_ALL=fi_SE.UTF-8 date\fP
$ \fBecho "export LOCPATH=\\$HOME/.locale" >> $HOME/.bashrc\fP
$ \fBecho "export LOCPATH=\e$HOME/.locale" >> $HOME/.bashrc\fP
$ \fBecho "export LANG=fi_SE.UTF-8" >> $HOME/.bashrc\fP
.EE
.SH SEE ALSO

View File

@ -247,7 +247,7 @@ main(int argc, char *argv[])
int i, j;
int *p;
printf("malloc: %zd\\n", sizeof(int) * 100);
printf("malloc: %zd\en", sizeof(int) * 100);
p = malloc(sizeof(int) * 100);
for (i = 0; i < CYCLES; i++) {
@ -256,10 +256,10 @@ main(int argc, char *argv[])
else
j--;
printf("realloc: %zd\\n", sizeof(int) * (j * 50 + 110));
printf("realloc: %zd\en", sizeof(int) * (j * 50 + 110));
p = realloc(p, sizeof(int) * (j * 50 + 100));
printf("realloc: %zd\\n", sizeof(int) * ((j+1) * 150 + 110));
printf("realloc: %zd\en", sizeof(int) * ((j+1) * 150 + 110));
p = realloc(p, sizeof(int) * ((j + 1) * 150 + 110));
}

View File

@ -92,7 +92,7 @@ using a command such as the following
.PP
.in +4n
.EX
$ \fBgdb \-ex "set confirm off" \-ex "set height 0" \-ex "info shared" \\\fP
$ \fBgdb \-ex "set confirm off" \-ex "set height 0" \-ex "info shared" \e\fP
\fB-ex "quit" \-p $pid | grep '^0x.*0x'\fP
.EE
.in

View File

@ -156,11 +156,11 @@ main(void)
int error;
error = sysinfo(&s_info);
printf("code error = %d\\n", error);
printf("Uptime = %lds\\nLoad: 1 min %lu / 5 min %lu / 15 min %lu\\n"
"RAM: total %lu / free %lu / shared %lu\\n"
"Memory in buffers = %lu\\nSwap: total %lu / free %lu\\n"
"Number of processes = %d\\n",
printf("code error = %d\en", error);
printf("Uptime = %lds\enLoad: 1 min %lu / 5 min %lu / 15 min %lu\en"
"RAM: total %lu / free %lu / shared %lu\en"
"Memory in buffers = %lu\enSwap: total %lu / free %lu\en"
"Number of processes = %d\en",
s_info.uptime, s_info.loads[0],
s_info.loads[1], s_info.loads[2],
s_info.totalram, s_info.freeram,

View File

@ -250,7 +250,7 @@ main(int argc, char *argv[])
key_serial_t key;
if (argc != 4) {
fprintf(stderr, "Usage: %s type description payload\\n",
fprintf(stderr, "Usage: %s type description payload\en",
argv[0]);
exit(EXIT_FAILURE);
}
@ -262,7 +262,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
printf("Key ID is %lx\\n", (long) key);
printf("Key ID is %lx\en", (long) key);
exit(EXIT_SUCCESS);
}

View File

@ -278,7 +278,7 @@ domain, and accept connections:
#define MY_SOCK_PATH "/somepath"
#define LISTEN_BACKLOG 50
#define handle_error(msg) \\
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
int

View File

@ -961,7 +961,7 @@ main(int argc, char **argv)
map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, sizeof(key),
sizeof(value), 256);
if (map_fd < 0) {
printf("failed to create map '%s'\\n", strerror(errno));
printf("failed to create map '%s'\en", strerror(errno));
/* likely not run as root */
return 1;
}
@ -1000,7 +1000,7 @@ main(int argc, char **argv)
assert(bpf_lookup_elem(map_fd, &key, &tcp_cnt) == 0);
key = IPPROTO_UDP;
assert(bpf_lookup_elem(map_fd, &key, &udp_cnt) == 0);
printf("TCP %lld UDP %lld packets\\n", tcp_cnt, udp_cnt);
printf("TCP %lld UDP %lld packets\en", tcp_cnt, udp_cnt);
sleep(1);
}

View File

@ -469,14 +469,14 @@ main(int argc, char *argv[])
struct passwd *pwd;
char *endptr;
if (argc != 3 || argv[1][0] == \(aq\\0\(aq) {
fprintf(stderr, "%s <owner> <file>\\n", argv[0]);
if (argc != 3 || argv[1][0] == \(aq\e0\(aq) {
fprintf(stderr, "%s <owner> <file>\en", argv[0]);
exit(EXIT_FAILURE);
}
uid = strtol(argv[1], &endptr, 10); /* Allow a numeric string */
if (*endptr != \(aq\\0\(aq) { /* Was not pure numeric string */
if (*endptr != \(aq\e0\(aq) { /* Was not pure numeric string */
pwd = getpwnam(argv[1]); /* Try getting UID for username */
if (pwd == NULL) {
perror("getpwnam");

View File

@ -1314,7 +1314,7 @@ For an example of the use of this program, see
#include <stdlib.h>
#include <unistd.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
static int /* Start function for cloned child */
@ -1331,7 +1331,7 @@ childFunc(void *arg)
if (uname(&uts) == \-1)
errExit("uname");
printf("uts.nodename in child: %s\\n", uts.nodename);
printf("uts.nodename in child: %s\en", uts.nodename);
/* Keep the namespace open for a while, by sleeping.
This allows some experimentation\-\-for example, another
@ -1353,7 +1353,7 @@ main(int argc, char *argv[])
struct utsname uts;
if (argc < 2) {
fprintf(stderr, "Usage: %s <child\-hostname>\\n", argv[0]);
fprintf(stderr, "Usage: %s <child\-hostname>\en", argv[0]);
exit(EXIT_SUCCESS);
}
@ -1370,7 +1370,7 @@ main(int argc, char *argv[])
pid = clone(childFunc, stackTop, CLONE_NEWUTS | SIGCHLD, argv[1]);
if (pid == \-1)
errExit("clone");
printf("clone() returned %ld\\n", (long) pid);
printf("clone() returned %ld\en", (long) pid);
/* Parent falls through to here */
@ -1381,11 +1381,11 @@ main(int argc, char *argv[])
if (uname(&uts) == \-1)
errExit("uname");
printf("uts.nodename in parent: %s\\n", uts.nodename);
printf("uts.nodename in parent: %s\en", uts.nodename);
if (waitpid(pid, NULL, 0) == \-1) /* Wait for child */
errExit("waitpid");
printf("child has terminated\\n");
printf("child has terminated\en");
exit(EXIT_SUCCESS);
}

View File

@ -193,7 +193,7 @@ main(int argc, char **argv)
loff_t len, ret;
if (argc != 3) {
fprintf(stderr, "Usage: %s <source> <destination>\\n", argv[0]);
fprintf(stderr, "Usage: %s <source> <destination>\en", argv[0]);
exit(EXIT_FAILURE);
}

View File

@ -391,7 +391,7 @@ Parent read 28 (0x1c) from efd
#include <stdio.h>
#include <stdint.h> /* Definition of uint64_t */
#define handle_error(msg) \\
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
int
@ -402,7 +402,7 @@ main(int argc, char *argv[])
ssize_t s;
if (argc < 2) {
fprintf(stderr, "Usage: %s <num>...\\n", argv[0]);
fprintf(stderr, "Usage: %s <num>...\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -413,25 +413,25 @@ main(int argc, char *argv[])
switch (fork()) {
case 0:
for (j = 1; j < argc; j++) {
printf("Child writing %s to efd\\n", argv[j]);
printf("Child writing %s to efd\en", argv[j]);
u = strtoull(argv[j], NULL, 0);
/* strtoull() allows various bases */
s = write(efd, &u, sizeof(uint64_t));
if (s != sizeof(uint64_t))
handle_error("write");
}
printf("Child completed write loop\\n");
printf("Child completed write loop\en");
exit(EXIT_SUCCESS);
default:
sleep(2);
printf("Parent about to read\\n");
printf("Parent about to read\en");
s = read(efd, &u, sizeof(uint64_t));
if (s != sizeof(uint64_t))
handle_error("read");
printf("Parent read %llu (0x%llx) from efd\\n",
printf("Parent read %llu (0x%llx) from efd\en",
(unsigned long long) u, (unsigned long long) u);
exit(EXIT_SUCCESS);

View File

@ -753,7 +753,7 @@ main(int argc, char *argv[])
int j;
for (j = 0; j < argc; j++)
printf("argv[%d]: %s\\n", j, argv[j]);
printf("argv[%d]: %s\en", j, argv[j]);
exit(EXIT_SUCCESS);
}
@ -778,7 +778,7 @@ main(int argc, char *argv[])
char *newenviron[] = { NULL };
if (argc != 2) {
fprintf(stderr, "Usage: %s <file\-to\-exec>\\n", argv[0]);
fprintf(stderr, "Usage: %s <file\-to\-exec>\en", argv[0]);
exit(EXIT_FAILURE);
}

View File

@ -635,10 +635,10 @@ Expressed in code, the encoding is:
.IP
.in +4n
.EX
#define FUTEX_OP(op, oparg, cmp, cmparg) \\
(((op & 0xf) << 28) | \\
((cmp & 0xf) << 24) | \\
((oparg & 0xfff) << 12) | \\
#define FUTEX_OP(op, oparg, cmp, cmparg) \e
(((op & 0xf) << 28) | \e
((cmp & 0xf) << 24) | \e
((oparg & 0xfff) << 12) | \e
(cmparg & 0xfff))
.EE
.in
@ -1765,7 +1765,7 @@ Child (18535) 4
#include <linux/futex.h>
#include <sys/time.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
static int *futex1, *futex2, *iaddr;
@ -1864,7 +1864,7 @@ main(int argc, char *argv[])
if (childPid == 0) { /* Child */
for (j = 0; j < nloops; j++) {
fwait(futex1);
printf("Child (%ld) %d\\n", (long) getpid(), j);
printf("Child (%ld) %d\en", (long) getpid(), j);
fpost(futex2);
}
@ -1875,7 +1875,7 @@ main(int argc, char *argv[])
for (j = 0; j < nloops; j++) {
fwait(futex2);
printf("Parent (%ld) %d\\n", (long) getpid(), j);
printf("Parent (%ld) %d\en", (long) getpid(), j);
fpost(futex1);
}

View File

@ -250,7 +250,7 @@ inode# file type d_reclen d_off d_name
#include <sys/stat.h>
#include <sys/syscall.h>
#define handle_error(msg) \\
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
struct linux_dirent {
@ -283,8 +283,8 @@ main(int argc, char *argv[])
if (nread == 0)
break;
printf("\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- nread=%d \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\\n", nread);
printf("inode# file type d_reclen d_off d_name\\n");
printf("\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- nread=%d \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\en", nread);
printf("inode# file type d_reclen d_off d_name\en");
for (bpos = 0; bpos < nread;) {
d = (struct linux_dirent *) (buf + bpos);
printf("%8ld ", d\->d_ino);
@ -296,7 +296,7 @@ main(int argc, char *argv[])
(d_type == DT_LNK) ? "symlink" :
(d_type == DT_BLK) ? "block dev" :
(d_type == DT_CHR) ? "char dev" : "???");
printf("%4d %10lld %s\\n", d\->d_reclen,
printf("%4d %10lld %s\en", d\->d_reclen,
(long long) d\->d_off, d\->d_name);
bpos += d\->d_reclen;
}

View File

@ -789,7 +789,7 @@ The program below demonstrates the use of
#include <unistd.h>
#include <sys/resource.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
int
@ -801,7 +801,7 @@ main(int argc, char *argv[])
if (!(argc == 2 || argc == 4)) {
fprintf(stderr, "Usage: %s <pid> [<new\-soft\-limit> "
"<new\-hard\-limit>]\\n", argv[0]);
"<new\-hard\-limit>]\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -819,14 +819,14 @@ main(int argc, char *argv[])
if (prlimit(pid, RLIMIT_CPU, newp, &old) == \-1)
errExit("prlimit\-1");
printf("Previous limits: soft=%lld; hard=%lld\\n",
printf("Previous limits: soft=%lld; hard=%lld\en",
(long long) old.rlim_cur, (long long) old.rlim_max);
/* Retrieve and display new CPU time limit */
if (prlimit(pid, RLIMIT_CPU, NULL, &old) == \-1)
errExit("prlimit\-2");
printf("New limits: soft=%lld; hard=%lld\\n",
printf("New limits: soft=%lld; hard=%lld\en",
(long long) old.rlim_cur, (long long) old.rlim_max);
exit(EXIT_SUCCESS);

View File

@ -111,7 +111,7 @@ Typically the volume ID is displayed to the user as a group of two
.PP
.in +4n
.EX
printf("Volume ID %04x-%04x\\n", id >> 16, id & 0xFFFF);
printf("Volume ID %04x-%04x\en", id >> 16, id & 0xFFFF);
.EE
.in
.SS Reading short file names of a directory
@ -291,9 +291,9 @@ readattr(int fd)
}
if (attr & ATTR_ARCH)
printf("Archive flag is set\\n");
printf("Archive flag is set\en");
else
printf("Archive flag is not set\\n");
printf("Archive flag is not set\en");
return attr;
}
@ -306,7 +306,7 @@ main(int argc, char *argv[])
int ret;
if (argc != 2) {
printf("Usage: %s FILENAME\\n", argv[0]);
printf("Usage: %s FILENAME\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -324,7 +324,7 @@ main(int argc, char *argv[])
/*
* Invert archive attribute.
*/
printf("Toggling archive flag\\n");
printf("Toggling archive flag\en");
attr ^= ATTR_ARCH;
/*
@ -381,7 +381,7 @@ main(int argc, char *argv[])
int ret;
if (argc != 2) {
printf("Usage: %s FILENAME\\n", argv[0]);
printf("Usage: %s FILENAME\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -403,7 +403,7 @@ main(int argc, char *argv[])
/*
* Format the output as two groups of 16 bits each.
*/
printf("Volume ID %04x\-%04x\\n", id >> 16, id & 0xFFFF);
printf("Volume ID %04x\-%04x\en", id >> 16, id & 0xFFFF);
close(fd);
@ -448,7 +448,7 @@ main(int argc, char *argv[])
int ret;
if (argc != 2) {
printf("Usage: %s DIRECTORY\\n", argv[0]);
printf("Usage: %s DIRECTORY\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -481,7 +481,7 @@ main(int argc, char *argv[])
/*
* Write both the short name and the long name.
*/
printf("%s \-> '%s'\\n", entry[0].d_name, entry[1].d_name);
printf("%s \-> '%s'\en", entry[0].d_name, entry[1].d_name);
}
if (ret == \-1) {

View File

@ -277,13 +277,13 @@ main(int argc, char *argv[])
struct stat sb;
if (argc < 2) {
fprintf(stderr, "Usage: %s /proc/[pid]/ns/[file] [p|u]\\n",
fprintf(stderr, "Usage: %s /proc/[pid]/ns/[file] [p|u]\en",
argv[0]);
fprintf(stderr, "\\nDisplay the result of one or both "
"of NS_GET_USERNS (u) or NS_GET_PARENT (p)\\n"
fprintf(stderr, "\enDisplay the result of one or both "
"of NS_GET_USERNS (u) or NS_GET_PARENT (p)\en"
"for the specified /proc/[pid]/ns/[file]. If neither "
"\(aqp\(aq nor \(aqu\(aq is specified,\\n"
"NS_GET_USERNS is the default.\\n");
"\(aqp\(aq nor \(aqu\(aq is specified,\en"
"NS_GET_USERNS is the default.\en");
exit(EXIT_FAILURE);
}
@ -305,7 +305,7 @@ main(int argc, char *argv[])
if (userns_fd == \-1) {
if (errno == EPERM)
printf("The owning user namespace is outside "
"your namespace scope\\n");
"your namespace scope\en");
else
perror("ioctl\-NS_GET_USERNS");
exit(EXIT_FAILURE);
@ -316,7 +316,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
printf("Device/Inode of owning user namespace is: "
"[%lx,%lx] / %ld\\n",
"[%lx,%lx] / %ld\en",
(long) major(sb.st_dev), (long) minor(sb.st_dev),
(long) sb.st_ino);
@ -332,10 +332,10 @@ main(int argc, char *argv[])
if (parent_fd == \-1) {
if (errno == EINVAL)
printf("Can\(aq get parent namespace of a "
"nonhierarchical namespace\\n");
"nonhierarchical namespace\en");
else if (errno == EPERM)
printf("The parent namespace is outside "
"your namespace scope\\n");
"your namespace scope\en");
else
perror("ioctl\-NS_GET_PARENT");
exit(EXIT_FAILURE);
@ -345,7 +345,7 @@ main(int argc, char *argv[])
perror("fstat\-parentns");
exit(EXIT_FAILURE);
}
printf("Device/Inode of parent namespace is: [%lx,%lx] / %ld\\n",
printf("Device/Inode of parent namespace is: [%lx,%lx] / %ld\en",
(long) major(sb.st_dev), (long) minor(sb.st_dev),
(long) sb.st_ino);

View File

@ -358,7 +358,7 @@ Child duplicated FD 3 to create FD 5
#include <fcntl.h>
#include <linux/kcmp.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
static int
@ -371,8 +371,8 @@ kcmp(pid_t pid1, pid_t pid2, int type,
static void
test_kcmp(char *msg, id_t pid1, pid_t pid2, int fd_a, int fd_b)
{
printf("\\t%s\\n", msg);
printf("\\t\\tkcmp(%ld, %ld, KCMP_FILE, %d, %d) ==> %s\\n",
printf("\et%s\en", msg);
printf("\et\etkcmp(%ld, %ld, KCMP_FILE, %d, %d) ==> %s\en",
(long) pid1, (long) pid2, fd_a, fd_b,
(kcmp(pid1, pid2, KCMP_FILE, fd_a, fd_b) == 0) ?
"same" : "different");
@ -388,15 +388,15 @@ main(int argc, char *argv[])
if (fd1 == \-1)
errExit("open");
printf("Parent PID is %ld\\n", (long) getpid());
printf("Parent opened file on FD %d\\n\\n", fd1);
printf("Parent PID is %ld\en", (long) getpid());
printf("Parent opened file on FD %d\en\en", fd1);
switch (fork()) {
case \-1:
errExit("fork");
case 0:
printf("PID of child of fork() is %ld\\n", (long) getpid());
printf("PID of child of fork() is %ld\en", (long) getpid());
test_kcmp("Compare duplicate FDs from different processes:",
getpid(), getppid(), fd1, fd1);
@ -404,7 +404,7 @@ main(int argc, char *argv[])
fd2 = open(pathname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
if (fd2 == \-1)
errExit("open");
printf("Child opened file on FD %d\\n", fd2);
printf("Child opened file on FD %d\en", fd2);
test_kcmp("Compare FDs from distinct open()s in same process:",
getpid(), getpid(), fd1, fd2);
@ -412,7 +412,7 @@ main(int argc, char *argv[])
fd3 = dup(fd1);
if (fd3 == \-1)
errExit("dup");
printf("Child duplicated FD %d to create FD %d\\n", fd1, fd3);
printf("Child duplicated FD %d to create FD %d\en", fd1, fd3);
test_kcmp("Compare duplicated FDs in same process:",
getpid(), getpid(), fd1, fd3);

View File

@ -207,7 +207,7 @@ for the new kernel.
The
.IR cmdline_len
argument specifies size of the buffer.
The last byte in the buffer must be a null byte (\(aq\\0\(aq).
The last byte in the buffer must be a null byte (\(aq\e0\(aq).
.PP
The
.IR flags
@ -302,7 +302,7 @@ Two or more of the kernel target buffers overlap.
.B EINVAL
The value in
.I cmdline[cmdline_len-1]
is not \(aq\\0\(aq.
is not \(aq\e0\(aq.
.TP
.B EINVAL
The file referred to by

View File

@ -2111,7 +2111,7 @@ main(int argc, char *argv[])
setbuf(fp, NULL);
t = time(NULL);
fprintf(fp, "Time: %s\\n", ctime(&t));
fprintf(fp, "Time: %s\en", ctime(&t));
/*
* The kernel passes a fixed set of arguments to the program
@ -2125,23 +2125,23 @@ main(int argc, char *argv[])
process_keyring = atoi(argv[6]);
session_keyring = atoi(argv[7]);
fprintf(fp, "Command line arguments:\\n");
fprintf(fp, " argv[0]: %s\\n", argv[0]);
fprintf(fp, " operation: %s\\n", operation);
fprintf(fp, " key_to_instantiate: %lx\\n",
fprintf(fp, "Command line arguments:\en");
fprintf(fp, " argv[0]: %s\en", argv[0]);
fprintf(fp, " operation: %s\en", operation);
fprintf(fp, " key_to_instantiate: %lx\en",
(long) key_to_instantiate);
fprintf(fp, " UID: %ld\\n", (long) uid);
fprintf(fp, " GID: %ld\\n", (long) gid);
fprintf(fp, " thread_keyring: %lx\\n", (long) thread_keyring);
fprintf(fp, " process_keyring: %lx\\n", (long) process_keyring);
fprintf(fp, " session_keyring: %lx\\n", (long) session_keyring);
fprintf(fp, "\\n");
fprintf(fp, " UID: %ld\en", (long) uid);
fprintf(fp, " GID: %ld\en", (long) gid);
fprintf(fp, " thread_keyring: %lx\en", (long) thread_keyring);
fprintf(fp, " process_keyring: %lx\en", (long) process_keyring);
fprintf(fp, " session_keyring: %lx\en", (long) session_keyring);
fprintf(fp, "\en");
/*
* Assume the authority to instantiate the key named in argv[2]
*/
if (keyctl(KEYCTL_ASSUME_AUTHORITY, key_to_instantiate) == \-1) {
fprintf(fp, "KEYCTL_ASSUME_AUTHORITY failed: %s\\n",
fprintf(fp, "KEYCTL_ASSUME_AUTHORITY failed: %s\en",
strerror(errno));
exit(EXIT_FAILURE);
}
@ -2151,11 +2151,11 @@ main(int argc, char *argv[])
*/
if (keyctl(KEYCTL_DESCRIBE, key_to_instantiate,
dbuf, sizeof(dbuf)) == \-1) {
fprintf(fp, "KEYCTL_DESCRIBE failed: %s\\n", strerror(errno));
fprintf(fp, "KEYCTL_DESCRIBE failed: %s\en", strerror(errno));
exit(EXIT_FAILURE);
}
fprintf(fp, "Key description: %s\\n", dbuf);
fprintf(fp, "Key description: %s\en", dbuf);
/*
* Fetch the payload of the authorization key, which is
@ -2164,12 +2164,12 @@ main(int argc, char *argv[])
akp_size = keyctl(KEYCTL_READ, KEY_SPEC_REQKEY_AUTH_KEY,
auth_key_payload, sizeof(auth_key_payload));
if (akp_size == \-1) {
fprintf(fp, "KEYCTL_READ failed: %s\\n", strerror(errno));
fprintf(fp, "KEYCTL_READ failed: %s\en", strerror(errno));
exit(EXIT_FAILURE);
}
auth_key_payload[akp_size] = \(aq\\0\(aq;
fprintf(fp, "Auth key payload: %s\\n", auth_key_payload);
auth_key_payload[akp_size] = \(aq\e0\(aq;
fprintf(fp, "Auth key payload: %s\en", auth_key_payload);
/*
* For interest, get the ID of the authorization key and
@ -2178,12 +2178,12 @@ main(int argc, char *argv[])
auth_key = keyctl(KEYCTL_GET_KEYRING_ID,
KEY_SPEC_REQKEY_AUTH_KEY);
if (auth_key == \-1) {
fprintf(fp, "KEYCTL_GET_KEYRING_ID failed: %s\\n",
fprintf(fp, "KEYCTL_GET_KEYRING_ID failed: %s\en",
strerror(errno));
exit(EXIT_FAILURE);
}
fprintf(fp, "Auth key ID: %lx\\n", (long) auth_key);
fprintf(fp, "Auth key ID: %lx\en", (long) auth_key);
/*
* Fetch key ID for the request_key(2) destination keyring.
@ -2191,12 +2191,12 @@ main(int argc, char *argv[])
dest_keyring = keyctl(KEYCTL_GET_KEYRING_ID,
KEY_SPEC_REQUESTOR_KEYRING);
if (dest_keyring == \-1) {
fprintf(fp, "KEYCTL_GET_KEYRING_ID failed: %s\\n",
fprintf(fp, "KEYCTL_GET_KEYRING_ID failed: %s\en",
strerror(errno));
exit(EXIT_FAILURE);
}
fprintf(fp, "Destination keyring: %lx\\n", (long) dest_keyring);
fprintf(fp, "Destination keyring: %lx\en", (long) dest_keyring);
/*
* Fetch the description of the authorization key. This
@ -2207,11 +2207,11 @@ main(int argc, char *argv[])
*/
if (keyctl(KEYCTL_DESCRIBE, KEY_SPEC_REQKEY_AUTH_KEY,
dbuf, sizeof(dbuf)) == \-1) {
fprintf(fp, "KEYCTL_DESCRIBE failed: %s\\n", strerror(errno));
fprintf(fp, "KEYCTL_DESCRIBE failed: %s\en", strerror(errno));
exit(EXIT_FAILURE);
}
fprintf(fp, "Auth key description: %s\\n", dbuf);
fprintf(fp, "Auth key description: %s\en", dbuf);
/*
* Instantiate the key using the callout data that was supplied
@ -2219,7 +2219,7 @@ main(int argc, char *argv[])
*/
if (keyctl(KEYCTL_INSTANTIATE, key_to_instantiate,
auth_key_payload, akp_size + 1, dest_keyring) == \-1) {
fprintf(fp, "KEYCTL_INSTANTIATE failed: %s\\n",
fprintf(fp, "KEYCTL_INSTANTIATE failed: %s\en",
strerror(errno));
exit(EXIT_FAILURE);
}

View File

@ -105,11 +105,11 @@ from the second call.)
The
.I list
of names is returned as an unordered array of null-terminated character
strings (attribute names are separated by null bytes (\(aq\\0\(aq)), like this:
strings (attribute names are separated by null bytes (\(aq\e0\(aq)), like this:
.PP
.in +4n
.EX
user.name1\\0system.name1\\0user.name2\\0
user.name1\e0system.name1\e0user.name2\e0
.EE
.in
.PP
@ -120,7 +120,7 @@ like this:
.PP
.in +4n
.EX
system.posix_acl_access\\0system.posix_acl_default\\0
system.posix_acl_access\e0system.posix_acl_default\e0
.EE
.in
.SH RETURN VALUE
@ -228,7 +228,7 @@ main(int argc, char *argv[])
char *buf, *key, *val;
if (argc != 2) {
fprintf(stderr, "Usage: %s path\\n", argv[0]);
fprintf(stderr, "Usage: %s path\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -241,7 +241,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
if (buflen == 0) {
printf("%s has no attributes.\\n", argv[1]);
printf("%s has no attributes.\en", argv[1]);
exit(EXIT_SUCCESS);
}
@ -313,7 +313,7 @@ main(int argc, char *argv[])
} else if (vallen == 0)
printf("<no value>");
printf("\\n");
printf("\en");
/*
* Forward to next attribute key.

View File

@ -83,7 +83,7 @@ bytes.
allows the file offset to be set beyond the end
of the file (but this does not change the size of the file).
If data is later written at this point, subsequent reads of the data
in the gap (a "hole") return null bytes (\(aq\\0\(aq) until
in the gap (a "hole") return null bytes (\(aq\e0\(aq) until
data is actually written into the gap.
.SS Seeking file data and holes
Since version 3.1, Linux supports the following additional values for

View File

@ -361,7 +361,7 @@ init_membarrier(void)
if (!(ret & MEMBARRIER_CMD_GLOBAL)) {
fprintf(stderr,
"membarrier does not support MEMBARRIER_CMD_GLOBAL\\n");
"membarrier does not support MEMBARRIER_CMD_GLOBAL\en");
return \-1;
}

View File

@ -406,7 +406,7 @@ Existing seals: WRITE SHRINK
#include <string.h>
#include <stdio.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
int
@ -419,13 +419,13 @@ main(int argc, char *argv[])
ssize_t len;
if (argc < 3) {
fprintf(stderr, "%s name size [seals]\\n", argv[0]);
fprintf(stderr, "\\t\(aqseals\(aq can contain any of the "
"following characters:\\n");
fprintf(stderr, "\\t\\tg \- F_SEAL_GROW\\n");
fprintf(stderr, "\\t\\ts \- F_SEAL_SHRINK\\n");
fprintf(stderr, "\\t\\tw \- F_SEAL_WRITE\\n");
fprintf(stderr, "\\t\\tS \- F_SEAL_SEAL\\n");
fprintf(stderr, "%s name size [seals]\en", argv[0]);
fprintf(stderr, "\et\(aqseals\(aq can contain any of the "
"following characters:\en");
fprintf(stderr, "\et\etg \- F_SEAL_GROW\en");
fprintf(stderr, "\et\ets \- F_SEAL_SHRINK\en");
fprintf(stderr, "\et\etw \- F_SEAL_WRITE\en");
fprintf(stderr, "\et\etS \- F_SEAL_SEAL\en");
exit(EXIT_FAILURE);
}
@ -445,7 +445,7 @@ main(int argc, char *argv[])
if (ftruncate(fd, len) == \-1)
errExit("truncate");
printf("PID: %ld; fd: %d; /proc/%ld/fd/%d\\n",
printf("PID: %ld; fd: %d; /proc/%ld/fd/%d\en",
(long) getpid(), fd, (long) getpid(), fd);
/* Code to map the file and populate the mapping with data
@ -489,7 +489,7 @@ main(int argc, char *argv[])
#include <string.h>
#include <stdio.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
int
@ -499,7 +499,7 @@ main(int argc, char *argv[])
unsigned int seals;
if (argc != 2) {
fprintf(stderr, "%s /proc/PID/fd/FD\\n", argv[0]);
fprintf(stderr, "%s /proc/PID/fd/FD\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -520,7 +520,7 @@ main(int argc, char *argv[])
printf(" WRITE");
if (seals & F_SEAL_SHRINK)
printf(" SHRINK");
printf("\\n");
printf("\en");
/* Code to map the file and access the contents of the
resulting mapping omitted */

View File

@ -914,7 +914,7 @@ to output the desired bytes.
#include <stdlib.h>
#include <unistd.h>
#define handle_error(msg) \\
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
int
@ -928,7 +928,7 @@ main(int argc, char *argv[])
ssize_t s;
if (argc < 3 || argc > 4) {
fprintf(stderr, "%s file offset [length]\\n", argv[0]);
fprintf(stderr, "%s file offset [length]\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -944,7 +944,7 @@ main(int argc, char *argv[])
/* offset for mmap() must be page aligned */
if (offset >= sb.st_size) {
fprintf(stderr, "offset is past end of file\\n");
fprintf(stderr, "offset is past end of file\en");
exit(EXIT_FAILURE);
}

View File

@ -309,7 +309,7 @@ Got SIGSEGV at address: 0x804e000
#include <errno.h>
#include <sys/mman.h>
#define handle_error(msg) \\
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
static char *buffer;
@ -323,7 +323,7 @@ handler(int sig, siginfo_t *si, void *unused)
Nevertheless, we use printf() here as a simple way of
showing that the handler was called. */
printf("Got SIGSEGV at address: 0x%lx\\n",
printf("Got SIGSEGV at address: 0x%lx\en",
(long) si\->si_addr);
exit(EXIT_FAILURE);
}
@ -352,7 +352,7 @@ main(int argc, char *argv[])
if (buffer == NULL)
handle_error("memalign");
printf("Start of region: 0x%lx\\n", (long) buffer);
printf("Start of region: 0x%lx\en", (long) buffer);
if (mprotect(buffer + pagesize * 2, pagesize,
PROT_READ) == \-1)
@ -361,7 +361,7 @@ main(int argc, char *argv[])
for (p = buffer ; ; )
*(p++) = \(aqa\(aq;
printf("Loop completed\\n"); /* Should never happen */
printf("Loop completed\en"); /* Should never happen */
exit(EXIT_SUCCESS);
}
.EE

View File

@ -615,12 +615,12 @@ usage(char *prog_name, char *msg)
if (msg != NULL)
fputs(msg, stderr);
fprintf(stderr, "Usage: %s [options]\\n", prog_name);
fprintf(stderr, "Options are:\\n");
fprintf(stderr, "\-s send message using msgsnd()\\n");
fprintf(stderr, "\-r read message using msgrcv()\\n");
fprintf(stderr, "\-t message type (default is 1)\\n");
fprintf(stderr, "\-k message queue key (default is 1234)\\n");
fprintf(stderr, "Usage: %s [options]\en", prog_name);
fprintf(stderr, "Options are:\en");
fprintf(stderr, "\-s send message using msgsnd()\en");
fprintf(stderr, "\-r read message using msgrcv()\en");
fprintf(stderr, "\-t message type (default is 1)\en");
fprintf(stderr, "\-k message queue key (default is 1234)\en");
exit(EXIT_FAILURE);
}
@ -641,7 +641,7 @@ send_msg(int qid, int msgtype)
perror("msgsnd error");
exit(EXIT_FAILURE);
}
printf("sent: %s\\n", msg.mtext);
printf("sent: %s\en", msg.mtext);
}
static void
@ -655,9 +655,9 @@ get_msg(int qid, int msgtype)
perror("msgrcv");
exit(EXIT_FAILURE);
}
printf("No message available for msgrcv()\\n");
printf("No message available for msgrcv()\en");
} else
printf("message received: %s\\n", msg.mtext);
printf("message received: %s\en", msg.mtext);
}
int
@ -679,18 +679,18 @@ main(int argc, char *argv[])
case \(aqt\(aq:
msgtype = atoi(optarg);
if (msgtype <= 0)
usage(argv[0], "\-t option must be greater than 0\\n");
usage(argv[0], "\-t option must be greater than 0\en");
break;
case \(aqk\(aq:
msgkey = atoi(optarg);
break;
default:
usage(argv[0], "Unrecognized option\\n");
usage(argv[0], "Unrecognized option\en");
}
}
if (mode == 0)
usage(argv[0], "must use either \-s or \-r option\\n");
usage(argv[0], "must use either \-s or \-r option\en");
qid = msgget(msgkey, IPC_CREAT | 0666);

View File

@ -525,11 +525,11 @@ no longer exists.
.PP
.in +4n
.EX
$ \fBstat \-\-printf="%i\\n" cecilia.txt\fP # Display inode number
$ \fBstat \-\-printf="%i\en" cecilia.txt\fP # Display inode number
4072121
$ \fBrm cecilia.txt\fP
$ \fBecho 'Can you please think about it?' > cecilia.txt\fP
$ \fBstat \-\-printf="%i\\n" cecilia.txt\fP # Check inode number
$ \fBstat \-\-printf="%i\en" cecilia.txt\fP # Check inode number
4072121
$ \fBsudo ./t_open_by_handle_at < fh\fP
open_by_handle_at: Stale NFS file handle
@ -548,7 +548,7 @@ open_by_handle_at: Stale NFS file handle
#include <errno.h>
#include <string.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
int
@ -559,7 +559,7 @@ main(int argc, char *argv[])
char *pathname;
if (argc != 2) {
fprintf(stderr, "Usage: %s pathname\\n", argv[0]);
fprintf(stderr, "Usage: %s pathname\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -580,7 +580,7 @@ main(int argc, char *argv[])
fhp\->handle_bytes = 0;
if (name_to_handle_at(dirfd, pathname, fhp,
&mount_id, flags) != \-1 || errno != EOVERFLOW) {
fprintf(stderr, "Unexpected result from name_to_handle_at()\\n");
fprintf(stderr, "Unexpected result from name_to_handle_at()\en");
exit(EXIT_FAILURE);
}
@ -599,11 +599,11 @@ main(int argc, char *argv[])
/* Write mount ID, file handle size, and file handle to stdout,
for later reuse by t_open_by_handle_at.c */
printf("%d\\n", mount_id);
printf("%d\en", mount_id);
printf("%d %d ", fhp\->handle_bytes, fhp\->handle_type);
for (j = 0; j < fhp\->handle_bytes; j++)
printf(" %02x", fhp\->f_handle[j]);
printf("\\n");
printf("\en");
exit(EXIT_SUCCESS);
}
@ -621,7 +621,7 @@ main(int argc, char *argv[])
#include <unistd.h>
#include <string.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
/* Scan /proc/self/mountinfo to find the line whose mount ID matches
@ -654,7 +654,7 @@ open_mount_path_by_id(int mount_id)
nread = sscanf(linep, "%d %*d %*s %*s %s",
&mi_mount_id, mount_path);
if (nread != 2) {
fprintf(stderr, "Bad sscanf()\\n");
fprintf(stderr, "Bad sscanf()\en");
exit(EXIT_FAILURE);
}
@ -666,7 +666,7 @@ open_mount_path_by_id(int mount_id)
fclose(fp);
if (!found) {
fprintf(stderr, "Could not find mount point\\n");
fprintf(stderr, "Could not find mount point\en");
exit(EXIT_FAILURE);
}
@ -685,7 +685,7 @@ main(int argc, char *argv[])
char *nextp;
if ((argc > 1 && strcmp(argv[1], "\-\-help") == 0) || argc > 2) {
fprintf(stderr, "Usage: %s [mount\-path]\\n", argv[0]);
fprintf(stderr, "Usage: %s [mount\-path]\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -697,7 +697,7 @@ main(int argc, char *argv[])
if ((fgets(line1, sizeof(line1), stdin) == NULL) ||
(fgets(line2, sizeof(line2), stdin) == NULL)) {
fprintf(stderr, "Missing mount_id / file handle\\n");
fprintf(stderr, "Missing mount_id / file handle\en");
exit(EXIT_FAILURE);
}
@ -743,7 +743,7 @@ main(int argc, char *argv[])
if (nread == \-1)
errExit("read");
printf("Read %zd bytes\\n", nread);
printf("Read %zd bytes\en", nread);
exit(EXIT_SUCCESS);
}

View File

@ -3428,19 +3428,19 @@ main(int argc, char **argv)
fd = perf_event_open(&pe, 0, \-1, \-1, 0);
if (fd == \-1) {
fprintf(stderr, "Error opening leader %llx\\n", pe.config);
fprintf(stderr, "Error opening leader %llx\en", pe.config);
exit(EXIT_FAILURE);
}
ioctl(fd, PERF_EVENT_IOC_RESET, 0);
ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);
printf("Measuring instruction count for this printf\\n");
printf("Measuring instruction count for this printf\en");
ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);
read(fd, &count, sizeof(long long));
printf("Used %lld instructions\\n", count);
printf("Used %lld instructions\en", count);
close(fd);
}

View File

@ -247,7 +247,7 @@ main(int argc, char *argv[])
char buf;
if (argc != 2) {
fprintf(stderr, "Usage: %s <string>\\n", argv[0]);
fprintf(stderr, "Usage: %s <string>\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -268,7 +268,7 @@ main(int argc, char *argv[])
while (read(pipefd[0], &buf, 1) > 0)
write(STDOUT_FILENO, &buf, 1);
write(STDOUT_FILENO, "\\n", 1);
write(STDOUT_FILENO, "\en", 1);
close(pipefd[0]);
_exit(EXIT_SUCCESS);

View File

@ -87,7 +87,7 @@ is the distance from the start of the directory to this
.I d_reclen
is the size of
.IR d_name ,
not counting the terminating null byte (\(aq\\0\(aq).
not counting the terminating null byte (\(aq\e0\(aq).
.I d_name
is a null-terminated filename.
.SH RETURN VALUE

View File

@ -299,7 +299,7 @@ main(int argc, char *argv[])
ssize_t nbytes, bufsiz;
if (argc != 2) {
fprintf(stderr, "Usage: %s <pathname>\\n", argv[0]);
fprintf(stderr, "Usage: %s <pathname>\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -332,7 +332,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
printf("\(aq%s\(aq points to \(aq%.*s\(aq\\n", argv[1], (int) nbytes, buf);
printf("\(aq%s\(aq points to \(aq%.*s\(aq\en", argv[1], (int) nbytes, buf);
/* If the return value was equal to the buffer size, then the
the link target was larger than expected (perhaps because the
@ -341,7 +341,7 @@ main(int argc, char *argv[])
been truncated. */
if (nbytes == bufsiz)
printf("(Returned buffer may have been truncated)\\n");
printf("(Returned buffer may have been truncated)\en");
free(buf);
exit(EXIT_SUCCESS);

View File

@ -415,7 +415,7 @@ The following code sample demonstrates the use of
.in +4n
.EX
char *str0 = "hello ";
char *str1 = "world\\n";
char *str1 = "world\en";
struct iovec iov[2];
ssize_t nwritten;

View File

@ -276,7 +276,7 @@ main(void)
exit(EXIT_FAILURE);
}
printf("%d messages received\\n", retval);
printf("%d messages received\en", retval);
for (i = 0; i < retval; i++) {
bufs[i][msgs[i].msg_len] = 0;
printf("%d %s", i+1, bufs[i]);

View File

@ -463,7 +463,7 @@ we first create a suitable entry in the file
.in +4n
.EX
$ sudo sh
# \fBecho 'create user mtk:* * /bin/keyctl instantiate %k %c %S' \\\fP
# \fBecho 'create user mtk:* * /bin/keyctl instantiate %k %c %S' \e\fP
\fB> /etc/request-key.conf\fP
# \fBexit\fP
.EE
@ -525,7 +525,7 @@ main(int argc, char *argv[])
key_serial_t key;
if (argc != 4) {
fprintf(stderr, "Usage: %s type description callout\-data\\n",
fprintf(stderr, "Usage: %s type description callout\-data\en",
argv[0]);
exit(EXIT_FAILURE);
}
@ -537,7 +537,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
printf("Key ID is %lx\\n", (long) key);
printf("Key ID is %lx\en", (long) key);
exit(EXIT_SUCCESS);
}

View File

@ -353,7 +353,7 @@ sys 12.07
#include <unistd.h>
#include <sys/wait.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
int
@ -364,7 +364,7 @@ main(int argc, char *argv[])
int nloops, j;
if (argc != 4) {
fprintf(stderr, "Usage: %s parent\-cpu child\-cpu num\-loops\\n",
fprintf(stderr, "Usage: %s parent\-cpu child\-cpu num\-loops\en",
argv[0]);
exit(EXIT_FAILURE);
}

View File

@ -943,7 +943,7 @@ numbers on this architecture:
$ \fBuname -m\fP
x86_64
$ \fBsyscall_nr() {
cat /usr/src/linux/arch/x86/syscalls/syscall_64.tbl | \\
cat /usr/src/linux/arch/x86/syscalls/syscall_64.tbl | \e
awk '$2 != "x32" && $3 == "'$1'" { print $1 }'
}\fP
.EE
@ -1087,10 +1087,10 @@ main(int argc, char **argv)
{
if (argc < 5) {
fprintf(stderr, "Usage: "
"%s <syscall_nr> <arch> <errno> <prog> [<args>]\\n"
"Hint for <arch>: AUDIT_ARCH_I386: 0x%X\\n"
" AUDIT_ARCH_X86_64: 0x%X\\n"
"\\n", argv[0], AUDIT_ARCH_I386, AUDIT_ARCH_X86_64);
"%s <syscall_nr> <arch> <errno> <prog> [<args>]\en"
"Hint for <arch>: AUDIT_ARCH_I386: 0x%X\en"
" AUDIT_ARCH_X86_64: 0x%X\en"
"\en", argv[0], AUDIT_ARCH_I386, AUDIT_ARCH_X86_64);
exit(EXIT_FAILURE);
}

View File

@ -701,10 +701,10 @@ main(void)
if (retval == \-1)
perror("select()");
else if (retval)
printf("Data is available now.\\n");
printf("Data is available now.\en");
/* FD_ISSET(0, &rfds) will be true. */
else
printf("No data within five seconds.\\n");
printf("No data within five seconds.\en");
exit(EXIT_SUCCESS);
}

View File

@ -579,7 +579,7 @@ listen_socket(int listen_port)
return \-1;
}
printf("accepting connections on port %d\\n", listen_port);
printf("accepting connections on port %d\en", listen_port);
listen(lfd, 10);
return lfd;
}
@ -601,7 +601,7 @@ connect_socket(int connect_port, char *address)
addr.sin_family = AF_INET;
if (!inet_aton(address, (struct in_addr *) &addr.sin_addr.s_addr)) {
fprintf(stderr, "inet_aton(): bad IP address format\\n");
fprintf(stderr, "inet_aton(): bad IP address format\en");
close(cfd);
return \-1;
}
@ -615,20 +615,20 @@ connect_socket(int connect_port, char *address)
return cfd;
}
#define SHUT_FD1 do { \\
if (fd1 >= 0) { \\
shutdown(fd1, SHUT_RDWR); \\
close(fd1); \\
fd1 = \-1; \\
} \\
#define SHUT_FD1 do { \e
if (fd1 >= 0) { \e
shutdown(fd1, SHUT_RDWR); \e
close(fd1); \e
fd1 = \-1; \e
} \e
} while (0)
#define SHUT_FD2 do { \\
if (fd2 >= 0) { \\
shutdown(fd2, SHUT_RDWR); \\
close(fd2); \\
fd2 = \-1; \\
} \\
#define SHUT_FD2 do { \e
if (fd2 >= 0) { \e
shutdown(fd2, SHUT_RDWR); \e
close(fd2); \e
fd2 = \-1; \e
} \e
} while (0)
#define BUF_SIZE 1024
@ -643,8 +643,8 @@ main(int argc, char *argv[])
int buf2_avail = 0, buf2_written = 0;
if (argc != 4) {
fprintf(stderr, "Usage\\n\\tfwd <listen\-port> "
"<forward\-to\-port> <forward\-to\-ip\-address>\\n");
fprintf(stderr, "Usage\en\etfwd <listen\-port> "
"<forward\-to\-port> <forward\-to\-ip\-address>\en");
exit(EXIT_FAILURE);
}
@ -718,7 +718,7 @@ main(int argc, char *argv[])
if (fd2 == \-1)
SHUT_FD1;
else
printf("connect from %s\\n",
printf("connect from %s\en",
inet_ntoa(client_addr.sin_addr));
/* Skip any events on the old, closed file descriptors. */

View File

@ -237,7 +237,7 @@ main(void)
if (retval == \-1)
perror("sendmmsg()");
else
printf("%d messages sent\\n", retval);
printf("%d messages sent\en", retval);
exit(0);
}

View File

@ -308,7 +308,7 @@ bizarro
#include <stdlib.h>
#include <stdio.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
int
@ -317,7 +317,7 @@ main(int argc, char *argv[])
int fd;
if (argc < 3) {
fprintf(stderr, "%s /proc/PID/ns/FILE cmd args...\\n", argv[0]);
fprintf(stderr, "%s /proc/PID/ns/FILE cmd args...\en", argv[0]);
exit(EXIT_FAILURE);
}

View File

@ -435,7 +435,7 @@ The following shell session demonstrates the use of the program:
Got SIGINT
.B ^C
Got SIGINT
\fB^\\\fP # Control\-\\ generates SIGQUIT
\fB^\e\fP # Control\-\e generates SIGQUIT
Got SIGQUIT
$
.EE
@ -449,7 +449,7 @@ $
#include <stdlib.h>
#include <stdio.h>
#define handle_error(msg) \\
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
int
@ -480,12 +480,12 @@ main(int argc, char *argv[])
handle_error("read");
if (fdsi.ssi_signo == SIGINT) {
printf("Got SIGINT\\n");
printf("Got SIGINT\en");
} else if (fdsi.ssi_signo == SIGQUIT) {
printf("Got SIGQUIT\\n");
printf("Got SIGQUIT\en");
exit(EXIT_SUCCESS);
} else {
printf("Read unexpected signal\\n");
printf("Read unexpected signal\en");
}
}
}

View File

@ -218,7 +218,7 @@ system call.
#include <sys/types.h>
#include <fcntl.h>
#define handle_error(msg) \\
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
int main(void)
@ -254,7 +254,7 @@ int main(void)
* 0x00000002 (spu was stopped due to stop\-and\-signal)
* | 0x12340000 (the stop\-and\-signal code)
*/
printf("SPU Status: 0x%08x\\n", spu_status);
printf("SPU Status: 0x%08x\en", spu_status);
exit(EXIT_SUCCESS);
}

View File

@ -655,7 +655,7 @@ main(int argc, char *argv[])
struct stat sb;
if (argc != 2) {
fprintf(stderr, "Usage: %s <pathname>\\n", argv[0]);
fprintf(stderr, "Usage: %s <pathname>\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -664,36 +664,36 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
printf("ID of containing device: [%lx,%lx]\\n",
printf("ID of containing device: [%lx,%lx]\en",
(long) major(sb.st_dev), (long) minor(sb.st_dev));
printf("File type: ");
switch (sb.st_mode & S_IFMT) {
case S_IFBLK: printf("block device\\n"); break;
case S_IFCHR: printf("character device\\n"); break;
case S_IFDIR: printf("directory\\n"); break;
case S_IFIFO: printf("FIFO/pipe\\n"); break;
case S_IFLNK: printf("symlink\\n"); break;
case S_IFREG: printf("regular file\\n"); break;
case S_IFSOCK: printf("socket\\n"); break;
default: printf("unknown?\\n"); break;
case S_IFBLK: printf("block device\en"); break;
case S_IFCHR: printf("character device\en"); break;
case S_IFDIR: printf("directory\en"); break;
case S_IFIFO: printf("FIFO/pipe\en"); break;
case S_IFLNK: printf("symlink\en"); break;
case S_IFREG: printf("regular file\en"); break;
case S_IFSOCK: printf("socket\en"); break;
default: printf("unknown?\en"); break;
}
printf("I\-node number: %ld\\n", (long) sb.st_ino);
printf("I\-node number: %ld\en", (long) sb.st_ino);
printf("Mode: %lo (octal)\\n",
printf("Mode: %lo (octal)\en",
(unsigned long) sb.st_mode);
printf("Link count: %ld\\n", (long) sb.st_nlink);
printf("Ownership: UID=%ld GID=%ld\\n",
printf("Link count: %ld\en", (long) sb.st_nlink);
printf("Ownership: UID=%ld GID=%ld\en",
(long) sb.st_uid, (long) sb.st_gid);
printf("Preferred I/O block size: %ld bytes\\n",
printf("Preferred I/O block size: %ld bytes\en",
(long) sb.st_blksize);
printf("File size: %lld bytes\\n",
printf("File size: %lld bytes\en",
(long long) sb.st_size);
printf("Blocks allocated: %lld\\n",
printf("Blocks allocated: %lld\en",
(long long) sb.st_blocks);
printf("Last status change: %s", ctime(&sb.st_ctime));

View File

@ -173,7 +173,7 @@ main(void)
perror("_sysctl");
exit(EXIT_FAILURE);
}
printf("This machine is running %*s\\n", osnamelth, osname);
printf("This machine is running %*s\en", osnamelth, osname);
exit(EXIT_SUCCESS);
}
.EE

View File

@ -165,7 +165,7 @@ main(int argc, char *argv[])
int len, slen;
if (argc != 2) {
fprintf(stderr, "Usage: %s <file>\\n", argv[0]);
fprintf(stderr, "Usage: %s <file>\en", argv[0]);
exit(EXIT_FAILURE);
}

View File

@ -357,7 +357,7 @@ Caught signal 34
#define CLOCKID CLOCK_REALTIME
#define SIG SIGRTMIN
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
static void
@ -369,13 +369,13 @@ print_siginfo(siginfo_t *si)
tidp = si\->si_value.sival_ptr;
printf(" sival_ptr = %p; ", si\->si_value.sival_ptr);
printf(" *sival_ptr = 0x%lx\\n", (long) *tidp);
printf(" *sival_ptr = 0x%lx\en", (long) *tidp);
or = timer_getoverrun(*tidp);
if (or == \-1)
errExit("timer_getoverrun");
else
printf(" overrun count = %d\\n", or);
printf(" overrun count = %d\en", or);
}
static void
@ -387,7 +387,7 @@ handler(int sig, siginfo_t *si, void *uc)
Nevertheless, we use printf() here as a simple way of
showing that the handler was called. */
printf("Caught signal %d\\n", sig);
printf("Caught signal %d\en", sig);
print_siginfo(si);
signal(sig, SIG_IGN);
}
@ -403,14 +403,14 @@ main(int argc, char *argv[])
struct sigaction sa;
if (argc != 3) {
fprintf(stderr, "Usage: %s <sleep\-secs> <freq\-nanosecs>\\n",
fprintf(stderr, "Usage: %s <sleep\-secs> <freq\-nanosecs>\en",
argv[0]);
exit(EXIT_FAILURE);
}
/* Establish handler for timer signal */
printf("Establishing handler for signal %d\\n", SIG);
printf("Establishing handler for signal %d\en", SIG);
sa.sa_flags = SA_SIGINFO;
sa.sa_sigaction = handler;
sigemptyset(&sa.sa_mask);
@ -419,7 +419,7 @@ main(int argc, char *argv[])
/* Block timer signal temporarily */
printf("Blocking signal %d\\n", SIG);
printf("Blocking signal %d\en", SIG);
sigemptyset(&mask);
sigaddset(&mask, SIG);
if (sigprocmask(SIG_SETMASK, &mask, NULL) == \-1)
@ -433,7 +433,7 @@ main(int argc, char *argv[])
if (timer_create(CLOCKID, &sev, &timerid) == \-1)
errExit("timer_create");
printf("timer ID is 0x%lx\\n", (long) timerid);
printf("timer ID is 0x%lx\en", (long) timerid);
/* Start the timer */
@ -449,13 +449,13 @@ main(int argc, char *argv[])
/* Sleep for a while; meanwhile, the timer may expire
multiple times */
printf("Sleeping for %d seconds\\n", atoi(argv[1]));
printf("Sleeping for %d seconds\en", atoi(argv[1]));
sleep(atoi(argv[1]));
/* Unlock the timer signal, so that timer notification
can be delivered */
printf("Unblocking signal %d\\n", SIG);
printf("Unblocking signal %d\en", SIG);
if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == \-1)
errExit("sigprocmask");

View File

@ -549,7 +549,7 @@ a.out 3 1 100
#include <stdio.h>
#include <stdint.h> /* Definition of uint64_t */
#define handle_error(msg) \\
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
static void
@ -588,7 +588,7 @@ main(int argc, char *argv[])
ssize_t s;
if ((argc != 2) && (argc != 4)) {
fprintf(stderr, "%s init\-secs [interval\-secs max\-exp]\\n",
fprintf(stderr, "%s init\-secs [interval\-secs max\-exp]\en",
argv[0]);
exit(EXIT_FAILURE);
}
@ -618,7 +618,7 @@ main(int argc, char *argv[])
handle_error("timerfd_settime");
print_elapsed_time();
printf("timer started\\n");
printf("timer started\en");
for (tot_exp = 0; tot_exp < max_exp;) {
s = read(fd, &exp, sizeof(uint64_t));
@ -627,7 +627,7 @@ main(int argc, char *argv[])
tot_exp += exp;
print_elapsed_time();
printf("read: %llu; total=%llu\\n",
printf("read: %llu; total=%llu\en",
(unsigned long long) exp,
(unsigned long long) tot_exp);
}

View File

@ -90,7 +90,7 @@ bytes.
.PP
If the file previously was larger than this size, the extra data is lost.
If the file previously was shorter, it is extended, and
the extended part reads as null bytes (\(aq\\0\(aq).
the extended part reads as null bytes (\(aq\e0\(aq).
.PP
The file offset is not changed.
.PP

View File

@ -59,7 +59,7 @@ struct utsname {
The length of the arrays in a
.I struct utsname
is unspecified (see NOTES);
the fields are terminated by a null byte (\(aq\\0\(aq).
the fields are terminated by a null byte (\(aq\e0\(aq).
.SH RETURN VALUE
On success, zero is returned.
On error, \-1 is returned, and

View File

@ -485,20 +485,20 @@ commands shows that the two shells are in different mount namespaces.
/* A simple error\-handling function: print an error message based
on the value in \(aqerrno\(aq and terminate the calling process */
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
static void
usage(char *pname)
{
fprintf(stderr, "Usage: %s [options] program [arg...]\\n", pname);
fprintf(stderr, "Options can be:\\n");
fprintf(stderr, " \-i unshare IPC namespace\\n");
fprintf(stderr, " \-m unshare mount namespace\\n");
fprintf(stderr, " \-n unshare network namespace\\n");
fprintf(stderr, " \-p unshare PID namespace\\n");
fprintf(stderr, " \-u unshare UTS namespace\\n");
fprintf(stderr, " \-U unshare user namespace\\n");
fprintf(stderr, "Usage: %s [options] program [arg...]\en", pname);
fprintf(stderr, "Options can be:\en");
fprintf(stderr, " \-i unshare IPC namespace\en");
fprintf(stderr, " \-m unshare mount namespace\en");
fprintf(stderr, " \-n unshare network namespace\en");
fprintf(stderr, " \-p unshare PID namespace\en");
fprintf(stderr, " \-u unshare UTS namespace\en");
fprintf(stderr, " \-U unshare user namespace\en");
exit(EXIT_FAILURE);
}

View File

@ -574,7 +574,7 @@ Read address 0x7fd30106ec0f in main(): C
#include <sys/ioctl.h>
#include <poll.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
static int page_size;
@ -615,9 +615,9 @@ fault_handler_thread(void *arg)
if (nready == \-1)
errExit("poll");
printf("\\nfault_handler_thread():\\n");
printf("\enfault_handler_thread():\en");
printf(" poll() returns: nready = %d; "
"POLLIN = %d; POLLERR = %d\\n", nready,
"POLLIN = %d; POLLERR = %d\en", nready,
(pollfd.revents & POLLIN) != 0,
(pollfd.revents & POLLERR) != 0);
@ -625,7 +625,7 @@ fault_handler_thread(void *arg)
nread = read(uffd, &msg, sizeof(msg));
if (nread == 0) {
printf("EOF on userfaultfd!\\n");
printf("EOF on userfaultfd!\en");
exit(EXIT_FAILURE);
}
@ -635,7 +635,7 @@ fault_handler_thread(void *arg)
/* We expect only one kind of event; verify that assumption */
if (msg.event != UFFD_EVENT_PAGEFAULT) {
fprintf(stderr, "Unexpected event on userfaultfd\\n");
fprintf(stderr, "Unexpected event on userfaultfd\en");
exit(EXIT_FAILURE);
}
@ -643,7 +643,7 @@ fault_handler_thread(void *arg)
printf(" UFFD_EVENT_PAGEFAULT event: ");
printf("flags = %llx; ", msg.arg.pagefault.flags);
printf("address = %llx\\n", msg.arg.pagefault.address);
printf("address = %llx\en", msg.arg.pagefault.address);
/* Copy the page pointed to by \(aqpage\(aq into the faulting
region. Vary the contents that are copied in, so that it
@ -665,7 +665,7 @@ fault_handler_thread(void *arg)
if (ioctl(uffd, UFFDIO_COPY, &uffdio_copy) == \-1)
errExit("ioctl\-UFFDIO_COPY");
printf(" (uffdio_copy.copy returned %lld)\\n",
printf(" (uffdio_copy.copy returned %lld)\en",
uffdio_copy.copy);
}
}
@ -682,7 +682,7 @@ main(int argc, char *argv[])
int s;
if (argc != 2) {
fprintf(stderr, "Usage: %s num\-pages\\n", argv[0]);
fprintf(stderr, "Usage: %s num\-pages\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -710,7 +710,7 @@ main(int argc, char *argv[])
if (addr == MAP_FAILED)
errExit("mmap");
printf("Address returned by mmap() = %p\\n", addr);
printf("Address returned by mmap() = %p\en", addr);
/* Register the memory range of the mapping we just created for
handling by the userfaultfd object. In mode, we request to track
@ -741,7 +741,7 @@ main(int argc, char *argv[])
while (l < len) {
char c = addr[l];
printf("Read address %p in main(): ", addr + l);
printf("%c\\n", c);
printf("%c\en", c);
l += 1024;
usleep(100000); /* Slow things down a little */
}

View File

@ -64,7 +64,7 @@ The last two fields,
and
.IR f_fpack ,
are not implemented and will
always be filled with null bytes (\(aq\\0\(aq).
always be filled with null bytes (\(aq\e0\(aq).
.SH RETURN VALUE
On success, zero is returned and the
.I ustat

View File

@ -660,7 +660,7 @@ main(int argc, char *argv[])
}
if (cpid == 0) { /* Code executed by child */
printf("Child PID is %ld\\n", (long) getpid());
printf("Child PID is %ld\en", (long) getpid());
if (argc == 1)
pause(); /* Wait for signals */
_exit(atoi(argv[1]));
@ -674,13 +674,13 @@ main(int argc, char *argv[])
}
if (WIFEXITED(wstatus)) {
printf("exited, status=%d\\n", WEXITSTATUS(wstatus));
printf("exited, status=%d\en", WEXITSTATUS(wstatus));
} else if (WIFSIGNALED(wstatus)) {
printf("killed by signal %d\\n", WTERMSIG(wstatus));
printf("killed by signal %d\en", WTERMSIG(wstatus));
} else if (WIFSTOPPED(wstatus)) {
printf("stopped by signal %d\\n", WSTOPSIG(wstatus));
printf("stopped by signal %d\en", WSTOPSIG(wstatus));
} else if (WIFCONTINUED(wstatus)) {
printf("continued\\n");
printf("continued\en");
}
} while (!WIFEXITED(wstatus) && !WIFSIGNALED(wstatus));
exit(EXIT_SUCCESS);

View File

@ -332,7 +332,7 @@ main(int argc, char *argv[])
int num_cpus, cpu;
if (argc < 2) {
fprintf(stderr, "Usage: %s <num\-cpus>\\n", argv[0]);
fprintf(stderr, "Usage: %s <num\-cpus>\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -350,7 +350,7 @@ main(int argc, char *argv[])
for (cpu = 0; cpu < num_cpus; cpu += 2)
CPU_SET_S(cpu, size, cpusetp);
printf("CPU_COUNT() of set: %d\\n", CPU_COUNT_S(size, cpusetp));
printf("CPU_COUNT() of set: %d\en", CPU_COUNT_S(size, cpusetp));
CPU_FREE(cpusetp);
exit(EXIT_SUCCESS);

View File

@ -86,7 +86,7 @@ main(void)
uint64_t tb1, tb2, diff;
uint64_t freq = __ppc_get_timebase_freq();
printf("Time Base frequency = %"PRIu64" Hz\\n", freq);
printf("Time Base frequency = %"PRIu64" Hz\en", freq);
tb1 = __ppc_get_timebase();
@ -101,7 +101,7 @@ main(void)
diff = (MAX_TB \- tb2) + tb1;
}
printf("Elapsed time = %1.2f usecs\\n",
printf("Elapsed time = %1.2f usecs\en",
(double) diff * 1000000 / freq );
exit(EXIT_SUCCESS);

View File

@ -53,7 +53,7 @@ These functions are glibc-specific.
.PP
An argz vector is a pointer to a character buffer together with a length.
The intended interpretation of the character buffer is an array
of strings, where the strings are separated by null bytes (\(aq\\0\(aq).
of strings, where the strings are separated by null bytes (\(aq\e0\(aq).
If the length is nonzero, the last byte of the buffer must be a null byte.
.PP
These functions are for handling argz vectors.
@ -99,7 +99,7 @@ will be increased by
.PP
.BR argz_count ()
counts the number of strings, that is,
the number of null bytes (\(aq\\0\(aq), in
the number of null bytes (\(aq\e0\(aq), in
.RI ( argz ,\ argz_len ).
.PP
.BR argz_create ()
@ -187,7 +187,7 @@ will be incremented by the number of replacements.
is the opposite of
.BR argz_create_sep ().
It transforms the argz vector into a normal string by replacing
all null bytes (\(aq\\0\(aq) except the last by
all null bytes (\(aq\e0\(aq) except the last by
.IR sep .
.SH RETURN VALUE
All argz functions that do memory allocation have a return type of

View File

@ -45,7 +45,7 @@ are analogs of
and
.BR vsprintf (3),
except that they allocate a string large enough to hold the output
including the terminating null byte (\(aq\\0\(aq),
including the terminating null byte (\(aq\e0\(aq),
and return a pointer to it via the first argument.
This pointer should be passed to
.BR free (3)

View File

@ -237,7 +237,7 @@ myfunc3(void)
char **strings;
nptrs = backtrace(buffer, BT_BUF_SIZE);
printf("backtrace() returned %d addresses\\n", nptrs);
printf("backtrace() returned %d addresses\en", nptrs);
/* The call backtrace_symbols_fd(buffer, nptrs, STDOUT_FILENO)
would produce similar output to the following: */
@ -249,7 +249,7 @@ myfunc3(void)
}
for (j = 0; j < nptrs; j++)
printf("%s\\n", strings[j]);
printf("%s\en", strings[j]);
free(strings);
}
@ -273,7 +273,7 @@ int
main(int argc, char *argv[])
{
if (argc != 2) {
fprintf(stderr, "%s num\-calls\\n", argv[0]);
fprintf(stderr, "%s num\-calls\en", argv[0]);
exit(EXIT_FAILURE);
}

View File

@ -192,7 +192,7 @@ dirc = strdup(path);
basec = strdup(path);
dname = dirname(dirc);
bname = basename(basec);
printf("dirname=%s, basename=%s\\n", dname, bname);
printf("dirname=%s, basename=%s\en", dname, bname);
.EE
.in
.SH SEE ALSO

View File

@ -68,12 +68,12 @@ main(int argc, char *argv[])
uint64_t x;
if (argc != 2) {
fprintf(stderr, "Usage: %s <num>\\n", argv[0]);
fprintf(stderr, "Usage: %s <num>\en", argv[0]);
exit(EXIT_FAILURE);
}
x = strtoul(argv[1], NULL, 0);
printf("0x%" PRIx64 " ==> 0x%" PRIx64 "\\n", x, bswap_64(x));
printf("0x%" PRIx64 " ==> 0x%" PRIx64 "\en", x, bswap_64(x));
exit(EXIT_SUCCESS);
}

View File

@ -42,7 +42,7 @@ function erases the data in the
.I n
bytes of the memory starting at the location pointed to by
.IR s ,
by writing zeros (bytes containing \(aq\\0\(aq) to that area.
by writing zeros (bytes containing \(aq\e0\(aq) to that area.
.PP
The
.BR explicit_bzero ()

View File

@ -65,7 +65,7 @@ main(int argc, char *argv[])
double complex i = I;
if (argc != 3) {
fprintf(stderr, "Usage: %s <real> <imag>\\n", argv[0]);
fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -73,11 +73,11 @@ main(int argc, char *argv[])
c = cacos(z);
printf("cacos() = %6.3f %6.3f*i\\n", creal(c), cimag(c));
printf("cacos() = %6.3f %6.3f*i\en", creal(c), cimag(c));
f = \-i * clog(z + i * csqrt(1 \- z * z));
printf("formula = %6.3f %6.3f*i\\n", creal(f), cimag(f));
printf("formula = %6.3f %6.3f*i\en", creal(f), cimag(f));
exit(EXIT_SUCCESS);
}

View File

@ -67,17 +67,17 @@ main(int argc, char *argv[])
double complex z, c, f;
if (argc != 3) {
fprintf(stderr, "Usage: %s <real> <imag>\\n", argv[0]);
fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
exit(EXIT_FAILURE);
}
z = atof(argv[1]) + atof(argv[2]) * I;
c = cacosh(z);
printf("cacosh() = %6.3f %6.3f*i\\n", creal(c), cimag(c));
printf("cacosh() = %6.3f %6.3f*i\en", creal(c), cimag(c));
f = 2 * clog(csqrt((z + 1)/2) + csqrt((z \- 1)/2));
printf("formula = %6.3f %6.3f*i\\n", creal(f2), cimag(f2));
printf("formula = %6.3f %6.3f*i\en", creal(f2), cimag(f2));
exit(EXIT_SUCCESS);
}

View File

@ -63,17 +63,17 @@ main(int argc, char *argv[])
double complex i = I;
if (argc != 3) {
fprintf(stderr, "Usage: %s <real> <imag>\\n", argv[0]);
fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
exit(EXIT_FAILURE);
}
z = atof(argv[1]) + atof(argv[2]) * I;
c = catan(z);
printf("catan() = %6.3f %6.3f*i\\n", creal(c), cimag(c));
printf("catan() = %6.3f %6.3f*i\en", creal(c), cimag(c));
f = (clog(1 + i * z) \- clog(1 \- i * z)) / (2 * i);
printf("formula = %6.3f %6.3f*i\\n", creal(f2), cimag(f2));
printf("formula = %6.3f %6.3f*i\en", creal(f2), cimag(f2));
exit(EXIT_SUCCESS);
}

View File

@ -64,17 +64,17 @@ main(int argc, char *argv[])
double complex z, c, f;
if (argc != 3) {
fprintf(stderr, "Usage: %s <real> <imag>\\n", argv[0]);
fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
exit(EXIT_FAILURE);
}
z = atof(argv[1]) + atof(argv[2]) * I;
c = catanh(z);
printf("catanh() = %6.3f %6.3f*i\\n", creal(c), cimag(c));
printf("catanh() = %6.3f %6.3f*i\en", creal(c), cimag(c));
f = 0.5 * (clog(1 + z) \- clog(1 \- z));
printf("formula = %6.3f %6.3f*i\\n", creal(f2), cimag(f2));
printf("formula = %6.3f %6.3f*i\en", creal(f2), cimag(f2));
exit(EXIT_SUCCESS);
}

View File

@ -55,7 +55,7 @@ The
message-text is contained in an internal buffer area and should be copied by
the application if it is to be saved or modified.
The return string is
always terminated with a null byte (\(aq\\0\(aq).
always terminated with a null byte (\(aq\e0\(aq).
.SH RETURN VALUE
.PP
On success,

View File

@ -139,7 +139,7 @@ main(int argc, char *argv[])
struct timespec ts;
if (argc != 2) {
fprintf(stderr, "%s <process\-ID>\\n", argv[0]);
fprintf(stderr, "%s <process\-ID>\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -153,7 +153,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
printf("CPU-time clock for PID %s is %ld.%09ld seconds\\n",
printf("CPU-time clock for PID %s is %ld.%09ld seconds\en",
argv[1], (long) ts.tv_sec, (long) ts.tv_nsec);
exit(EXIT_SUCCESS);
}

View File

@ -80,7 +80,7 @@ copies the value of the string to
.I buf
truncated to
.I len \- 1
bytes if necessary, with a null byte (\(aq\\0\(aq) as terminator.
bytes if necessary, with a null byte (\(aq\e0\(aq) as terminator.
This can be detected by comparing the return value of
.BR confstr ()
against

View File

@ -151,7 +151,7 @@ null-terminated string of the form
.PP
.in +4n
.EX
"Wed Jun 30 21:49:08 1993\\n"
"Wed Jun 30 21:49:08 1993\en"
.EE
.in
.PP

View File

@ -310,7 +310,7 @@ callback(struct dl_phdr_info *info, size_t size, void *data)
char *type;
int p_type, j;
printf("Name: \\"%s\\" (%d segments)\\n", info\->dlpi_name,
printf("Name: \e"%s\e" (%d segments)\en", info\->dlpi_name,
info\->dlpi_phnum);
for (j = 0; j < info\->dlpi_phnum; j++) {
@ -331,9 +331,9 @@ callback(struct dl_phdr_info *info, size_t size, void *data)
info\->dlpi_phdr[j].p_memsz,
info\->dlpi_phdr[j].p_flags);
if (type != NULL)
printf("%s\\n", type);
printf("%s\en", type);
else
printf("[other (0x%x)]\\n", p_type);
printf("[other (0x%x)]\en", p_type);
}
return 0;

View File

@ -276,7 +276,7 @@ main(int argc, char *argv[])
int j;
if (argc != 2) {
fprintf(stderr, "Usage: %s <libpath>\\n", argv[0]);
fprintf(stderr, "Usage: %s <libpath>\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -284,7 +284,7 @@ main(int argc, char *argv[])
handle = dlopen(argv[1], RTLD_NOW);
if (handle == NULL) {
fprintf(stderr, "dlopen() failed: %s\\n", dlerror());
fprintf(stderr, "dlopen() failed: %s\en", dlerror());
exit(EXIT_FAILURE);
}
@ -292,7 +292,7 @@ main(int argc, char *argv[])
RTLD_DI_SERINFO */
if (dlinfo(handle, RTLD_DI_SERINFOSIZE, &serinfo) == \-1) {
fprintf(stderr, "RTLD_DI_SERINFOSIZE failed: %s\\n", dlerror());
fprintf(stderr, "RTLD_DI_SERINFOSIZE failed: %s\en", dlerror());
exit(EXIT_FAILURE);
}
@ -308,19 +308,19 @@ main(int argc, char *argv[])
allocated buffer */
if (dlinfo(handle, RTLD_DI_SERINFOSIZE, sip) == \-1) {
fprintf(stderr, "RTLD_DI_SERINFOSIZE failed: %s\\n", dlerror());
fprintf(stderr, "RTLD_DI_SERINFOSIZE failed: %s\en", dlerror());
exit(EXIT_FAILURE);
}
/* Fetch and print library search list */
if (dlinfo(handle, RTLD_DI_SERINFO, sip) == \-1) {
fprintf(stderr, "RTLD_DI_SERINFO failed: %s\\n", dlerror());
fprintf(stderr, "RTLD_DI_SERINFO failed: %s\en", dlerror());
exit(EXIT_FAILURE);
}
for (j = 0; j < serinfo.dls_cnt; j++)
printf("dls_serpath[%d].dls_name = %s\\n",
printf("dls_serpath[%d].dls_name = %s\en",
j, sip\->dls_serpath[j].dls_name);
exit(EXIT_SUCCESS);

View File

@ -142,7 +142,7 @@ ABC
#include <stdlib.h>
#include <locale.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
int
@ -152,7 +152,7 @@ main(int argc, char *argv[])
char *p;
if (argc != 2) {
fprintf(stderr, "Usage: %s string\\n", argv[0]);
fprintf(stderr, "Usage: %s string\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -171,7 +171,7 @@ main(int argc, char *argv[])
for (p = argv[1]; *p; p++)
putchar(toupper_l(*p, nloc));
printf("\\n");
printf("\en");
freelocale(nloc);

View File

@ -190,25 +190,25 @@ main(void)
}
setkey(key);
}
printf("Before encrypting: %s\\n", orig);
printf("Before encrypting: %s\en", orig);
encrypt(buf, 0);
for (i = 0; i < 8; i++) {
for (j = 0, txt[i] = \(aq\\0\(aq; j < 8; j++) {
for (j = 0, txt[i] = \(aq\e0\(aq; j < 8; j++) {
txt[i] |= buf[i * 8 + j] << j;
}
txt[8] = \(aq\\0\(aq;
txt[8] = \(aq\e0\(aq;
}
printf("After encrypting: %s\\n", txt);
printf("After encrypting: %s\en", txt);
encrypt(buf, 1);
for (i = 0; i < 8; i++) {
for (j = 0, txt[i] = \(aq\\0\(aq; j < 8; j++) {
for (j = 0, txt[i] = \(aq\e0\(aq; j < 8; j++) {
txt[i] |= buf[i * 8 + j] << j;
}
txt[8] = \(aq\\0\(aq;
txt[8] = \(aq\e0\(aq;
}
printf("After decrypting: %s\\n", txt);
printf("After decrypting: %s\en", txt);
exit(EXIT_SUCCESS);
}
.EE

View File

@ -97,10 +97,10 @@ extern char etext, edata, end; /* The symbols must have some type,
int
main(int argc, char *argv[])
{
printf("First address past:\\n");
printf(" program text (etext) %10p\\n", &etext);
printf(" initialized data (edata) %10p\\n", &edata);
printf(" uninitialized data (end) %10p\\n", &end);
printf("First address past:\en");
printf(" program text (etext) %10p\en", &etext);
printf(" initialized data (edata) %10p\en", &edata);
printf(" uninitialized data (end) %10p\en", &end);
exit(EXIT_SUCCESS);
}

View File

@ -164,9 +164,9 @@ main(int argc, char *argv[])
x.arr[2] = 0x33;
x.arr[3] = 0x44; /* Highest-address byte */
printf("x.u32 = 0x%x\\n", x.u32);
printf("htole32(x.u32) = 0x%x\\n", htole32(x.u32));
printf("htobe32(x.u32) = 0x%x\\n", htobe32(x.u32));
printf("x.u32 = 0x%x\en", x.u32);
printf("htole32(x.u32) = 0x%x\en", htole32(x.u32));
printf("htobe32(x.u32) = 0x%x\en", htobe32(x.u32));
exit(EXIT_SUCCESS);
}

View File

@ -33,7 +33,7 @@ of the
function.
It reads a string of at most \fIn\-1\fP wide characters into the
wide-character array pointed to by \fIws\fP,
and adds a terminating null wide character (L\(aq\\0\(aq).
and adds a terminating null wide character (L\(aq\e0\(aq).
It stops reading wide characters after it has encountered and
stored a newline wide character.
It also stops when end of stream is reached.

View File

@ -62,7 +62,7 @@ Open the stream for reading and writing.
.I w+
Open the stream for reading and writing.
The buffer contents are truncated
(i.e., \(aq\\0\(aq is placed in the first byte of the buffer).
(i.e., \(aq\e0\(aq is placed in the first byte of the buffer).
.TP
.I a+
Append; open the stream for reading and writing,
@ -115,7 +115,7 @@ counts that byte)
to allow for this.
.PP
In a stream opened for reading,
null bytes (\(aq\\0\(aq) in the buffer do not cause read
null bytes (\(aq\e0\(aq) in the buffer do not cause read
operations to return an end-of-file indication.
A read from the buffer will indicate end-of-file
only when the current buffer position advances
@ -303,7 +303,7 @@ size=11; ptr=1 529 1849
#include <stdio.h>
#include <stdlib.h>
#define handle_error(msg) \\
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
int
@ -315,7 +315,7 @@ main(int argc, char *argv[])
char *ptr;
if (argc != 2) {
fprintf(stderr, "Usage: %s \(aq<num>...\(aq\\n", argv[0]);
fprintf(stderr, "Usage: %s \(aq<num>...\(aq\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -340,7 +340,7 @@ main(int argc, char *argv[])
fclose(in);
fclose(out);
printf("size=%zu; ptr=%s\\n", size, ptr);
printf("size=%zu; ptr=%s\en", size, ptr);
free(ptr);
exit(EXIT_SUCCESS);

View File

@ -436,11 +436,11 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
if (nread == 0) {
printf("Reached end of file\\n");
printf("Reached end of file\en");
break;
}
printf("/%.*s/\\n", nread, buf);
printf("/%.*s/\en", nread, buf);
}
exit(EXIT_SUCCESS);

View File

@ -30,7 +30,7 @@ the
.BR fputs (3)
function.
It writes the wide-character string starting at \fIws\fP, up to but
not including the terminating null wide character (L\(aq\\0\(aq), to \fIstream\fP.
not including the terminating null wide character (L\(aq\e0\(aq), to \fIstream\fP.
.PP
For a nonlocking counterpart, see
.BR unlocked_stdio (3).

View File

@ -146,7 +146,7 @@ main(int argc, char *argv[])
x = strtod(argv[1], NULL);
r = frexp(x, &exp);
printf("frexp(%g, &e) = %g: %g * %d^%d = %g\\n",
printf("frexp(%g, &e) = %g: %g * %d^%d = %g\en",
x, r, r, FLT_RADIX, exp, x);
exit(EXIT_SUCCESS);
}

View File

@ -490,7 +490,7 @@ display_info(const char *fpath, const struct stat *sb,
else
printf("%7jd", (intmax_t) sb\->st_size);
printf(" %\-40s %d %s\\n",
printf(" %\-40s %d %s\en",
fpath, ftwbuf\->base, fpath + ftwbuf\->base);
return 0; /* To tell nftw() to continue */

View File

@ -97,7 +97,7 @@ int
main(int argc, char *argv[])
{
printf("This system has %d processors configured and "
"%d processors available.\\n",
"%d processors available.\en",
get_nprocs_conf(), get_nprocs());
exit(EXIT_SUCCESS);
}

View File

@ -92,7 +92,7 @@ int
main(int argc, char *argv[])
{
printf("This system has %ld pages of physical memory and "
"%ld pages of physical memory available.\\n",
"%ld pages of physical memory available.\en",
get_phys_pages(), get_avphys_pages());
exit(EXIT_SUCCESS);
}

View File

@ -676,7 +676,7 @@ main(int argc, char *argv[])
char buf[BUF_SIZE];
if (argc != 2) {
fprintf(stderr, "Usage: %s port\\n", argv[0]);
fprintf(stderr, "Usage: %s port\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -691,7 +691,7 @@ main(int argc, char *argv[])
s = getaddrinfo(NULL, argv[1], &hints, &result);
if (s != 0) {
fprintf(stderr, "getaddrinfo: %s\\n", gai_strerror(s));
fprintf(stderr, "getaddrinfo: %s\en", gai_strerror(s));
exit(EXIT_FAILURE);
}
@ -713,7 +713,7 @@ main(int argc, char *argv[])
}
if (rp == NULL) { /* No address succeeded */
fprintf(stderr, "Could not bind\\n");
fprintf(stderr, "Could not bind\en");
exit(EXIT_FAILURE);
}
@ -734,15 +734,15 @@ main(int argc, char *argv[])
peer_addr_len, host, NI_MAXHOST,
service, NI_MAXSERV, NI_NUMERICSERV);
if (s == 0)
printf("Received %zd bytes from %s:%s\\n",
printf("Received %zd bytes from %s:%s\en",
nread, host, service);
else
fprintf(stderr, "getnameinfo: %s\\n", gai_strerror(s));
fprintf(stderr, "getnameinfo: %s\en", gai_strerror(s));
if (sendto(sfd, buf, nread, 0,
(struct sockaddr *) &peer_addr,
peer_addr_len) != nread)
fprintf(stderr, "Error sending response\\n");
fprintf(stderr, "Error sending response\en");
}
}
.EE
@ -770,7 +770,7 @@ main(int argc, char *argv[])
char buf[BUF_SIZE];
if (argc < 3) {
fprintf(stderr, "Usage: %s host port msg...\\n", argv[0]);
fprintf(stderr, "Usage: %s host port msg...\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -784,7 +784,7 @@ main(int argc, char *argv[])
s = getaddrinfo(argv[1], argv[2], &hints, &result);
if (s != 0) {
fprintf(stderr, "getaddrinfo: %s\\n", gai_strerror(s));
fprintf(stderr, "getaddrinfo: %s\en", gai_strerror(s));
exit(EXIT_FAILURE);
}
@ -806,7 +806,7 @@ main(int argc, char *argv[])
}
if (rp == NULL) { /* No address succeeded */
fprintf(stderr, "Could not connect\\n");
fprintf(stderr, "Could not connect\en");
exit(EXIT_FAILURE);
}
@ -821,12 +821,12 @@ main(int argc, char *argv[])
if (len > BUF_SIZE) {
fprintf(stderr,
"Ignoring long message in argument %d\\n", j);
"Ignoring long message in argument %d\en", j);
continue;
}
if (write(sfd, argv[j], len) != len) {
fprintf(stderr, "partial/failed write\\n");
fprintf(stderr, "partial/failed write\en");
exit(EXIT_FAILURE);
}
@ -836,7 +836,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
printf("Received %zd bytes: %s\\n", nread, buf);
printf("Received %zd bytes: %s\en", nread, buf);
}
exit(EXIT_SUCCESS);

View File

@ -365,7 +365,7 @@ main(int argc, char *argv[])
struct addrinfo *res;
if (argc < 2) {
fprintf(stderr, "Usage: %s HOST...\\n", argv[0]);
fprintf(stderr, "Usage: %s HOST...\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -381,7 +381,7 @@ main(int argc, char *argv[])
ret = getaddrinfo_a(GAI_WAIT, reqs, argc \- 1, NULL);
if (ret != 0) {
fprintf(stderr, "getaddrinfo_a() failed: %s\\n",
fprintf(stderr, "getaddrinfo_a() failed: %s\en",
gai_strerror(ret));
exit(EXIT_FAILURE);
}
@ -396,7 +396,7 @@ main(int argc, char *argv[])
host, sizeof(host),
NULL, 0, NI_NUMERICHOST);
if (ret != 0) {
fprintf(stderr, "getnameinfo() failed: %s\\n",
fprintf(stderr, "getnameinfo() failed: %s\en",
gai_strerror(ret));
exit(EXIT_FAILURE);
}
@ -457,7 +457,7 @@ getcmd(void)
if (fgets(buf, sizeof(buf), stdin) == NULL)
return NULL;
if (buf[strlen(buf) \- 1] == \(aq\\n\(aq)
if (buf[strlen(buf) \- 1] == \(aq\en\(aq)
buf[strlen(buf) \- 1] = 0;
return buf;
@ -484,7 +484,7 @@ add_requests(void)
ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base],
nreqs \- nreqs_base, NULL);
if (ret) {
fprintf(stderr, "getaddrinfo_a() failed: %s\\n",
fprintf(stderr, "getaddrinfo_a() failed: %s\en",
gai_strerror(ret));
exit(EXIT_FAILURE);
}
@ -503,7 +503,7 @@ wait_requests(void)
n = atoi(id);
if (n >= nreqs) {
printf("Bad request number: %s\\n", id);
printf("Bad request number: %s\en", id);
return;
}
@ -512,7 +512,7 @@ wait_requests(void)
ret = gai_suspend(wait_reqs, nreqs, NULL);
if (ret) {
printf("gai_suspend(): %s\\n", gai_strerror(ret));
printf("gai_suspend(): %s\en", gai_strerror(ret));
return;
}
@ -524,7 +524,7 @@ wait_requests(void)
if (ret == EAI_INPROGRESS)
continue;
printf("[%02d] %s: %s\\n", i, reqs[i]\->ar_name,
printf("[%02d] %s: %s\en", i, reqs[i]\->ar_name,
ret == 0 ? "Finished" : gai_strerror(ret));
}
}
@ -540,12 +540,12 @@ cancel_requests(void)
n = atoi(id);
if (n >= nreqs) {
printf("Bad request number: %s\\n", id);
printf("Bad request number: %s\en", id);
return;
}
ret = gai_cancel(reqs[n]);
printf("[%s] %s: %s\\n", id, reqs[atoi(id)]\->ar_name,
printf("[%s] %s: %s\en", id, reqs[atoi(id)]\->ar_name,
gai_strerror(ret));
}
}
@ -569,7 +569,7 @@ list_requests(void)
host, sizeof(host),
NULL, 0, NI_NUMERICHOST);
if (ret) {
fprintf(stderr, "getnameinfo() failed: %s\\n",
fprintf(stderr, "getnameinfo() failed: %s\en",
gai_strerror(ret));
exit(EXIT_FAILURE);
}
@ -606,7 +606,7 @@ main(int argc, char *argv[])
list_requests();
break;
default:
fprintf(stderr, "Bad command: %c\\n", cmd[0]);
fprintf(stderr, "Bad command: %c\en", cmd[0]);
break;
}
}

View File

@ -296,21 +296,21 @@ main(int argc, char *argv[])
tmp = getdate(argv[j]);
if (tmp == NULL) {
printf("Call %d failed; getdate_err = %d\\n",
printf("Call %d failed; getdate_err = %d\en",
j, getdate_err);
continue;
}
printf("Call %d (\\"%s\\") succeeded:\\n", j, argv[j]);
printf(" tm_sec = %d\\n", tmp\->tm_sec);
printf(" tm_min = %d\\n", tmp\->tm_min);
printf(" tm_hour = %d\\n", tmp\->tm_hour);
printf(" tm_mday = %d\\n", tmp\->tm_mday);
printf(" tm_mon = %d\\n", tmp\->tm_mon);
printf(" tm_year = %d\\n", tmp\->tm_year);
printf(" tm_wday = %d\\n", tmp\->tm_wday);
printf(" tm_yday = %d\\n", tmp\->tm_yday);
printf(" tm_isdst = %d\\n", tmp\->tm_isdst);
printf("Call %d (\e"%s\e") succeeded:\en", j, argv[j]);
printf(" tm_sec = %d\en", tmp\->tm_sec);
printf(" tm_min = %d\en", tmp\->tm_min);
printf(" tm_hour = %d\en", tmp\->tm_hour);
printf(" tm_mday = %d\en", tmp\->tm_mday);
printf(" tm_mon = %d\en", tmp\->tm_mon);
printf(" tm_year = %d\en", tmp\->tm_year);
printf(" tm_wday = %d\en", tmp\->tm_wday);
printf(" tm_yday = %d\en", tmp\->tm_yday);
printf(" tm_isdst = %d\en", tmp\->tm_isdst);
}
exit(EXIT_SUCCESS);

View File

@ -159,7 +159,7 @@ main(int argc, char *argv[])
struct group *gr;
if (argc != 3) {
fprintf(stderr, "Usage: %s <user> <ngroups>\\n", argv[0]);
fprintf(stderr, "Usage: %s <user> <ngroups>\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -182,20 +182,20 @@ main(int argc, char *argv[])
/* Retrieve group list */
if (getgrouplist(argv[1], pw\->pw_gid, groups, &ngroups) == \-1) {
fprintf(stderr, "getgrouplist() returned \-1; ngroups = %d\\n",
fprintf(stderr, "getgrouplist() returned \-1; ngroups = %d\en",
ngroups);
exit(EXIT_FAILURE);
}
/* Display list of retrieved groups, along with group names */
fprintf(stderr, "ngroups = %d\\n", ngroups);
fprintf(stderr, "ngroups = %d\en", ngroups);
for (j = 0; j < ngroups; j++) {
printf("%d", groups[j]);
gr = getgrgid(groups[j]);
if (gr != NULL)
printf(" (%s)", gr\->gr_name);
printf("\\n");
printf("\en");
}
exit(EXIT_SUCCESS);

View File

@ -284,7 +284,7 @@ int main(int argc, char *argv[])
/* Display interface name and family (including symbolic
form of the latter for the common families) */
printf("%\-8s %s (%d)\\n",
printf("%\-8s %s (%d)\en",
ifa\->ifa_name,
(family == AF_PACKET) ? "AF_PACKET" :
(family == AF_INET) ? "AF_INET" :
@ -300,17 +300,17 @@ int main(int argc, char *argv[])
host, NI_MAXHOST,
NULL, 0, NI_NUMERICHOST);
if (s != 0) {
printf("getnameinfo() failed: %s\\n", gai_strerror(s));
printf("getnameinfo() failed: %s\en", gai_strerror(s));
exit(EXIT_FAILURE);
}
printf("\\t\\taddress: <%s>\\n", host);
printf("\et\etaddress: <%s>\en", host);
} else if (family == AF_PACKET && ifa\->ifa_data != NULL) {
struct rtnl_link_stats *stats = ifa\->ifa_data;
printf("\\t\\ttx_packets = %10u; rx_packets = %10u\\n"
"\\t\\ttx_bytes = %10u; rx_bytes = %10u\\n",
printf("\et\ettx_packets = %10u; rx_packets = %10u\en"
"\et\ettx_bytes = %10u; rx_bytes = %10u\en",
stats\->tx_packets, stats\->rx_packets,
stats\->tx_bytes, stats\->rx_bytes);
}

View File

@ -115,7 +115,7 @@ On success,
and
.BR getdelim ()
return the number of characters read, including the delimiter character,
but not including the terminating null byte (\(aq\\0\(aq).
but not including the terminating null byte (\(aq\e0\(aq).
This value can be used
to handle embedded null bytes in the line read.
.PP

View File

@ -121,7 +121,7 @@ The calling process has no controlling terminal.
.TP
.B ERANGE
(getlogin_r)
The length of the username, including the terminating null byte (\(aq\\0\(aq),
The length of the username, including the terminating null byte (\(aq\e0\(aq),
is larger than
.IR bufsize .
.PP

View File

@ -427,21 +427,21 @@ main(int argc, char *argv[])
tfnd = 1;
break;
default: /* \(aq?\(aq */
fprintf(stderr, "Usage: %s [\-t nsecs] [\-n] name\\n",
fprintf(stderr, "Usage: %s [\-t nsecs] [\-n] name\en",
argv[0]);
exit(EXIT_FAILURE);
}
}
printf("flags=%d; tfnd=%d; nsecs=%d; optind=%d\\n",
printf("flags=%d; tfnd=%d; nsecs=%d; optind=%d\en",
flags, tfnd, nsecs, optind);
if (optind >= argc) {
fprintf(stderr, "Expected argument after options\\n");
fprintf(stderr, "Expected argument after options\en");
exit(EXIT_FAILURE);
}
printf("name argument = %s\\n", argv[optind]);
printf("name argument = %s\en", argv[optind]);
/* Other code omitted */
@ -487,39 +487,39 @@ main(int argc, char **argv)
printf("option %s", long_options[option_index].name);
if (optarg)
printf(" with arg %s", optarg);
printf("\\n");
printf("\en");
break;
case \(aq0\(aq:
case \(aq1\(aq:
case \(aq2\(aq:
if (digit_optind != 0 && digit_optind != this_option_optind)
printf("digits occur in two different argv\-elements.\\n");
printf("digits occur in two different argv\-elements.\en");
digit_optind = this_option_optind;
printf("option %c\\n", c);
printf("option %c\en", c);
break;
case \(aqa\(aq:
printf("option a\\n");
printf("option a\en");
break;
case \(aqb\(aq:
printf("option b\\n");
printf("option b\en");
break;
case \(aqc\(aq:
printf("option c with value \(aq%s\(aq\\n", optarg);
printf("option c with value \(aq%s\(aq\en", optarg);
break;
case \(aqd\(aq:
printf("option d with value \(aq%s\(aq\\n", optarg);
printf("option d with value \(aq%s\(aq\en", optarg);
break;
case \(aq?\(aq:
break;
default:
printf("?? getopt returned character code 0%o ??\\n", c);
printf("?? getopt returned character code 0%o ??\en", c);
}
}
@ -527,7 +527,7 @@ main(int argc, char **argv)
printf("non\-option ARGV\-elements: ");
while (optind < argc)
printf("%s ", argv[optind++]);
printf("\\n");
printf("\en");
}
exit(EXIT_SUCCESS);

View File

@ -76,7 +76,7 @@ The function
returns a pointer to a static buffer containing (the first
.B PASS_MAX
bytes of) the password without the trailing
newline, terminated by a null byte (\(aq\\0\(aq).
newline, terminated by a null byte (\(aq\e0\(aq).
This buffer may be overwritten by a following call.
On error, the terminal state is restored,
.I errno

View File

@ -200,7 +200,7 @@ main(int argc, char *argv[])
char **p;
if (argc < 2) {
printf("Usage: %s proto\-name [buflen]\\n", argv[0]);
printf("Usage: %s proto\-name [buflen]\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -209,7 +209,7 @@ main(int argc, char *argv[])
buflen = atoi(argv[2]);
if (buflen > MAX_BUF) {
printf("Exceeded buffer limit (%d)\\n", MAX_BUF);
printf("Exceeded buffer limit (%d)\en", MAX_BUF);
exit(EXIT_FAILURE);
}
@ -219,7 +219,7 @@ main(int argc, char *argv[])
buf, buflen, &result);
if (s == ERANGE) {
if (erange_cnt == 0)
printf("ERANGE! Retrying with larger buffer\\n");
printf("ERANGE! Retrying with larger buffer\en");
erange_cnt++;
/* Increment a byte at a time so we can see exactly
@ -228,18 +228,18 @@ main(int argc, char *argv[])
buflen++;
if (buflen > MAX_BUF) {
printf("Exceeded buffer limit (%d)\\n", MAX_BUF);
printf("Exceeded buffer limit (%d)\en", MAX_BUF);
exit(EXIT_FAILURE);
}
}
} while (s == ERANGE);
printf("getprotobyname_r() returned: %s (buflen=%d)\\n",
printf("getprotobyname_r() returned: %s (buflen=%d)\en",
(s == 0) ? "0 (success)" : (s == ENOENT) ? "ENOENT" :
strerror(s), buflen);
if (s != 0 || result == NULL) {
printf("Call failed/record not found\\n");
printf("Call failed/record not found\en");
exit(EXIT_FAILURE);
}
@ -247,7 +247,7 @@ main(int argc, char *argv[])
result_buf.p_name, result_buf.p_proto);
for (p = result_buf.p_aliases; *p != NULL; p++)
printf("%s ", *p);
printf("\\n");
printf("\en");
exit(EXIT_SUCCESS);
}

View File

@ -298,7 +298,7 @@ main(int argc, char *argv[])
int s;
if (argc != 2) {
fprintf(stderr, "Usage: %s username\\n", argv[0]);
fprintf(stderr, "Usage: %s username\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -315,7 +315,7 @@ main(int argc, char *argv[])
s = getpwnam_r(argv[1], &pwd, buf, bufsize, &result);
if (result == NULL) {
if (s == 0)
printf("Not found\\n");
printf("Not found\en");
else {
errno = s;
perror("getpwnam_r");
@ -323,7 +323,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
printf("Name: %s; UID: %ld\\n", pwd.pw_gecos, (long) pwd.pw_uid);
printf("Name: %s; UID: %ld\en", pwd.pw_gecos, (long) pwd.pw_uid);
exit(EXIT_SUCCESS);
}
.EE

View File

@ -198,7 +198,7 @@ main(int argc, char *argv[])
char **p;
if (argc < 3) {
printf("Usage: %s port\-num proto\-name [buflen]\\n", argv[0]);
printf("Usage: %s port\-num proto\-name [buflen]\en", argv[0]);
exit(EXIT_FAILURE);
}
@ -211,7 +211,7 @@ main(int argc, char *argv[])
buflen = atoi(argv[3]);
if (buflen > MAX_BUF) {
printf("Exceeded buffer limit (%d)\\n", MAX_BUF);
printf("Exceeded buffer limit (%d)\en", MAX_BUF);
exit(EXIT_FAILURE);
}
@ -221,7 +221,7 @@ main(int argc, char *argv[])
buf, buflen, &result);
if (s == ERANGE) {
if (erange_cnt == 0)
printf("ERANGE! Retrying with larger buffer\\n");
printf("ERANGE! Retrying with larger buffer\en");
erange_cnt++;
/* Increment a byte at a time so we can see exactly
@ -230,18 +230,18 @@ main(int argc, char *argv[])
buflen++;
if (buflen > MAX_BUF) {
printf("Exceeded buffer limit (%d)\\n", MAX_BUF);
printf("Exceeded buffer limit (%d)\en", MAX_BUF);
exit(EXIT_FAILURE);
}
}
} while (s == ERANGE);
printf("getservbyport_r() returned: %s (buflen=%d)\\n",
printf("getservbyport_r() returned: %s (buflen=%d)\en",
(s == 0) ? "0 (success)" : (s == ENOENT) ? "ENOENT" :
strerror(s), buflen);
if (s != 0 || result == NULL) {
printf("Call failed/record not found\\n");
printf("Call failed/record not found\en");
exit(EXIT_FAILURE);
}
@ -250,7 +250,7 @@ main(int argc, char *argv[])
ntohs(result_buf.s_port));
for (p = result_buf.s_aliases; *p != NULL; p++)
printf("%s ", *p);
printf("\\n");
printf("\en");
exit(EXIT_SUCCESS);
}

View File

@ -107,7 +107,7 @@ When
returns,
.I optionp
points to the next suboption,
or to the null byte (\(aq\\0\(aq) at the end of the
or to the null byte (\(aq\e0\(aq) at the end of the
string if the last suboption was just processed.
.SH RETURN VALUE
If the first suboption in
@ -185,7 +185,7 @@ main(int argc, char **argv)
switch (opt) {
case \(aqo\(aq:
subopts = optarg;
while (*subopts != \(aq\\0\(aq && !errfnd) {
while (*subopts != \(aq\e0\(aq && !errfnd) {
switch (getsubopt(&subopts, token, &value)) {
case RO_OPT:
@ -199,7 +199,7 @@ main(int argc, char **argv)
case NAME_OPT:
if (value == NULL) {
fprintf(stderr, "Missing value for "
"suboption \(aq%s\(aq\\n", token[NAME_OPT]);
"suboption \(aq%s\(aq\en", token[NAME_OPT]);
errfnd = 1;
continue;
}
@ -209,14 +209,14 @@ main(int argc, char **argv)
default:
fprintf(stderr, "No match found "
"for token: /%s/\\n", value);
"for token: /%s/\en", value);
errfnd = 1;
break;
}
}
if (readwrite && readonly) {
fprintf(stderr, "Only one of \(aq%s\(aq and \(aq%s\(aq can be "
"specified\\n", token[RO_OPT], token[RW_OPT]);
"specified\en", token[RO_OPT], token[RW_OPT]);
errfnd = 1;
}
break;
@ -227,9 +227,9 @@ main(int argc, char **argv)
}
if (errfnd || argc == 1) {
fprintf(stderr, "\\nUsage: %s \-o <suboptstring>\\n", argv[0]);
fprintf(stderr, "\enUsage: %s \-o <suboptstring>\en", argv[0]);
fprintf(stderr, "suboptions are \(aqro\(aq, \(aqrw\(aq, "
"and \(aqname=<value>\(aq\\n");
"and \(aqname=<value>\(aq\en");
exit(EXIT_FAILURE);
}

View File

@ -128,7 +128,7 @@ Do not set this flag on the first invocation of
.BR glob ().
.TP
.B GLOB_NOESCAPE
Don't allow backslash (\(aq\\\(aq) to be used as an escape
Don't allow backslash (\(aq\e\(aq) to be used as an escape
character.
Normally, a backslash can be used to quote the following character,
providing a mechanism to turn off the special meaning

View File

@ -81,8 +81,8 @@ GNU libc release: stable
int
main(int argc, char *argv[])
{
printf("GNU libc version: %s\\n", gnu_get_libc_version());
printf("GNU libc release: %s\\n", gnu_get_libc_release());
printf("GNU libc version: %s\en", gnu_get_libc_version());
printf("GNU libc release: %s\en", gnu_get_libc_release());
exit(EXIT_SUCCESS);
}
.EE

View File

@ -330,7 +330,7 @@ main(void)
ep = hsearch(e, ENTER);
/* there should be no failures */
if (ep == NULL) {
fprintf(stderr, "entry failed\\n");
fprintf(stderr, "entry failed\en");
exit(EXIT_FAILURE);
}
}
@ -340,7 +340,7 @@ main(void)
show that two are not in the table */
e.key = data[i];
ep = hsearch(e, FIND);
printf("%9.9s \-> %9.9s:%d\\n", e.key,
printf("%9.9s \-> %9.9s:%d\en", e.key,
ep ? ep\->key : "NULL", ep ? (int)(ep\->data) : 0);
}
hdestroy();

Some files were not shown because too many files have changed in this diff Show More