diff options
author | Bruce Evans <bde@FreeBSD.org> | 2006-10-08 18:15:08 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 2006-10-08 18:15:08 +0000 |
commit | 2481da7487b9ad8f88311742b190fb5021a60260 (patch) | |
tree | 9e69099aed086269ab338b986781b6629a9787c9 /sys/ddb/db_output.c | |
parent | 0f85b689a524c306cff4d7acee6f4a8001f98f75 (diff) | |
download | src-2481da7487b9ad8f88311742b190fb5021a60260.tar.gz src-2481da7487b9ad8f88311742b190fb5021a60260.zip |
Fixed formatting of printing of command tables. WIth the default max
output width of 79, only 6 columns of width 12 each fit, but 7 columns
were printed.
The fix is to pass the width of the next output to db_end_line() and
not assume there that this width is always 1.
Related unfixed bugs:
- 1 character is wasted for a space after the last column
- suppression of trailing spaces used to limit the misformatting, but
seems to have been lost
- in db_examine(), the width of the next output is not know and is
still assumed to be 1.
Notes
Notes:
svn path=/head/; revision=163134
Diffstat (limited to 'sys/ddb/db_output.c')
-rw-r--r-- | sys/ddb/db_output.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c index e9f0c824c9de..a3492416ae91 100644 --- a/sys/ddb/db_output.c +++ b/sys/ddb/db_output.c @@ -304,8 +304,8 @@ db_iprintf(fmt) * End line if too long. */ void -db_end_line() +db_end_line(int field_width) { - if (db_output_position >= db_max_width) + if (db_output_position + field_width > db_max_width) db_printf("\n"); } |