From 9f8e673e623dc6fbae517885f4161a29e9c24d1d Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Mon, 24 Sep 2012 10:23:07 +0200 Subject: [PATCH] time.1, atexit.3, bsearch.3, dlopen.3, envz_add.3, errno.3, fmtmsg.3, getgrent_r.3, getline.3, getmntent.3, getnameinfo.3, getpass.3, getpwent_r.3, gets.3, isalpha.3, printf.3, puts.3, recno.3, scandir.3, stdarg.3, sysconf.3, termios.3, wordexp.3, null.4, core.5, dir_colors.5, issue.5, proc.5, termcap.5, utmp.5, ascii.7, cpuset.7, glob.7, man-pages.7, man.7, mdoc.7, mdoc.samples.7, regex.7: Global fix: use \\ rather than \e for literal backslash Reported-by: Jan Engelhardt Signed-off-by: Michael Kerrisk --- man1/time.1 | 4 +- man3/atexit.3 | 6 +-- man3/bsearch.3 | 4 +- man3/dlopen.3 | 6 +-- man3/envz_add.3 | 4 +- man3/errno.3 | 4 +- man3/fmtmsg.3 | 8 ++-- man3/getgrent_r.3 | 2 +- man3/getline.3 | 2 +- man3/getmntent.3 | 4 +- man3/getnameinfo.3 | 4 +- man3/getpass.3 | 2 +- man3/getpwent_r.3 | 2 +- man3/gets.3 | 4 +- man3/isalpha.3 | 10 ++-- man3/printf.3 | 10 ++-- man3/puts.3 | 2 +- man3/recno.3 | 2 +- man3/scandir.3 | 2 +- man3/stdarg.3 | 6 +-- man3/sysconf.3 | 2 +- man3/termios.3 | 2 +- man3/wordexp.3 | 2 +- man4/null.4 | 2 +- man5/core.5 | 4 +- man5/dir_colors.5 | 34 ++++++------- man5/issue.5 | 2 +- man5/proc.5 | 2 +- man5/termcap.5 | 16 +++---- man5/utmp.5 | 2 +- man7/ascii.7 | 24 +++++----- man7/cpuset.7 | 2 +- man7/glob.7 | 4 +- man7/man-pages.7 | 2 +- man7/man.7 | 50 +++++++++---------- man7/mdoc.7 | 2 +- man7/mdoc.samples.7 | 114 ++++++++++++++++++++++---------------------- man7/regex.7 | 22 ++++----- 38 files changed, 188 insertions(+), 188 deletions(-) diff --git a/man1/time.1 b/man1/time.1 index 000062a81..6420192af 100644 --- a/man1/time.1 +++ b/man1/time.1 @@ -54,7 +54,7 @@ To access the real command, you may need to specify its pathname When in the POSIX locale, use the precise traditional format .IP .in +4n -"real %f\enuser %f\ensys %f\en" +"real %f\\nuser %f\\nsys %f\\n" .in .IP (with numbers in seconds) @@ -122,7 +122,7 @@ is used. .SS "The format string" The format is interpreted in the usual printf-like way. Ordinary characters are directly copied, tab, newline -and backslash are escaped using \et, \en and \e\e, +and backslash are escaped using \\t, \\n and \\\\, a percent sign is represented by %%, and otherwise % indicates a conversion. The program diff --git a/man3/atexit.3 b/man3/atexit.3 index a6d145129..d53eceb99 100644 --- a/man3/atexit.3 +++ b/man3/atexit.3 @@ -132,7 +132,7 @@ that are called when the shared library is unloaded. void bye(void) { - printf("That was all, folks\en"); + printf("That was all, folks\\n"); } int @@ -142,11 +142,11 @@ main(void) int i; a = sysconf(_SC_ATEXIT_MAX); - printf("ATEXIT_MAX = %ld\en", a); + printf("ATEXIT_MAX = %ld\\n", a); i = atexit(bye); if (i != 0) { - fprintf(stderr, "cannot set exit function\en"); + fprintf(stderr, "cannot set exit function\\n"); exit(EXIT_FAILURE); } diff --git a/man3/bsearch.3 b/man3/bsearch.3 index eca877f23..96e5ce4f1 100644 --- a/man3/bsearch.3 +++ b/man3/bsearch.3 @@ -105,9 +105,9 @@ main(int argc, char **argv) res = bsearch(&key, months, nr_of_months, sizeof(struct mi), compmi); if (res == NULL) - printf("\(aq%s\(aq: unknown month\en", argv[i]); + printf("\(aq%s\(aq: unknown month\\n", argv[i]); else - printf("%s: month #%d\en", res\->name, res\->nr); + printf("%s: month #%d\\n", res\->name, res\->nr); } exit(EXIT_SUCCESS); } diff --git a/man3/dlopen.3 b/man3/dlopen.3 index e2a50950d..b93c85d68 100644 --- a/man3/dlopen.3 +++ b/man3/dlopen.3 @@ -460,7 +460,7 @@ main(int argc, char **argv) handle = dlopen("libm.so", RTLD_LAZY); if (!handle) { - fprintf(stderr, "%s\en", dlerror()); + fprintf(stderr, "%s\\n", dlerror()); exit(EXIT_FAILURE); } @@ -477,11 +477,11 @@ main(int argc, char **argv) .\" But in fact "gcc -O2 -Wall" will complain about the preceding cast. if ((error = dlerror()) != NULL) { - fprintf(stderr, "%s\en", error); + fprintf(stderr, "%s\\n", error); exit(EXIT_FAILURE); } - printf("%f\en", (*cosine)(2.0)); + printf("%f\\n", (*cosine)(2.0)); dlclose(handle); exit(EXIT_SUCCESS); } diff --git a/man3/envz_add.3 b/man3/envz_add.3 index e720b4d81..dcee40200 100644 --- a/man3/envz_add.3 +++ b/man3/envz_add.3 @@ -129,9 +129,9 @@ main(int argc, char *argv[], char *envp[]) e_len += strlen(envp[i]) + 1; str = envz_entry(*envp, e_len, "HOME"); - printf("%s\en", str); + printf("%s\\n", str); str = envz_get(*envp, e_len, "HOME"); - printf("%s\en", str); + printf("%s\\n", str); exit(EXIT_SUCCESS); } .fi diff --git a/man3/errno.3 b/man3/errno.3 index af08aa7b9..1de85a6dd 100644 --- a/man3/errno.3 +++ b/man3/errno.3 @@ -488,7 +488,7 @@ A common mistake is to do .nf if (somecall() == \-1) { - printf("somecall() failed\en"); + printf("somecall() failed\\n"); if (errno == ...) { ... } } @@ -508,7 +508,7 @@ should be preserved across a library call, it must be saved: if (somecall() == \-1) { int errsv = errno; - printf("somecall() failed\en"); + printf("somecall() failed\\n"); if (errsv == ...) { ... } } .fi diff --git a/man3/fmtmsg.3 b/man3/fmtmsg.3 index 78f712940..38eec6f4b 100644 --- a/man3/fmtmsg.3 +++ b/man3/fmtmsg.3 @@ -256,16 +256,16 @@ main(void) case MM_OK: break; case MM_NOTOK: - printf("Nothing printed\en"); + printf("Nothing printed\\n"); break; case MM_NOMSG: - printf("Nothing printed to stderr\en"); + printf("Nothing printed to stderr\\n"); break; case MM_NOCON: - printf("No console output\en"); + printf("No console output\\n"); break; default: - printf("Unknown error from fmtmsg()\en"); + printf("Unknown error from fmtmsg()\\n"); } exit(EXIT_SUCCESS); } diff --git a/man3/getgrent_r.3 b/man3/getgrent_r.3 index 87d7a8615..b096157f0 100644 --- a/man3/getgrent_r.3 +++ b/man3/getgrent_r.3 @@ -164,7 +164,7 @@ main(void) break; printf(" %s", grpp\->gr_mem[i]); } - printf("\en"); + printf("\\n"); } endgrent(); exit(EXIT_SUCCESS); diff --git a/man3/getline.3 b/man3/getline.3 index 2e5146d55..87ae8c806 100644 --- a/man3/getline.3 +++ b/man3/getline.3 @@ -155,7 +155,7 @@ main(void) exit(EXIT_FAILURE); while ((read = getline(&line, &len, fp)) != \-1) { - printf("Retrieved line of length %zu :\en", read); + printf("Retrieved line of length %zu :\\n", read); printf("%s", line); } diff --git a/man3/getmntent.3 b/man3/getmntent.3 index 9945d9a4c..485f1b631 100644 --- a/man3/getmntent.3 +++ b/man3/getmntent.3 @@ -134,8 +134,8 @@ struct mntent { .in Since fields in the mtab and fstab files are separated by whitespace, -octal escapes are used to represent the four characters space (\e040), -tab (\e011), newline (\e012) and backslash (\e134) in those files +octal escapes are used to represent the four characters space (\\040), +tab (\\011), newline (\\012) and backslash (\\134) in those files when they occur in one of the four strings in a .I mntent structure. diff --git a/man3/getnameinfo.3 b/man3/getnameinfo.3 index f1001cd81..4537a5d16 100644 --- a/man3/getnameinfo.3 +++ b/man3/getnameinfo.3 @@ -244,7 +244,7 @@ char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; if (getnameinfo(sa, len, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV) == 0) - printf("host=%s, serv=%s\en", hbuf, sbuf); + printf("host=%s, serv=%s\\n", hbuf, sbuf); .fi .in @@ -261,7 +261,7 @@ if (getnameinfo(sa, len, hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD)) printf("could not resolve hostname"); else - printf("host=%s\en", hbuf); + printf("host=%s\\n", hbuf); .fi .in .PP diff --git a/man3/getpass.3 b/man3/getpass.3 index d363ec403..e6a3b49c8 100644 --- a/man3/getpass.3 +++ b/man3/getpass.3 @@ -106,7 +106,7 @@ While reading the password, signal generation .BR SIGSTOP , .BR SIGTSTP ) is disabled and the corresponding characters -(usually control-C, control-\e, control-Z and control-Y) +(usually control-C, control-\\, control-Z and control-Y) are transmitted as part of the password. Since libc 5.4.19 also line editing is disabled, so that also backspace and the like will be seen as part of the password. diff --git a/man3/getpwent_r.3 b/man3/getpwent_r.3 index 510643f04..7804b508a 100644 --- a/man3/getpwent_r.3 +++ b/man3/getpwent_r.3 @@ -160,7 +160,7 @@ main(void) i = getpwent_r(&pw, buf, BUFLEN, &pwp); if (i) break; - printf("%s (%d)\etHOME %s\etSHELL %s\en", pwp\->pw_name, + printf("%s (%d)\\tHOME %s\\tSHELL %s\\n", pwp\->pw_name, pwp\->pw_uid, pwp\->pw_dir, pwp\->pw_shell); } endpwent(); diff --git a/man3/gets.3 b/man3/gets.3 index 93b1389ec..eec5b7a65 100644 --- a/man3/gets.3 +++ b/man3/gets.3 @@ -71,7 +71,7 @@ into the buffer pointed to by .I s until either a terminating newline or .BR EOF , -which it replaces with a null byte (\(aq\e0\(aq). +which it replaces with a null byte (\(aq\\0\(aq). No check for buffer overrun is performed (see BUGS below). .PP .BR fgets () @@ -85,7 +85,7 @@ Reading stops after an .B EOF or a newline. If a newline is read, it is stored into the buffer. -A terminating null byte (\(aq\e0\(aq) +A terminating null byte (\(aq\\0\(aq) is stored after the last character in the buffer. .PP .BR ungetc () diff --git a/man3/isalpha.3 b/man3/isalpha.3 index 4b1cd5b88..24027f013 100644 --- a/man3/isalpha.3 +++ b/man3/isalpha.3 @@ -139,15 +139,15 @@ In the and .B """POSIX""" locales, these are: space, form-feed -.RB ( \(aq\ef\(aq ), +.RB ( \(aq\\f\(aq ), newline -.RB ( \(aq\en\(aq ), +.RB ( \(aq\\n\(aq ), carriage return -.RB ( \(aq\er\(aq ), +.RB ( \(aq\\r\(aq ), horizontal tab -.RB ( \(aq\et\(aq ), +.RB ( \(aq\\t\(aq ), and vertical tab -.RB ( \(aq\ev\(aq ). +.RB ( \(aq\\v\(aq ). .TP .BR isupper () checks for an uppercase letter. diff --git a/man3/printf.3 b/man3/printf.3 index 1d832ca07..450eeeaae 100644 --- a/man3/printf.3 +++ b/man3/printf.3 @@ -105,7 +105,7 @@ and .BR vsnprintf () write at most .I size -bytes (including the terminating null byte (\(aq\e0\(aq)) to +bytes (including the terminating null byte (\(aq\\0\(aq)) to .IR str . .PP The functions @@ -159,7 +159,7 @@ and .BR vsnprintf () do not write more than .I size -bytes (including the terminating null byte (\(aq\e0\(aq)). +bytes (including the terminating null byte (\(aq\\0\(aq)). If the output was truncated due to this limit then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space @@ -979,7 +979,7 @@ to five decimal places: #include #include -fprintf(stdout, "pi = %.5f\en", 4 * atan(1.0)); +fprintf(stdout, "pi = %.5f\\n", 4 * atan(1.0)); .fi .in .PP @@ -993,7 +993,7 @@ are pointers to strings: .nf #include -fprintf(stdout, "%s, %s %d, %.2d:%.2d\en", +fprintf(stdout, "%s, %s %d, %.2d:%.2d\\n", weekday, month, day, hour, min); .fi .in @@ -1017,7 +1017,7 @@ With the value: .in +4n .nf -"%1$s, %3$d. %2$s, %4$d:%5$.2d\en" +"%1$s, %3$d. %2$s, %4$d:%5$.2d\\n" .fi .in diff --git a/man3/puts.3 b/man3/puts.3 index 0dd686446..dbc0207fb 100644 --- a/man3/puts.3 +++ b/man3/puts.3 @@ -52,7 +52,7 @@ writes the string .I s to .IR stream , -without its terminating null byte (\(aq\e0\(aq). +without its terminating null byte (\(aq\\0\(aq). .PP .BR putc () is equivalent to diff --git a/man3/recno.3 b/man3/recno.3 index 843ab1efa..07917677b 100644 --- a/man3/recno.3 +++ b/man3/recno.3 @@ -161,7 +161,7 @@ The length of a fixed-length record. The delimiting byte to be used to mark the end of a record for variable-length records, and the pad character for fixed-length records. -If no value is specified, newlines ("\en") are used to mark the end +If no value is specified, newlines ("\\n") are used to mark the end of variable-length records and fixed-length records are padded with spaces. .TP diff --git a/man3/scandir.3 b/man3/scandir.3 index 4526331fc..c445a279b 100644 --- a/man3/scandir.3 +++ b/man3/scandir.3 @@ -162,7 +162,7 @@ main(void) perror("scandir"); else { while (n\-\-) { - printf("%s\en", namelist[n]\->d_name); + printf("%s\\n", namelist[n]\->d_name); free(namelist[n]); } free(namelist); diff --git a/man3/stdarg.3 b/man3/stdarg.3 index cea9085c6..472331040 100644 --- a/man3/stdarg.3 +++ b/man3/stdarg.3 @@ -291,17 +291,17 @@ foo(char *fmt, ...) switch (*fmt++) { case \(aqs\(aq: /* string */ s = va_arg(ap, char *); - printf("string %s\en", s); + printf("string %s\\n", s); break; case \(aqd\(aq: /* int */ d = va_arg(ap, int); - printf("int %d\en", d); + printf("int %d\\n", d); break; case \(aqc\(aq: /* char */ /* need a cast here since va_arg only takes fully promoted types */ c = (char) va_arg(ap, int); - printf("char %c\en", c); + printf("char %c\\n", c); break; } va_end(ap); diff --git a/man3/sysconf.3 b/man3/sysconf.3 index 8bda919db..ca7b6daec 100644 --- a/man3/sysconf.3 +++ b/man3/sysconf.3 @@ -262,7 +262,7 @@ newline. .BR RE_DUP_MAX " - " _SC_RE_DUP_MAX The maximum number of repeated occurrences of a regular expression when the interval notation -.B \e{m,n\e} +.B \\{m,n\\} is used. .TP .BR POSIX2_VERSION " - " _SC_2_VERSION diff --git a/man3/termios.3 b/man3/termios.3 index f768d1e85..644a115b1 100644 --- a/man3/termios.3 +++ b/man3/termios.3 @@ -555,7 +555,7 @@ is set, and then not passed as input. Minimum number of characters for noncanonical read (MIN). .TP .B VQUIT -(034, FS, Ctrl-\e) +(034, FS, Ctrl-\\) Quit character (QUIT). Send .B SIGQUIT diff --git a/man3/wordexp.3 b/man3/wordexp.3 index 04902bd3a..323a4424f 100644 --- a/man3/wordexp.3 +++ b/man3/wordexp.3 @@ -204,7 +204,7 @@ main(int argc, char **argv) wordexp("[a\-c]*.c", &p, 0); w = p.we_wordv; for (i = 0; i < p.we_wordc; i++) - printf("%s\en", w[i]); + printf("%s\\n", w[i]); wordfree(&p); exit(EXIT_SUCCESS); } diff --git a/man4/null.4 b/man4/null.4 index 0a2068070..e05da60cb 100644 --- a/man4/null.4 +++ b/man4/null.4 @@ -31,7 +31,7 @@ Data written to a \fBnull\fP or \fBzero\fP special file is discarded. Reads from the \fBnull\fP special file always return end of file (i.e., .BR read (2) returns 0), whereas -reads from \fBzero\fP always return bytes containing zero (\e0 characters). +reads from \fBzero\fP always return bytes containing zero (\\0 characters). .LP \fBnull\fP and \fBzero\fP are typically created by: .RS diff --git a/man5/core.5 b/man5/core.5 index 7beea7b26..853b9b804 100644 --- a/man5/core.5 +++ b/man5/core.5 @@ -319,11 +319,11 @@ The following shell session demonstrates the use of this program .RB "$" " su" Password: .RB "#" " echo \(dq|$PWD/core_pattern_pipe_test %p \ -UID=%u GID=%g sig=%s\(dq > \e" +UID=%u GID=%g sig=%s\(dq > \\" .B " /proc/sys/kernel/core_pattern" .RB "#" " exit" .RB "$" " sleep 100" -.BR "^\e" " # type control-backslash" +.BR "^\\" " # type control-backslash" Quit (core dumped) .RB "$" " cat core.info" argc=5 diff --git a/man5/dir_colors.5 b/man5/dir_colors.5 index 93e9b935b..5e73bffca 100644 --- a/man5/dir_colors.5 +++ b/man5/dir_colors.5 @@ -296,7 +296,7 @@ A different can, however, be specified, which would have the same effect. .SS "Escape Sequences" To specify control- or blank characters in the color sequences or -filename extensions, either C-style \e-escaped notation or +filename extensions, either C-style \\-escaped notation or .BR stty \-style ^-notation can be used. The C-style notation @@ -305,21 +305,21 @@ includes the following characters: .RS +.2i .ta 1.0i .nf -\fB\ea\fR Bell (ASCII 7) -\fB\eb\fR Backspace (ASCII 8) -\fB\ee\fR Escape (ASCII 27) -\fB\ef\fR Form feed (ASCII 12) -\fB\en\fR Newline (ASCII 10) -\fB\er\fR Carriage Return (ASCII 13) -\fB\et\fR Tab (ASCII 9) -\fB\ev\fR Vertical Tab (ASCII 11) -\fB\e?\fR Delete (ASCII 127) -\fB\e\fInnn\fR Any character (octal notation) -\fB\ex\fInnn\fR Any character (hexadecimal notation) -\fB\e_\fR Space -\fB\e\e\fR Backslash (\e) -\fB\e^\fR Caret (^) -\fB\e#\fR Hash mark (#) +\fB\\a\fR Bell (ASCII 7) +\fB\\b\fR Backspace (ASCII 8) +\fB\\e\fR Escape (ASCII 27) +\fB\\f\fR Form feed (ASCII 12) +\fB\\n\fR Newline (ASCII 10) +\fB\\r\fR Carriage Return (ASCII 13) +\fB\\t\fR Tab (ASCII 9) +\fB\\v\fR Vertical Tab (ASCII 11) +\fB\\?\fR Delete (ASCII 127) +\fB\\\fInnn\fR Any character (octal notation) +\fB\\x\fInnn\fR Any character (hexadecimal notation) +\fB\\_\fR Space +\fB\\\\\fR Backslash (\\) +\fB\\^\fR Caret (^) +\fB\\#\fR Hash mark (#) .fi .RE .sp @@ -348,7 +348,7 @@ definitions, which are used by ISO 6429 terminals are: .RS +.2i .ta 1.0i .nf -\fBLEFTCODE\fR \ee[ +\fBLEFTCODE\fR \\e[ \fBRIGHTCODE\fR m .fi .RE diff --git a/man5/issue.5 b/man5/issue.5 index d890a70fe..d9e39ecc0 100644 --- a/man5/issue.5 +++ b/man5/issue.5 @@ -29,7 +29,7 @@ issue \- prelogin message and identification file .SH DESCRIPTION The file \fI/etc/issue\fP is a text file which contains a message or system identification to be printed before the login prompt. -It may contain various \fB@\fP\fIchar\fP and \fB\e\fP\fIchar\fP +It may contain various \fB@\fP\fIchar\fP and \fB\\\fP\fIchar\fP sequences, if supported by the .BR getty -type program employed on the system. diff --git a/man5/proc.5 b/man5/proc.5 index aa73f5320..d41407587 100644 --- a/man5/proc.5 +++ b/man5/proc.5 @@ -181,7 +181,7 @@ Thus, to print out the environment of process 1, you would do: .nf .ft CW -.RB "$" " (cat /proc/1/environ; echo) | tr \(aq\e000\(aq \(aq\en\(aq" +.RB "$" " (cat /proc/1/environ; echo) | tr \(aq\\000\(aq \(aq\\n\(aq" .fi .ft P .in diff --git a/man5/termcap.5 b/man5/termcap.5 index f8f33f50b..fa777fc41 100644 --- a/man5/termcap.5 +++ b/man5/termcap.5 @@ -86,11 +86,11 @@ Capabilities of similar functions can be written in one line. .nf Example for: .sp -Head line: vt|vt101|DEC VT 101 terminal in 80 character mode:\e -Head line: Vt|vt101-w|DEC VT 101 terminal in (wide) 132 character mode:\e -Boolean: :bs:\e -Numeric: :co#80:\e -String: :sr=\eE[H:\e +Head line: vt|vt101|DEC VT 101 terminal in 80 character mode:\\ +Head line: Vt|vt101-w|DEC VT 101 terminal in (wide) 132 character mode:\\ +Boolean: :bs:\\ +Numeric: :co#80:\\ +String: :sr=\\E[H:\\ .fi .SS "Boolean Capabilities" .nf @@ -380,12 +380,12 @@ XF XOFF character if not \fB^S\fP There are several ways of defining the control codes for string capabilities: .LP Every normal character represents itself, -except \(aq^\(aq, \(aq\e\(aq, and \(aq%\(aq. +except \(aq^\(aq, \(aq\\\(aq, and \(aq%\(aq. .LP A \fB^x\fP means Control-x. Control-A equals 1 decimal. .LP -\ex means a special code. +\\x means a special code. x can be one of the following characters: .RS E Escape (27) @@ -401,7 +401,7 @@ b Backspace (8) f Form feed (12) .br 0 Null character. -A \exxx specifies the octal character xxx. +A \\xxx specifies the octal character xxx. .RE .IP i Increments parameters by one. diff --git a/man5/utmp.5 b/man5/utmp.5 index 05207035a..8f90f63c0 100644 --- a/man5/utmp.5 +++ b/man5/utmp.5 @@ -133,7 +133,7 @@ This structure gives the name of the special file associated with the user's terminal, the user's login name, and the time of login in the form of .BR time (2). -String fields are terminated by a null byte (\(aq\e0\(aq) +String fields are terminated by a null byte (\(aq\\0\(aq) if they are shorter than the size of the field. .PP diff --git a/man7/ascii.7 b/man7/ascii.7 index c9d82450a..634e36842 100644 --- a/man7/ascii.7 +++ b/man7/ascii.7 @@ -43,7 +43,7 @@ The international counterpart of ASCII is known as ISO 646. .LP The following table contains the 128 ASCII characters. .LP -C program \f(CW\(aq\eX\(aq\fP escapes are noted. +C program \f(CW\(aq\\X\(aq\fP escapes are noted. .if t \{\ .ft CW \} @@ -51,20 +51,20 @@ C program \f(CW\(aq\eX\(aq\fP escapes are noted. l l l l l l l l. Oct Dec Hex Char Oct Dec Hex Char _ -000 0 00 NUL \(aq\e0\(aq 100 64 40 @ +000 0 00 NUL \(aq\\0\(aq 100 64 40 @ 001 1 01 SOH (start of heading) 101 65 41 A 002 2 02 STX (start of text) 102 66 42 B 003 3 03 ETX (end of text) 103 67 43 C 004 4 04 EOT (end of transmission) 104 68 44 D 005 5 05 ENQ (enquiry) 105 69 45 E 006 6 06 ACK (acknowledge) 106 70 46 F -007 7 07 BEL \(aq\ea\(aq (bell) 107 71 47 G -010 8 08 BS \(aq\eb\(aq (backspace) 110 72 48 H -011 9 09 HT \(aq\et\(aq (horizontal tab) 111 73 49 I -012 10 0A LF \(aq\en\(aq (new line) 112 74 4A J -013 11 0B VT \(aq\ev\(aq (vertical tab) 113 75 4B K -014 12 0C FF \(aq\ef\(aq (form feed) 114 76 4C L -015 13 0D CR \(aq\er\(aq (carriage ret) 115 77 4D M +007 7 07 BEL \(aq\\a\(aq (bell) 107 71 47 G +010 8 08 BS \(aq\\b\(aq (backspace) 110 72 48 H +011 9 09 HT \(aq\\t\(aq (horizontal tab) 111 73 49 I +012 10 0A LF \(aq\\n\(aq (new line) 112 74 4A J +013 11 0B VT \(aq\\v\(aq (vertical tab) 113 75 4B K +014 12 0C FF \(aq\\f\(aq (form feed) 114 76 4C L +015 13 0D CR \(aq\\r\(aq (carriage ret) 115 77 4D M 016 14 0E SO (shift out) 116 78 4E N 017 15 0F SI (shift in) 117 79 4F O 020 16 10 DLE (data link escape) 120 80 50 P @@ -79,7 +79,7 @@ _ 031 25 19 EM (end of medium) 131 89 59 Y 032 26 1A SUB (substitute) 132 90 5A Z 033 27 1B ESC (escape) 133 91 5B [ -034 28 1C FS (file separator) 134 92 5C \e \(aq\e\e\(aq +034 28 1C FS (file separator) 134 92 5C \\ \(aq\\\\\(aq 035 29 1D GS (group separator) 135 93 5D ] 036 30 1E RS (record separator) 136 94 5E ^ 037 31 1F US (unit separator) 137 95 5F \&_ @@ -132,7 +132,7 @@ For convenience, let us give more compact tables in hex and decimal. ------------- --------------------------------- 0: 0 @ P \` p 0: ( 2 < F P Z d n x 1: ! 1 A Q a q 1: ) 3 = G Q [ e o y -2: " 2 B R b r 2: * 4 > H R \e f p z +2: " 2 B R b r 2: * 4 > H R \\ f p z 3: # 3 C S c s 3: ! + 5 ? I S ] g q { 4: $ 4 D T d t 4: " , 6 @ J T ^ h r | 5: % 5 E U e u 5: # \- 7 A K U _ i s } @@ -142,7 +142,7 @@ For convenience, let us give more compact tables in hex and decimal. 9: ) 9 I Y i y 9: \' 1 ; E O Y c m w A: * : J Z j z B: + ; K [ k { -C: , < L \e l | +C: , < L \\ l | D: \- = M ] m } E: . > N ^ n ~ F: / ? O _ o DEL diff --git a/man7/cpuset.7 b/man7/cpuset.7 index 4803b8f80..3eabbcedc 100644 --- a/man7/cpuset.7 +++ b/man7/cpuset.7 @@ -532,7 +532,7 @@ Unless memory pressure calculation is enabled by setting the pseudo-file .IR /dev/cpuset/memory_pressure_enabled , it is not computed for any cpuset, and reads from any .I memory_pressure -always return zero, as represented by the ASCII string "0\en". +always return zero, as represented by the ASCII string "0\\n". See the \fBWARNINGS\fR section, below. .PP A per-cpuset, running average is employed for the following reasons: diff --git a/man7/glob.7 b/man7/glob.7 index f809e177f..58245f72b 100644 --- a/man7/glob.7 +++ b/man7/glob.7 @@ -85,8 +85,8 @@ One can remove the special meaning of \(aq?\(aq, \(aq*\(aq and \(aq[\(aq by preceding them by a backslash, or, in case this is part of a shell command line, enclosing them in quotes. Between brackets these characters stand for themselves. -Thus, "\fI[[?*\e]\fP" matches the -four characters \(aq[\(aq, \(aq?\(aq, \(aq*\(aq and \(aq\e\(aq. +Thus, "\fI[[?*\\]\fP" matches the +four characters \(aq[\(aq, \(aq?\(aq, \(aq*\(aq and \(aq\\\(aq. .SS Pathnames Globbing is applied on each of the components of a pathname separately. diff --git a/man7/man-pages.7 b/man7/man-pages.7 index 091e027ab..cd4209655 100644 --- a/man7/man-pages.7 +++ b/man7/man-pages.7 @@ -436,7 +436,7 @@ If the command is short, then it can be included inline in the text, in italic format, for example, .IR "man 7 man-pages" . In this case, it may be worth using nonbreaking spaces -("\e\ ") at suitable places in the command. +("\\\ ") at suitable places in the command. Command options should be written in italics, e.g., .IR \-l . .PP diff --git a/man7/man.7 b/man7/man.7 index f4d642ba7..78f9a7319 100644 --- a/man7/man.7 +++ b/man7/man.7 @@ -246,7 +246,7 @@ except the tag is included with the command instead of being on the following line). If the tag is too long, the text after the tag will be moved down to the next line (text will not be lost or garbled). -For bulleted lists, use this macro with \e(bu (bullet) or \e(em (em dash) +For bulleted lists, use this macro with \\(bu (bullet) or \\(em (em dash) as the tag, and for numbered lists, use the number or letter followed by a period as the tag; this simplifies translation to other formats. @@ -354,15 +354,15 @@ but used for a subsection inside a section). The .B man package has the following predefined strings: -.IP \e*R +.IP \\*R Registration Symbol: \*R -.IP \e*S +.IP \\*S Change to default font size -.IP \e*(Tm +.IP \\*(Tm Trademark Symbol: \*(Tm -.IP \e*(lq +.IP \\*(lq Left angled double quote: \*(lq -.IP \e*(rq +.IP \\*(rq Right angled double quote: \*(rq .SS "Safe Subset" Although technically @@ -383,7 +383,7 @@ Avoid using computations; most other tools can't process them. Use simple commands that are easy to translate to other formats. The following troff macros are believed to be safe (though in many cases they will be ignored by translators): -.BR \e" , +.BR \\" , .BR . , .BR ad , .BR bp , @@ -410,26 +410,26 @@ they will be ignored by translators): .BR tr . .PP You may also use many troff escape sequences (those sequences beginning -with \e). +with \\). When you need to include the backslash character as normal text, -use \ee. +use \\\\. Other sequences you may use, where x or xx are any characters and N is any digit, include: -.BR \e' , -.BR \e` , -.BR \e- , -.BR \e. , -.BR \e" , -.BR \e% , -.BR \e*x , -.BR \e*(xx , -.BR \e(xx , -.BR \e$N , -.BR \enx , -.BR \en(xx , -.BR \efx , +.BR \\' , +.BR \\` , +.BR \\- , +.BR \\. , +.BR \\" , +.BR \\% , +.BR \\*x , +.BR \\*(xx , +.BR \\(xx , +.BR \\$N , +.BR \\nx , +.BR \\n(xx , +.BR \\fx , and -.BR \ef(xx . +.BR \\f(xx . Avoid using the escape sequences for drawing graphics. .PP Do not use the optional parameter for @@ -459,7 +459,7 @@ Only translations that can be ignored should be used. Font changes .RB ( ft -and the \fB\ef\fP escape sequence) +and the \fB\\f\fP escape sequence) should only have the values 1, 2, 3, 4, R, I, B, P, or CW (the ft command may also have no parameters). .PP @@ -497,7 +497,7 @@ file (such as HTML or Docbook). Anything else suggests simple ASCII text (e.g., a "catman" result). .PP -Many man pages begin with \fB\'\e"\fP followed by a +Many man pages begin with \fB\'\\"\fP followed by a space and a list of characters, indicating how the page is to be preprocessed. For portability's sake to non-troff translators we recommend diff --git a/man7/mdoc.7 b/man7/mdoc.7 index a1fb29a1c..090f5afb2 100644 --- a/man7/mdoc.7 +++ b/man7/mdoc.7 @@ -281,7 +281,7 @@ and a leading white space is not output between the characters and the previous argument (if any). The special meaning of a punctuation character may be escaped with the string -.Ql \e& . +.Ql \\& . For example the following string, .Bl -tag -width "&.Ar file1\ , file2\ , file3\ )\ ." -offset indent .It Li "\&.Ar file1\ , file2\ , file3\ )\ ." diff --git a/man7/mdoc.samples.7 b/man7/mdoc.samples.7 index 196b4b3c9..3f68e18b1 100644 --- a/man7/mdoc.samples.7 +++ b/man7/mdoc.samples.7 @@ -231,10 +231,10 @@ at the beginning of a line in some context other than a macro invocation, precede the .Ql \&\. (dot) with the -.Ql \e& +.Ql \\& escape sequence. The -.Ql \e& +.Ql \\& translates literally to a zero width space, and is never displayed in the output. .Pp @@ -289,11 +289,11 @@ To prevent a two character string from being interpreted as a macro name, precede the string with the escape sequence -.Ql \e& : +.Ql \\& : .Bl -tag -width "\&.Op \&Fl s \&Ar bytes" -offset indent .It Op \&Fl s \&Ar bytes is produced by -.Li \&.Op \e&Fl s \e&Ar bytes +.Li \&.Op \\&Fl s \\&Ar bytes .El .Pp Here the strings @@ -379,9 +379,9 @@ Title of article in a book or journal. .Pp One way of passing a string containing blank spaces is to use the hard or unpaddable space character -.Ql \e\ , +.Ql \\\ , that is, a blank space preceded by the escape character -.Ql \e . +.Ql \\ . This method may be used with any macro but has the side effect of interfering with the adjustment of text over the length of a line. @@ -395,14 +395,14 @@ For example: .Bl -tag -width "fetch(char *str)" -offset indent .It Fn fetch char\ *str is created by -.Ql \&.Fn fetch char\e *str +.Ql \&.Fn fetch char\\ *str .It Fn fetch "char *str" can also be created by .Ql \&.Fn fetch "\\*qchar *str\\*q" .El .Pp If the -.Ql \e +.Ql \\ or quotes were omitted, .Ql \&.Fn @@ -424,20 +424,20 @@ from character sequences. Should the need arise to force a blank character at the end of a line, it may be forced with an unpaddable space and the -.Ql \e& +.Ql \\& escape character. For example, -.Ql string\e\ \e& . +.Ql string\\\ \\& . .Ss Escaping Special Characters Special characters like the newline character -.Ql \en , +.Ql \\n , are handled by replacing the -.Ql \e +.Ql \\ with -.Ql \ee +.Ql \\e (e.g., -.Ql \een ) +.Ql \\en ) to preserve the backslash. .Sh THE ANATOMY OF A MAN PAGE @@ -450,7 +450,7 @@ in .Pp .Ss A manual page template .Bd -literal -offset indent -\&.\e" The following requests are required for all man pages. +\&.\\" The following requests are required for all man pages. \&.Dd Month day, year \&.Os OPERATING_SYSTEM [version/release] \&.Dt DOCUMENT_TITLE [section number] [volume] @@ -459,26 +459,26 @@ in \&.Nd one line description of name \&.Sh SYNOPSIS \&.Sh DESCRIPTION -\&.\e" The following requests should be uncommented and -\&.\e" used where appropriate. This next request is -\&.\e" for sections 2 and 3 function return values only. -\&.\e" .Sh RETURN VALUE -\&.\e" This next request is for sections 1, 6, 7 & 8 only -\&.\e" .Sh ENVIRONMENT -\&.\e" .Sh FILES -\&.\e" .Sh EXAMPLES -\&.\e" This next request is for sections 1, 6, 7 & 8 only -\&.\e" (command return values (to shell) and -\&.\e" fprintf/stderr type diagnostics) -\&.\e" .Sh DIAGNOSTICS -\&.\e" The next request is for sections 2 and 3 error -\&.\e" and signal handling only. -\&.\e" .Sh ERRORS -\&.\e" .Sh SEE ALSO -\&.\e" .Sh CONFORMING TO -\&.\e" .Sh HISTORY -\&.\e" .Sh AUTHORS -\&.\e" .Sh BUGS +\&.\\" The following requests should be uncommented and +\&.\\" used where appropriate. This next request is +\&.\\" for sections 2 and 3 function return values only. +\&.\\" .Sh RETURN VALUE +\&.\\" This next request is for sections 1, 6, 7 & 8 only +\&.\\" .Sh ENVIRONMENT +\&.\\" .Sh FILES +\&.\\" .Sh EXAMPLES +\&.\\" This next request is for sections 1, 6, 7 & 8 only +\&.\\" (command return values (to shell) and +\&.\\" fprintf/stderr type diagnostics) +\&.\\" .Sh DIAGNOSTICS +\&.\\" The next request is for sections 2 and 3 error +\&.\\" and signal handling only. +\&.\\" .Sh ERRORS +\&.\\" .Sh SEE ALSO +\&.\\" .Sh CONFORMING TO +\&.\\" .Sh HISTORY +\&.\\" .Sh AUTHORS +\&.\\" .Sh BUGS .Ed .Pp The first items in the template are the macros @@ -785,7 +785,7 @@ default font distinguishing it from the strings in literal font. .Pp To remove the special meaning from a punctuation character escape it with -.Ql \e& . +.Ql \\& . .Xr Troff is limited as a macro language, and has difficulty when presented with a string containing @@ -801,7 +801,7 @@ may assume it is supposed to actually perform the operation or evaluation suggested by the characters. To prevent the accidental evaluation of these characters, escape them with -.Ql \e& . +.Ql \\& . Typical syntax is shown in the first content macro displayed below, .Ql \&.Ad . @@ -1249,7 +1249,7 @@ it can not recall the first argument it was invoked with. .Bl -tag -width "\&.Nm mdoc.sample" -compact -offset 14n .It Li \&.Nm mdoc.sample .Nm mdoc.sample -.It Li \&.Nm \e-mdoc +.It Li \&.Nm \\-mdoc .Nm \-mdoc . .It Li \&.Nm foo\ )\ )\ , .Nm foo ) ) , @@ -1710,7 +1710,7 @@ using the space mode macro to turn spacing off: .Bd -literal -offset indent \&.Sm off \&.It Xo Sy I Ar operation -\&.No \een Ar count No \een +\&.No \\en Ar count No \\en \&.Xc \&.Sm on .Ed @@ -1720,7 +1720,7 @@ Produces .Bl -tag -width flag -compact .Sm off .It Xo Sy I Ar operation -.No \en Ar count No \en +.No \\n Ar count No \\n .Xc .Sm on .El @@ -1755,7 +1755,7 @@ Test the value of a variable. .Bd -literal -offset indent \&.It Xo \&.Ic .ifndef -\&.Oo \e&! Oc Ns Ar variable +\&.Oo \\&! Oc Ns Ar variable \&.Op Ar operator variable ... \&.Xc .Ed @@ -2076,7 +2076,7 @@ macro asserts a vertical distance unless the -compact flag is given). .\" around the .\" .Li \&+ .\" signs were forced with -.\" .Li \e : +.\" .Li \\ : .\" .Pp .\" .Ds I .\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \& @@ -2091,7 +2091,7 @@ macro asserts a vertical distance unless the -compact flag is given). .\" .Li \&.Sy x .\" .Cx .\" .Cl Cx \t\t -.\" .Li \&.Cx \e\ +\e\ \e& +.\" .Li \&.Cx \\\ +\\\ \\& .\" .Cx .\" .Cl Cx \&(\& .\" .Va a @@ -2110,7 +2110,7 @@ macro asserts a vertical distance unless the -compact flag is given). .\" .Li \&.Sy y .\" .Cx .\" .Cl Cx \t\t -.\" .Li \&.Cx \e\ +\e\ \e& +.\" .Li \&.Cx \\\ +\\\ \\& .\" .Cx .\" .Cl Cx \t\t .\" .Li \&.Va c ) @@ -2141,7 +2141,7 @@ macro asserts a vertical distance unless the -compact flag is given). .\" .Cx \t .\" .Em is produced by .\" .Cx \t -.\" .Li \&.Ar \e\ b1 e1 f1 +.\" .Li \&.Ar \\\ b1 e1 f1 .\" .Cx .\" .Cl Cx \t\t .\" .Li \&.Op Sy ?/ @@ -2336,8 +2336,8 @@ would be typed. .Pp .Dl Usage: .Li argument ... \*(Pu .Bl -tag -width "\&.Li cntrl-D ) ," -compact -offset 14n -.It Li \&.Li \een -.Li \en +.It Li \&.Li \\en +.Li \\n .It Li \&.Li M1 M2 M3\ ; .Li M1 M2 M3 ; .It Li \&.Li cntrl-D\ )\ , @@ -2647,11 +2647,11 @@ macro name, a new and nested list is assumed. .Sh PREDEFINED STRINGS The following strings are predefined as may be used by preceding with the troff string interpreting sequence -.Ql \&\e*(xx +.Ql \&\\*(xx where .Em xx is the name of the defined string or as -.Ql \&\e*x +.Ql \&\\*x where .Em x is the name of the string. @@ -2685,7 +2685,7 @@ The interpreting sequence may be used any where in the text. The string named .Ql q should be written as -.Ql \e*q +.Ql \\*q since it is only one char. .Sh DIAGNOSTICS The debugging facilities for @@ -2718,7 +2718,7 @@ two lower case characters or a dot plus a letter or metacharacter character. In one of the introduction examples, it was shown how to prevent the interpretation of a macro name with the escape sequence -.Ql \e& . +.Ql \\& . This is sufficient for the internal register names also. .Pp .\" Every callable macro name has a corresponding register @@ -2767,7 +2767,7 @@ the debug macro placed above and below an artificially created problem (a flag argument .Ql \&aC which should be -.Ql \e&aC +.Ql \\&aC in order to work): .Bd -literal -offset indent \&.Db on @@ -2820,7 +2820,7 @@ In this next example, the offending is escaped: .Bd -literal -offset indent \&.Db on -\&.Em An escaped \e&aC +\&.Em An escaped \\&aC \&.Db off .Ed .Bd -literal -offset indent @@ -2837,12 +2837,12 @@ DEBUGGING OFF .Ed .Pp The argument -.Ql \e&aC +.Ql \\&aC shows up with the same length of 2 as the -.Ql \e& +.Ql \\& sequence produces a zero width, but a register named -.Ql \e&aC +.Ql \\&aC was not found and the type classified as string. .Pp Other diagnostics consist of usage statements and are self explanatory. @@ -2913,7 +2913,7 @@ and certainly should be able to. .\" boundary. .\" to make sure a line boundary is crossed: .\" .Bd -literal -.\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[] +.\" \&.Fn struct\\\ dictionarytable\\\ *dictionarylookup struct\\\ dictionarytable\\\ *tab[] .\" .Ed .\" .Pp .\" produces, nudge nudge, diff --git a/man7/regex.7 b/man7/regex.7 index c9355717c..b7dd627ec 100644 --- a/man7/regex.7 +++ b/man7/regex.7 @@ -90,16 +90,16 @@ an empty set of "\fI()\fP" (matching the null string)\*(dg, a \fIbracket expression\fR (see below), \(aq.\(aq (matching any single character), \(aq^\(aq (matching the null string at the beginning of a line), \(aq$\(aq (matching the null string at the -end of a line), a \(aq\e\(aq followed by one of the characters -"\fI^.[$()|*+?{\e\fP" +end of a line), a \(aq\\\(aq followed by one of the characters +"\fI^.[$()|*+?{\\\fP" (matching that character taken as an ordinary character), -a \(aq\e\(aq followed by any other character\*(dg +a \(aq\\\(aq followed by any other character\*(dg (matching that character taken as an ordinary character, -as if the \(aq\e\(aq had not been present\*(dg), +as if the \(aq\\\(aq had not been present\*(dg), or a single character with no other significance (matching that character). A \(aq{\(aq followed by a character other than a digit is an ordinary character, not the beginning of a bound\*(dg. -It is illegal to end an RE with \(aq\e\(aq. +It is illegal to end an RE with \(aq\\\(aq. .PP A \fIbracket expression\fR is a list of characters enclosed in "\fI[]\fP". It normally matches any single character from the list (but see below). @@ -123,7 +123,7 @@ To use a literal \(aq\-\(aq as the first endpoint of a range, enclose it in "\fI[.\fP" and "\fI.]\fP" to make it a collating element (see below). With the exception of these and some combinations using \(aq[\(aq (see next -paragraphs), all other special characters, including \(aq\e\(aq, lose their +paragraphs), all other special characters, including \(aq\\\(aq, lose their special significance within a bracket expression. .PP Within a bracket expression, a collating element (a character, @@ -235,9 +235,9 @@ Obsolete ("basic") regular expressions differ in several respects. \(aq|\(aq, \(aq+\(aq, and \(aq?\(aq are ordinary characters and there is no equivalent for their functionality. -The delimiters for bounds are "\fI\e{\fP" and "\fI\e}\fP", +The delimiters for bounds are "\fI\\{\fP" and "\fI\\}\fP", with \(aq{\(aq and \(aq}\(aq by themselves ordinary characters. -The parentheses for nested subexpressions are "\fI\e(\fP" and "\fI\e)\fP", +The parentheses for nested subexpressions are "\fI\\(\fP" and "\fI\\)\fP", with \(aq(\(aq and \(aq)\(aq by themselves ordinary characters. \(aq^\(aq is an ordinary character except at the beginning of the RE or\*(dg the beginning of a parenthesized subexpression, @@ -248,12 +248,12 @@ RE or the beginning of a parenthesized subexpression (after a possible leading \(aq^\(aq). .PP Finally, there is one new type of atom, a \fIback reference\fR: -\(aq\e\(aq followed by a nonzero decimal digit \fId\fR +\(aq\\\(aq followed by a nonzero decimal digit \fId\fR matches the same sequence of characters matched by the \fId\fRth parenthesized subexpression (numbering subexpressions by the positions of their opening parentheses, left to right), -so that, for example, "\fI\e([bc]\e)\e1\fP" matches "bb" or "cc" but not "bc". +so that, for example, "\fI\\([bc]\\)\\1\fP" matches "bb" or "cc" but not "bc". .SH BUGS Having two kinds of REs is a botch. .PP @@ -267,7 +267,7 @@ Back references are a dreadful botch, posing major problems for efficient implementations. They are also somewhat vaguely defined (does -"\fIa\e(\e(b\e)*\e2\e)*d\fP" match "abbbd"?). +"\fIa\\(\\(b\\)*\\2\\)*d\fP" match "abbbd"?). Avoid using them. .PP POSIX.2's specification of case-independent matching is vague.