Mon Mar 12 09:29:43 2018 UTC ()
Remove Tn.


(wiz)
diff -r1.26 -r1.27 src/usr.bin/printf/printf.1

cvs diff -r1.26 -r1.27 src/usr.bin/printf/printf.1 (expand / switch to unified diff)

--- src/usr.bin/printf/printf.1 2018/03/12 00:42:05 1.26
+++ src/usr.bin/printf/printf.1 2018/03/12 09:29:43 1.27
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: printf.1,v 1.26 2018/03/12 00:42:05 dholland Exp $ 1.\" $NetBSD: printf.1,v 1.27 2018/03/12 09:29:43 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 1989, 1990, 1993 3.\" Copyright (c) 1989, 1990, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to Berkeley by 6.\" This code is derived from software contributed to Berkeley by
7.\" the Institute of Electrical and Electronics Engineers, Inc. 7.\" the Institute of Electrical and Electronics Engineers, Inc.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
@@ -60,28 +60,27 @@ The @@ -60,28 +60,27 @@ The
60after the first are treated as strings if the corresponding format is 60after the first are treated as strings if the corresponding format is
61either 61either
62.Cm b , 62.Cm b ,
63.Cm B , 63.Cm B ,
64.Cm c , 64.Cm c ,
65or 65or
66.Cm s ; 66.Cm s ;
67otherwise it is evaluated as a C constant, with the following extensions: 67otherwise it is evaluated as a C constant, with the following extensions:
68.Pp 68.Pp
69.Bl -bullet -offset indent -compact 69.Bl -bullet -offset indent -compact
70.It 70.It
71A leading plus or minus sign is allowed. 71A leading plus or minus sign is allowed.
72.It 72.It
73If the leading character is a single or double quote, the value is the 73If the leading character is a single or double quote, the value is the ASCII
74.Tn ASCII 
75code of the next character. 74code of the next character.
76.El 75.El
77.Pp 76.Pp
78The format string is reused as often as necessary to satisfy the 77The format string is reused as often as necessary to satisfy the
79.Ar arguments . 78.Ar arguments .
80Any extra format specifications are evaluated with zero or the null 79Any extra format specifications are evaluated with zero or the null
81string. 80string.
82.Pp 81.Pp
83Character escape sequences are in backslash notation as defined in 82Character escape sequences are in backslash notation as defined in
84.St -ansiC . 83.St -ansiC .
85The characters and their meanings are as follows: 84The characters and their meanings are as follows:
86.Bl -tag -width Ds -offset indent 85.Bl -tag -width Ds -offset indent
87.It Cm \ee 86.It Cm \ee
@@ -117,33 +116,31 @@ Write a @@ -117,33 +116,31 @@ Write a
117.Aq vertical tab 116.Aq vertical tab
118character. 117character.
119.It Cm \e\' 118.It Cm \e\'
120Write a 119Write a
121.Aq single quote 120.Aq single quote
122character. 121character.
123.It Cm \e" 122.It Cm \e"
124Write a 123Write a
125.Aq double quote 124.Aq double quote
126character. 125character.
127.It Cm \e\e 126.It Cm \e\e
128Write a backslash character. 127Write a backslash character.
129.It Cm \e Ns Ar num 128.It Cm \e Ns Ar num
130Write an 8\-bit character whose 129Write an 8\-bit character whose ASCII
131.Tn ASCII 
132value is the 1\-, 2\-, or 3\-digit octal number 130value is the 1\-, 2\-, or 3\-digit octal number
133.Ar num . 131.Ar num .
134.It Cm \ex Ns Ar xx 132.It Cm \ex Ns Ar xx
135Write an 8\-bit character whose 133Write an 8\-bit character whose ASCII
136.Tn ASCII 
137value is the 1\- or 2\-digit hexadecimal number 134value is the 1\- or 2\-digit hexadecimal number
138.Ar xx . 135.Ar xx .
139.El 136.El
140.Pp 137.Pp
141Each format specification is introduced by the percent character 138Each format specification is introduced by the percent character
142.Pq Dq \&% . 139.Pq Dq \&% .
143The remainder of the format specification includes, 140The remainder of the format specification includes,
144in the following order: 141in the following order:
145.Bl -tag -width Ds 142.Bl -tag -width Ds
146.It Zero or more of the following flags : 143.It Zero or more of the following flags :
147.Bl -tag -width Ds 144.Bl -tag -width Ds
148.It Cm # 145.It Cm #
149A 146A
@@ -299,30 +296,28 @@ whichever gives full precision in minimu @@ -299,30 +296,28 @@ whichever gives full precision in minimu
299Characters from the string 296Characters from the string
300.Ar argument 297.Ar argument
301are printed with backslash-escape sequences expanded. 298are printed with backslash-escape sequences expanded.
302.Pp 299.Pp
303The following additional backslash-escape sequences are supported: 300The following additional backslash-escape sequences are supported:
304.Bl -tag -width Ds 301.Bl -tag -width Ds
305.It Cm \ec 302.It Cm \ec
306Causes 303Causes
307.Nm 304.Nm
308to ignore any remaining characters in the string operand containing it, 305to ignore any remaining characters in the string operand containing it,
309any remaining string operands, and any additional characters in 306any remaining string operands, and any additional characters in
310the format operand. 307the format operand.
311.It Cm \e0 Ns Ar num 308.It Cm \e0 Ns Ar num
312Write an 8\-bit character whose 309Write an 8\-bit character whose ASCII value is the 1\-, 2\-, or
313.Tn ASCII 3103\-digit octal number
314value is the 1\-, 2\-, or 3\-digit 
315octal number 
316.Ar num . 311.Ar num .
317.It Cm \e^ Ns Ar c 312.It Cm \e^ Ns Ar c
318Write the control character 313Write the control character
319.Ar c . 314.Ar c .
320Generates characters `\e000' through `\e037`, and `\e177' (from `\e^?'). 315Generates characters `\e000' through `\e037`, and `\e177' (from `\e^?').
321.It Cm \eM\- Ns Ar c 316.It Cm \eM\- Ns Ar c
322Write the character 317Write the character
323.Ar c 318.Ar c
324with the 8th bit set. 319with the 8th bit set.
325Generates characters `\e241' through `\e376`. 320Generates characters `\e241' through `\e376`.
326.It Cm \eM^ Ns Ar c 321.It Cm \eM^ Ns Ar c
327Write the control character 322Write the control character
328.Ar c 323.Ar c
@@ -374,30 +369,28 @@ from being interpreted as an option stri @@ -374,30 +369,28 @@ from being interpreted as an option stri
374.Xr printf 9 369.Xr printf 9
375.Sh STANDARDS 370.Sh STANDARDS
376The 371The
377.Nm 372.Nm
378utility conforms to 373utility conforms to
379.St -p1003.1-2001 . 374.St -p1003.1-2001 .
380.Pp 375.Pp
381Support for the floating point formats and `*' as a field width and precision 376Support for the floating point formats and `*' as a field width and precision
382are optional in POSIX. 377are optional in POSIX.
383.Pp 378.Pp
384The behaviour of the %B format and the \e', \e", \exxx, \ee and 379The behaviour of the %B format and the \e', \e", \exxx, \ee and
385\e[M][\-|^]c escape sequences are undefined in POSIX. 380\e[M][\-|^]c escape sequences are undefined in POSIX.
386.Sh BUGS 381.Sh BUGS
387Since the floating point numbers are translated from 382Since the floating point numbers are translated from ASCII to
388.Tn ASCII 383floating-point and then back again, floating-point precision may be lost.
389to floating-point and 
390then back again, floating-point precision may be lost. 
391.Pp 384.Pp
392Hexadecimal character constants are restricted to, and should be specified 385Hexadecimal character constants are restricted to, and should be specified
393as, two character constants. 386as, two character constants.
394This is contrary to the ISO C standard but 387This is contrary to the ISO C standard but
395does guarantee detection of the end of the constant. 388does guarantee detection of the end of the constant.
396.Sh NOTES 389.Sh NOTES
397All formats which treat the 390All formats which treat the
398.Ar argument 391.Ar argument
399as a number first convert the 392as a number first convert the
400.Ar argument 393.Ar argument
401from its external representation as a character string 394from its external representation as a character string
402to an internal numeric representation, and then apply the 395to an internal numeric representation, and then apply the
403format to the internal numeric representation, producing 396format to the internal numeric representation, producing