1 --- printf.3.orig 2009-12-15 17:50:20.000000000 -0800
2 +++ printf.3 2009-12-15 17:58:46.000000000 -0800
7 -.Fd "#define _WITH_DPRINTF"
10 .Fn printf "const char * restrict format" ...
11 @@ -98,7 +97,7 @@ write output to the given file descripto
14 write to the character string
20 @@ -106,6 +105,12 @@ and
21 dynamically allocate a new string with
24 +Extended locale versions of these functions are documented in
28 +for more information.
30 These functions write the output under the control of a
32 string that specifies how subsequent arguments
33 @@ -122,7 +127,7 @@ except for
36 which return the number of characters that would have been printed if the
40 (again, not including the final
42 @@ -154,14 +159,14 @@ and
48 of the characters printed into the output string
52 character then gets the terminating
54 if the return value is greater than or equal to the
57 argument, the string was too short
58 and some of the printed characters were discarded.
59 The output is always null-terminated.
60 @@ -172,7 +177,11 @@ and
63 effectively assume an infinite
67 +For those routines that write to a user-provided character string,
68 +that string and the format strings should not overlap, as the
69 +behavior is undefined.
71 The format string is composed of zero or more directives:
73 @@ -291,6 +300,20 @@ the non-monetary separator returned by
77 +An optional separator character (
78 +.Cm \ , | \; | \ : | _
79 +) used for separating multiple values when printing an AltiVec or SSE vector,
80 +or other multi-value unit.
82 +NOTE: This is an extension to the
85 +Behaviour of these values for
87 +is only defined for operating systems conforming to the
88 +AltiVec Technology Programming Interface Manual.
89 +(At time of writing this includes only Mac OS X 10.2 and later.)
91 An optional decimal digit string specifying a minimum field width.
92 If the converted value has fewer characters than the field width, it will
93 be padded with spaces on the left (or right, if the left-adjustment
94 @@ -383,6 +406,34 @@ conversion:
95 .It Sy Modifier Ta Cm c Ta Cm s
96 .It Cm l No (ell) Ta Vt wint_t Ta Vt "wchar_t *"
99 +The AltiVec Technology Programming Interface Manual also defines five additional length modifiers
100 +which can be used (in place of the conventional length modifiers) for the printing of AltiVec or SSE vectors:
103 +Treat the argument as a vector value, unit length will be determined by the conversion
104 +specifier (default = 16 8-bit units for all integer conversions,
105 +4 32-bit units for floating point conversions).
107 +Treat the argument as a vector of 8 16-bit units.
109 +Treat the argument as a vector of 4 32-bit units.
112 +NOTE: The vector length specifiers are extensions to the
115 +Behaviour of these values for
117 +is only defined for operating systems conforming to the
118 +AltiVec Technology Programming Interface Manual.
119 +(At time of writing this includes only Mac OS X 10.2 and later.)
121 +As a further extension, for SSE2 64-bit units:
124 +Treat the argument as a vector of 2 64-bit units.
127 A character that specifies the type of conversion to be applied.
129 @@ -561,10 +612,9 @@ For example,
134 -and later always prints finite non-zero numbers using
136 -as the digit before the hexadecimal point.
137 +The format chosen depends on the internal representation of the
138 +number, but the implementation guarantees that the length of the
139 +mantissa will be minimized.
140 Zeroes are always represented with a mantissa of 0 (preceded by a
142 if appropriate) and an exponent of
143 @@ -781,34 +831,6 @@ Always use the proper secure idiom:
145 .Dl "snprintf(buffer, sizeof(buffer), \*q%s\*q, string);"
147 -Many application writers used the name
151 -function was introduced in
153 -so a prototype is not provided by default in order to avoid
154 -compatibility problems.
155 -Applications that wish to use the
157 -function described herein should either request a strict
159 -environment by defining the macro
161 -to the value 200809 or greater, or by defining the macro
163 -prior to the inclusion of
165 -For compatibility with GNU libc, defining either
169 -prior to the inclusion of
175 The conversion formats
178 @@ -845,9 +867,11 @@ Insufficient storage space is available.
189 Subject to the caveats noted in the