From caa55a655742e4e600bdb05a38e07f6896f32081 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Wed, 28 Mar 2001 02:57:26 +0000 Subject: [PATCH] When printing KEY records with COMMENT and MULTILINE, the line would often be too long. --- lib/dns/rdata/generic/key_25.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/dns/rdata/generic/key_25.c b/lib/dns/rdata/generic/key_25.c index 2df2250eb6..e5913cc830 100644 --- a/lib/dns/rdata/generic/key_25.c +++ b/lib/dns/rdata/generic/key_25.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: key_25.c,v 1.38 2001/03/16 22:52:42 bwelling Exp $ */ +/* $Id: key_25.c,v 1.39 2001/03/28 02:57:26 bwelling Exp $ */ /* * Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley. @@ -110,8 +110,14 @@ totext_key(ARGS_TOTEXT) { RETERR(str_totext(tctx->linebreak, target)); RETERR(isc_base64_totext(&sr, tctx->width - 2, tctx->linebreak, target)); + + if ((tctx->flags & DNS_STYLEFLAG_COMMENT) != 0) + RETERR(str_totext(tctx->linebreak, target)); + else if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) + RETERR(str_totext(" ", target)); + if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) - RETERR(str_totext(" )", target)); + RETERR(str_totext(")", target)); if ((tctx->flags & DNS_STYLEFLAG_COMMENT) != 0) { isc_region_t tmpr;