summaryrefslogtreecommitdiff
path: root/libps
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-07-09 01:41:20 +0000
committerMiles Bader <miles@gnu.org>1996-07-09 01:41:20 +0000
commitd56b0f3528ad9047e4560996ea38d0445597da82 (patch)
treeaeb2f01ba74054a72a0778f4cb491e0058c72adb /libps
parent5f5eba8ecc2f055513097a7b392bc5ed83a1043f (diff)
(_ps_stream_write_field): If a field is truncatable (MAX_WIDTH >= 0), take
some of our spacing deficit out of it.
Diffstat (limited to 'libps')
-rw-r--r--libps/write.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libps/write.c b/libps/write.c
index 3c57f94f..725ea288 100644
--- a/libps/write.c
+++ b/libps/write.c
@@ -189,6 +189,10 @@ _ps_stream_write_field (struct ps_stream *stream,
while (isspace (*buf))
buf++;
+ if (stream->spaces < 0 && max_width >= 0)
+ /* Take some of our spacing deficit out of a truncatable field. */
+ max_width += stream->spaces;
+
len = noise_len (buf, max_width);
if (width > 0)