=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/printf/printf.1,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/printf/printf.1 2000/03/06 03:15:59 1.9 --- src/usr.bin/printf/printf.1 2000/03/10 20:17:49 1.10 *************** *** 1,4 **** ! .\" $OpenBSD: printf.1,v 1.9 2000/03/06 03:15:59 aaron Exp $ .\" Copyright (c) 1989, 1990 The Regents of the University of California. .\" All rights reserved. .\" --- 1,5 ---- ! .\" $OpenBSD: printf.1,v 1.10 2000/03/10 20:17:49 aaron Exp $ ! .\" .\" Copyright (c) 1989, 1990 The Regents of the University of California. .\" All rights reserved. .\" *************** *** 49,62 **** .Nm printf formats and prints its arguments, after the first, under control of the ! .Ar format . The .Ar format is a character string which contains three types of objects: plain characters, which are simply copied to standard output, character escape sequences which are converted and copied to the standard output, and format specifications, each of which causes printing of the next successive ! .Ar argument . .Pp The .Ar arguments --- 50,63 ---- .Nm printf formats and prints its arguments, after the first, under control of the ! .Ar format . The .Ar format is a character string which contains three types of objects: plain characters, which are simply copied to standard output, character escape sequences which are converted and copied to the standard output, and format specifications, each of which causes printing of the next successive ! .Ar argument . .Pp The .Ar arguments *************** *** 66,73 **** or .Cm s ; otherwise it is evaluated as a C constant, with the following extensions: ! .Pp ! .Bl -bullet -offset indent -compact .It A leading plus or minus sign is allowed. .It --- 67,73 ---- or .Cm s ; otherwise it is evaluated as a C constant, with the following extensions: ! .Bl -bullet -offset indent .It A leading plus or minus sign is allowed. .It *************** *** 77,91 **** .El .Pp The format string is reused as often as necessary to satisfy the ! .Ar arguments . Any extra format specifications are evaluated with zero or the null string. .Pp Character escape sequences are in backslash notation as defined in .St -ansiC . ! The characters and their meanings ! are as follows: ! .Bl -tag -width Ds -offset indent .It Cm \ee Write an character. .It Cm \ea --- 77,91 ---- .El .Pp The format string is reused as often as necessary to satisfy the ! .Ar arguments . Any extra format specifications are evaluated with zero or the null string. .Pp Character escape sequences are in backslash notation as defined in .St -ansiC . ! The characters and their meanings are as follows: ! .Pp ! .Bl -tag -width Ds -offset indent -compact .It Cm \ee Write an character. .It Cm \ea *************** *** 117,123 **** Each format specification is introduced by the percent .Pq Sq \&% character. ! The remainder of the format specification includes, in the following order: .Bl -tag -width Ds .It "Zero or more of the following flags:" --- 117,123 ---- Each format specification is introduced by the percent .Pq Sq \&% character. ! The remainder of the format specifiers include, in the following order: .Bl -tag -width Ds .It "Zero or more of the following flags:" *************** *** 126,154 **** Specifies that the value should be printed in an .Dq alternate form . For the ! .Cm c , .Cm d , and .Cm s ! formats, this option has no effect. For the .Cm o format the precision of the number is increased to force the first ! character of the output string to a zero. For the .Cm x .Pq Cm X format, a non-zero result has the string .Li 0x .Pq Li 0X ! prepended to it. For ! .Cm e , .Cm E , ! .Cm f , .Cm g , and .Cm G formats, the result will always contain a decimal point, even if no digits follow the point (normally, a decimal point only appears in the ! results of those formats if a digit follows the decimal point). For .Cm g and .Cm G --- 126,158 ---- Specifies that the value should be printed in an .Dq alternate form . For the ! .Cm c , .Cm d , and .Cm s ! formats, this option has no effect. ! For the .Cm o format the precision of the number is increased to force the first ! character of the output string to a zero. ! For the .Cm x .Pq Cm X format, a non-zero result has the string .Li 0x .Pq Li 0X ! prepended to it. ! For ! .Cm e , .Cm E , ! .Cm f , .Cm g , and .Cm G formats, the result will always contain a decimal point, even if no digits follow the point (normally, a decimal point only appears in the ! results of those formats if a digit follows the decimal point). ! For .Cm g and .Cm G *************** *** 163,183 **** a sign placed before the number when using signed formats. .It Sq \&\ \& A space specifies that a blank should be left before a positive number ! for a signed format. A ! .Dq + overrides a space if both are used. .It Cm \&0 A zero character specifies that zero-padding should be used ! rather than blank-padding. This flag is ignored if used with a precision specifier and any of the .Cm d , i , o , u , or .Cm x .Pq Cm X ! formats. A ! .Dq \&- overrides a ! .Dq \&0 if both are used. .El .It "Field Width:" --- 167,190 ---- a sign placed before the number when using signed formats. .It Sq \&\ \& A space specifies that a blank should be left before a positive number ! for a signed format. ! A ! .Ql + overrides a space if both are used. .It Cm \&0 A zero character specifies that zero-padding should be used ! rather than blank-padding. ! This flag is ignored if used with a precision specifier and any of the .Cm d , i , o , u , or .Cm x .Pq Cm X ! formats. ! A ! .Ql \&- overrides a ! .Ql \&0 if both are used. .El .It "Field Width:" *************** *** 206,212 **** .El .Pp A field width or precision may be ! .Dq \&* instead of a digit string. In this case an .Ar argument --- 213,219 ---- .El .Pp A field width or precision may be ! .Ql \&* instead of a digit string. In this case an .Ar argument *************** *** 247,253 **** the precision specification for the argument; when the precision is missing, 6 digits are produced. An upper-case ! .Dq E is used for an .Cm E format. --- 254,260 ---- the precision specification for the argument; when the precision is missing, 6 digits are produced. An upper-case ! .Sq E is used for an .Cm E format. *************** *** 276,282 **** precision is 0 or missing, all characters in the string are printed. .It Cm \&% Print a ! .Dq \&% ; no argument is used. .El .Pp --- 283,289 ---- precision is 0 or missing, all characters in the string are printed. .It Cm \&% Print a ! .Ql \&% ; no argument is used. .El .Pp