mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 19:02:05 -04:00
add brackets for multi-line output
This commit is contained in:
parent
69468e5417
commit
40a770b932
2 changed files with 24 additions and 10 deletions
|
|
@ -41,12 +41,19 @@ totext_in_eid(ARGS_TOTEXT) {
|
|||
|
||||
dns_rdata_toregion(rdata, ®ion);
|
||||
|
||||
if (tctx->width == 0) {
|
||||
return (isc_hex_totext(®ion, 60, "", target));
|
||||
} else {
|
||||
return (isc_hex_totext(®ion, tctx->width - 2,
|
||||
tctx->linebreak, target));
|
||||
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) {
|
||||
RETERR(str_totext("( ", target));
|
||||
}
|
||||
if (tctx->width == 0) {
|
||||
RETERR(isc_hex_totext(®ion, 60, "", target));
|
||||
} else {
|
||||
RETERR(isc_hex_totext(®ion, tctx->width - 2,
|
||||
tctx->linebreak, target));
|
||||
}
|
||||
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) {
|
||||
RETERR(str_totext(" )", target));
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -41,12 +41,19 @@ totext_in_nimloc(ARGS_TOTEXT) {
|
|||
|
||||
dns_rdata_toregion(rdata, ®ion);
|
||||
|
||||
if (tctx->width == 0) {
|
||||
return (isc_hex_totext(®ion, 60, "", target));
|
||||
} else {
|
||||
return (isc_hex_totext(®ion, tctx->width - 2,
|
||||
tctx->linebreak, target));
|
||||
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) {
|
||||
RETERR(str_totext("( ", target));
|
||||
}
|
||||
if (tctx->width == 0) {
|
||||
RETERR(isc_hex_totext(®ion, 60, "", target));
|
||||
} else {
|
||||
RETERR(isc_hex_totext(®ion, tctx->width - 2,
|
||||
tctx->linebreak, target));
|
||||
}
|
||||
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) {
|
||||
RETERR(str_totext(" )", target));
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
Loading…
Reference in a new issue