Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Add details of %A, %An, %Av formats to pkg_printf(3)
Matthew Seaman committed 12 years ago
commit 6ee8e315cd1a3aba2f72e786a554e5d82f7d7363
parent 7de5f47
1 file changed +29 -9
modified libpkg/pkg_printf.3
@@ -30,7 +30,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-
.Dd January 26, 2013
+
.Dd May 12, 2013
.Dt PKG_PRINTF 3
.Os
.Sh NAME
@@ -180,7 +180,7 @@ See
.Sx SCALE FACTORS .
.Pp
For array valued conversions
-
.Cm ( B , C , D , F , G , L , O , U , d ,
+
.Cm ( A, B , C , D , F , G , L , O , U , d ,
and
.Cm r )
generate
@@ -233,7 +233,7 @@ See
.Sx SCALE FACTORS .
.Pp
For array valued conversions
-
.Cm ( B , C , D , F , G , L , O , U , d ,
+
.Cm ( A, B , C , D , F , G , L , O , U , d ,
and
.Cm r )
generate the number of items in the array.
@@ -276,9 +276,9 @@ the converted value is to be left adjusted on the field boundary.
The converted value is padded on the right with blanks,
rather than on the left with blanks or zeros.
Applies to all scalar-valued conversions.
-
.Cm \-
+
.Dq Cm \-
overrides a
-
.Cm 0
+
.Dq Cm 0
if both are given.
.It So "\ " Sc (space)
A blank should be left before a positive number
@@ -290,7 +290,7 @@ or
A sign must always be placed before an integer or humanized
number produced by a numerical conversion.
A
-
.Cm +
+
.Dq Cm +
overrides a space if both are used.
.It Sq Cm '
Numerical (integer) conversions should be grouped and separated by
@@ -313,7 +313,7 @@ One or two characters that specify the type of conversion to be applied.
An optional
.Dq row format
for array valued conversions
-
.Cm ( B , C , D , F , G , L , O , U , d ,
+
.Cm ( A, B , C , D , F , G , L , O , U , d ,
and
.Cm r )
or the timestamp value conversion 
@@ -367,7 +367,7 @@ When used in this fashion they will consume one argument of the indicated
type from the function's argument list.
.Pp
The array valued format codes
-
.Cm ( B , C , D , F , G , L , O , U , d ,
+
.Cm ( A , B , C , D , F , G , L , O , U , d ,
and
.Cm r )
and the timestamp format code
@@ -399,7 +399,7 @@ default format, detailed below.
.Pp
Within a
.Dq row format
-
string, you may use any of the single-character non-array valuedd
+
string, you may use any of the single-character non-array valued
format codes, but only the two-character format codes which correspond
to the parent item and have the same first character.
Array valued format codes may not be used within row formats,
@@ -422,6 +422,18 @@ version.
.Pp
The conversion specifiers and their meanings are:
.Bl -tag -width ".Cm %Bn"
+
.It Cm \^%A
+
Annotations [array]
+
.Vt struct pkg *
+
.Pp
+
Default row format
+
.Cm "%A%{%An: %Av\n|%}"
+
.It Cm \^%An
+
Annotation tag name [string]
+
.Vt struct pkg_note *
+
.It Cm \^%Av
+
Annotation value [string]
+
.Vt struct pkg_note *
.It Cm \^%B
Shared libraries [array]
.Vt struct pkg *
@@ -655,6 +667,14 @@ if the result of a conversion is wider than the field width, the field
is expanded to contain the conversion result.
.Pp
.Ss ARRAY VALUES
+
Effective format modifiers:
+
.Bl -tag -width ".So \  Sc" -offset indent
+
.It Cm ?
+
1st Alternate Form: 0 if the array is empty, 1 if it has any number
+
of elements within it
+
.It Cm #
+
2nd Alternate Form: The number of elements in the array
+
.El
.Pp
.Ss STRING VALUES
Effective format modifiers: