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

Quoting Branden:

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

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

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

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

groff(7) discusses the issue:

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

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

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

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

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