From d1a719857b7eb68f5e5c1c965089038dee683240 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 27 Feb 2019 12:57:17 +0100 Subject: [PATCH] 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- man1/locale.1 | 2 +- man1/memusage.1 | 6 +-- man1/pldd.1 | 2 +- man2/_syscall.2 | 10 ++--- man2/add_key.2 | 4 +- man2/bind.2 | 2 +- man2/bpf.2 | 4 +- man2/chown.2 | 6 +-- man2/clone.2 | 12 ++--- man2/copy_file_range.2 | 2 +- man2/eventfd.2 | 12 ++--- man2/execve.2 | 4 +- man2/futex.2 | 14 +++--- man2/getdents.2 | 8 ++-- man2/getrlimit.2 | 8 ++-- man2/ioctl_fat.2 | 18 ++++---- man2/ioctl_ns.2 | 20 ++++----- man2/kcmp.2 | 16 +++---- man2/kexec_load.2 | 4 +- man2/keyctl.2 | 48 ++++++++++---------- man2/listxattr.2 | 12 ++--- man2/lseek.2 | 2 +- man2/membarrier.2 | 2 +- man2/memfd_create.2 | 24 +++++----- man2/mmap.2 | 6 +-- man2/mprotect.2 | 8 ++-- man2/msgop.2 | 24 +++++----- man2/open_by_handle_at.2 | 26 +++++------ man2/perf_event_open.2 | 6 +-- man2/pipe.2 | 4 +- man2/readdir.2 | 2 +- man2/readlink.2 | 6 +-- man2/readv.2 | 2 +- man2/recvmmsg.2 | 2 +- man2/request_key.2 | 6 +-- man2/sched_setaffinity.2 | 4 +- man2/seccomp.2 | 10 ++--- man2/select.2 | 4 +- man2/select_tut.2 | 34 +++++++-------- man2/sendmmsg.2 | 2 +- man2/setns.2 | 4 +- man2/signalfd.2 | 10 ++--- man2/spu_run.2 | 4 +- man2/stat.2 | 34 +++++++-------- man2/sysctl.2 | 2 +- man2/tee.2 | 2 +- man2/timer_create.2 | 20 ++++----- man2/timerfd_create.2 | 8 ++-- man2/truncate.2 | 2 +- man2/uname.2 | 2 +- man2/unshare.2 | 18 ++++---- man2/userfaultfd.2 | 20 ++++----- man2/ustat.2 | 2 +- man2/wait.2 | 10 ++--- man3/CPU_SET.3 | 4 +- man3/__ppc_get_timebase.3 | 4 +- man3/argz_add.3 | 6 +-- man3/asprintf.3 | 2 +- man3/backtrace.3 | 6 +-- man3/basename.3 | 2 +- man3/bswap.3 | 4 +- man3/bzero.3 | 2 +- man3/cacos.3 | 6 +-- man3/cacosh.3 | 6 +-- man3/catan.3 | 6 +-- man3/catanh.3 | 6 +-- man3/catgets.3 | 2 +- man3/clock_getcpuclockid.3 | 4 +- man3/confstr.3 | 2 +- man3/ctime.3 | 2 +- man3/dl_iterate_phdr.3 | 6 +-- man3/dlinfo.3 | 12 ++--- man3/duplocale.3 | 6 +-- man3/encrypt.3 | 14 +++--- man3/end.3 | 8 ++-- man3/endian.3 | 6 +-- man3/fgetws.3 | 2 +- man3/fmemopen.3 | 10 ++--- man3/fopencookie.3 | 4 +- man3/fputws.3 | 2 +- man3/frexp.3 | 2 +- man3/ftw.3 | 2 +- man3/get_nprocs_conf.3 | 2 +- man3/get_phys_pages.3 | 2 +- man3/getaddrinfo.3 | 24 +++++----- man3/getaddrinfo_a.3 | 24 +++++----- man3/getdate.3 | 22 +++++----- man3/getgrouplist.3 | 8 ++-- man3/getifaddrs.3 | 10 ++--- man3/getline.3 | 2 +- man3/getlogin.3 | 2 +- man3/getopt.3 | 26 +++++------ man3/getpass.3 | 2 +- man3/getprotoent_r.3 | 14 +++--- man3/getpwnam.3 | 6 +-- man3/getservent_r.3 | 14 +++--- man3/getsubopt.3 | 14 +++--- man3/glob.3 | 2 +- man3/gnu_get_libc_version.3 | 4 +- man3/hsearch.3 | 4 +- man3/if_nameindex.3 | 2 +- man3/index.3 | 2 +- man3/inet.3 | 6 +-- man3/inet_net_pton.3 | 10 ++--- man3/inet_pton.3 | 4 +- man3/insque.3 | 10 ++--- man3/iswblank.3 | 2 +- man3/iswspace.3 | 2 +- man3/makecontext.3 | 18 ++++---- man3/mallinfo.3 | 30 ++++++------- man3/malloc_hook.3 | 2 +- man3/malloc_info.3 | 8 ++-- man3/mallopt.3 | 4 +- man3/matherr.3 | 10 ++--- man3/mbrtowc.3 | 8 ++-- man3/mbsnrtowcs.3 | 4 +- man3/mbsrtowcs.3 | 4 +- man3/mbstowcs.3 | 18 ++++---- man3/mbtowc.3 | 2 +- man3/mcheck.3 | 6 +-- man3/memchr.3 | 2 +- man3/mq_getattr.3 | 8 ++-- man3/mq_notify.3 | 6 +-- man3/newlocale.3 | 8 ++-- man3/nl_langinfo.3 | 4 +- man3/offsetof.3 | 4 +- man3/perror.3 | 2 +- man3/posix_spawn.3 | 16 +++---- man3/printf.3 | 4 +- man3/pthread_attr_init.3 | 24 +++++----- man3/pthread_cancel.3 | 14 +++--- man3/pthread_cleanup_push.3 | 14 +++--- man3/pthread_create.3 | 12 ++--- man3/pthread_getattr_default_np.3 | 16 +++---- man3/pthread_getattr_np.3 | 28 ++++++------ man3/pthread_getcpuclockid.3 | 12 ++--- man3/pthread_mutexattr_setrobust.3 | 18 ++++---- man3/pthread_setaffinity_np.3 | 6 +-- man3/pthread_setname_np.3 | 12 ++--- man3/pthread_setschedparam.3 | 52 +++++++++++----------- man3/pthread_sigmask.3 | 4 +- man3/qsort.3 | 2 +- man3/rand.3 | 4 +- man3/readdir.3 | 2 +- man3/regex.3 | 2 +- man3/rpmatch.3 | 4 +- man3/rtime.3 | 2 +- man3/scanf.3 | 8 ++-- man3/sem_wait.3 | 14 +++--- man3/setaliasent.3 | 2 +- man3/setbuf.3 | 2 +- man3/stpcpy.3 | 4 +- man3/stpncpy.3 | 4 +- man3/strcat.3 | 10 ++--- man3/strchr.3 | 2 +- man3/strcpy.3 | 8 ++-- man3/strdup.3 | 2 +- man3/strerror.3 | 2 +- man3/strfromd.3 | 2 +- man3/strftime.3 | 2 +- man3/strlen.3 | 2 +- man3/strnlen.3 | 4 +- man3/strsep.3 | 2 +- man3/strstr.3 | 2 +- man3/strtok.3 | 8 ++-- man3/strtol.3 | 14 +++--- man3/strtoul.3 | 4 +- man3/strverscmp.3 | 4 +- man3/strxfrm.3 | 2 +- man3/termios.3 | 20 ++++----- man3/tsearch.3 | 6 +-- man3/wcpcpy.3 | 2 +- man3/wcpncpy.3 | 6 +-- man3/wcrtomb.3 | 8 ++-- man3/wcscat.3 | 2 +- man3/wcscpy.3 | 2 +- man3/wcslen.3 | 2 +- man3/wcsncat.3 | 2 +- man3/wcsncmp.3 | 2 +- man3/wcsncpy.3 | 2 +- man3/wcsnlen.3 | 2 +- man3/wcsnrtombs.3 | 4 +- man3/wcsrtombs.3 | 4 +- man3/wcsstr.3 | 2 +- man3/wcstok.3 | 6 +-- man3/wcstombs.3 | 4 +- man3/wcwidth.3 | 2 +- man3/wprintf.3 | 6 +-- man4/console_codes.4 | 12 ++--- man4/dsp56k.4 | 2 +- man4/full.4 | 2 +- man4/initrd.4 | 2 +- man4/loop.4 | 6 +-- man4/vcs.4 | 2 +- man5/charmap.5 | 2 +- man5/core.5 | 6 +-- man5/elf.5 | 2 +- man5/locale.5 | 2 +- man5/proc.5 | 12 ++--- man5/repertoiremap.5 | 2 +- man5/sysfs.5 | 2 +- man5/termcap.5 | 4 +- man7/aio.7 | 30 ++++++------- man7/cgroups.7 | 2 +- man7/charsets.7 | 2 +- man7/complex.7 | 2 +- man7/fanotify.7 | 16 +++---- man7/feature_test_macros.7 | 32 +++++++------- man7/inotify.7 | 18 ++++---- man7/locale.7 | 2 +- man7/man-pages.7 | 12 ++--- man7/man.7 | 4 +- man7/pkeys.7 | 10 ++--- man7/pthreads.7 | 4 +- man7/rtld-audit.7 | 22 +++++----- man7/sock_diag.7 | 14 +++--- man7/unix.7 | 8 ++-- man7/user_namespaces.7 | 70 +++++++++++++++--------------- man7/utf-8.7 | 8 ++-- 219 files changed, 891 insertions(+), 891 deletions(-) diff --git a/man1/locale.1 b/man1/locale.1 index 76f432703..e344e605d 100644 --- a/man1/locale.1 +++ b/man1/locale.1 @@ -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 diff --git a/man1/memusage.1 b/man1/memusage.1 index 44c676f93..701e804cf 100644 --- a/man1/memusage.1 +++ b/man1/memusage.1 @@ -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)); } diff --git a/man1/pldd.1 b/man1/pldd.1 index 6957c8d60..321c5356f 100644 --- a/man1/pldd.1 +++ b/man1/pldd.1 @@ -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 diff --git a/man2/_syscall.2 b/man2/_syscall.2 index 7c11eb409..fe079d825 100644 --- a/man2/_syscall.2 +++ b/man2/_syscall.2 @@ -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, diff --git a/man2/add_key.2 b/man2/add_key.2 index e52c585f4..241ba99c9 100644 --- a/man2/add_key.2 +++ b/man2/add_key.2 @@ -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); } diff --git a/man2/bind.2 b/man2/bind.2 index ea8bf492f..55075f108 100644 --- a/man2/bind.2 +++ b/man2/bind.2 @@ -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 diff --git a/man2/bpf.2 b/man2/bpf.2 index 5b2d3dae6..3382ec993 100644 --- a/man2/bpf.2 +++ b/man2/bpf.2 @@ -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); } diff --git a/man2/chown.2 b/man2/chown.2 index 50db789ac..bd3dd3dce 100644 --- a/man2/chown.2 +++ b/man2/chown.2 @@ -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 \\n", argv[0]); + if (argc != 3 || argv[1][0] == \(aq\e0\(aq) { + fprintf(stderr, "%s \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"); diff --git a/man2/clone.2 b/man2/clone.2 index 7c55d897d..ec23742db 100644 --- a/man2/clone.2 +++ b/man2/clone.2 @@ -1314,7 +1314,7 @@ For an example of the use of this program, see #include #include -#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 \\n", argv[0]); + fprintf(stderr, "Usage: %s \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); } diff --git a/man2/copy_file_range.2 b/man2/copy_file_range.2 index 9bb1813ee..80b810988 100644 --- a/man2/copy_file_range.2 +++ b/man2/copy_file_range.2 @@ -193,7 +193,7 @@ main(int argc, char **argv) loff_t len, ret; if (argc != 3) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \en", argv[0]); exit(EXIT_FAILURE); } diff --git a/man2/eventfd.2 b/man2/eventfd.2 index 185778ab7..8366114f0 100644 --- a/man2/eventfd.2 +++ b/man2/eventfd.2 @@ -391,7 +391,7 @@ Parent read 28 (0x1c) from efd #include #include /* 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 ...\\n", argv[0]); + fprintf(stderr, "Usage: %s ...\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); diff --git a/man2/execve.2 b/man2/execve.2 index 788e62d03..a052f34b0 100644 --- a/man2/execve.2 +++ b/man2/execve.2 @@ -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 \\n", argv[0]); + fprintf(stderr, "Usage: %s \en", argv[0]); exit(EXIT_FAILURE); } diff --git a/man2/futex.2 b/man2/futex.2 index ea5931c26..410dfe61a 100644 --- a/man2/futex.2 +++ b/man2/futex.2 @@ -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 #include -#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); } diff --git a/man2/getdents.2 b/man2/getdents.2 index 30bbf9a74..249145a6d 100644 --- a/man2/getdents.2 +++ b/man2/getdents.2 @@ -250,7 +250,7 @@ inode# file type d_reclen d_off d_name #include #include -#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; } diff --git a/man2/getrlimit.2 b/man2/getrlimit.2 index de374f514..5cf1d3388 100644 --- a/man2/getrlimit.2 +++ b/man2/getrlimit.2 @@ -789,7 +789,7 @@ The program below demonstrates the use of #include #include -#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 [ " - "]\\n", argv[0]); + "]\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); diff --git a/man2/ioctl_fat.2 b/man2/ioctl_fat.2 index e1970b2ad..3ff6028d0 100644 --- a/man2/ioctl_fat.2 +++ b/man2/ioctl_fat.2 @@ -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) { diff --git a/man2/ioctl_ns.2 b/man2/ioctl_ns.2 index 52fa4614f..387c5f4ec 100644 --- a/man2/ioctl_ns.2 +++ b/man2/ioctl_ns.2 @@ -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); diff --git a/man2/kcmp.2 b/man2/kcmp.2 index bf454bdfa..ac9a49905 100644 --- a/man2/kcmp.2 +++ b/man2/kcmp.2 @@ -358,7 +358,7 @@ Child duplicated FD 3 to create FD 5 #include #include -#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); diff --git a/man2/kexec_load.2 b/man2/kexec_load.2 index cad903199..35e7cefd5 100644 --- a/man2/kexec_load.2 +++ b/man2/kexec_load.2 @@ -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 diff --git a/man2/keyctl.2 b/man2/keyctl.2 index e8cd59b98..a12c77da0 100644 --- a/man2/keyctl.2 +++ b/man2/keyctl.2 @@ -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); } diff --git a/man2/listxattr.2 b/man2/listxattr.2 index a38279909..b1eeff7b4 100644 --- a/man2/listxattr.2 +++ b/man2/listxattr.2 @@ -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(""); - printf("\\n"); + printf("\en"); /* * Forward to next attribute key. diff --git a/man2/lseek.2 b/man2/lseek.2 index 5a28a7b49..2299e5e70 100644 --- a/man2/lseek.2 +++ b/man2/lseek.2 @@ -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 diff --git a/man2/membarrier.2 b/man2/membarrier.2 index 41d7a303a..f67867c65 100644 --- a/man2/membarrier.2 +++ b/man2/membarrier.2 @@ -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; } diff --git a/man2/memfd_create.2 b/man2/memfd_create.2 index 3cd392d1b..0aeffc40f 100644 --- a/man2/memfd_create.2 +++ b/man2/memfd_create.2 @@ -406,7 +406,7 @@ Existing seals: WRITE SHRINK #include #include -#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 #include -#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 */ diff --git a/man2/mmap.2 b/man2/mmap.2 index dbcae59be..f2643583c 100644 --- a/man2/mmap.2 +++ b/man2/mmap.2 @@ -914,7 +914,7 @@ to output the desired bytes. #include #include -#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); } diff --git a/man2/mprotect.2 b/man2/mprotect.2 index b715bf532..d566ae365 100644 --- a/man2/mprotect.2 +++ b/man2/mprotect.2 @@ -309,7 +309,7 @@ Got SIGSEGV at address: 0x804e000 #include #include -#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 diff --git a/man2/msgop.2 b/man2/msgop.2 index d89c49bb2..f56082ca3 100644 --- a/man2/msgop.2 +++ b/man2/msgop.2 @@ -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); diff --git a/man2/open_by_handle_at.2 b/man2/open_by_handle_at.2 index 877e7bea4..4070a1a8e 100644 --- a/man2/open_by_handle_at.2 +++ b/man2/open_by_handle_at.2 @@ -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 #include -#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 #include -#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); } diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2 index 8d5e206d4..a4a128bfd 100644 --- a/man2/perf_event_open.2 +++ b/man2/perf_event_open.2 @@ -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); } diff --git a/man2/pipe.2 b/man2/pipe.2 index d265a8d8e..bef48c6d8 100644 --- a/man2/pipe.2 +++ b/man2/pipe.2 @@ -247,7 +247,7 @@ main(int argc, char *argv[]) char buf; if (argc != 2) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \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); diff --git a/man2/readdir.2 b/man2/readdir.2 index 77c0c65be..41e200d28 100644 --- a/man2/readdir.2 +++ b/man2/readdir.2 @@ -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 diff --git a/man2/readlink.2 b/man2/readlink.2 index e5a934ced..f1598adf4 100644 --- a/man2/readlink.2 +++ b/man2/readlink.2 @@ -299,7 +299,7 @@ main(int argc, char *argv[]) ssize_t nbytes, bufsiz; if (argc != 2) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \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); diff --git a/man2/readv.2 b/man2/readv.2 index 2d7300750..af27aa63e 100644 --- a/man2/readv.2 +++ b/man2/readv.2 @@ -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; diff --git a/man2/recvmmsg.2 b/man2/recvmmsg.2 index 4aee1dc11..29843bd6e 100644 --- a/man2/recvmmsg.2 +++ b/man2/recvmmsg.2 @@ -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]); diff --git a/man2/request_key.2 b/man2/request_key.2 index 2487ba648..48222b2e0 100644 --- a/man2/request_key.2 +++ b/man2/request_key.2 @@ -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); } diff --git a/man2/sched_setaffinity.2 b/man2/sched_setaffinity.2 index a63f417a6..fa00253df 100644 --- a/man2/sched_setaffinity.2 +++ b/man2/sched_setaffinity.2 @@ -353,7 +353,7 @@ sys 12.07 #include #include -#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); } diff --git a/man2/seccomp.2 b/man2/seccomp.2 index 035532b8b..136daaa29 100644 --- a/man2/seccomp.2 +++ b/man2/seccomp.2 @@ -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 []\\n" - "Hint for : AUDIT_ARCH_I386: 0x%X\\n" - " AUDIT_ARCH_X86_64: 0x%X\\n" - "\\n", argv[0], AUDIT_ARCH_I386, AUDIT_ARCH_X86_64); + "%s []\en" + "Hint for : 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); } diff --git a/man2/select.2 b/man2/select.2 index 1c83187ed..e2d284fd4 100644 --- a/man2/select.2 +++ b/man2/select.2 @@ -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); } diff --git a/man2/select_tut.2 b/man2/select_tut.2 index 59e7e3b3d..5f669b2fd 100644 --- a/man2/select_tut.2 +++ b/man2/select_tut.2 @@ -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 " - " \\n"); + fprintf(stderr, "Usage\en\etfwd " + " \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. */ diff --git a/man2/sendmmsg.2 b/man2/sendmmsg.2 index 1332ff2cb..70df6bdec 100644 --- a/man2/sendmmsg.2 +++ b/man2/sendmmsg.2 @@ -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); } diff --git a/man2/setns.2 b/man2/setns.2 index 0b7fae55f..f5eb1f744 100644 --- a/man2/setns.2 +++ b/man2/setns.2 @@ -308,7 +308,7 @@ bizarro #include #include -#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); } diff --git a/man2/signalfd.2 b/man2/signalfd.2 index 87a975cc2..02f6af648 100644 --- a/man2/signalfd.2 +++ b/man2/signalfd.2 @@ -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 #include -#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"); } } } diff --git a/man2/spu_run.2 b/man2/spu_run.2 index 0c6cbddf2..0434a7572 100644 --- a/man2/spu_run.2 +++ b/man2/spu_run.2 @@ -218,7 +218,7 @@ system call. #include #include -#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); } diff --git a/man2/stat.2 b/man2/stat.2 index 4fb459a8e..db2c12d16 100644 --- a/man2/stat.2 +++ b/man2/stat.2 @@ -655,7 +655,7 @@ main(int argc, char *argv[]) struct stat sb; if (argc != 2) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \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)); diff --git a/man2/sysctl.2 b/man2/sysctl.2 index 82b9f1507..2d58ddc91 100644 --- a/man2/sysctl.2 +++ b/man2/sysctl.2 @@ -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 diff --git a/man2/tee.2 b/man2/tee.2 index 55953c0e8..513bd288c 100644 --- a/man2/tee.2 +++ b/man2/tee.2 @@ -165,7 +165,7 @@ main(int argc, char *argv[]) int len, slen; if (argc != 2) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \en", argv[0]); exit(EXIT_FAILURE); } diff --git a/man2/timer_create.2 b/man2/timer_create.2 index cbcc2b140..d0aafed61 100644 --- a/man2/timer_create.2 +++ b/man2/timer_create.2 @@ -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 \\n", + fprintf(stderr, "Usage: %s \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"); diff --git a/man2/timerfd_create.2 b/man2/timerfd_create.2 index 8a165486d..cbfa1385b 100644 --- a/man2/timerfd_create.2 +++ b/man2/timerfd_create.2 @@ -549,7 +549,7 @@ a.out 3 1 100 #include #include /* 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); } diff --git a/man2/truncate.2 b/man2/truncate.2 index 0e6a7ab19..147631f4b 100644 --- a/man2/truncate.2 +++ b/man2/truncate.2 @@ -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 diff --git a/man2/uname.2 b/man2/uname.2 index 1013dde0a..14e80550c 100644 --- a/man2/uname.2 +++ b/man2/uname.2 @@ -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 diff --git a/man2/unshare.2 b/man2/unshare.2 index bccc964d4..a97fe02ff 100644 --- a/man2/unshare.2 +++ b/man2/unshare.2 @@ -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); } diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index e1a8343b3..d36d7d40a 100644 --- a/man2/userfaultfd.2 +++ b/man2/userfaultfd.2 @@ -574,7 +574,7 @@ Read address 0x7fd30106ec0f in main(): C #include #include -#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 */ } diff --git a/man2/ustat.2 b/man2/ustat.2 index de17e2327..47cb05489 100644 --- a/man2/ustat.2 +++ b/man2/ustat.2 @@ -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 diff --git a/man2/wait.2 b/man2/wait.2 index 08da2d0ff..2280227b9 100644 --- a/man2/wait.2 +++ b/man2/wait.2 @@ -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); diff --git a/man3/CPU_SET.3 b/man3/CPU_SET.3 index bc93e96ed..d9a6bb0d3 100644 --- a/man3/CPU_SET.3 +++ b/man3/CPU_SET.3 @@ -332,7 +332,7 @@ main(int argc, char *argv[]) int num_cpus, cpu; if (argc < 2) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \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); diff --git a/man3/__ppc_get_timebase.3 b/man3/__ppc_get_timebase.3 index 4d927c3ae..a476ed00c 100644 --- a/man3/__ppc_get_timebase.3 +++ b/man3/__ppc_get_timebase.3 @@ -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); diff --git a/man3/argz_add.3 b/man3/argz_add.3 index 023d80b3e..a1898a015 100644 --- a/man3/argz_add.3 +++ b/man3/argz_add.3 @@ -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 diff --git a/man3/asprintf.3 b/man3/asprintf.3 index d2aaf3ccc..83026feb9 100644 --- a/man3/asprintf.3 +++ b/man3/asprintf.3 @@ -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) diff --git a/man3/backtrace.3 b/man3/backtrace.3 index 9079f32c1..f303e9a6d 100644 --- a/man3/backtrace.3 +++ b/man3/backtrace.3 @@ -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); } diff --git a/man3/basename.3 b/man3/basename.3 index d7f2eedb3..3f918d865 100644 --- a/man3/basename.3 +++ b/man3/basename.3 @@ -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 diff --git a/man3/bswap.3 b/man3/bswap.3 index b5c08800c..f73550bd2 100644 --- a/man3/bswap.3 +++ b/man3/bswap.3 @@ -68,12 +68,12 @@ main(int argc, char *argv[]) uint64_t x; if (argc != 2) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \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); } diff --git a/man3/bzero.3 b/man3/bzero.3 index c57c53d6c..d4393be6a 100644 --- a/man3/bzero.3 +++ b/man3/bzero.3 @@ -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 () diff --git a/man3/cacos.3 b/man3/cacos.3 index 21d39e6d5..e5a63419b 100644 --- a/man3/cacos.3 +++ b/man3/cacos.3 @@ -65,7 +65,7 @@ main(int argc, char *argv[]) double complex i = I; if (argc != 3) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \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); } diff --git a/man3/cacosh.3 b/man3/cacosh.3 index 675d488e1..c7c747b5c 100644 --- a/man3/cacosh.3 +++ b/man3/cacosh.3 @@ -67,17 +67,17 @@ main(int argc, char *argv[]) double complex z, c, f; if (argc != 3) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \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); } diff --git a/man3/catan.3 b/man3/catan.3 index 868ba96dd..e8c83be5a 100644 --- a/man3/catan.3 +++ b/man3/catan.3 @@ -63,17 +63,17 @@ main(int argc, char *argv[]) double complex i = I; if (argc != 3) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \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); } diff --git a/man3/catanh.3 b/man3/catanh.3 index ff9a2434b..ce8468bbf 100644 --- a/man3/catanh.3 +++ b/man3/catanh.3 @@ -64,17 +64,17 @@ main(int argc, char *argv[]) double complex z, c, f; if (argc != 3) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \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); } diff --git a/man3/catgets.3 b/man3/catgets.3 index 3f1f86c6e..e4165f69a 100644 --- a/man3/catgets.3 +++ b/man3/catgets.3 @@ -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, diff --git a/man3/clock_getcpuclockid.3 b/man3/clock_getcpuclockid.3 index d4ca27ef7..d908d11cf 100644 --- a/man3/clock_getcpuclockid.3 +++ b/man3/clock_getcpuclockid.3 @@ -139,7 +139,7 @@ main(int argc, char *argv[]) struct timespec ts; if (argc != 2) { - fprintf(stderr, "%s \\n", argv[0]); + fprintf(stderr, "%s \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); } diff --git a/man3/confstr.3 b/man3/confstr.3 index 77b1e723d..af7663a82 100644 --- a/man3/confstr.3 +++ b/man3/confstr.3 @@ -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 diff --git a/man3/ctime.3 b/man3/ctime.3 index d317fd398..7323b9c73 100644 --- a/man3/ctime.3 +++ b/man3/ctime.3 @@ -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 diff --git a/man3/dl_iterate_phdr.3 b/man3/dl_iterate_phdr.3 index 9989573c9..b547e87aa 100644 --- a/man3/dl_iterate_phdr.3 +++ b/man3/dl_iterate_phdr.3 @@ -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; diff --git a/man3/dlinfo.3 b/man3/dlinfo.3 index 70d914989..65feefc1c 100644 --- a/man3/dlinfo.3 +++ b/man3/dlinfo.3 @@ -276,7 +276,7 @@ main(int argc, char *argv[]) int j; if (argc != 2) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \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); diff --git a/man3/duplocale.3 b/man3/duplocale.3 index 5741c4802..6d8aab962 100644 --- a/man3/duplocale.3 +++ b/man3/duplocale.3 @@ -142,7 +142,7 @@ ABC #include #include -#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); diff --git a/man3/encrypt.3 b/man3/encrypt.3 index 7ef6256e6..fb7f87e2f 100644 --- a/man3/encrypt.3 +++ b/man3/encrypt.3 @@ -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 diff --git a/man3/end.3 b/man3/end.3 index 83677bec2..7beae8938 100644 --- a/man3/end.3 +++ b/man3/end.3 @@ -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); } diff --git a/man3/endian.3 b/man3/endian.3 index 835e5c321..27bf23304 100644 --- a/man3/endian.3 +++ b/man3/endian.3 @@ -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); } diff --git a/man3/fgetws.3 b/man3/fgetws.3 index 10949df63..20c8927c7 100644 --- a/man3/fgetws.3 +++ b/man3/fgetws.3 @@ -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. diff --git a/man3/fmemopen.3 b/man3/fmemopen.3 index e77d9b530..0f51c7f62 100644 --- a/man3/fmemopen.3 +++ b/man3/fmemopen.3 @@ -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 #include -#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...\(aq\\n", argv[0]); + fprintf(stderr, "Usage: %s \(aq...\(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); diff --git a/man3/fopencookie.3 b/man3/fopencookie.3 index 40dee961d..f18306bea 100644 --- a/man3/fopencookie.3 +++ b/man3/fopencookie.3 @@ -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); diff --git a/man3/fputws.3 b/man3/fputws.3 index bda5d2fbf..96578154d 100644 --- a/man3/fputws.3 +++ b/man3/fputws.3 @@ -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). diff --git a/man3/frexp.3 b/man3/frexp.3 index 5d33712e0..387ab9afd 100644 --- a/man3/frexp.3 +++ b/man3/frexp.3 @@ -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); } diff --git a/man3/ftw.3 b/man3/ftw.3 index d4dc41fb9..8769f97b7 100644 --- a/man3/ftw.3 +++ b/man3/ftw.3 @@ -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 */ diff --git a/man3/get_nprocs_conf.3 b/man3/get_nprocs_conf.3 index 28329b4d1..dcf72e362 100644 --- a/man3/get_nprocs_conf.3 +++ b/man3/get_nprocs_conf.3 @@ -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); } diff --git a/man3/get_phys_pages.3 b/man3/get_phys_pages.3 index 7819494d7..1c924b0c4 100644 --- a/man3/get_phys_pages.3 +++ b/man3/get_phys_pages.3 @@ -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); } diff --git a/man3/getaddrinfo.3 b/man3/getaddrinfo.3 index 95262c173..d8758672f 100644 --- a/man3/getaddrinfo.3 +++ b/man3/getaddrinfo.3 @@ -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); diff --git a/man3/getaddrinfo_a.3 b/man3/getaddrinfo_a.3 index 1a9d36f07..9971da808 100644 --- a/man3/getaddrinfo_a.3 +++ b/man3/getaddrinfo_a.3 @@ -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; } } diff --git a/man3/getdate.3 b/man3/getdate.3 index c9d23b240..d19e9f73d 100644 --- a/man3/getdate.3 +++ b/man3/getdate.3 @@ -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); diff --git a/man3/getgrouplist.3 b/man3/getgrouplist.3 index 2f75f9b84..2cad79d57 100644 --- a/man3/getgrouplist.3 +++ b/man3/getgrouplist.3 @@ -159,7 +159,7 @@ main(int argc, char *argv[]) struct group *gr; if (argc != 3) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \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); diff --git a/man3/getifaddrs.3 b/man3/getifaddrs.3 index cdd52f3fc..03bd0de17 100644 --- a/man3/getifaddrs.3 +++ b/man3/getifaddrs.3 @@ -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); } diff --git a/man3/getline.3 b/man3/getline.3 index d7bf733c2..723044cd2 100644 --- a/man3/getline.3 +++ b/man3/getline.3 @@ -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 diff --git a/man3/getlogin.3 b/man3/getlogin.3 index f1d93394d..8a40cccb1 100644 --- a/man3/getlogin.3 +++ b/man3/getlogin.3 @@ -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 diff --git a/man3/getopt.3 b/man3/getopt.3 index 2f1c70ef9..d3b021cee 100644 --- a/man3/getopt.3 +++ b/man3/getopt.3 @@ -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); diff --git a/man3/getpass.3 b/man3/getpass.3 index 7d023df83..33dd57214 100644 --- a/man3/getpass.3 +++ b/man3/getpass.3 @@ -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 diff --git a/man3/getprotoent_r.3 b/man3/getprotoent_r.3 index 53a105875..c2d216417 100644 --- a/man3/getprotoent_r.3 +++ b/man3/getprotoent_r.3 @@ -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); } diff --git a/man3/getpwnam.3 b/man3/getpwnam.3 index 2f1db3f0c..4a506456f 100644 --- a/man3/getpwnam.3 +++ b/man3/getpwnam.3 @@ -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 diff --git a/man3/getservent_r.3 b/man3/getservent_r.3 index 2b68594aa..2b9a975c4 100644 --- a/man3/getservent_r.3 +++ b/man3/getservent_r.3 @@ -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); } diff --git a/man3/getsubopt.3 b/man3/getsubopt.3 index 0d431b147..74bd04f02 100644 --- a/man3/getsubopt.3 +++ b/man3/getsubopt.3 @@ -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 \\n", argv[0]); + fprintf(stderr, "\enUsage: %s \-o \en", argv[0]); fprintf(stderr, "suboptions are \(aqro\(aq, \(aqrw\(aq, " - "and \(aqname=\(aq\\n"); + "and \(aqname=\(aq\en"); exit(EXIT_FAILURE); } diff --git a/man3/glob.3 b/man3/glob.3 index d55f55e4c..ac504e10f 100644 --- a/man3/glob.3 +++ b/man3/glob.3 @@ -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 diff --git a/man3/gnu_get_libc_version.3 b/man3/gnu_get_libc_version.3 index 0c5030fff..da3ac424e 100644 --- a/man3/gnu_get_libc_version.3 +++ b/man3/gnu_get_libc_version.3 @@ -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 diff --git a/man3/hsearch.3 b/man3/hsearch.3 index 8985e6b88..0c2f74548 100644 --- a/man3/hsearch.3 +++ b/man3/hsearch.3 @@ -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(); diff --git a/man3/if_nameindex.3 b/man3/if_nameindex.3 index 196c49558..66c0735ce 100644 --- a/man3/if_nameindex.3 +++ b/man3/if_nameindex.3 @@ -152,7 +152,7 @@ main(int argc, char *argv[]) } for (i = if_ni; ! (i\->if_index == 0 && i\->if_name == NULL); i++) - printf("%u: %s\\n", i\->if_index, i\->if_name); + printf("%u: %s\en", i\->if_index, i\->if_name); if_freenameindex(if_ni); diff --git a/man3/index.3 b/man3/index.3 index 7ab8dc053..307ea046c 100644 --- a/man3/index.3 +++ b/man3/index.3 @@ -50,7 +50,7 @@ The function returns a pointer to the last occurrence of the character \fIc\fP in the string \fIs\fP. .PP -The terminating null byte (\(aq\\0\(aq) is considered to be a part of the +The terminating null byte (\(aq\e0\(aq) is considered to be a part of the strings. .SH RETURN VALUE The diff --git a/man3/inet.3 b/man3/inet.3 index 695cb3219..a5397a250 100644 --- a/man3/inet.3 +++ b/man3/inet.3 @@ -315,16 +315,16 @@ main(int argc, char *argv[]) struct in_addr addr; if (argc != 2) { - fprintf(stderr, "%s \\n", argv[0]); + fprintf(stderr, "%s \en", argv[0]); exit(EXIT_FAILURE); } if (inet_aton(argv[1], &addr) == 0) { - fprintf(stderr, "Invalid address\\n"); + fprintf(stderr, "Invalid address\en"); exit(EXIT_FAILURE); } - printf("%s\\n", inet_ntoa(addr)); + printf("%s\en", inet_ntoa(addr)); exit(EXIT_SUCCESS); } .EE diff --git a/man3/inet_net_pton.3 b/man3/inet_net_pton.3 index 0c236d028..549bb81fa 100644 --- a/man3/inet_net_pton.3 +++ b/man3/inet_net_pton.3 @@ -336,7 +336,7 @@ Raw address: c1a80180 #include #include -#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\ +#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e } while (0) int @@ -348,7 +348,7 @@ main(int argc, char *argv[]) if (argc < 2) { fprintf(stderr, - "Usage: %s presentation\-form [addr\-init\-value]\\n", + "Usage: %s presentation\-form [addr\-init\-value]\en", argv[0]); exit(EXIT_FAILURE); } @@ -367,7 +367,7 @@ main(int argc, char *argv[]) if (bits == \-1) errExit("inet_net_ntop"); - printf("inet_net_pton() returned: %d\\n", bits); + printf("inet_net_pton() returned: %d\en", bits); /* Convert binary format back to presentation, using \(aqbits\(aq returned by inet_net_pton() */ @@ -375,14 +375,14 @@ main(int argc, char *argv[]) if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL) errExit("inet_net_ntop"); - printf("inet_net_ntop() yielded: %s\\n", buf); + printf("inet_net_ntop() yielded: %s\en", buf); /* Display \(aqaddr\(aq in raw form (in network byte order), so we can see bytes not displayed by inet_net_ntop(); some of those bytes may not have been touched by inet_net_ntop(), and so will still have any initial value that was specified in argv[2]. */ - printf("Raw address: %x\\n", htonl(addr.s_addr)); + printf("Raw address: %x\en", htonl(addr.s_addr)); exit(EXIT_SUCCESS); } diff --git a/man3/inet_pton.3 b/man3/inet_pton.3 index 9eaf19851..70c196f2b 100644 --- a/man3/inet_pton.3 +++ b/man3/inet_pton.3 @@ -200,7 +200,7 @@ main(int argc, char *argv[]) char str[INET6_ADDRSTRLEN]; if (argc != 3) { - fprintf(stderr, "Usage: %s {i4|i6|} string\\n", argv[0]); + fprintf(stderr, "Usage: %s {i4|i6|} string\en", argv[0]); exit(EXIT_FAILURE); } @@ -221,7 +221,7 @@ main(int argc, char *argv[]) exit(EXIT_FAILURE); } - printf("%s\\n", str); + printf("%s\en", str); exit(EXIT_SUCCESS); } diff --git a/man3/insque.3 b/man3/insque.3 index 905c18dff..b6e07bb1c 100644 --- a/man3/insque.3 +++ b/man3/insque.3 @@ -184,7 +184,7 @@ new_element(void) e = malloc(sizeof(struct element)); if (e == NULL) { - fprintf(stderr, "malloc() failed\\n"); + fprintf(stderr, "malloc() failed\en"); exit(EXIT_FAILURE); } @@ -214,7 +214,7 @@ main(int argc, char *argv[]) } if (errfnd || optind >= argc) { - fprintf(stderr, "Usage: %s [\-c] string...\\n", argv[0]); + fprintf(stderr, "Usage: %s [\-c] string...\en", argv[0]); exit(EXIT_FAILURE); } @@ -245,15 +245,15 @@ main(int argc, char *argv[]) /* Traverse the list from the start, printing element names */ - printf("Traversing completed list:\\n"); + printf("Traversing completed list:\en"); elem = first; do { - printf(" %s\\n", elem\->name); + printf(" %s\en", elem\->name); elem = elem\->forward; } while (elem != NULL && elem != first); if (elem == first) - printf("That was a circular list\\n"); + printf("That was a circular list\en"); exit(EXIT_SUCCESS); } diff --git a/man3/iswblank.3 b/man3/iswblank.3 index fefef104a..910b94ddb 100644 --- a/man3/iswblank.3 +++ b/man3/iswblank.3 @@ -54,7 +54,7 @@ from its subclasses "alnum", "alpha", "upper", "lower", "digit", .PP The wide-character class "blank" always contains at least the space character -and the control character \(aq\\t\(aq. +and the control character \(aq\et\(aq. .SH RETURN VALUE The .BR iswblank () diff --git a/man3/iswspace.3 b/man3/iswspace.3 index 49273cdd1..ef49fdfdc 100644 --- a/man3/iswspace.3 +++ b/man3/iswspace.3 @@ -44,7 +44,7 @@ The wide-character class "space" contains the wide-character class "blank". .PP The wide-character class "space" always contains at least the space character and the control -characters \(aq\\f\(aq, \(aq\\n\(aq, \(aq\\r\(aq, \(aq\\t\(aq, \(aq\\v\(aq. +characters \(aq\ef\(aq, \(aq\en\(aq, \(aq\er\(aq, \(aq\et\(aq, \(aq\ev\(aq. .SH RETURN VALUE The .BR iswspace () diff --git a/man3/makecontext.3 b/man3/makecontext.3 index 277af2099..11d0abca0 100644 --- a/man3/makecontext.3 +++ b/man3/makecontext.3 @@ -180,27 +180,27 @@ main: exiting static ucontext_t uctx_main, uctx_func1, uctx_func2; -#define handle_error(msg) \\ +#define handle_error(msg) \e do { perror(msg); exit(EXIT_FAILURE); } while (0) static void func1(void) { - printf("func1: started\\n"); - printf("func1: swapcontext(&uctx_func1, &uctx_func2)\\n"); + printf("func1: started\en"); + printf("func1: swapcontext(&uctx_func1, &uctx_func2)\en"); if (swapcontext(&uctx_func1, &uctx_func2) == \-1) handle_error("swapcontext"); - printf("func1: returning\\n"); + printf("func1: returning\en"); } static void func2(void) { - printf("func2: started\\n"); - printf("func2: swapcontext(&uctx_func2, &uctx_func1)\\n"); + printf("func2: started\en"); + printf("func2: swapcontext(&uctx_func2, &uctx_func1)\en"); if (swapcontext(&uctx_func2, &uctx_func1) == \-1) handle_error("swapcontext"); - printf("func2: returning\\n"); + printf("func2: returning\en"); } int @@ -224,11 +224,11 @@ main(int argc, char *argv[]) uctx_func2.uc_link = (argc > 1) ? NULL : &uctx_func1; makecontext(&uctx_func2, func2, 0); - printf("main: swapcontext(&uctx_main, &uctx_func2)\\n"); + printf("main: swapcontext(&uctx_main, &uctx_func2)\en"); if (swapcontext(&uctx_main, &uctx_func2) == \-1) handle_error("swapcontext"); - printf("main: exiting\\n"); + printf("main: exiting\en"); exit(EXIT_SUCCESS); } .EE diff --git a/man3/mallinfo.3 b/man3/mallinfo.3 index 628373a16..6b0e3bba0 100644 --- a/man3/mallinfo.3 +++ b/man3/mallinfo.3 @@ -240,16 +240,16 @@ display_mallinfo(void) mi = mallinfo(); - printf("Total non\-mmapped bytes (arena): %d\\n", mi.arena); - printf("# of free chunks (ordblks): %d\\n", mi.ordblks); - printf("# of free fastbin blocks (smblks): %d\\n", mi.smblks); - printf("# of mapped regions (hblks): %d\\n", mi.hblks); - printf("Bytes in mapped regions (hblkhd): %d\\n", mi.hblkhd); - printf("Max. total allocated space (usmblks): %d\\n", mi.usmblks); - printf("Free bytes held in fastbins (fsmblks): %d\\n", mi.fsmblks); - printf("Total allocated space (uordblks): %d\\n", mi.uordblks); - printf("Total free space (fordblks): %d\\n", mi.fordblks); - printf("Topmost releasable block (keepcost): %d\\n", mi.keepcost); + printf("Total non\-mmapped bytes (arena): %d\en", mi.arena); + printf("# of free chunks (ordblks): %d\en", mi.ordblks); + printf("# of free fastbin blocks (smblks): %d\en", mi.smblks); + printf("# of mapped regions (hblks): %d\en", mi.hblks); + printf("Bytes in mapped regions (hblkhd): %d\en", mi.hblkhd); + printf("Max. total allocated space (usmblks): %d\en", mi.usmblks); + printf("Free bytes held in fastbins (fsmblks): %d\en", mi.fsmblks); + printf("Total allocated space (uordblks): %d\en", mi.uordblks); + printf("Total free space (fordblks): %d\en", mi.fordblks); + printf("Topmost releasable block (keepcost): %d\en", mi.keepcost); } int @@ -262,7 +262,7 @@ main(int argc, char *argv[]) if (argc < 3 || strcmp(argv[1], "\-\-help") == 0) { fprintf(stderr, "%s num\-blocks block\-size [free\-step " - "[start\-free [end\-free]]]\\n", argv[0]); + "[start\-free [end\-free]]]\en", argv[0]); exit(EXIT_FAILURE); } @@ -272,12 +272,12 @@ main(int argc, char *argv[]) freeBegin = (argc > 4) ? atoi(argv[4]) : 0; freeEnd = (argc > 5) ? atoi(argv[5]) : numBlocks; - printf("============== Before allocating blocks ==============\\n"); + printf("============== Before allocating blocks ==============\en"); display_mallinfo(); for (j = 0; j < numBlocks; j++) { if (numBlocks >= MAX_ALLOCS) { - fprintf(stderr, "Too many allocations\\n"); + fprintf(stderr, "Too many allocations\en"); exit(EXIT_FAILURE); } @@ -288,13 +288,13 @@ main(int argc, char *argv[]) } } - printf("\\n============== After allocating blocks ==============\\n"); + printf("\en============== After allocating blocks ==============\en"); display_mallinfo(); for (j = freeBegin; j < freeEnd; j += freeStep) free(alloc[j]); - printf("\\n============== After freeing blocks ==============\\n"); + printf("\en============== After freeing blocks ==============\en"); display_mallinfo(); exit(EXIT_SUCCESS); diff --git a/man3/malloc_hook.3 b/man3/malloc_hook.3 index cdd72b3ce..130ea921a 100644 --- a/man3/malloc_hook.3 +++ b/man3/malloc_hook.3 @@ -130,7 +130,7 @@ my_malloc_hook(size_t size, const void *caller) old_malloc_hook = __malloc_hook; /* printf() might call malloc(), so protect it too. */ - printf("malloc(%u) called from %p returns %p\\n", + printf("malloc(%u) called from %p returns %p\en", (unsigned int) size, caller, result); /* Restore our own hooks */ diff --git a/man3/malloc_info.3 b/man3/malloc_info.3 index ce344e7ca..3481933a0 100644 --- a/man3/malloc_info.3 +++ b/man3/malloc_info.3 @@ -188,7 +188,7 @@ glibc 2.13 static size_t blockSize; static int numThreads, numBlocks; -#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\ +#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e } while (0) static void * @@ -216,7 +216,7 @@ main(int argc, char *argv[]) if (argc < 4) { fprintf(stderr, - "%s num\-threads num\-blocks block\-size [sleep\-time]\\n", + "%s num\-threads num\-blocks block\-size [sleep\-time]\en", argv[0]); exit(EXIT_FAILURE); } @@ -230,7 +230,7 @@ main(int argc, char *argv[]) if (thr == NULL) errExit("calloc"); - printf("============ Before allocating blocks ============\\n"); + printf("============ Before allocating blocks ============\en"); malloc_info(0, stdout); /* Create threads that allocate different amounts of memory */ @@ -259,7 +259,7 @@ main(int argc, char *argv[]) sleep(2); /* Give all threads a chance to complete allocations */ - printf("\\n============ After allocating blocks ============\\n"); + printf("\en============ After allocating blocks ============\en"); malloc_info(0, stdout); exit(EXIT_SUCCESS); diff --git a/man3/mallopt.3 b/man3/mallopt.3 index a0199064a..39d495514 100644 --- a/man3/mallopt.3 +++ b/man3/mallopt.3 @@ -603,10 +603,10 @@ main(int argc, char *argv[]) } free(p); - printf("main(): returned from first free() call\\n"); + printf("main(): returned from first free() call\en"); free(p); - printf("main(): returned from second free() call\\n"); + printf("main(): returned from second free() call\en"); exit(EXIT_SUCCESS); } diff --git a/man3/matherr.3 b/man3/matherr.3 index d7605a055..f03d998c0 100644 --- a/man3/matherr.3 +++ b/man3/matherr.3 @@ -389,7 +389,7 @@ static double new_retval; /* New function return value */ int matherr(struct exception *exc) { - fprintf(stderr, "matherr %s exception in %s() function\\n", + fprintf(stderr, "matherr %s exception in %s() function\en", (exc\->type == DOMAIN) ? "DOMAIN" : (exc\->type == OVERFLOW) ? "OVERFLOW" : (exc\->type == UNDERFLOW) ? "UNDERFLOW" : @@ -397,9 +397,9 @@ matherr(struct exception *exc) (exc\->type == TLOSS) ? "TLOSS" : (exc\->type == PLOSS) ? "PLOSS" : "???", exc\->name); - fprintf(stderr, " args: %f, %f\\n", + fprintf(stderr, " args: %f, %f\en", exc\->arg1, exc\->arg2); - fprintf(stderr, " retval: %f\\n", exc\->retval); + fprintf(stderr, " retval: %f\en", exc\->retval); if (change_retval) exc\->retval = new_retval; @@ -414,7 +414,7 @@ main(int argc, char *argv[]) if (argc < 2) { fprintf(stderr, "Usage: %s " - " [ []]\\n", argv[0]); + " [ []]\en", argv[0]); exit(EXIT_FAILURE); } @@ -432,7 +432,7 @@ main(int argc, char *argv[]) if (errno != 0) perror("errno"); - printf("x=%f\\n", x); + printf("x=%f\en", x); exit(EXIT_SUCCESS); } .EE diff --git a/man3/mbrtowc.3 b/man3/mbrtowc.3 index 5526b2da3..bacaaa1f7 100644 --- a/man3/mbrtowc.3 +++ b/man3/mbrtowc.3 @@ -43,11 +43,11 @@ multibyte character, converts it to a wide character and stores it at It updates the shift state .IR *ps . If the converted wide -character is not L\(aq\\0\(aq (the null wide character), +character is not L\(aq\e0\(aq (the null wide character), it returns the number of bytes that were consumed from .IR s . -If the converted wide character is L\(aq\\0\(aq, it resets the shift +If the converted wide character is L\(aq\e0\(aq, it resets the shift state .I *ps to the initial state and returns 0. @@ -155,9 +155,9 @@ The function returns the number of bytes parsed from the multibyte sequence starting at .IR s , -if a non-L\(aq\\0\(aq wide character +if a non-L\(aq\e0\(aq wide character was recognized. -It returns 0, if a L\(aq\\0\(aq wide character was recognized. +It returns 0, if a L\(aq\e0\(aq wide character was recognized. It returns .I (size_t)\ \-1 and sets diff --git a/man3/mbsnrtowcs.3 b/man3/mbsnrtowcs.3 index e0c51c1f1..2f29e9232 100644 --- a/man3/mbsnrtowcs.3 +++ b/man3/mbsnrtowcs.3 @@ -102,7 +102,7 @@ The limit forces a stop, or .I len -non-L\(aq\\0\(aq wide characters +non-L\(aq\e0\(aq wide characters have been stored at .IR dest . In this case, @@ -114,7 +114,7 @@ written to is returned. .IP 3. The multibyte string has been completely converted, including the -terminating null wide character (\(aq\\0\(aq) +terminating null wide character (\(aq\e0\(aq) (which has the side effect of bringing back .I *ps to the diff --git a/man3/mbsrtowcs.3 b/man3/mbsrtowcs.3 index 41ddc1cfb..01bef928e 100644 --- a/man3/mbsrtowcs.3 +++ b/man3/mbsrtowcs.3 @@ -65,7 +65,7 @@ is set to .BR EILSEQ . .IP 2. .I len -non-L\(aq\\0\(aq wide characters have been stored at +non-L\(aq\e0\(aq wide characters have been stored at .IR dest . In this case, .I *src @@ -76,7 +76,7 @@ and the number of wide characters written to is returned. .IP 3. The multibyte string has been completely converted, including the -terminating null wide character (\(aq\\0\(aq), which has the side +terminating null wide character (\(aq\e0\(aq), which has the side effect of bringing back .I *ps to the diff --git a/man3/mbstowcs.3 b/man3/mbstowcs.3 index 5a4cc39d5..cd2d8d8b1 100644 --- a/man3/mbstowcs.3 +++ b/man3/mbstowcs.3 @@ -50,7 +50,7 @@ In this case, is returned. .IP 2. .I n -non-L\(aq\\0\(aq wide characters have been stored at +non-L\(aq\e0\(aq wide characters have been stored at .IR dest . In this case, the number of wide characters written to .I dest @@ -58,7 +58,7 @@ is returned, but the shift state at this point is lost. .IP 3. The multibyte string has been completely converted, including the -terminating null character (\(aq\\0\(aq). +terminating null character (\(aq\e0\(aq). In this case, the number of wide characters written to .IR dest , excluding the terminating null wide character, is returned. @@ -158,7 +158,7 @@ main(int argc, char *argv[]) wchar_t *wp; if (argc < 3) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \en", argv[0]); exit(EXIT_FAILURE); } @@ -180,12 +180,12 @@ main(int argc, char *argv[]) /* Describe the source string to the user */ - printf("Length of source string (excluding terminator):\\n"); - printf(" %zu bytes\\n", strlen(argv[2])); - printf(" %zu multibyte characters\\n\\n", mbslen); + printf("Length of source string (excluding terminator):\en"); + printf(" %zu bytes\en", strlen(argv[2])); + printf(" %zu multibyte characters\en\en", mbslen); /* Allocate wide character string of the desired size. Add 1 - to allow for terminating null wide character (L\(aq\\0\(aq). */ + to allow for terminating null wide character (L\(aq\e0\(aq). */ wcs = calloc(mbslen + 1, sizeof(wchar_t)); if (wcs == NULL) { @@ -201,7 +201,7 @@ main(int argc, char *argv[]) exit(EXIT_FAILURE); } - printf("Wide character string is: %ls (%zu characters)\\n", + printf("Wide character string is: %ls (%zu characters)\en", wcs, mbslen); /* Now do some inspection of the classes of the characters in @@ -222,7 +222,7 @@ main(int argc, char *argv[]) printf("lower "); } - putchar(\(aq\\n\(aq); + putchar(\(aq\en\(aq); } exit(EXIT_SUCCESS); diff --git a/man3/mbtowc.3 b/man3/mbtowc.3 index 26f37e2c9..055a06864 100644 --- a/man3/mbtowc.3 +++ b/man3/mbtowc.3 @@ -43,7 +43,7 @@ It updates an internal shift state known only to the function. If .I s -does not point to a null byte (\(aq\\0\(aq), it returns the number +does not point to a null byte (\(aq\e0\(aq), it returns the number of bytes that were consumed from .IR s , otherwise it returns 0. diff --git a/man3/mcheck.3 b/man3/mcheck.3 index 474d00a08..4e1571735 100644 --- a/man3/mcheck.3 +++ b/man3/mcheck.3 @@ -207,16 +207,16 @@ main(int argc, char *argv[]) char *p; if (mcheck(NULL) != 0) { - fprintf(stderr, "mcheck() failed\\n"); + fprintf(stderr, "mcheck() failed\en"); exit(EXIT_FAILURE); } p = malloc(1000); - fprintf(stderr, "About to free\\n"); + fprintf(stderr, "About to free\en"); free(p); - fprintf(stderr, "\\nAbout to free a second time\\n"); + fprintf(stderr, "\enAbout to free a second time\en"); free(p); exit(EXIT_SUCCESS); diff --git a/man3/memchr.3 b/man3/memchr.3 index 75ec6daea..f315ed8cc 100644 --- a/man3/memchr.3 +++ b/man3/memchr.3 @@ -99,7 +99,7 @@ terminating null byte: .PP .in +4n .EX -char *p = rawmemchr(s,\ \(aq\\0\(aq); +char *p = rawmemchr(s,\ \(aq\e0\(aq); .EE .in .SH RETURN VALUE diff --git a/man3/mq_getattr.3 b/man3/mq_getattr.3 index a9483a0b9..573c5bac2 100644 --- a/man3/mq_getattr.3 +++ b/man3/mq_getattr.3 @@ -203,7 +203,7 @@ $ \fBcat /proc/sys/fs/mqueue/msgsize_default\fP #include #include -#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\ +#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e } while (0) int @@ -213,7 +213,7 @@ main(int argc, char *argv[]) struct mq_attr attr; if (argc != 2) { - fprintf(stderr, "Usage: %s mq\-name\\n", argv[0]); + fprintf(stderr, "Usage: %s mq\-name\en", argv[0]); exit(EXIT_FAILURE); } @@ -224,8 +224,8 @@ main(int argc, char *argv[]) if (mq_getattr(mqd, &attr) == \-1) errExit("mq_getattr"); - printf("Maximum # of messages on queue: %ld\\n", attr.mq_maxmsg); - printf("Maximum message size: %ld\\n", attr.mq_msgsize); + printf("Maximum # of messages on queue: %ld\en", attr.mq_maxmsg); + printf("Maximum message size: %ld\en", attr.mq_msgsize); if (mq_unlink(argv[1]) == \-1) errExit("mq_unlink"); diff --git a/man3/mq_notify.3 b/man3/mq_notify.3 index 5aa53623c..3923cb5ab 100644 --- a/man3/mq_notify.3 +++ b/man3/mq_notify.3 @@ -222,7 +222,7 @@ queue and then terminates the process. #include #include -#define handle_error(msg) \\ +#define handle_error(msg) \e do { perror(msg); exit(EXIT_FAILURE); } while (0) static void /* Thread start function */ @@ -245,7 +245,7 @@ tfunc(union sigval sv) if (nr == \-1) handle_error("mq_receive"); - printf("Read %zd bytes from MQ\\n", nr); + printf("Read %zd bytes from MQ\en", nr); free(buf); exit(EXIT_SUCCESS); /* Terminate the process */ } @@ -257,7 +257,7 @@ main(int argc, char *argv[]) struct sigevent sev; if (argc != 2) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \en", argv[0]); exit(EXIT_FAILURE); } diff --git a/man3/newlocale.3 b/man3/newlocale.3 index 19064d7a2..cdf8c4c09 100644 --- a/man3/newlocale.3 +++ b/man3/newlocale.3 @@ -306,7 +306,7 @@ Te Paraire, te 07 o Poutū-te-rangi, 2014 00:38:44 CET #include #include -#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\ +#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e } while (0) int @@ -319,7 +319,7 @@ main(int argc, char *argv[]) locale_t loc, nloc; if (argc < 2) { - fprintf(stderr, "Usage: %s locale1 [locale2]\\n", argv[0]); + fprintf(stderr, "Usage: %s locale1 [locale2]\en", argv[0]); exit(EXIT_FAILURE); } @@ -349,7 +349,7 @@ main(int argc, char *argv[]) /* Test effect of LC_NUMERIC */ - printf("%8.3f\\n", 123456.789); + printf("%8.3f\en", 123456.789); /* Test effect of LC_TIME */ @@ -362,7 +362,7 @@ main(int argc, char *argv[]) if (s == 0) errExit("strftime"); - printf("%s\\n", buf); + printf("%s\en", buf); /* Free the locale object */ diff --git a/man3/nl_langinfo.3 b/man3/nl_langinfo.3 index d2c243d10..1383bcebb 100644 --- a/man3/nl_langinfo.3 +++ b/man3/nl_langinfo.3 @@ -206,8 +206,8 @@ main(int argc, char *argv[]) setlocale(LC_CTYPE, ""); setlocale(LC_NUMERIC, ""); - printf("%s\\n", nl_langinfo(CODESET)); - printf("%s\\n", nl_langinfo(RADIXCHAR)); + printf("%s\en", nl_langinfo(CODESET)); + printf("%s\en", nl_langinfo(RADIXCHAR)); exit(EXIT_SUCCESS); } diff --git a/man3/offsetof.3 b/man3/offsetof.3 index 8d69cd0b0..154fe47a4 100644 --- a/man3/offsetof.3 +++ b/man3/offsetof.3 @@ -93,10 +93,10 @@ main(void) /* Output is compiler dependent */ - printf("offsets: i=%zd; c=%zd; d=%zd a=%zd\\n", + printf("offsets: i=%zd; c=%zd; d=%zd a=%zd\en", offsetof(struct s, i), offsetof(struct s, c), offsetof(struct s, d), offsetof(struct s, a)); - printf("sizeof(struct s)=%zd\\n", sizeof(struct s)); + printf("sizeof(struct s)=%zd\en", sizeof(struct s)); exit(EXIT_SUCCESS); } diff --git a/man3/perror.3 b/man3/perror.3 index bbdac61a5..503d16a35 100644 --- a/man3/perror.3 +++ b/man3/perror.3 @@ -65,7 +65,7 @@ First (if .I s is not NULL and .I *s -is not a null byte (\(aq\\0\(aq)), the argument string +is not a null byte (\(aq\e0\(aq)), the argument string .I s is printed, followed by a colon and a blank. Then an error message corresponding to the current value of diff --git a/man3/posix_spawn.3 b/man3/posix_spawn.3 index 974a6f0be..0b52e130b 100644 --- a/man3/posix_spawn.3 +++ b/man3/posix_spawn.3 @@ -653,11 +653,11 @@ Child status: exited, status=127 #include #include -#define errExit(msg) do { perror(msg); \\ +#define errExit(msg) do { perror(msg); \e exit(EXIT_FAILURE); } while (0) -#define errExitEN(en, msg) \\ - do { errno = en; perror(msg); \\ +#define errExitEN(en, msg) \e + do { errno = en; perror(msg); \e exit(EXIT_FAILURE); } while (0) char **environ; @@ -744,7 +744,7 @@ main(int argc, char *argv[]) errExitEN(s, "posix_spawn_file_actions_destroy"); } - printf("PID of child: %ld\\n", (long) child_pid); + printf("PID of child: %ld\en", (long) child_pid); /* Monitor status of the child until it terminates */ @@ -755,13 +755,13 @@ main(int argc, char *argv[]) printf("Child status: "); if (WIFEXITED(status)) { - printf("exited, status=%d\\n", WEXITSTATUS(status)); + printf("exited, status=%d\en", WEXITSTATUS(status)); } else if (WIFSIGNALED(status)) { - printf("killed by signal %d\\n", WTERMSIG(status)); + printf("killed by signal %d\en", WTERMSIG(status)); } else if (WIFSTOPPED(status)) { - printf("stopped by signal %d\\n", WSTOPSIG(status)); + printf("stopped by signal %d\en", WSTOPSIG(status)); } else if (WIFCONTINUED(status)) { - printf("continued\\n"); + printf("continued\en"); } } while (!WIFEXITED(status) && !WIFSIGNALED(status)); diff --git a/man3/printf.3 b/man3/printf.3 index 7dc136f90..e067a4fec 100644 --- a/man3/printf.3 +++ b/man3/printf.3 @@ -772,7 +772,7 @@ modifier is present: the argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not -including) a terminating null byte (\(aq\\0\(aq); +including) a terminating null byte (\(aq\e0\(aq); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; @@ -1144,7 +1144,7 @@ make_message(const char *fmt, ...) if (size < 0) return NULL; - size++; /* For '\\0' */ + size++; /* For '\e0' */ p = malloc(size); if (p == NULL) return NULL; diff --git a/man3/pthread_attr_init.3 b/man3/pthread_attr_init.3 index b42e1798e..05b98ead7 100644 --- a/man3/pthread_attr_init.3 +++ b/man3/pthread_attr_init.3 @@ -170,7 +170,7 @@ Thread attributes: #include #include -#define handle_error_en(en, msg) \\ +#define handle_error_en(en, msg) \e do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) static void @@ -184,7 +184,7 @@ display_pthread_attr(pthread_attr_t *attr, char *prefix) s = pthread_attr_getdetachstate(attr, &i); if (s != 0) handle_error_en(s, "pthread_attr_getdetachstate"); - printf("%sDetach state = %s\\n", prefix, + printf("%sDetach state = %s\en", prefix, (i == PTHREAD_CREATE_DETACHED) ? "PTHREAD_CREATE_DETACHED" : (i == PTHREAD_CREATE_JOINABLE) ? "PTHREAD_CREATE_JOINABLE" : "???"); @@ -192,7 +192,7 @@ display_pthread_attr(pthread_attr_t *attr, char *prefix) s = pthread_attr_getscope(attr, &i); if (s != 0) handle_error_en(s, "pthread_attr_getscope"); - printf("%sScope = %s\\n", prefix, + printf("%sScope = %s\en", prefix, (i == PTHREAD_SCOPE_SYSTEM) ? "PTHREAD_SCOPE_SYSTEM" : (i == PTHREAD_SCOPE_PROCESS) ? "PTHREAD_SCOPE_PROCESS" : "???"); @@ -200,7 +200,7 @@ display_pthread_attr(pthread_attr_t *attr, char *prefix) s = pthread_attr_getinheritsched(attr, &i); if (s != 0) handle_error_en(s, "pthread_attr_getinheritsched"); - printf("%sInherit scheduler = %s\\n", prefix, + printf("%sInherit scheduler = %s\en", prefix, (i == PTHREAD_INHERIT_SCHED) ? "PTHREAD_INHERIT_SCHED" : (i == PTHREAD_EXPLICIT_SCHED) ? "PTHREAD_EXPLICIT_SCHED" : "???"); @@ -208,7 +208,7 @@ display_pthread_attr(pthread_attr_t *attr, char *prefix) s = pthread_attr_getschedpolicy(attr, &i); if (s != 0) handle_error_en(s, "pthread_attr_getschedpolicy"); - printf("%sScheduling policy = %s\\n", prefix, + printf("%sScheduling policy = %s\en", prefix, (i == SCHED_OTHER) ? "SCHED_OTHER" : (i == SCHED_FIFO) ? "SCHED_FIFO" : (i == SCHED_RR) ? "SCHED_RR" : @@ -217,18 +217,18 @@ display_pthread_attr(pthread_attr_t *attr, char *prefix) s = pthread_attr_getschedparam(attr, &sp); if (s != 0) handle_error_en(s, "pthread_attr_getschedparam"); - printf("%sScheduling priority = %d\\n", prefix, sp.sched_priority); + printf("%sScheduling priority = %d\en", prefix, sp.sched_priority); s = pthread_attr_getguardsize(attr, &v); if (s != 0) handle_error_en(s, "pthread_attr_getguardsize"); - printf("%sGuard size = %zu bytes\\n", prefix, v); + printf("%sGuard size = %zu bytes\en", prefix, v); s = pthread_attr_getstack(attr, &stkaddr, &v); if (s != 0) handle_error_en(s, "pthread_attr_getstack"); - printf("%sStack address = %p\\n", prefix, stkaddr); - printf("%sStack size = 0x%zx bytes\\n", prefix, v); + printf("%sStack address = %p\en", prefix, stkaddr); + printf("%sStack size = 0x%zx bytes\en", prefix, v); } static void * @@ -245,8 +245,8 @@ thread_start(void *arg) if (s != 0) handle_error_en(s, "pthread_getattr_np"); - printf("Thread attributes:\\n"); - display_pthread_attr(&gattr, "\\t"); + printf("Thread attributes:\en"); + display_pthread_attr(&gattr, "\et"); exit(EXIT_SUCCESS); /* Terminate all threads */ } @@ -289,7 +289,7 @@ main(int argc, char *argv[]) if (s != 0) handle_error_en(s, "posix_memalign"); - printf("posix_memalign() allocated at %p\\n", sp); + printf("posix_memalign() allocated at %p\en", sp); s = pthread_attr_setstack(&attr, sp, stack_size); if (s != 0) diff --git a/man3/pthread_cancel.3 b/man3/pthread_cancel.3 index f6c50ec66..d37c45edd 100644 --- a/man3/pthread_cancel.3 +++ b/man3/pthread_cancel.3 @@ -170,7 +170,7 @@ main(): thread was canceled #include #include -#define handle_error_en(en, msg) \\ +#define handle_error_en(en, msg) \e do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) static void * @@ -185,9 +185,9 @@ thread_func(void *ignored_argument) if (s != 0) handle_error_en(s, "pthread_setcancelstate"); - printf("thread_func(): started; cancellation disabled\\n"); + printf("thread_func(): started; cancellation disabled\en"); sleep(5); - printf("thread_func(): about to enable cancellation\\n"); + printf("thread_func(): about to enable cancellation\en"); s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); if (s != 0) @@ -199,7 +199,7 @@ thread_func(void *ignored_argument) /* Should never get here */ - printf("thread_func(): not canceled!\\n"); + printf("thread_func(): not canceled!\en"); return NULL; } @@ -218,7 +218,7 @@ main(void) sleep(2); /* Give thread a chance to get started */ - printf("main(): sending cancellation request\\n"); + printf("main(): sending cancellation request\en"); s = pthread_cancel(thr); if (s != 0) handle_error_en(s, "pthread_cancel"); @@ -230,9 +230,9 @@ main(void) handle_error_en(s, "pthread_join"); if (res == PTHREAD_CANCELED) - printf("main(): thread was canceled\\n"); + printf("main(): thread was canceled\en"); else - printf("main(): thread wasn\(aqt canceled (shouldn\(aqt happen!)\\n"); + printf("main(): thread wasn\(aqt canceled (shouldn\(aqt happen!)\en"); exit(EXIT_SUCCESS); } .EE diff --git a/man3/pthread_cleanup_push.3 b/man3/pthread_cleanup_push.3 index f22907d87..781178963 100644 --- a/man3/pthread_cleanup_push.3 +++ b/man3/pthread_cleanup_push.3 @@ -252,7 +252,7 @@ was nonzero. #include #include -#define handle_error_en(en, msg) \\ +#define handle_error_en(en, msg) \e do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) static int done = 0; @@ -262,7 +262,7 @@ static int cnt = 0; static void cleanup_handler(void *arg) { - printf("Called clean\-up handler\\n"); + printf("Called clean\-up handler\en"); cnt = 0; } @@ -271,7 +271,7 @@ thread_start(void *arg) { time_t start, curr; - printf("New thread started\\n"); + printf("New thread started\en"); pthread_cleanup_push(cleanup_handler, NULL); @@ -281,7 +281,7 @@ thread_start(void *arg) pthread_testcancel(); /* A cancellation point */ if (curr < time(NULL)) { curr = time(NULL); - printf("cnt = %d\\n", cnt); /* A cancellation point */ + printf("cnt = %d\en", cnt); /* A cancellation point */ cnt++; } } @@ -309,7 +309,7 @@ main(int argc, char *argv[]) done = 1; } else { - printf("Canceling thread\\n"); + printf("Canceling thread\en"); s = pthread_cancel(thr); if (s != 0) handle_error_en(s, "pthread_cancel"); @@ -320,9 +320,9 @@ main(int argc, char *argv[]) handle_error_en(s, "pthread_join"); if (res == PTHREAD_CANCELED) - printf("Thread was canceled; cnt = %d\\n", cnt); + printf("Thread was canceled; cnt = %d\en", cnt); else - printf("Thread terminated normally; cnt = %d\\n", cnt); + printf("Thread terminated normally; cnt = %d\en", cnt); exit(EXIT_SUCCESS); } .EE diff --git a/man3/pthread_create.3 b/man3/pthread_create.3 index 6ada96a40..c1d47fb05 100644 --- a/man3/pthread_create.3 +++ b/man3/pthread_create.3 @@ -286,10 +286,10 @@ Joined with thread 3; returned value was SERVUS #include #include -#define handle_error_en(en, msg) \\ +#define handle_error_en(en, msg) \e do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) -#define handle_error(msg) \\ +#define handle_error(msg) \e do { perror(msg); exit(EXIT_FAILURE); } while (0) struct thread_info { /* Used as argument to thread_start() */ @@ -307,14 +307,14 @@ thread_start(void *arg) struct thread_info *tinfo = arg; char *uargv, *p; - printf("Thread %d: top of stack near %p; argv_string=%s\\n", + printf("Thread %d: top of stack near %p; argv_string=%s\en", tinfo\->thread_num, &p, tinfo\->argv_string); uargv = strdup(tinfo\->argv_string); if (uargv == NULL) handle_error("strdup"); - for (p = uargv; *p != \(aq\\0\(aq; p++) + for (p = uargv; *p != \(aq\e0\(aq; p++) *p = toupper(*p); return uargv; @@ -339,7 +339,7 @@ main(int argc, char *argv[]) break; default: - fprintf(stderr, "Usage: %s [\-s stack-size] arg...\\n", + fprintf(stderr, "Usage: %s [\-s stack-size] arg...\en", argv[0]); exit(EXIT_FAILURE); } @@ -394,7 +394,7 @@ main(int argc, char *argv[]) if (s != 0) handle_error_en(s, "pthread_join"); - printf("Joined with thread %d; returned value was %s\\n", + printf("Joined with thread %d; returned value was %s\en", tinfo[tnum].thread_num, (char *) res); free(res); /* Free memory allocated by thread */ } diff --git a/man3/pthread_getattr_default_np.3 b/man3/pthread_getattr_default_np.3 index 560943994..2e5077ae8 100644 --- a/man3/pthread_getattr_default_np.3 +++ b/man3/pthread_getattr_default_np.3 @@ -124,8 +124,8 @@ Inherit scheduler: INHERIT #include #include -#define errExitEN(en, msg) \\ - do { errno = en; perror(msg); \\ +#define errExitEN(en, msg) \e + do { errno = en; perror(msg); \e exit(EXIT_FAILURE); } while (0) static void @@ -142,17 +142,17 @@ display_pthread_attr(pthread_attr_t *attr) s = pthread_attr_getstacksize(attr, &stacksize); if (s != 0) errExitEN(s, "pthread_attr_getstacksize"); - printf("Stack size: %zd\\n", stacksize); + printf("Stack size: %zd\en", stacksize); s = pthread_attr_getguardsize(attr, &guardsize); if (s != 0) errExitEN(s, "pthread_attr_getguardsize"); - printf("Guard size: %zd\\n", guardsize); + printf("Guard size: %zd\en", guardsize); s = pthread_attr_getschedpolicy(attr, &policy); if (s != 0) errExitEN(s, "pthread_attr_getschedpolicy"); - printf("Scheduling policy: %s\\n", + printf("Scheduling policy: %s\en", (policy == SCHED_FIFO) ? "SCHED_FIFO" : (policy == SCHED_RR) ? "SCHED_RR" : (policy == SCHED_OTHER) ? "SCHED_OTHER" : "[unknown]"); @@ -160,12 +160,12 @@ display_pthread_attr(pthread_attr_t *attr) s = pthread_attr_getschedparam(attr, &schedparam); if (s != 0) errExitEN(s, "pthread_attr_getschedparam"); - printf("Scheduling priority: %d\\n", schedparam.sched_priority); + printf("Scheduling priority: %d\en", schedparam.sched_priority); s = pthread_attr_getdetachstate(attr, &detachstate); if (s != 0) errExitEN(s, "pthread_attr_getdetachstate"); - printf("Detach state: %s\\n", + printf("Detach state: %s\en", (detachstate == PTHREAD_CREATE_DETACHED) ? "DETACHED" : (detachstate == PTHREAD_CREATE_JOINABLE) ? "JOINABLE" : "???"); @@ -173,7 +173,7 @@ display_pthread_attr(pthread_attr_t *attr) s = pthread_attr_getinheritsched(attr, &inheritsched); if (s != 0) errExitEN(s, "pthread_attr_getinheritsched"); - printf("Inherit scheduler: %s\\n", + printf("Inherit scheduler: %s\en", (inheritsched == PTHREAD_INHERIT_SCHED) ? "INHERIT" : (inheritsched == PTHREAD_EXPLICIT_SCHED) ? "EXPLICIT" : "???"); diff --git a/man3/pthread_getattr_np.3 b/man3/pthread_getattr_np.3 index 253a1aca5..bf8473d53 100644 --- a/man3/pthread_getattr_np.3 +++ b/man3/pthread_getattr_np.3 @@ -200,7 +200,7 @@ Attributes of created thread: #include #include -#define handle_error_en(en, msg) \\ +#define handle_error_en(en, msg) \e do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) static void @@ -213,7 +213,7 @@ display_stack_related_attributes(pthread_attr_t *attr, char *prefix) s = pthread_attr_getguardsize(attr, &guard_size); if (s != 0) handle_error_en(s, "pthread_attr_getguardsize"); - printf("%sGuard size = %d bytes\\n", prefix, guard_size); + printf("%sGuard size = %d bytes\en", prefix, guard_size); s = pthread_attr_getstack(attr, &stack_addr, &stack_size); if (s != 0) @@ -221,8 +221,8 @@ display_stack_related_attributes(pthread_attr_t *attr, char *prefix) printf("%sStack address = %p", prefix, stack_addr); if (stack_size > 0) printf(" (EOS = %p)", (char *) stack_addr + stack_size); - printf("\\n"); - printf("%sStack size = 0x%x (%d) bytes\\n", + printf("\en"); + printf("%sStack size = 0x%x (%d) bytes\en", prefix, stack_size, stack_size); } @@ -246,8 +246,8 @@ display_thread_attributes(pthread_t thread, char *prefix) static void * /* Start function for thread we create */ thread_start(void *arg) { - printf("Attributes of created thread:\\n"); - display_thread_attributes(pthread_self(), "\\t"); + printf("Attributes of created thread:\en"); + display_thread_attributes(pthread_self(), "\et"); exit(EXIT_SUCCESS); /* Terminate all threads */ } @@ -258,8 +258,8 @@ usage(char *pname, char *msg) if (msg != NULL) fputs(msg, stderr); fprintf(stderr, "Usage: %s [\-s stack\-size [\-a]]" - " [\-g guard\-size]\\n", pname); - fprintf(stderr, "\\t\\t\-a means program should allocate stack\\n"); + " [\-g guard\-size]\en", pname); + fprintf(stderr, "\et\et\-a means program should allocate stack\en"); exit(EXIT_FAILURE); } @@ -286,10 +286,10 @@ get_thread_attributes_from_cl(int argc, char *argv[], } if (allocate_stack && stack_size == \-1) - usage(argv[0], "Specifying \-a without \-s makes no sense\\n"); + usage(argv[0], "Specifying \-a without \-s makes no sense\en"); if (argc > optind) - usage(argv[0], "Extraneous command\-line arguments\\n"); + usage(argv[0], "Extraneous command\-line arguments\en"); if (stack_size >= 0 || guard_size > 0) { ret_attrp = attrp; @@ -309,7 +309,7 @@ get_thread_attributes_from_cl(int argc, char *argv[], stack_size); if (s != 0) handle_error_en(s, "posix_memalign"); - printf("Allocated thread stack at %p\\n\\n", stack_addr); + printf("Allocated thread stack at %p\en\en", stack_addr); s = pthread_attr_setstack(attrp, stack_addr, stack_size); if (s != 0) @@ -338,9 +338,9 @@ main(int argc, char *argv[]) attrp = get_thread_attributes_from_cl(argc, argv, &attr); if (attrp != NULL) { - printf("Thread attributes object after initializations:\\n"); - display_stack_related_attributes(attrp, "\\t"); - printf("\\n"); + printf("Thread attributes object after initializations:\en"); + display_stack_related_attributes(attrp, "\et"); + printf("\en"); } s = pthread_create(&thr, attrp, &thread_start, NULL); diff --git a/man3/pthread_getcpuclockid.3 b/man3/pthread_getcpuclockid.3 index d168dad9e..4b3b90674 100644 --- a/man3/pthread_getcpuclockid.3 +++ b/man3/pthread_getcpuclockid.3 @@ -118,16 +118,16 @@ Subthread CPU time: 0.992 #include #include -#define handle_error(msg) \\ +#define handle_error(msg) \e do { perror(msg); exit(EXIT_FAILURE); } while (0) -#define handle_error_en(en, msg) \\ +#define handle_error_en(en, msg) \e do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) static void * thread_start(void *arg) { - printf("Subthread starting infinite loop\\n"); + printf("Subthread starting infinite loop\en"); for (;;) continue; } @@ -140,7 +140,7 @@ pclock(char *msg, clockid_t cid) printf("%s", msg); if (clock_gettime(cid, &ts) == \-1) handle_error("clock_gettime"); - printf("%4ld.%03ld\\n", ts.tv_sec, ts.tv_nsec / 1000000); + printf("%4ld.%03ld\en", ts.tv_sec, ts.tv_nsec / 1000000); } int @@ -154,10 +154,10 @@ main(int argc, char *argv[]) if (s != 0) handle_error_en(s, "pthread_create"); - printf("Main thread sleeping\\n"); + printf("Main thread sleeping\en"); sleep(1); - printf("Main thread consuming some CPU time...\\n"); + printf("Main thread consuming some CPU time...\en"); for (j = 0; j < 2000000; j++) getppid(); diff --git a/man3/pthread_mutexattr_setrobust.3 b/man3/pthread_mutexattr_setrobust.3 index 47d9c6686..341a75a7e 100644 --- a/man3/pthread_mutexattr_setrobust.3 +++ b/man3/pthread_mutexattr_setrobust.3 @@ -217,7 +217,7 @@ $ \fB./a.out\fP #include #include -#define handle_error_en(en, msg) \\ +#define handle_error_en(en, msg) \e do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) static pthread_mutex_t mtx; @@ -225,9 +225,9 @@ static pthread_mutex_t mtx; static void * original_owner_thread(void *ptr) { - printf("[original owner] Setting lock...\\n"); + printf("[original owner] Setting lock...\en"); pthread_mutex_lock(&mtx); - printf("[original owner] Locked. Now exiting without unlocking.\\n"); + printf("[original owner] Locked. Now exiting without unlocking.\en"); pthread_exit(NULL); } @@ -251,25 +251,25 @@ main(int argc, char *argv[]) /* "original_owner_thread" should have exited by now */ - printf("[main thread] Attempting to lock the robust mutex.\\n"); + printf("[main thread] Attempting to lock the robust mutex.\en"); s = pthread_mutex_lock(&mtx); if (s == EOWNERDEAD) { - printf("[main thread] pthread_mutex_lock() returned EOWNERDEAD\\n"); - printf("[main thread] Now make the mutex consistent\\n"); + printf("[main thread] pthread_mutex_lock() returned EOWNERDEAD\en"); + printf("[main thread] Now make the mutex consistent\en"); s = pthread_mutex_consistent(&mtx); if (s != 0) handle_error_en(s, "pthread_mutex_consistent"); - printf("[main thread] Mutex is now consistent; unlocking\\n"); + printf("[main thread] Mutex is now consistent; unlocking\en"); s = pthread_mutex_unlock(&mtx); if (s != 0) handle_error_en(s, "pthread_mutex_unlock"); exit(EXIT_SUCCESS); } else if (s == 0) { - printf("[main thread] pthread_mutex_lock() unexpectedly succeeded\\n"); + printf("[main thread] pthread_mutex_lock() unexpectedly succeeded\en"); exit(EXIT_FAILURE); } else { - printf("[main thread] pthread_mutex_lock() unexpectedly failed\\n"); + printf("[main thread] pthread_mutex_lock() unexpectedly failed\en"); handle_error_en(s, "pthread_mutex_lock"); } } diff --git a/man3/pthread_setaffinity_np.3 b/man3/pthread_setaffinity_np.3 index 8c664aa0b..c1397ef78 100644 --- a/man3/pthread_setaffinity_np.3 +++ b/man3/pthread_setaffinity_np.3 @@ -176,7 +176,7 @@ to check the resulting CPU affinity mask of the thread. #include #include -#define handle_error_en(en, msg) \\ +#define handle_error_en(en, msg) \e do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) int @@ -204,10 +204,10 @@ main(int argc, char *argv[]) if (s != 0) handle_error_en(s, "pthread_getaffinity_np"); - printf("Set returned by pthread_getaffinity_np() contained:\\n"); + printf("Set returned by pthread_getaffinity_np() contained:\en"); for (j = 0; j < CPU_SETSIZE; j++) if (CPU_ISSET(j, &cpuset)) - printf(" CPU %d\\n", j); + printf(" CPU %d\en", j); exit(EXIT_SUCCESS); } diff --git a/man3/pthread_setname_np.3 b/man3/pthread_setname_np.3 index 4e6cc5b5e..9c0e2aa53 100644 --- a/man3/pthread_setname_np.3 +++ b/man3/pthread_setname_np.3 @@ -46,7 +46,7 @@ function can be used to set a unique name for a thread, which can be useful for debugging multithreaded applications. The thread name is a meaningful C language string, whose length is -restricted to 16 characters, including the terminating null byte (\(aq\\0\(aq). +restricted to 16 characters, including the terminating null byte (\(aq\e0\(aq). The .I thread argument specifies the thread whose name is to be changed; @@ -165,8 +165,8 @@ THREADFOO #define NAMELEN 16 -#define errExitEN(en, msg) \\ - do { errno = en; perror(msg); exit(EXIT_FAILURE); \\ +#define errExitEN(en, msg) \e + do { errno = en; perror(msg); exit(EXIT_FAILURE); \e } while (0) static void * @@ -191,7 +191,7 @@ main(int argc, char **argv) if (rc != 0) errExitEN(rc, "pthread_getname_np"); - printf("Created a thread. Default name is: %s\\n", thread_name); + printf("Created a thread. Default name is: %s\en", thread_name); rc = pthread_setname_np(thread, (argc > 1) ? argv[1] : "THREADFOO"); if (rc != 0) errExitEN(rc, "pthread_setname_np"); @@ -202,13 +202,13 @@ main(int argc, char **argv) (argc > 2) ? atoi(argv[1]) : NAMELEN); if (rc != 0) errExitEN(rc, "pthread_getname_np"); - printf("The thread name after setting it is %s.\\n", thread_name); + printf("The thread name after setting it is %s.\en", thread_name); rc = pthread_join(thread, NULL); if (rc != 0) errExitEN(rc, "pthread_join"); - printf("Done\\n"); + printf("Done\en"); exit(EXIT_SUCCESS); } .EE diff --git a/man3/pthread_setschedparam.3 b/man3/pthread_setschedparam.3 index 012b503a3..e35bcf2ec 100644 --- a/man3/pthread_setschedparam.3 +++ b/man3/pthread_setschedparam.3 @@ -245,7 +245,7 @@ is the default for the inherit scheduler attribute. #include #include -#define handle_error_en(en, msg) \\ +#define handle_error_en(en, msg) \e do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) static void @@ -254,20 +254,20 @@ 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"); -#define fpe(msg) fprintf(stderr, "\\t%s", msg); /* Shorter */ - fpe("\-a Set scheduling policy and priority in\\n"); - fpe(" thread attributes object\\n"); - fpe(" can be\\n"); - fpe(" f SCHED_FIFO\\n"); - fpe(" r SCHED_RR\\n"); - fpe(" o SCHED_OTHER\\n"); - fpe("\-A Use default thread attributes object\\n"); - fpe("\-i {e|i} Set inherit scheduler attribute to\\n"); - fpe(" \(aqexplicit\(aq or \(aqinherit\(aq\\n"); - fpe("\-m Set scheduling policy and priority on\\n"); - fpe(" main thread before pthread_create() call\\n"); + fprintf(stderr, "Usage: %s [options]\en", prog_name); + fprintf(stderr, "Options are:\en"); +#define fpe(msg) fprintf(stderr, "\et%s", msg); /* Shorter */ + fpe("\-a Set scheduling policy and priority in\en"); + fpe(" thread attributes object\en"); + fpe(" can be\en"); + fpe(" f SCHED_FIFO\en"); + fpe(" r SCHED_RR\en"); + fpe(" o SCHED_OTHER\en"); + fpe("\-A Use default thread attributes object\en"); + fpe("\-i {e|i} Set inherit scheduler attribute to\en"); + fpe(" \(aqexplicit\(aq or \(aqinherit\(aq\en"); + fpe("\-m Set scheduling policy and priority on\en"); + fpe(" main thread before pthread_create() call\en"); exit(EXIT_FAILURE); } @@ -285,7 +285,7 @@ get_policy(char p, int *policy) static void display_sched_attr(int policy, struct sched_param *param) { - printf(" policy=%s, priority=%d\\n", + printf(" policy=%s, priority=%d\en", (policy == SCHED_FIFO) ? "SCHED_FIFO" : (policy == SCHED_RR) ? "SCHED_RR" : (policy == SCHED_OTHER) ? "SCHED_OTHER" : @@ -303,7 +303,7 @@ display_thread_sched_attr(char *msg) if (s != 0) handle_error_en(s, "pthread_getschedparam"); - printf("%s\\n", msg); + printf("%s\en", msg); display_sched_attr(policy, ¶m); } @@ -338,20 +338,20 @@ main(int argc, char *argv[]) case \(aqA\(aq: use_null_attrib = 1; break; case \(aqi\(aq: inheritsched_str = optarg; break; case \(aqm\(aq: main_sched_str = optarg; break; - default: usage(argv[0], "Unrecognized option\\n"); + default: usage(argv[0], "Unrecognized option\en"); } } if (use_null_attrib && (inheritsched_str != NULL || attr_sched_str != NULL)) - usage(argv[0], "Can\(aqt specify \-A with \-i or \-a\\n"); + usage(argv[0], "Can\(aqt specify \-A with \-i or \-a\en"); /* Optionally set scheduling attributes of main thread, and display the attributes */ if (main_sched_str != NULL) { if (!get_policy(main_sched_str[0], &policy)) - usage(argv[0], "Bad policy for main thread (\-m)\\n"); + usage(argv[0], "Bad policy for main thread (\-m)\en"); param.sched_priority = strtol(&main_sched_str[1], NULL, 0); s = pthread_setschedparam(pthread_self(), policy, ¶m); @@ -360,7 +360,7 @@ main(int argc, char *argv[]) } display_thread_sched_attr("Scheduler settings of main thread"); - printf("\\n"); + printf("\en"); /* Initialize thread attributes object according to options */ @@ -379,7 +379,7 @@ main(int argc, char *argv[]) else if (inheritsched_str[0] == \(aqi\(aq) inheritsched = PTHREAD_INHERIT_SCHED; else - usage(argv[0], "Value for \-i must be \(aqe\(aq or \(aqi\(aq\\n"); + usage(argv[0], "Value for \-i must be \(aqe\(aq or \(aqi\(aq\en"); s = pthread_attr_setinheritsched(&attr, inheritsched); if (s != 0) @@ -389,7 +389,7 @@ main(int argc, char *argv[]) if (attr_sched_str != NULL) { if (!get_policy(attr_sched_str[0], &policy)) usage(argv[0], - "Bad policy for \(aqattr\(aq (\-a)\\n"); + "Bad policy for \(aqattr\(aq (\-a)\en"); param.sched_priority = strtol(&attr_sched_str[1], NULL, 0); s = pthread_attr_setschedpolicy(&attr, policy); @@ -411,15 +411,15 @@ main(int argc, char *argv[]) if (s != 0) handle_error_en(s, "pthread_attr_getschedpolicy"); - printf("Scheduler settings in \(aqattr\(aq\\n"); + printf("Scheduler settings in \(aqattr\(aq\en"); display_sched_attr(policy, ¶m); s = pthread_attr_getinheritsched(&attr, &inheritsched); - printf(" inheritsched is %s\\n", + printf(" inheritsched is %s\en", (inheritsched == PTHREAD_INHERIT_SCHED) ? "INHERIT" : (inheritsched == PTHREAD_EXPLICIT_SCHED) ? "EXPLICIT" : "???"); - printf("\\n"); + printf("\en"); } /* Create a thread that will display its scheduling attributes */ diff --git a/man3/pthread_sigmask.3 b/man3/pthread_sigmask.3 index 1b6b4e91a..d3a339858 100644 --- a/man3/pthread_sigmask.3 +++ b/man3/pthread_sigmask.3 @@ -120,7 +120,7 @@ Signal handling thread got signal 10 /* Simple error handling functions */ -#define handle_error_en(en, msg) \\ +#define handle_error_en(en, msg) \e do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) static void * @@ -133,7 +133,7 @@ sig_thread(void *arg) s = sigwait(set, &sig); if (s != 0) handle_error_en(s, "sigwait"); - printf("Signal handling thread got signal %d\\n", sig); + printf("Signal handling thread got signal %d\en", sig); } } diff --git a/man3/qsort.3 b/man3/qsort.3 index 0dc9d48f7..027050b9d 100644 --- a/man3/qsort.3 +++ b/man3/qsort.3 @@ -146,7 +146,7 @@ main(int argc, char *argv[]) int j; if (argc < 2) { - fprintf(stderr, "Usage: %s ...\\n", argv[0]); + fprintf(stderr, "Usage: %s ...\en", argv[0]); exit(EXIT_FAILURE); } diff --git a/man3/rand.3 b/man3/rand.3 index 6a1bee31a..f575a2b8b 100644 --- a/man3/rand.3 +++ b/man3/rand.3 @@ -217,7 +217,7 @@ main(int argc, char *argv[]) unsigned int seed; if (argc != 3) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \en", argv[0]); exit(EXIT_FAILURE); } @@ -227,7 +227,7 @@ main(int argc, char *argv[]) srand(seed); for (j = 0; j < nloops; j++) { r = rand(); - printf("%d\\n", r); + printf("%d\en", r); } exit(EXIT_SUCCESS); diff --git a/man3/readdir.3 b/man3/readdir.3 index b9ae265fc..950eb1334 100644 --- a/man3/readdir.3 +++ b/man3/readdir.3 @@ -268,7 +268,7 @@ POSIX defines it as .IR "char\ d_name[]", a character array of unspecified size, with at most .B NAME_MAX -characters preceding the terminating null byte (\(aq\\0\(aq). +characters preceding the terminating null byte (\(aq\e0\(aq). .PP POSIX.1 explicitly notes that this field should not be used as an lvalue. The standard also notes that the use of diff --git a/man3/regex.3 b/man3/regex.3 index a2b35fb3a..3c1cf6f94 100644 --- a/man3/regex.3 +++ b/man3/regex.3 @@ -235,7 +235,7 @@ are nonzero, .I errbuf is filled in with the first .I "errbuf_size \- 1" -characters of the error message and a terminating null byte (\(aq\\0\(aq). +characters of the error message and a terminating null byte (\(aq\e0\(aq). .SS POSIX pattern buffer freeing Supplying .BR regfree () diff --git a/man3/rpmatch.3 b/man3/rpmatch.3 index 1521246f0..8a149bb41 100644 --- a/man3/rpmatch.3 +++ b/man3/rpmatch.3 @@ -148,12 +148,12 @@ int main(int argc, char *argv[]) { if (argc != 2 || strcmp(argv[1], "\-\-help") == 0) { - fprintf(stderr, "%s response\\n", argv[0]); + fprintf(stderr, "%s response\en", argv[0]); exit(EXIT_FAILURE); } setlocale(LC_ALL, ""); - printf("rpmatch() returns: %d\\n", rpmatch(argv[1])); + printf("rpmatch() returns: %d\en", rpmatch(argv[1])); exit(EXIT_SUCCESS); } .EE diff --git a/man3/rtime.3 b/man3/rtime.3 index e0db41ef2..4aebb1847 100644 --- a/man3/rtime.3 +++ b/man3/rtime.3 @@ -131,7 +131,7 @@ main(void) perror("rtime error"); else { time_t t = time1.tv_sec; - printf("%s\\n", ctime(&t)); + printf("%s\en", ctime(&t)); } exit(EXIT_SUCCESS); diff --git a/man3/scanf.3 b/man3/scanf.3 index adab15060..828299cf4 100644 --- a/man3/scanf.3 +++ b/man3/scanf.3 @@ -233,7 +233,7 @@ when a nonmatching character is found, whichever happens first. Most conversions discard initial white space characters (the exceptions are noted below), and these discarded characters don't count toward the maximum field width. -String input conversions store a terminating null byte (\(aq\\0\(aq) +String input conversions store a terminating null byte (\(aq\e0\(aq) to mark the end of the input; the maximum field width does not include this terminator. .TP @@ -460,7 +460,7 @@ Equivalent to Matches a sequence of non-white-space characters; the next pointer must be a pointer to the initial element of a character array that is long enough to hold the input sequence and -the terminating null byte (\(aq\\0\(aq), which is added automatically. +the terminating null byte (\(aq\e0\(aq), which is added automatically. The input string stops at white space or at the maximum field width, whichever occurs first. .TP @@ -745,12 +745,12 @@ int n; errno = 0; n = scanf("%m[a\-z]", &p); if (n == 1) { - printf("read: %s\\n", p); + printf("read: %s\en", p); free(p); } else if (errno != 0) { perror("scanf"); } else { - fprintf(stderr, "No matching characters\\n"); + fprintf(stderr, "No matching characters\en"); } .EE .in diff --git a/man3/sem_wait.3 b/man3/sem_wait.3 index 11179b771..cd4e58b3f 100644 --- a/man3/sem_wait.3 +++ b/man3/sem_wait.3 @@ -201,15 +201,15 @@ sem_timedwait() timed out sem_t sem; -#define handle_error(msg) \\ +#define handle_error(msg) \e do { perror(msg); exit(EXIT_FAILURE); } while (0) static void handler(int sig) { - write(STDOUT_FILENO, "sem_post() from handler\\n", 24); + write(STDOUT_FILENO, "sem_post() from handler\en", 24); if (sem_post(&sem) == \-1) { - write(STDERR_FILENO, "sem_post() failed\\n", 18); + write(STDERR_FILENO, "sem_post() failed\en", 18); _exit(EXIT_FAILURE); } } @@ -222,7 +222,7 @@ main(int argc, char *argv[]) int s; if (argc != 3) { - fprintf(stderr, "Usage: %s \\n", + fprintf(stderr, "Usage: %s \en", argv[0]); exit(EXIT_FAILURE); } @@ -248,7 +248,7 @@ main(int argc, char *argv[]) ts.tv_sec += atoi(argv[2]); - printf("main() about to call sem_timedwait()\\n"); + printf("main() about to call sem_timedwait()\en"); while ((s = sem_timedwait(&sem, &ts)) == \-1 && errno == EINTR) continue; /* Restart if interrupted by handler */ @@ -256,11 +256,11 @@ main(int argc, char *argv[]) if (s == \-1) { if (errno == ETIMEDOUT) - printf("sem_timedwait() timed out\\n"); + printf("sem_timedwait() timed out\en"); else perror("sem_timedwait"); } else - printf("sem_timedwait() succeeded\\n"); + printf("sem_timedwait() succeeded\en"); exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE); } diff --git a/man3/setaliasent.3 b/man3/setaliasent.3 index 95d7849a9..5cd46f457 100644 --- a/man3/setaliasent.3 +++ b/man3/setaliasent.3 @@ -153,7 +153,7 @@ main(void) al = getaliasent(); if (al == NULL) break; - printf("Name: %s\\n", al\->alias_name); + printf("Name: %s\en", al\->alias_name); } if (errno) { perror("reading alias"); diff --git a/man3/setbuf.3 b/man3/setbuf.3 index df1abf9ed..524117eef 100644 --- a/man3/setbuf.3 +++ b/man3/setbuf.3 @@ -210,7 +210,7 @@ main(void) { char buf[BUFSIZ]; setbuf(stdin, buf); - printf("Hello, world!\\n"); + printf("Hello, world!\en"); return 0; } .EE diff --git a/man3/stpcpy.3 b/man3/stpcpy.3 index e611a84fd..ef5f4e9d5 100644 --- a/man3/stpcpy.3 +++ b/man3/stpcpy.3 @@ -55,7 +55,7 @@ The .BR stpcpy () function copies the string pointed to by .I src -(including the terminating null byte (\(aq\\0\(aq)) to the array pointed to by +(including the terminating null byte (\(aq\e0\(aq)) to the array pointed to by .IR dest . The strings may not overlap, and the destination string .I dest @@ -116,7 +116,7 @@ main(void) to = stpcpy(to, "foo"); to = stpcpy(to, "bar"); - printf("%s\\n", buffer); + printf("%s\en", buffer); } .EE .SH SEE ALSO diff --git a/man3/stpncpy.3 b/man3/stpncpy.3 index 6769ecba5..5781765f5 100644 --- a/man3/stpncpy.3 +++ b/man3/stpncpy.3 @@ -47,7 +47,7 @@ function copies at most characters from the string pointed to by .IR src , -including the terminating null byte (\(aq\\0\(aq), +including the terminating null byte (\(aq\e0\(aq), to the array pointed to by .IR dest . Exactly @@ -62,7 +62,7 @@ the remaining characters in the array pointed to by .I dest are filled -with null bytes (\(aq\\0\(aq), +with null bytes (\(aq\e0\(aq), If the length .I strlen(src) is greater than or equal to diff --git a/man3/strcat.3 b/man3/strcat.3 index 6b0edf0a9..f21296ffd 100644 --- a/man3/strcat.3 +++ b/man3/strcat.3 @@ -48,7 +48,7 @@ function appends the string to the .I dest string, -overwriting the terminating null byte (\(aq\\0\(aq) at the end of +overwriting the terminating null byte (\(aq\e0\(aq) at the end of .IR dest , and then adds a terminating null byte. The strings may not overlap, and the @@ -112,9 +112,9 @@ strncat(char *dest, const char *src, size_t n) size_t dest_len = strlen(dest); size_t i; - for (i = 0 ; i < n && src[i] != \(aq\\0\(aq ; i++) + for (i = 0 ; i < n && src[i] != \(aq\e0\(aq ; i++) dest[dest_len + i] = src[i]; - dest[dest_len + i] = \(aq\\0\(aq; + dest[dest_len + i] = \(aq\e0\(aq; return dest; } @@ -213,11 +213,11 @@ main(int argc, char *argv[]) time_t base; base = time(NULL); - p[0] = \(aq\\0\(aq; + p[0] = \(aq\e0\(aq; for (j = 0; j < LIM; j++) { if ((j % 10000) == 0) - printf("%d %ld\\n", j, (long) (time(NULL) \- base)); + printf("%d %ld\en", j, (long) (time(NULL) \- base)); strcat(p, "a"); } } diff --git a/man3/strchr.3 b/man3/strchr.3 index 7f56901e7..d528beafd 100644 --- a/man3/strchr.3 +++ b/man3/strchr.3 @@ -88,7 +88,7 @@ the matched character or NULL if the character is not found. The terminating null byte is considered part of the string, so that if .I c -is specified as \(aq\\0\(aq, +is specified as \(aq\e0\(aq, these functions return a pointer to the terminator. .PP The diff --git a/man3/strcpy.3 b/man3/strcpy.3 index f80b5fcf5..737c83515 100644 --- a/man3/strcpy.3 +++ b/man3/strcpy.3 @@ -48,7 +48,7 @@ The .BR strcpy () function copies the string pointed to by .IR src , -including the terminating null byte (\(aq\\0\(aq), +including the terminating null byte (\(aq\e0\(aq), to the buffer pointed to by .IR dest . The strings may not overlap, and the destination string @@ -96,10 +96,10 @@ strncpy(char *dest, const char *src, size_t n) { size_t i; - for (i = 0; i < n && src[i] != \(aq\\0\(aq; i++) + for (i = 0; i < n && src[i] != \(aq\e0\(aq; i++) dest[i] = src[i]; for ( ; i < n; i++) - dest[i] = \(aq\\0\(aq; + dest[i] = \(aq\e0\(aq; return dest; } @@ -168,7 +168,7 @@ you can force termination using something like the following: .EX if (buflen > 0) { strncpy(buf, str, buflen \- 1); - buf[buflen \- 1]= \(aq\\0\(aq; + buf[buflen \- 1]= \(aq\e0\(aq; } .EE .in diff --git a/man3/strdup.3 b/man3/strdup.3 index 809bb5bce..9c797edb1 100644 --- a/man3/strdup.3 +++ b/man3/strdup.3 @@ -95,7 +95,7 @@ is longer than .IR n , only .I n -bytes are copied, and a terminating null byte (\(aq\\0\(aq) is added. +bytes are copied, and a terminating null byte (\(aq\e0\(aq) is added. .PP .BR strdupa () and diff --git a/man3/strerror.3 b/man3/strerror.3 index 39de2c499..0658cdede 100644 --- a/man3/strerror.3 +++ b/man3/strerror.3 @@ -140,7 +140,7 @@ bytes are stored (the string may be truncated if is too small and .I errnum is unknown). -The string always includes a terminating null byte (\(aq\\0\(aq). +The string always includes a terminating null byte (\(aq\e0\(aq). .\" .SS strerror_l() .BR strerror_l () diff --git a/man3/strfromd.3 b/man3/strfromd.3 index 013ac3411..a6c2ef342 100644 --- a/man3/strfromd.3 +++ b/man3/strfromd.3 @@ -71,7 +71,7 @@ At most characters are stored into .IR str . .PP -The terminating null character ('\\0') is written if and only if +The terminating null character ('\e0') is written if and only if .I n is sufficiently large, otherwise the written string is truncated at .I n diff --git a/man3/strftime.3 b/man3/strftime.3 index 942550797..35ac028fd 100644 --- a/man3/strftime.3 +++ b/man3/strftime.3 @@ -643,7 +643,7 @@ main(int argc, char *argv[]) exit(EXIT_FAILURE); } - printf("Result string is \\"%s\\"\\n", outstr); + printf("Result string is \e"%s\e"\en", outstr); exit(EXIT_SUCCESS); } .EE diff --git a/man3/strlen.3 b/man3/strlen.3 index 397d225a1..7986a75f5 100644 --- a/man3/strlen.3 +++ b/man3/strlen.3 @@ -41,7 +41,7 @@ The .BR strlen () function calculates the length of the string pointed to by .IR s , -excluding the terminating null byte (\(aq\\0\(aq). +excluding the terminating null byte (\(aq\e0\(aq). .SH RETURN VALUE The .BR strlen () diff --git a/man3/strnlen.3 b/man3/strnlen.3 index 7675effb7..9f9698729 100644 --- a/man3/strnlen.3 +++ b/man3/strnlen.3 @@ -44,7 +44,7 @@ The function returns the number of bytes in the string pointed to by .IR s , -excluding the terminating null byte (\(aq\\0\(aq), +excluding the terminating null byte (\(aq\e0\(aq), but at most .IR maxlen . In doing this, @@ -64,7 +64,7 @@ if that is less than .IR maxlen , or .I maxlen -if there is no null terminating (\(aq\\0\(aq) among the first +if there is no null terminating (\(aq\e0\(aq) among the first .I maxlen characters pointed to by .IR s . diff --git a/man3/strsep.3 b/man3/strsep.3 index 2fc57612a..0c2f91a17 100644 --- a/man3/strsep.3 +++ b/man3/strsep.3 @@ -63,7 +63,7 @@ in the string that is delimited by one of the bytes in the string .IR delim . This token is terminated by overwriting the delimiter -with a null byte (\(aq\\0\(aq), +with a null byte (\(aq\e0\(aq), and .I *stringp is updated to point past the token. diff --git a/man3/strstr.3 b/man3/strstr.3 index 2d3c3ea72..2ca10a87e 100644 --- a/man3/strstr.3 +++ b/man3/strstr.3 @@ -52,7 +52,7 @@ function finds the first occurrence of the substring .I needle in the string .IR haystack . -The terminating null bytes (\(aq\\0\(aq) are not compared. +The terminating null bytes (\(aq\e0\(aq) are not compared. .PP The .BR strcasestr () diff --git a/man3/strtok.3 b/man3/strtok.3 index 2e8192f99..a7c8d6b36 100644 --- a/man3/strtok.3 +++ b/man3/strtok.3 @@ -104,7 +104,7 @@ to return NULL on the first call.) .PP The end of each token is found by scanning forward until either the next delimiter byte is found or until the -terminating null byte (\(aq\\0\(aq) is encountered. +terminating null byte (\(aq\e0\(aq) is encountered. If a delimiter byte is found, it is overwritten with a null byte to terminate the current token, and .BR strtok () @@ -244,7 +244,7 @@ main(int argc, char *argv[]) int j; if (argc != 4) { - fprintf(stderr, "Usage: %s string delim subdelim\\n", + fprintf(stderr, "Usage: %s string delim subdelim\en", argv[0]); exit(EXIT_FAILURE); } @@ -253,13 +253,13 @@ main(int argc, char *argv[]) token = strtok_r(str1, argv[2], &saveptr1); if (token == NULL) break; - printf("%d: %s\\n", j, token); + printf("%d: %s\en", j, token); for (str2 = token; ; str2 = NULL) { subtoken = strtok_r(str2, argv[3], &saveptr2); if (subtoken == NULL) break; - printf("\t \-\-> %s\\n", subtoken); + printf("\t \-\-> %s\en", subtoken); } } diff --git a/man3/strtol.3 b/man3/strtol.3 index 8131a6860..cad7b463f 100644 --- a/man3/strtol.3 +++ b/man3/strtol.3 @@ -102,9 +102,9 @@ in (and returns 0). In particular, if .I *nptr -is not \(aq\\0\(aq but +is not \(aq\e0\(aq but .I **endptr -is \(aq\\0\(aq on return, the entire string is valid. +is \(aq\e0\(aq on return, the entire string is valid. .PP The .BR strtoll () @@ -261,7 +261,7 @@ main(int argc, char *argv[]) long val; if (argc < 2) { - fprintf(stderr, "Usage: %s str [base]\\n", argv[0]); + fprintf(stderr, "Usage: %s str [base]\en", argv[0]); exit(EXIT_FAILURE); } @@ -280,16 +280,16 @@ main(int argc, char *argv[]) } if (endptr == str) { - fprintf(stderr, "No digits were found\\n"); + fprintf(stderr, "No digits were found\en"); exit(EXIT_FAILURE); } /* If we got here, strtol() successfully parsed a number */ - printf("strtol() returned %ld\\n", val); + printf("strtol() returned %ld\en", val); - if (*endptr != \(aq\\0\(aq) /* Not necessarily an error... */ - printf("Further characters after number: %s\\n", endptr); + if (*endptr != \(aq\e0\(aq) /* Not necessarily an error... */ + printf("Further characters after number: %s\en", endptr); exit(EXIT_SUCCESS); } diff --git a/man3/strtoul.3 b/man3/strtoul.3 index 1e488c02d..df010cd09 100644 --- a/man3/strtoul.3 +++ b/man3/strtoul.3 @@ -110,9 +110,9 @@ in (and returns 0). In particular, if .I *nptr -is not \(aq\\0\(aq but +is not \(aq\e0\(aq but .I **endptr -is \(aq\\0\(aq on return, the entire string is valid. +is \(aq\e0\(aq on return, the entire string is valid. .PP The .BR strtoull () diff --git a/man3/strverscmp.3 b/man3/strverscmp.3 index 720159159..6bdd0260e 100644 --- a/man3/strverscmp.3 +++ b/man3/strverscmp.3 @@ -139,13 +139,13 @@ main(int argc, char *argv[]) int res; if (argc != 3) { - fprintf(stderr, "Usage: %s \\n", argv[0]); + fprintf(stderr, "Usage: %s \en", argv[0]); exit(EXIT_FAILURE); } res = strverscmp(argv[1], argv[2]); - printf("%s %s %s\\n", argv[1], + printf("%s %s %s\en", argv[1], (res < 0) ? "<" : (res == 0) ? "==" : ">", argv[2]); exit(EXIT_SUCCESS); diff --git a/man3/strxfrm.3 b/man3/strxfrm.3 index 6e1973157..6e79b037b 100644 --- a/man3/strxfrm.3 +++ b/man3/strxfrm.3 @@ -66,7 +66,7 @@ function returns the number of bytes required to store the transformed string in .I dest excluding the -terminating null byte (\(aq\\0\(aq). +terminating null byte (\(aq\e0\(aq). If the value returned is .I n or more, the diff --git a/man3/termios.3 b/man3/termios.3 index 819a2cd46..f30747843 100644 --- a/man3/termios.3 +++ b/man3/termios.3 @@ -128,8 +128,8 @@ queues to be flushed, and if the terminal is the controlling terminal of a foreground process group, it will cause a \fBSIGINT\fP to be sent to this foreground process group. When neither \fBIGNBRK\fP nor \fBBRKINT\fP are set, a BREAK -reads as a null byte (\(aq\\0\(aq), except when \fBPARMRK\fP is set, -in which case it reads as the sequence \\377 \\0 \\0. +reads as a null byte (\(aq\e0\(aq), except when \fBPARMRK\fP is set, +in which case it reads as the sequence \e377 \e0 \e0. .TP .B IGNPAR Ignore framing errors and parity errors. @@ -140,19 +140,19 @@ marked when passed to the program. This bit is meaningful only when \fBINPCK\fP is set and \fBIGNPAR\fP is not set. The way erroneous bytes are marked is with two preceding bytes, -\\377 and \\0. +\e377 and \e0. Thus, the program actually reads three bytes for one erroneous byte received from the terminal. -If a valid byte has the value \\377, +If a valid byte has the value \e377, and \fBISTRIP\fP (see below) is not set, the program might confuse it with the prefix that marks a parity error. -Therefore, a valid byte \\377 is passed to the program as two -bytes, \\377 \\377, in this case. +Therefore, a valid byte \e377 is passed to the program as two +bytes, \e377 \e377, in this case. .IP If neither \fBIGNPAR\fP nor \fBPARMRK\fP is set, read a character with a parity error or framing error -as \\0. +as \e0. .TP .B INPCK Enable input parity checking. @@ -216,7 +216,7 @@ Send fill characters for a delay, rather than using a timed delay. .TP .B OFDEL Fill character is ASCII DEL (0177). -If unset, fill character is ASCII NUL (\(aq\\0\(aq). +If unset, fill character is ASCII NUL (\(aq\e0\(aq). (Not implemented on Linux.) .TP .B NLDLY @@ -387,8 +387,8 @@ Enable canonical mode (described below). .B XCASE (not in POSIX; not supported under Linux) If \fBICANON\fP is also set, terminal is uppercase only. -Input is converted to lowercase, except for characters preceded by \\. -On output, uppercase characters are preceded by \\ and lowercase +Input is converted to lowercase, except for characters preceded by \e. +On output, uppercase characters are preceded by \e and lowercase characters are converted to uppercase. [requires .B _BSD_SOURCE diff --git a/man3/tsearch.3 b/man3/tsearch.3 index fcdaaa40e..33213a029 100644 --- a/man3/tsearch.3 +++ b/man3/tsearch.3 @@ -256,7 +256,7 @@ xmalloc(unsigned n) p = malloc(n); if (p) return p; - fprintf(stderr, "insufficient memory\\n"); + fprintf(stderr, "insufficient memory\en"); exit(EXIT_FAILURE); } @@ -280,13 +280,13 @@ action(const void *nodep, const VISIT which, const int depth) break; case postorder: datap = *(int **) nodep; - printf("%6d\\n", *datap); + printf("%6d\en", *datap); break; case endorder: break; case leaf: datap = *(int **) nodep; - printf("%6d\\n", *datap); + printf("%6d\en", *datap); break; } } diff --git a/man3/wcpcpy.3 b/man3/wcpcpy.3 index 7d90a1344..cc6c5136c 100644 --- a/man3/wcpcpy.3 +++ b/man3/wcpcpy.3 @@ -48,7 +48,7 @@ function is the wide-character equivalent of the function. It copies the wide-character string pointed to by .IR src , -including the terminating null wide character (L\(aq\\0\(aq), +including the terminating null wide character (L\(aq\e0\(aq), to the array pointed to by .IR dest . .PP diff --git a/man3/wcpncpy.3 b/man3/wcpncpy.3 index c51d943f8..d11a591f5 100644 --- a/man3/wcpncpy.3 +++ b/man3/wcpncpy.3 @@ -53,7 +53,7 @@ It copies at most wide characters from the wide-character string pointed to by .IR src , -including the terminating null wide (L\(aq\\0\(aq), +including the terminating null wide (L\(aq\e0\(aq), to the array pointed to by .IR dest . Exactly @@ -68,7 +68,7 @@ is smaller than the remaining wide characters in the array pointed to by .I dest -are filled with L\(aq\\0\(aq characters. +are filled with L\(aq\e0\(aq characters. If the length .IR wcslen(src) is greater than or equal @@ -77,7 +77,7 @@ to the string pointed to by .I dest will -not be L\(aq\\0\(aq terminated. +not be L\(aq\e0\(aq terminated. .PP The strings may not overlap. .PP diff --git a/man3/wcrtomb.3 b/man3/wcrtomb.3 index 519d69b65..e7d6a62bc 100644 --- a/man3/wcrtomb.3 +++ b/man3/wcrtomb.3 @@ -28,7 +28,7 @@ The main case for this function is when is not NULL and .I wc -is not a null wide character (L\(aq\\0\(aq). +is not a null wide character (L\(aq\e0\(aq). In this case, the .BR wcrtomb () function @@ -51,7 +51,7 @@ A different case is when is not NULL, but .I wc -is a null wide character (L\(aq\\0\(aq). +is a null wide character (L\(aq\e0\(aq). In this case, the .BR wcrtomb () function stores at @@ -61,7 +61,7 @@ the shift sequence needed to bring .I *ps back to the initial state, -followed by a \(aq\\0\(aq byte. +followed by a \(aq\e0\(aq byte. It updates the shift state .I *ps (i.e., brings @@ -78,7 +78,7 @@ In this case, is ignored, and the function effectively returns .PP - wcrtomb(buf, L\(aq\\0\(aq, ps) + wcrtomb(buf, L\(aq\e0\(aq, ps) .PP where .I buf diff --git a/man3/wcscat.3 b/man3/wcscat.3 index 3d98bea4f..e5d2f6ed7 100644 --- a/man3/wcscat.3 +++ b/man3/wcscat.3 @@ -31,7 +31,7 @@ of the function. It copies the wide-character string pointed to by .IR src , -including the terminating null wide character (L\(aq\\0\(aq), +including the terminating null wide character (L\(aq\e0\(aq), to the end of the wide-character string pointed to by .IR dest . .PP diff --git a/man3/wcscpy.3 b/man3/wcscpy.3 index fcbff24d6..c008cc870 100644 --- a/man3/wcscpy.3 +++ b/man3/wcscpy.3 @@ -31,7 +31,7 @@ of the function. It copies the wide-character string pointed to by .IR src , -including the terminating null wide character (L\(aq\\0\(aq), +including the terminating null wide character (L\(aq\e0\(aq), to the array pointed to by .IR dest . .PP diff --git a/man3/wcslen.3 b/man3/wcslen.3 index 37f3ade49..f5f09a36c 100644 --- a/man3/wcslen.3 +++ b/man3/wcslen.3 @@ -32,7 +32,7 @@ function. It determines the length of the wide-character string pointed to by .IR s , -excluding the terminating null wide character (L\(aq\\0\(aq). +excluding the terminating null wide character (L\(aq\e0\(aq). .SH RETURN VALUE The .BR wcslen () diff --git a/man3/wcsncat.3 b/man3/wcsncat.3 index cd75d4e6c..cd3241a9f 100644 --- a/man3/wcsncat.3 +++ b/man3/wcsncat.3 @@ -36,7 +36,7 @@ string pointed to by to the end of the wide-character string pointed to by .IR dest , -and adds a terminating null wide character (L\(aq\\0\(aq). +and adds a terminating null wide character (L\(aq\e0\(aq). .PP The strings may not overlap. .PP diff --git a/man3/wcsncmp.3 b/man3/wcsncmp.3 index abc1cdf7b..324122e56 100644 --- a/man3/wcsncmp.3 +++ b/man3/wcsncmp.3 @@ -38,7 +38,7 @@ but at most wide characters from each string. In each string, the comparison extends only up -to the first occurrence of a null wide character (L\(aq\\0\(aq), if any. +to the first occurrence of a null wide character (L\(aq\e0\(aq), if any. .SH RETURN VALUE The .BR wcsncmp () diff --git a/man3/wcsncpy.3 b/man3/wcsncpy.3 index 8451e0f46..f97a34c9d 100644 --- a/man3/wcsncpy.3 +++ b/man3/wcsncpy.3 @@ -33,7 +33,7 @@ It copies at most wide characters from the wide-character string pointed to by .IR src , -including the terminating null wide character (L\(aq\\0\(aq), +including the terminating null wide character (L\(aq\e0\(aq), to the array pointed to by .IR dest . Exactly diff --git a/man3/wcsnlen.3 b/man3/wcsnlen.3 index 35c795386..8b5fc5cd1 100644 --- a/man3/wcsnlen.3 +++ b/man3/wcsnlen.3 @@ -49,7 +49,7 @@ of the function. It returns the number of wide-characters in the string pointed to by .IR s , -not including the terminating null wide character (L\(aq\\0\(aq), +not including the terminating null wide character (L\(aq\e0\(aq), but at most .I maxlen wide characters (note: this parameter is not a byte count). diff --git a/man3/wcsnrtombs.3 b/man3/wcsnrtombs.3 index d45b54127..569cb65fe 100644 --- a/man3/wcsnrtombs.3 +++ b/man3/wcsnrtombs.3 @@ -99,7 +99,7 @@ is set to .IP 2. .I nwc wide characters have been -converted without encountering a null wide character (L\(aq\\0\(aq), +converted without encountering a null wide character (L\(aq\e0\(aq), or the length limit forces a stop. In this case, .I *src @@ -118,7 +118,7 @@ In this case, is set to NULL, and the number of bytes written to .IR dest , -excluding the terminating null byte (\(aq\\0\(aq), is +excluding the terminating null byte (\(aq\e0\(aq), is returned. .PP If diff --git a/man3/wcsrtombs.3 b/man3/wcsrtombs.3 index 9808976f5..ef71919b4 100644 --- a/man3/wcsrtombs.3 +++ b/man3/wcsrtombs.3 @@ -75,7 +75,7 @@ and the number of bytes written to is returned. .IP 3. The wide-character string has been completely converted, including the -terminating null wide character (L\(aq\\0\(aq), +terminating null wide character (L\(aq\e0\(aq), which has the side effect of bringing back .I *ps to the initial state. @@ -84,7 +84,7 @@ In this case, is set to NULL, and the number of bytes written to .IR dest , -excluding the terminating null byte (\(aq\\0\(aq), +excluding the terminating null byte (\(aq\e0\(aq), is returned. .PP If diff --git a/man3/wcsstr.3 b/man3/wcsstr.3 index 20fb65fc5..f4f296c5c 100644 --- a/man3/wcsstr.3 +++ b/man3/wcsstr.3 @@ -30,7 +30,7 @@ function is the wide-character equivalent of the function. It searches for the first occurrence of the wide-character string .I needle -(without its terminating null wide character (L\(aq\\0\(aq)) +(without its terminating null wide character (L\(aq\e0\(aq)) as a substring in the wide-character string .IR haystack . .SH RETURN VALUE diff --git a/man3/wcstok.3 b/man3/wcstok.3 index 73aa0db82..b571c8df3 100644 --- a/man3/wcstok.3 +++ b/man3/wcstok.3 @@ -66,7 +66,7 @@ and returns a pointer to it, but before doing that, it zero-terminates the token by replacing the next wide-character which occurs in .I delim with -a null wide character (L\(aq\\0\(aq), +a null wide character (L\(aq\e0\(aq), and it updates .I *ptr so that subsequent calls will @@ -102,9 +102,9 @@ The following code loops over the tokens contained in a wide-character string. wchar_t *wcs = ...; wchar_t *token; wchar_t *state; -for (token = wcstok(wcs, " \\t\\n", &state); +for (token = wcstok(wcs, " \et\en", &state); token != NULL; - token = wcstok(NULL, " \\t\\n", &state)) { + token = wcstok(NULL, " \et\en", &state)) { ... } .EE diff --git a/man3/wcstombs.3 b/man3/wcstombs.3 index 2f8a49447..a8f310604 100644 --- a/man3/wcstombs.3 +++ b/man3/wcstombs.3 @@ -53,11 +53,11 @@ In this case, the number of bytes written to is returned, but the shift state at this point is lost. .IP 3. The wide-character string has been completely converted, including the -terminating null wide character (L\(aq\\0\(aq). +terminating null wide character (L\(aq\e0\(aq). In this case, the conversion ends in the initial shift state. The number of bytes written to .IR dest , -excluding the terminating null byte (\(aq\\0\(aq), is returned. +excluding the terminating null byte (\(aq\e0\(aq), is returned. .PP The programmer must ensure that there is room for at least .I n diff --git a/man3/wcwidth.3 b/man3/wcwidth.3 index 33750a041..11c58834d 100644 --- a/man3/wcwidth.3 +++ b/man3/wcwidth.3 @@ -34,7 +34,7 @@ is a printable wide character, the value is at least 0. If .I c -is null wide character (L\(aq\\0\(aq), the value is 0. +is null wide character (L\(aq\e0\(aq), the value is 0. Otherwise, \-1 is returned. .SH RETURN VALUE The diff --git a/man3/wprintf.3 b/man3/wprintf.3 index 9ce6ce3be..bf194a4aa 100644 --- a/man3/wprintf.3 +++ b/man3/wprintf.3 @@ -172,7 +172,7 @@ wide characters (each by a call to the function with a conversion state starting in the initial state before the first byte). The resulting wide characters are written up to -(but not including) the terminating null wide character (L\(aq\\0\(aq). +(but not including) the terminating null wide character (L\(aq\e0\(aq). If a precision is specified, no more wide characters than the number specified are written. Note that the precision determines the number of @@ -181,7 +181,7 @@ written, not the number of .I bytes or .IR "screen positions" . -The array must contain a terminating null byte (\(aq\\0\(aq), +The array must contain a terminating null byte (\(aq\e0\(aq), unless a precision is given and it is so small that the number of converted wide characters reaches it before the end of the array is reached. @@ -253,7 +253,7 @@ representation is platform- and locale-dependent. wide characters using their Unicode (ISO-10646) code point, but other platforms don't do this. Also, the use of C99 universal character names -of the form \\unnnn does not solve this problem.) +of the form \eunnnn does not solve this problem.) Therefore, in internationalized programs, the .I format diff --git a/man4/console_codes.4 b/man4/console_codes.4 index 6af663d84..c3cf771e7 100644 --- a/man4/console_codes.4 +++ b/man4/console_codes.4 @@ -411,7 +411,7 @@ In some distributions there is a program .BR reset (1) that just does "echo ^[c". If your terminfo entry for the console is correct -(and has an entry rs1=\\Ec), then "tput reset" will also work. +(and has an entry rs1=\eEc), then "tput reset" will also work. .PP The user-defined mapping table can be set using .BR mapscrn (8). @@ -501,10 +501,10 @@ ESC N SS2 Single shift 2. (Select G2 character set for the next character only.) ESC O SS3 Single shift 3. (Select G3 character set for the next character only.) -ESC P DCS Device control string (ended by ESC \\) +ESC P DCS Device control string (ended by ESC \e) ESC X SOS Start of string. -ESC ^ PM Privacy message (ended by ESC \\) -ESC \\ ST String terminator +ESC ^ PM Privacy message (ended by ESC \e) +ESC \e ST String terminator ESC * ... Designate G2 character set ESC + ... Designate G3 character set .TE @@ -512,10 +512,10 @@ ESC + ... Designate G3 character set The program .BR xterm (1) (in VT100 mode) recognizes ESC c, ESC # 8, ESC >, ESC =, -ESC D, ESC E, ESC H, ESC M, ESC N, ESC O, ESC P ... ESC \\, +ESC D, ESC E, ESC H, ESC M, ESC N, ESC O, ESC P ... ESC \e, ESC Z (it answers ESC [ ? 1 ; 2 c, "I am a VT100 with advanced video option") -and ESC ^ ... ESC \\ with the same meanings as indicated above. +and ESC ^ ... ESC \e with the same meanings as indicated above. It accepts ESC (, ESC ), ESC *, ESC + followed by 0, A, B for the DEC special character and line drawing set, UK, and US-ASCII, respectively. diff --git a/man4/dsp56k.4 b/man4/dsp56k.4 index caa689805..2ae3b8c51 100644 --- a/man4/dsp56k.4 +++ b/man4/dsp56k.4 @@ -85,7 +85,7 @@ Allowed values are in the range 1 to 4, and is the number of bytes that will be received at a time from the DSP56001. These data quantities will either truncated, or padded with -a null byte (\(aq\\0\(aq) to fit the native 24-bit data format of the DSP56001. +a null byte (\(aq\e0\(aq) to fit the native 24-bit data format of the DSP56001. .IP \fBDSP56K_HOST_FLAGS\fP read and write the host flags. The host flags are four diff --git a/man4/full.4 b/man4/full.4 index cea0bb53a..7bbdff4d9 100644 --- a/man4/full.4 +++ b/man4/full.4 @@ -53,7 +53,7 @@ This can be used to test how a program handles disk-full errors. .PP Reads from the .I /dev/full -device will return \\0 characters. +device will return \e0 characters. .PP Seeks on .I /dev/full diff --git a/man4/initrd.4 b/man4/initrd.4 index ae5e38f64..64707da77 100644 --- a/man4/initrd.4 +++ b/man4/initrd.4 @@ -301,7 +301,7 @@ IP number 193.8.232.2 and named "idefix": .in +4n .EX echo /var/nfsroot >/proc/sys/kernel/nfs-root-name -echo 193.8.232.2:193.8.232.7::255.255.255.0:idefix \\ +echo 193.8.232.2:193.8.232.7::255.255.255.0:idefix \e >/proc/sys/kernel/nfs-root-addrs echo 255 >/proc/sys/kernel/real-root-dev .EE diff --git a/man4/loop.4 b/man4/loop.4 index 6b3460262..78995a705 100644 --- a/man4/loop.4 +++ b/man4/loop.4 @@ -251,7 +251,7 @@ loopname = /dev/loop5 #include #include -#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\ +#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e } while (0) int @@ -262,7 +262,7 @@ main(int argc, char *argv[]) char loopname[4096]; if (argc != 2) { - fprintf(stderr, "Usage: %s backing\-file\\n", argv[0]); + fprintf(stderr, "Usage: %s backing\-file\en", argv[0]); exit(EXIT_FAILURE); } @@ -275,7 +275,7 @@ main(int argc, char *argv[]) errExit("ioctl\-LOOP_CTL_GET_FREE"); sprintf(loopname, "/dev/loop%ld", devnr); - printf("loopname = %s\\n", loopname); + printf("loopname = %s\en", loopname); loopfd = open(loopname, O_RDWR); if (loopfd == \-1) diff --git a/man4/vcs.4 b/man4/vcs.4 index f695b956c..34a64c8f8 100644 --- a/man4/vcs.4 +++ b/man4/vcs.4 @@ -165,7 +165,7 @@ main(void) if (s & mask) ch |= 0x100; attrib = ((s & ~mask) >> 8); - printf("ch=0x%03x attrib=0x%02x\\n", ch, attrib); + printf("ch=0x%03x attrib=0x%02x\en", ch, attrib); s ^= 0x1000; (void) lseek(fd, \-2, SEEK_CUR); (void) write(fd, &s, 2); diff --git a/man5/charmap.5 b/man5/charmap.5 index 4467144be..9000a6bd4 100644 --- a/man5/charmap.5 +++ b/man5/charmap.5 @@ -40,7 +40,7 @@ It defaults to the number sign (#). is followed by a character that should be used as the escape character for the rest of the file to mark characters that should be interpreted in a special way. -It defaults to the backslash (\\). +It defaults to the backslash (\e). .TP .RI < mb_cur_max > is followed by the maximum number of bytes for a character. diff --git a/man5/core.5 b/man5/core.5 index 4b7a7926b..56e393129 100644 --- a/man5/core.5 +++ b/man5/core.5 @@ -628,16 +628,16 @@ main(int argc, char *argv[]) /* Display command\-line arguments given to core_pattern pipe program */ - fprintf(fp, "argc=%d\\n", argc); + fprintf(fp, "argc=%d\en", argc); for (j = 0; j < argc; j++) - fprintf(fp, "argc[%d]=<%s>\\n", j, argv[j]); + fprintf(fp, "argc[%d]=<%s>\en", j, argv[j]); /* Count bytes in standard input (the core dump) */ tot = 0; while ((nread = read(STDIN_FILENO, buf, BUF_SIZE)) > 0) tot += nread; - fprintf(fp, "Total bytes in core dump: %d\\n", tot); + fprintf(fp, "Total bytes in core dump: %d\en", tot); fclose(fp); exit(EXIT_SUCCESS); diff --git a/man5/elf.5 b/man5/elf.5 index 656a8cb45..6ee0954d4 100644 --- a/man5/elf.5 +++ b/man5/elf.5 @@ -1435,7 +1435,7 @@ and section names. One references a string as an index into the string table section. The first byte, which is index zero, is defined to hold -a null byte (\(aq\\0\(aq). +a null byte (\(aq\e0\(aq). Similarly, a string table's last byte is defined to hold a null byte, ensuring null termination for all strings. .PP diff --git a/man5/locale.5 b/man5/locale.5 index 382109284..565b80474 100644 --- a/man5/locale.5 +++ b/man5/locale.5 @@ -45,7 +45,7 @@ of the following keywords: is followed by a character that should be used as the escape-character for the rest of the file to mark characters that should be interpreted in a special way. -It defaults to the backslash (\\). +It defaults to the backslash (\e). .TP .I comment_char is followed by a character that will be used as the diff --git a/man5/proc.5 b/man5/proc.5 index 199923441..6546e5552 100644 --- a/man5/proc.5 +++ b/man5/proc.5 @@ -508,7 +508,7 @@ unless the process is a zombie. In the latter case, there is nothing in this file: that is, a read on this file will return 0 characters. The command-line arguments appear in this file as a set of -strings separated by null bytes (\(aq\\0\(aq), +strings separated by null bytes (\(aq\e0\(aq), with a further null byte after the last string. .TP .IR /proc/[pid]/comm " (since Linux 2.6.33)" @@ -588,7 +588,7 @@ check; see This file contains the initial environment that was set when the currently executing program was started via .BR execve (2). -The entries are separated by null bytes (\(aq\\0\(aq), +The entries are separated by null bytes (\(aq\e0\(aq), and there may be a null byte at the end. Thus, to print out the environment of process 1, you would do: .IP @@ -1362,7 +1362,7 @@ is shown unescaped except for newline characters, which are replaced with an octal escape sequence. As a result, it is not possible to determine whether the original pathname contained a newline character or the literal -.I \\\012 +.I \ee012 character sequence. .IP If the mapping is file-backed and the file has been deleted, the string @@ -4298,13 +4298,13 @@ the \fI/proc\fP filesystem, and the (deprecated) .BR sysctl (2) system call. .IP -String values may be terminated by either \(aq\\0\(aq or \(aq\\n\(aq. +String values may be terminated by either \(aq\e0\(aq or \(aq\en\(aq. .IP Integer and long values may be written either in decimal or in hexadecimal notation (e.g. 0x3FFF). When writing multiple integer or long values, these may be separated by any of the following whitespace characters: -\(aq\ \(aq, \(aq\\t\(aq, or \(aq\\n\(aq. +\(aq\ \(aq, \(aq\et\(aq, or \(aq\en\(aq. Using other separators leads to the error .BR EINVAL . .TP @@ -6639,7 +6639,7 @@ This is useful for analyzing virtual memory behavior. .SH NOTES Many files contain strings (e.g., the environment and command line) that are in the internal format, -with subfields terminated by null bytes (\(aq\\0\(aq). +with subfields terminated by null bytes (\(aq\e0\(aq). When inspecting such files, you may find that the results are more readable if you use a command of the following form to display them: .PP diff --git a/man5/repertoiremap.5 b/man5/repertoiremap.5 index 6329bc720..c36c90367 100644 --- a/man5/repertoiremap.5 +++ b/man5/repertoiremap.5 @@ -42,7 +42,7 @@ It defaults to the number sign (#). is followed by a character that should be used as the escape character for the rest of the file to mark characters that should be interpreted in a special way. -It defaults to the backslash (\\). +It defaults to the backslash (\e). .PP The mapping section starts with the keyword .I CHARIDS diff --git a/man5/sysfs.5 b/man5/sysfs.5 index f34069697..d7fe419aa 100644 --- a/man5/sysfs.5 +++ b/man5/sysfs.5 @@ -135,7 +135,7 @@ The following shell session shows an example from .EX $ \fBstat \-c "%t %T" /dev/null\fP 1 3 -$ \fBreadlink /sys/dev/char/1\\:3\fP +$ \fBreadlink /sys/dev/char/1\e:3\fP \&../../devices/virtual/mem/null $ \fBls \-Fd /sys/devices/virtual/mem/null\fP /sys/devices/virtual/mem/null/ diff --git a/man5/termcap.5 b/man5/termcap.5 index d4029b284..8e4ebf41e 100644 --- a/man5/termcap.5 +++ b/man5/termcap.5 @@ -52,7 +52,7 @@ The termcap database is indexed on the .B TERM environment variable. .PP -Termcap entries must be defined on a single logical line, with \(aq\\\(aq +Termcap entries must be defined on a single logical line, with \(aq\e\(aq used to suppress the newline. Fields are separated by \(aq:\(aq. The first field of each entry starts at the left-hand margin, @@ -417,7 +417,7 @@ Do ASCII output of this parameter with a field with of 3 .IP % Print a \(aq%\(aq .PP -If you use binary output, then you should avoid the null character (\(aq\\0\(aq) +If you use binary output, then you should avoid the null character (\(aq\e0\(aq) because it terminates the string. You should reset tabulator expansion if a tabulator can be the binary output of a parameter. diff --git a/man7/aio.7 b/man7/aio.7 index df26117e3..a8aa0b7a9 100644 --- a/man7/aio.7 +++ b/man7/aio.7 @@ -209,7 +209,7 @@ the program retrieves their status using .PP The .B SIGQUIT -signal (generated by typing control-\\) causes the program to request +signal (generated by typing control-\e) causes the program to request cancellation of each of the outstanding requests using .BR aio_cancel (3). .PP @@ -283,7 +283,7 @@ static void /* Handler for I/O completion signal */ aioSigHandler(int sig, siginfo_t *si, void *ucontext) { if (si->si_code == SI_ASYNCIO) { - write(STDOUT_FILENO, "I/O completion signal received\\n", 31); + write(STDOUT_FILENO, "I/O completion signal received\en", 31); /* The corresponding ioRequest structure would be available as struct ioRequest *ioReq = si\->si_value.sival_ptr; @@ -303,7 +303,7 @@ main(int argc, char *argv[]) int openReqs; /* Number of I/O requests still in progress */ if (argc < 2) { - fprintf(stderr, "Usage: %s ...\\n", + fprintf(stderr, "Usage: %s ...\en", argv[0]); exit(EXIT_FAILURE); } @@ -345,7 +345,7 @@ main(int argc, char *argv[]) ioList[j].aiocbp\->aio_fildes = open(argv[j + 1], O_RDONLY); if (ioList[j].aiocbp\->aio_fildes == \-1) errExit("open"); - printf("opened %s on descriptor %d\\n", argv[j + 1], + printf("opened %s on descriptor %d\en", argv[j + 1], ioList[j].aiocbp\->aio_fildes); ioList[j].aiocbp\->aio_buf = malloc(BUF_SIZE); @@ -378,7 +378,7 @@ main(int argc, char *argv[]) outstanding I/O requests, and display status returned from the cancellation requests */ - printf("got SIGQUIT; canceling I/O requests: \\n"); + printf("got SIGQUIT; canceling I/O requests: \en"); for (j = 0; j < numReqs; j++) { if (ioList[j].status == EINPROGRESS) { @@ -387,11 +387,11 @@ main(int argc, char *argv[]) s = aio_cancel(ioList[j].aiocbp\->aio_fildes, ioList[j].aiocbp); if (s == AIO_CANCELED) - printf("I/O canceled\\n"); + printf("I/O canceled\en"); else if (s == AIO_NOTCANCELED) - printf("I/O not canceled\\n"); + printf("I/O not canceled\en"); else if (s == AIO_ALLDONE) - printf("I/O all done\\n"); + printf("I/O all done\en"); else errMsg("aio_cancel"); } @@ -403,7 +403,7 @@ main(int argc, char *argv[]) /* Check the status of each I/O request that is still in progress */ - printf("aio_error():\\n"); + printf("aio_error():\en"); for (j = 0; j < numReqs; j++) { if (ioList[j].status == EINPROGRESS) { printf(" for request %d (descriptor %d): ", @@ -412,13 +412,13 @@ main(int argc, char *argv[]) switch (ioList[j].status) { case 0: - printf("I/O succeeded\\n"); + printf("I/O succeeded\en"); break; case EINPROGRESS: - printf("In progress\\n"); + printf("In progress\en"); break; case ECANCELED: - printf("Canceled\\n"); + printf("Canceled\en"); break; default: errMsg("aio_error"); @@ -431,16 +431,16 @@ main(int argc, char *argv[]) } } - printf("All I/O requests completed\\n"); + printf("All I/O requests completed\en"); /* Check status return of all I/O requests */ - printf("aio_return():\\n"); + printf("aio_return():\en"); for (j = 0; j < numReqs; j++) { ssize_t s; s = aio_return(ioList[j].aiocbp); - printf(" for request %d (descriptor %d): %zd\\n", + printf(" for request %d (descriptor %d): %zd\en", j, ioList[j].aiocbp\->aio_fildes, s); } diff --git a/man7/cgroups.7 b/man7/cgroups.7 index 7004e3f9f..21f3f14cf 100644 --- a/man7/cgroups.7 +++ b/man7/cgroups.7 @@ -981,7 +981,7 @@ option as follows: .PP .in +4n .EX -mount -t cgroup2 -o remount,nsdelegate \\ +mount -t cgroup2 -o remount,nsdelegate \e none /sys/fs/cgroup/unified .EE .in diff --git a/man7/charsets.7 b/man7/charsets.7 index ecb90474b..01530eed1 100644 --- a/man7/charsets.7 +++ b/man7/charsets.7 @@ -312,7 +312,7 @@ byte is the head of a code. Note that the only way ASCII bytes occur in a UTF-8 stream, is as themselves. In particular, there are no -embedded NULs (\(aq\\0\(aq) or \(aq/\(aqs that form part of some larger code. +embedded NULs (\(aq\e0\(aq) or \(aq/\(aqs that form part of some larger code. .PP Since ASCII, and, in particular, NUL and \(aq/\(aq, are unchanged, the kernel does not notice that UTF-8 is being used. diff --git a/man7/complex.7 b/man7/complex.7 index f8a92cdb5..0cd8f5327 100644 --- a/man7/complex.7 +++ b/man7/complex.7 @@ -49,7 +49,7 @@ main(void) { double pi = 4 * atan(1.0); double complex z = cexp(I * pi); - printf("%f + %f * i\\n", creal(z), cimag(z)); + printf("%f + %f * i\en", creal(z), cimag(z)); } .EE .SH SEE ALSO diff --git a/man7/fanotify.7 b/man7/fanotify.7 index 05af2d3ab..742066bd0 100644 --- a/man7/fanotify.7 +++ b/man7/fanotify.7 @@ -635,7 +635,7 @@ handle_events(int fd) if (metadata\->vers != FANOTIFY_METADATA_VERSION) { fprintf(stderr, - "Mismatch of fanotify metadata version.\\n"); + "Mismatch of fanotify metadata version.\en"); exit(EXIT_FAILURE); } @@ -674,8 +674,8 @@ handle_events(int fd) exit(EXIT_FAILURE); } - path[path_len] = '\\0'; - printf("File %s\\n", path); + path[path_len] = '\e0'; + printf("File %s\en", path); /* Close the file descriptor of the event */ @@ -700,11 +700,11 @@ main(int argc, char *argv[]) /* Check mount point is supplied */ if (argc != 2) { - fprintf(stderr, "Usage: %s MOUNT\\n", argv[0]); + fprintf(stderr, "Usage: %s MOUNT\en", argv[0]); exit(EXIT_FAILURE); } - printf("Press enter key to terminate.\\n"); + printf("Press enter key to terminate.\en"); /* Create the file descriptor for accessing the fanotify API */ @@ -743,7 +743,7 @@ main(int argc, char *argv[]) /* This is the loop to wait for incoming events */ - printf("Listening for events.\\n"); + printf("Listening for events.\en"); while (1) { poll_num = poll(fds, nfds, \-1); @@ -760,7 +760,7 @@ main(int argc, char *argv[]) /* Console input is available: empty stdin and quit */ - while (read(STDIN_FILENO, &buf, 1) > 0 && buf != '\\n') + while (read(STDIN_FILENO, &buf, 1) > 0 && buf != '\en') continue; break; } @@ -774,7 +774,7 @@ main(int argc, char *argv[]) } } - printf("Listening for events stopped.\\n"); + printf("Listening for events stopped.\en"); exit(EXIT_SUCCESS); } .EE diff --git a/man7/feature_test_macros.7 b/man7/feature_test_macros.7 index 87630f4b9..5f842f853 100644 --- a/man7/feature_test_macros.7 +++ b/man7/feature_test_macros.7 @@ -835,67 +835,67 @@ int main(int argc, char *argv[]) { #ifdef _POSIX_SOURCE - printf("_POSIX_SOURCE defined\\n"); + printf("_POSIX_SOURCE defined\en"); #endif #ifdef _POSIX_C_SOURCE - printf("_POSIX_C_SOURCE defined: %ldL\\n", (long) _POSIX_C_SOURCE); + printf("_POSIX_C_SOURCE defined: %ldL\en", (long) _POSIX_C_SOURCE); #endif #ifdef _ISOC99_SOURCE - printf("_ISOC99_SOURCE defined\\n"); + printf("_ISOC99_SOURCE defined\en"); #endif #ifdef _ISOC11_SOURCE - printf("_ISOC11_SOURCE defined\\n"); + printf("_ISOC11_SOURCE defined\en"); #endif #ifdef _XOPEN_SOURCE - printf("_XOPEN_SOURCE defined: %d\\n", _XOPEN_SOURCE); + printf("_XOPEN_SOURCE defined: %d\en", _XOPEN_SOURCE); #endif #ifdef _XOPEN_SOURCE_EXTENDED - printf("_XOPEN_SOURCE_EXTENDED defined\\n"); + printf("_XOPEN_SOURCE_EXTENDED defined\en"); #endif #ifdef _LARGEFILE64_SOURCE - printf("_LARGEFILE64_SOURCE defined\\n"); + printf("_LARGEFILE64_SOURCE defined\en"); #endif #ifdef _FILE_OFFSET_BITS - printf("_FILE_OFFSET_BITS defined: %d\\n", _FILE_OFFSET_BITS); + printf("_FILE_OFFSET_BITS defined: %d\en", _FILE_OFFSET_BITS); #endif #ifdef _BSD_SOURCE - printf("_BSD_SOURCE defined\\n"); + printf("_BSD_SOURCE defined\en"); #endif #ifdef _SVID_SOURCE - printf("_SVID_SOURCE defined\\n"); + printf("_SVID_SOURCE defined\en"); #endif #ifdef _DEFAULT_SOURCE - printf("_DEFAULT_SOURCE defined\\n"); + printf("_DEFAULT_SOURCE defined\en"); #endif #ifdef _ATFILE_SOURCE - printf("_ATFILE_SOURCE defined\\n"); + printf("_ATFILE_SOURCE defined\en"); #endif #ifdef _GNU_SOURCE - printf("_GNU_SOURCE defined\\n"); + printf("_GNU_SOURCE defined\en"); #endif #ifdef _REENTRANT - printf("_REENTRANT defined\\n"); + printf("_REENTRANT defined\en"); #endif #ifdef _THREAD_SAFE - printf("_THREAD_SAFE defined\\n"); + printf("_THREAD_SAFE defined\en"); #endif #ifdef _FORTIFY_SOURCE - printf("_FORTIFY_SOURCE defined\\n"); + printf("_FORTIFY_SOURCE defined\en"); #endif exit(EXIT_SUCCESS); diff --git a/man7/inotify.7 b/man7/inotify.7 index 4d77ce09b..fd0334146 100644 --- a/man7/inotify.7 +++ b/man7/inotify.7 @@ -147,7 +147,7 @@ field is present only when an event is returned for a file inside a watched directory; it identifies the filename within to the watched directory. This filename is null-terminated, -and may include further null bytes (\(aq\\0\(aq) to align subsequent reads to a +and may include further null bytes (\(aq\e0\(aq) to align subsequent reads to a suitable address boundary. .PP The @@ -998,9 +998,9 @@ handle_events(int fd, int *wd, int argc, char* argv[]) /* Print type of filesystem object */ if (event\->mask & IN_ISDIR) - printf(" [directory]\\n"); + printf(" [directory]\en"); else - printf(" [file]\\n"); + printf(" [file]\en"); } } } @@ -1015,11 +1015,11 @@ main(int argc, char* argv[]) struct pollfd fds[2]; if (argc < 2) { - printf("Usage: %s PATH [PATH ...]\\n", argv[0]); + printf("Usage: %s PATH [PATH ...]\en", argv[0]); exit(EXIT_FAILURE); } - printf("Press ENTER key to terminate.\\n"); + printf("Press ENTER key to terminate.\en"); /* Create the file descriptor for accessing the inotify API */ @@ -1045,7 +1045,7 @@ main(int argc, char* argv[]) wd[i] = inotify_add_watch(fd, argv[i], IN_OPEN | IN_CLOSE); if (wd[i] == \-1) { - fprintf(stderr, "Cannot watch '%s'\\n", argv[i]); + fprintf(stderr, "Cannot watch '%s'\en", argv[i]); perror("inotify_add_watch"); exit(EXIT_FAILURE); } @@ -1067,7 +1067,7 @@ main(int argc, char* argv[]) /* Wait for events and/or terminal input */ - printf("Listening for events.\\n"); + printf("Listening for events.\en"); while (1) { poll_num = poll(fds, nfds, \-1); if (poll_num == \-1) { @@ -1083,7 +1083,7 @@ main(int argc, char* argv[]) /* Console input is available. Empty stdin and quit */ - while (read(STDIN_FILENO, &buf, 1) > 0 && buf != '\\n') + while (read(STDIN_FILENO, &buf, 1) > 0 && buf != '\en') continue; break; } @@ -1097,7 +1097,7 @@ main(int argc, char* argv[]) } } - printf("Listening for events stopped.\\n"); + printf("Listening for events stopped.\en"); /* Close inotify file descriptor */ diff --git a/man7/locale.7 b/man7/locale.7 index 6caccb390..38ce8d3ea 100644 --- a/man7/locale.7 +++ b/man7/locale.7 @@ -283,7 +283,7 @@ struct lconv { char *int_curr_symbol; /* First three chars are a currency symbol from ISO 4217. Fourth char is the separator. Fifth char - is \(aq\\0\(aq. */ + is \(aq\e0\(aq. */ char *currency_symbol; /* Local currency symbol */ char *mon_decimal_point; /* Radix character */ char *mon_thousands_sep; /* Like \fIthousands_sep\fP above */ diff --git a/man7/man-pages.7 b/man7/man-pages.7 index c92565bb4..9661e27a0 100644 --- a/man7/man-pages.7 +++ b/man7/man-pages.7 @@ -226,7 +226,7 @@ See for important details of the line(s) that should follow the \fB.SH NAME\fP command. All words in this line (including the word immediately -following the "\\\-") should be in lowercase, +following the "\e\-") should be in lowercase, except where English or technical terminological convention dictates otherwise. .TP @@ -473,7 +473,7 @@ and (don't hyphenate) directives. Hyphenation of individual page names can be prevented -by preceding words with the string "\\%". +by preceding words with the string "\e%". .IP Given the distributed, autonomous nature of FOSS projects and their documentation, it is sometimes necessary\(emand in many cases @@ -524,7 +524,7 @@ The preferred way to write this in the source file is: .BR fcntl () .EE .PP -(Using this format, rather than the use of "\\fB...\\fP()" +(Using this format, rather than the use of "\efB...\efP()" makes it easier to write tools that parse man page source files.) .\" .SS Formatting conventions (general) @@ -813,7 +813,7 @@ Always include periods in such abbreviations, as shown here. In addition, "e.g." and "i.e." should always be followed by a comma. .SS Em-dashes The way to write an em-dash\(emthe glyph that appears -at either end of this subphrase\(emin *roff is with the macro "\\(em". +at either end of this subphrase\(emin *roff is with the macro "\e(em". (On an ASCII terminal, an em-dash typically renders as two hyphens, but in other typographical contexts it renders as a long dash.) Em-dashes should be written @@ -876,14 +876,14 @@ or when writing options that have a leading dash, such as in .IR "ls\ \-l"), use the following form in the man page source: .PP - \\\- + \e\- .PP This guideline applies also to code examples. .SS Character constants To produce single quotes that render well in both ASCII and UTF-8, use the following form for character constants in the man page source: .PP - \\(aqC\\(aq + \e(aqC\e(aq .PP where .I C diff --git a/man7/man.7 b/man7/man.7 index fd6e30b07..7ba6dbcd4 100644 --- a/man7/man.7 +++ b/man7/man.7 @@ -77,7 +77,7 @@ for the Linux \fIman-pages\fP package, see .BR man-pages (7). .SS Title line The first command in a man page (after comment lines, -that is, lines that start with \fB.\\"\fP) should be +that is, lines that start with \fB.\e"\fP) should be .PP .RS .B \&.TH @@ -110,7 +110,7 @@ be followed on the next line by a one-line description of the program: .RS \&.SH NAME .br -item \\- description +item \e- description .RE .PP It is extremely important that this format is followed, and that there is a diff --git a/man7/pkeys.7 b/man7/pkeys.7 index 63be26ee8..ba0fc24b0 100644 --- a/man7/pkeys.7 +++ b/man7/pkeys.7 @@ -196,7 +196,7 @@ wrpkru(unsigned int pkru) unsigned int ecx = 0; unsigned int edx = 0; - asm volatile(".byte 0x0f,0x01,0xef\\n\\t" + asm volatile(".byte 0x0f,0x01,0xef\en\et" : : "a" (eax), "c" (ecx), "d" (edx)); } @@ -226,7 +226,7 @@ pkey_free(unsigned long pkey) return syscall(SYS_pkey_free, pkey); } -#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\ +#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e } while (0) int @@ -248,7 +248,7 @@ main(void) * Put some random data into the page (still OK to touch) */ *buffer = __LINE__; - printf("buffer contains: %d\\n", *buffer); + printf("buffer contains: %d\en", *buffer); /* * Allocate a protection key: @@ -275,12 +275,12 @@ main(void) if (status == -1) errExit("pkey_mprotect"); - printf("about to read buffer again...\\n"); + printf("about to read buffer again...\en"); /* * This will crash, because we have disallowed access */ - printf("buffer contains: %d\\n", *buffer); + printf("buffer contains: %d\en", *buffer); status = pkey_free(pkey); if (status == -1) diff --git a/man7/pthreads.7 b/man7/pthreads.7 index 046957642..213641ab3 100644 --- a/man7/pthreads.7 +++ b/man7/pthreads.7 @@ -868,7 +868,7 @@ be sufficient to determine the default threading implementation: .PP .in +4n .EX -bash$ $( ldd /bin/ls | grep libc.so | awk \(aq{print $3}\(aq ) | \\ +bash$ $( ldd /bin/ls | grep libc.so | awk \(aq{print $3}\(aq ) | \e egrep \-i \(aqthreads|nptl\(aq Native POSIX Threads Library by Ulrich Drepper et al .EE @@ -891,7 +891,7 @@ For example: .PP .in +4n .EX -bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\ +bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \e awk \(aq{print $3}\(aq ) | egrep \-i \(aqthreads|nptl\(aq linuxthreads-0.10 by Xavier Leroy .EE diff --git a/man7/rtld-audit.7 b/man7/rtld-audit.7 index 853ad5e7b..9a7a15023 100644 --- a/man7/rtld-audit.7 +++ b/man7/rtld-audit.7 @@ -508,7 +508,7 @@ This is reportedly fixed in glibc 2.10. unsigned int la_version(unsigned int version) { - printf("la_version(): %d\\n", version); + printf("la_version(): %d\en", version); return version; } @@ -517,7 +517,7 @@ char * la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag) { printf("la_objsearch(): name = %s; cookie = %p", name, cookie); - printf("; flag = %s\\n", + printf("; flag = %s\en", (flag == LA_SER_ORIG) ? "LA_SER_ORIG" : (flag == LA_SER_LIBPATH) ? "LA_SER_LIBPATH" : (flag == LA_SER_RUNPATH) ? "LA_SER_RUNPATH" : @@ -532,7 +532,7 @@ la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag) void la_activity (uintptr_t *cookie, unsigned int flag) { - printf("la_activity(): cookie = %p; flag = %s\\n", cookie, + printf("la_activity(): cookie = %p; flag = %s\en", cookie, (flag == LA_ACT_CONSISTENT) ? "LA_ACT_CONSISTENT" : (flag == LA_ACT_ADD) ? "LA_ACT_ADD" : (flag == LA_ACT_DELETE) ? "LA_ACT_DELETE" : @@ -542,7 +542,7 @@ la_activity (uintptr_t *cookie, unsigned int flag) unsigned int la_objopen(struct link_map *map, Lmid_t lmid, uintptr_t *cookie) { - printf("la_objopen(): loading \\"%s\\"; lmid = %s; cookie=%p\\n", + printf("la_objopen(): loading \e"%s\e"; lmid = %s; cookie=%p\en", map\->l_name, (lmid == LM_ID_BASE) ? "LM_ID_BASE" : (lmid == LM_ID_NEWLM) ? "LM_ID_NEWLM" : @@ -555,7 +555,7 @@ la_objopen(struct link_map *map, Lmid_t lmid, uintptr_t *cookie) unsigned int la_objclose (uintptr_t *cookie) { - printf("la_objclose(): %p\\n", cookie); + printf("la_objclose(): %p\en", cookie); return 0; } @@ -563,17 +563,17 @@ la_objclose (uintptr_t *cookie) void la_preinit(uintptr_t *cookie) { - printf("la_preinit(): %p\\n", cookie); + printf("la_preinit(): %p\en", cookie); } uintptr_t la_symbind32(Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook, uintptr_t *defcook, unsigned int *flags, const char *symname) { - printf("la_symbind32(): symname = %s; sym\->st_value = %p\\n", + printf("la_symbind32(): symname = %s; sym\->st_value = %p\en", symname, sym\->st_value); printf(" ndx = %d; flags = 0x%x", ndx, *flags); - printf("; refcook = %p; defcook = %p\\n", refcook, defcook); + printf("; refcook = %p; defcook = %p\en", refcook, defcook); return sym\->st_value; } @@ -582,10 +582,10 @@ uintptr_t la_symbind64(Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook, uintptr_t *defcook, unsigned int *flags, const char *symname) { - printf("la_symbind64(): symname = %s; sym\->st_value = %p\\n", + printf("la_symbind64(): symname = %s; sym\->st_value = %p\en", symname, sym\->st_value); printf(" ndx = %d; flags = 0x%x", ndx, *flags); - printf("; refcook = %p; defcook = %p\\n", refcook, defcook); + printf("; refcook = %p; defcook = %p\en", refcook, defcook); return sym\->st_value; } @@ -595,7 +595,7 @@ la_i86_gnu_pltenter(Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook, uintptr_t *defcook, La_i86_regs *regs, unsigned int *flags, const char *symname, long int *framesizep) { - printf("la_i86_gnu_pltenter(): %s (%p)\\n", symname, sym\->st_value); + printf("la_i86_gnu_pltenter(): %s (%p)\en", symname, sym\->st_value); return sym\->st_value; } diff --git a/man7/sock_diag.7 b/man7/sock_diag.7 index 28be58b8c..ae56bedb1 100644 --- a/man7/sock_diag.7 +++ b/man7/sock_diag.7 @@ -703,11 +703,11 @@ static int print_diag(const struct unix_diag_msg *diag, unsigned int len) { if (len < NLMSG_LENGTH(sizeof(*diag))) { - fputs("short response\\n", stderr); + fputs("short response\en", stderr); return \-1; } if (diag\->udiag_family != AF_UNIX) { - fprintf(stderr, "unexpected family %u\\n", diag\->udiag_family); + fprintf(stderr, "unexpected family %u\en", diag\->udiag_family); return \-1; } @@ -726,7 +726,7 @@ print_diag(const struct unix_diag_msg *diag, unsigned int len) if (path_len > sizeof(path) \- 1) path_len = sizeof(path) \- 1; memcpy(path, RTA_DATA(attr), path_len); - path[path_len] = '\\0'; + path[path_len] = '\e0'; } break; @@ -746,7 +746,7 @@ print_diag(const struct unix_diag_msg *diag, unsigned int len) printf(", name=%s%s", *path ? "" : "@", *path ? path : path + 1); - putchar('\\n'); + putchar('\en'); return 0; } @@ -786,7 +786,7 @@ receive_responses(int fd) const struct nlmsghdr *h = (struct nlmsghdr *) buf; if (!NLMSG_OK(h, ret)) { - fputs("!NLMSG_OK\\n", stderr); + fputs("!NLMSG_OK\en", stderr); return \-1; } @@ -798,7 +798,7 @@ receive_responses(int fd) const struct nlmsgerr *err = NLMSG_DATA(h); if (h\->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) { - fputs("NLMSG_ERROR\\n", stderr); + fputs("NLMSG_ERROR\en", stderr); } else { errno = \-err\->error; perror("NLMSG_ERROR"); @@ -808,7 +808,7 @@ receive_responses(int fd) } if (h\->nlmsg_type != SOCK_DIAG_BY_FAMILY) { - fprintf(stderr, "unexpected nlmsg_type %u\\n", + fprintf(stderr, "unexpected nlmsg_type %u\en", (unsigned) h\->nlmsg_type); return \-1; } diff --git a/man7/unix.7 b/man7/unix.7 index ee57c4a06..f22e9c0ed 100644 --- a/man7/unix.7 +++ b/man7/unix.7 @@ -142,7 +142,7 @@ should not be inspected. an abstract socket address is distinguished (from a pathname socket) by the fact that .IR sun_path[0] -is a null byte (\(aq\\0\(aq). +is a null byte (\(aq\e0\(aq). The socket's address in this namespace is given by the additional bytes in .IR sun_path @@ -847,7 +847,7 @@ memset(addrp, 0, addrlen + 1); if (getsockname(sfd, (struct sockaddr *) addrp, &addrlen)) == \-1) /* handle error */ ; -printf("sun_path = %s\\n", ((struct sockaddr_un *) addrp)\->sun_path); +printf("sun_path = %s\en", ((struct sockaddr_un *) addrp)\->sun_path); .EE .in .PP @@ -1085,7 +1085,7 @@ main(int argc, char *argv[]) ret = connect (data_socket, (const struct sockaddr *) &addr, sizeof(struct sockaddr_un)); if (ret == \-1) { - fprintf(stderr, "The server is down.\\n"); + fprintf(stderr, "The server is down.\en"); exit(EXIT_FAILURE); } @@ -1120,7 +1120,7 @@ main(int argc, char *argv[]) buffer[BUFFER_SIZE \- 1] = 0; - printf("Result = %s\\n", buffer); + printf("Result = %s\en", buffer); /* Close socket. */ diff --git a/man7/user_namespaces.7 b/man7/user_namespaces.7 index 636461f0d..d2e2942ba 100644 --- a/man7/user_namespaces.7 +++ b/man7/user_namespaces.7 @@ -1036,7 +1036,7 @@ CapEff: 0000001fffffffff /* 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) struct child_args { @@ -1049,35 +1049,35 @@ static int verbose; static void usage(char *pname) { - fprintf(stderr, "Usage: %s [options] cmd [arg...]\\n\\n", pname); + fprintf(stderr, "Usage: %s [options] cmd [arg...]\en\en", pname); fprintf(stderr, "Create a child process that executes a shell " - "command in a new user namespace,\\n" - "and possibly also other new namespace(s).\\n\\n"); - fprintf(stderr, "Options can be:\\n\\n"); + "command in a new user namespace,\en" + "and possibly also other new namespace(s).\en\en"); + fprintf(stderr, "Options can be:\en\en"); #define fpe(str) fprintf(stderr, " %s", str); - fpe("\-i New IPC namespace\\n"); - fpe("\-m New mount namespace\\n"); - fpe("\-n New network namespace\\n"); - fpe("\-p New PID namespace\\n"); - fpe("\-u New UTS namespace\\n"); - fpe("\-U New user namespace\\n"); - fpe("\-M uid_map Specify UID map for user namespace\\n"); - fpe("\-G gid_map Specify GID map for user namespace\\n"); - fpe("\-z Map user\(aqs UID and GID to 0 in user namespace\\n"); - fpe(" (equivalent to: \-M \(aq0 1\(aq \-G \(aq0 1\(aq)\\n"); - fpe("\-v Display verbose messages\\n"); - fpe("\\n"); - fpe("If \-z, \-M, or \-G is specified, \-U is required.\\n"); - fpe("It is not permitted to specify both \-z and either \-M or \-G.\\n"); - fpe("\\n"); - fpe("Map strings for \-M and \-G consist of records of the form:\\n"); - fpe("\\n"); - fpe(" ID\-inside\-ns ID\-outside\-ns len\\n"); - fpe("\\n"); + fpe("\-i New IPC namespace\en"); + fpe("\-m New mount namespace\en"); + fpe("\-n New network namespace\en"); + fpe("\-p New PID namespace\en"); + fpe("\-u New UTS namespace\en"); + fpe("\-U New user namespace\en"); + fpe("\-M uid_map Specify UID map for user namespace\en"); + fpe("\-G gid_map Specify GID map for user namespace\en"); + fpe("\-z Map user\(aqs UID and GID to 0 in user namespace\en"); + fpe(" (equivalent to: \-M \(aq0 1\(aq \-G \(aq0 1\(aq)\en"); + fpe("\-v Display verbose messages\en"); + fpe("\en"); + fpe("If \-z, \-M, or \-G is specified, \-U is required.\en"); + fpe("It is not permitted to specify both \-z and either \-M or \-G.\en"); + fpe("\en"); + fpe("Map strings for \-M and \-G consist of records of the form:\en"); + fpe("\en"); + fpe(" ID\-inside\-ns ID\-outside\-ns len\en"); + fpe("\en"); fpe("A map string can contain multiple records, separated" - " by commas;\\n"); + " by commas;\en"); fpe("the commas are replaced by newlines before writing" - " to map files.\\n"); + " to map files.\en"); exit(EXIT_FAILURE); } @@ -1105,17 +1105,17 @@ update_map(char *mapping, char *map_file) map_len = strlen(mapping); for (j = 0; j < map_len; j++) if (mapping[j] == \(aq,\(aq) - mapping[j] = \(aq\\n\(aq; + mapping[j] = \(aq\en\(aq; fd = open(map_file, O_RDWR); if (fd == \-1) { - fprintf(stderr, "ERROR: open %s: %s\\n", map_file, + fprintf(stderr, "ERROR: open %s: %s\en", map_file, strerror(errno)); exit(EXIT_FAILURE); } if (write(fd, mapping, map_len) != map_len) { - fprintf(stderr, "ERROR: write %s: %s\\n", map_file, + fprintf(stderr, "ERROR: write %s: %s\en", map_file, strerror(errno)); exit(EXIT_FAILURE); } @@ -1155,13 +1155,13 @@ proc_setgroups_write(pid_t child_pid, char *str) user know. */ if (errno != ENOENT) - fprintf(stderr, "ERROR: open %s: %s\\n", setgroups_path, + fprintf(stderr, "ERROR: open %s: %s\en", setgroups_path, strerror(errno)); return; } if (write(fd, str, strlen(str)) == \-1) - fprintf(stderr, "ERROR: write %s: %s\\n", setgroups_path, + fprintf(stderr, "ERROR: write %s: %s\en", setgroups_path, strerror(errno)); close(fd); @@ -1183,7 +1183,7 @@ childFunc(void *arg) when parent closes its descriptor */ if (read(args\->pipe_fd[0], &ch, 1) != 0) { fprintf(stderr, - "Failure in child: read from pipe returned != 0\\n"); + "Failure in child: read from pipe returned != 0\en"); exit(EXIT_FAILURE); } @@ -1191,7 +1191,7 @@ childFunc(void *arg) /* Execute a shell command */ - printf("About to exec %s\\n", args\->argv[0]); + printf("About to exec %s\en", args\->argv[0]); execvp(args\->argv[0], args\->argv); errExit("execvp"); } @@ -1271,7 +1271,7 @@ main(int argc, char *argv[]) /* Parent falls through to here */ if (verbose) - printf("%s: PID of child created by clone() is %ld\\n", + printf("%s: PID of child created by clone() is %ld\en", argv[0], (long) child_pid); /* Update the UID and GID maps in the child */ @@ -1307,7 +1307,7 @@ main(int argc, char *argv[]) errExit("waitpid"); if (verbose) - printf("%s: terminating\\n", argv[0]); + printf("%s: terminating\en", argv[0]); exit(EXIT_SUCCESS); } diff --git a/man7/utf-8.7 b/man7/utf-8.7 index f591347a1..8b00ed61e 100644 --- a/man7/utf-8.7 +++ b/man7/utf-8.7 @@ -35,7 +35,7 @@ The most obvious Unicode encoding (known as UCS-2) consists of a sequence of 16-bit words. Such strings can contain\(emas part of many 16-bit characters\(embytes -such as \(aq\\0\(aq or \(aq/\(aq, which have a +such as \(aq\e0\(aq or \(aq/\(aq, which have a special meaning in filenames and other C library function arguments. In addition, the majority of UNIX tools expect ASCII files and can't read 16-bit words as characters without major modifications. @@ -68,7 +68,7 @@ UTF-8 . All UCS characters greater than 0x7f are encoded as a multibyte sequence consisting only of bytes in the range 0x80 to 0xfd, so no ASCII byte can appear as part of another character and there are no -problems with, for example, \(aq\\0\(aq or \(aq/\(aq. +problems with, for example, \(aq\e0\(aq or \(aq/\(aq. .TP * The lexicographic sorting order of UCS-4 strings is preserved. @@ -201,9 +201,9 @@ should be used today to count characters and cursor positions. The official ESC sequence to switch from an ISO 2022 encoding scheme (as used for instance by VT100 terminals) to UTF-8 is ESC % G -("\\x1b%G"). +("\ex1b%G"). The corresponding return sequence from -UTF-8 to ISO 2022 is ESC % @ ("\\x1b%@"). +UTF-8 to ISO 2022 is ESC % @ ("\ex1b%@"). Other ISO 2022 sequences (such as for switching the G0 and G1 sets) are not applicable in UTF-8 mode. .SS Security