]> diplodocus.org Git - nmh/blobdiff - man/mh-format.man
Added -D_FORTIFY_SOURCE=2 now that the build is clean with it.
[nmh] / man / mh-format.man
index 38d313897e1836cf1ef34649eb9894f185fb6e7e..7ac0bc0ddddd3b00752e895479fd3fbb530e4dbe 100644 (file)
@@ -45,7 +45,8 @@ A format string consists of ordinary text, and special multi-character
 escape sequences which begin with `%'.  When specifying a format
 string, the usual C backslash characters are honored: `\\b', `\\f',
 `\\n', `\\r', and `\\t'.  Continuation lines in format files end with
-`\\' followed by the newline character.
+`\\' followed by the newline character. A literal `%' can be inserted into
+a format file by using the sequence `%%'.
 .\" TALK ABOUT SYNTAX FIRST, THEN SEMANTICS
 .SS SYNTAX
 Format strings are built around
@@ -290,6 +291,10 @@ decode     expr    string  decode \fIstr\fR as RFC 2047 (MIME-encoded)
                        component
 unquote        expr    string  remove RFC 2822 quotes from \fIstr\fR
 trim   expr            trim trailing whitespace from \fIstr\fR
+kilo   expr    string  express in SI units: 15.9K, 2.3M, etc.
+                       %(kilo) scales by factors of 1000,
+kibi   expr    string  express in IEC units: 15.5Ki, 2.2Mi.
+                       %(kibi) scales by factors of 1024.
 putstr expr            print \fIstr\fR
 putstrf        expr            print \fIstr\fR in a fixed width
 putnum expr            print \fInum\fR
@@ -457,7 +462,7 @@ attributes back to their default setting.
 .PP
 All of these terminal escape should be used in conjunction with
 (\fIzputlit\fR\^) (preferred) or (\fIputlit\fR\^), as the normal
-(\fputstr\fR\^) function will strip out control characters.
+(\fIputstr\fR\^) function will strip out control characters.
 .PP
 The available output width is kept in an internal register; any output
 past this width will be truncated.  The one exception to this is