summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-07-28 20:00:26 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-07-28 20:00:26 -0700
commit4f61ef03a2f9559d93ce43d5a5a5db86cbf33cd5 (patch)
tree36f3936c6d68cdb80406d5df7c93c6578124a1c5 /txr.1
parent0928a2c836681e9f0a91feda3fdae127bfca6b76 (diff)
downloadtxr-4f61ef03a2f9559d93ce43d5a5a5db86cbf33cd5.tar.gz
txr-4f61ef03a2f9559d93ce43d5a5a5db86cbf33cd5.tar.bz2
txr-4f61ef03a2f9559d93ce43d5a5a5db86cbf33cd5.zip
Centered fields in format.
* stream.c (enum align): New enum. (vformat_align_pre, vformat_align_post): New static functions. (vformat_num, vformat_str): Argument left renamed to align, and changed to enum align. vformat_align_pre and vformat_align_post are called to generate the correct padding for left, center and right alignment. (vformat): Two-valued local variable left turned into three-valued align. The ^ prefix on the width field is recognized. * txr.1: Documented ^ width prefix.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.119
1 files changed, 13 insertions, 6 deletions
diff --git a/txr.1 b/txr.1
index a9e46876..1f05ea20 100644
--- a/txr.1
+++ b/txr.1
@@ -23979,13 +23979,18 @@ are specified as follows:
.meIP < width
The width specifier consists of an optional
.code <
-(left angle bracket) character,
-followed by an optional width specification.
+(left angle bracket) character or
+.code ^
+(caret)
+character followed by an optional width specification.
If the leading
.code <
character is present, then the printing will be left-adjusted within
-this field. Otherwise it will be right-adjusted by default.
+this field. If the
+.code ^
+character is present, the printing will be centered within the field.
+Otherwise it will be right-adjusted by default.
The width can be specified as a decimal integer, or as the character
.codn * .
@@ -23994,10 +23999,12 @@ The
notation means that instead of digits, the value of the next argument is
consumed, and expected to be an integer which specifies the width. If that
integer value is negative, then the field will be left-adjusted.
-If the value is positive, but the
+If the value is positive, but either the
.code <
-character is present in the width
-specifier, then the field is left adjusted.
+or
+.code ^
+prefix character is present in the width
+specifier, then the field is adjusted according to that character.
.meIP < precision
The precision specifier is introduced by a leading comma. If this comma appears