[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#6645) Yet Another LDIF Wrap Patch

hyc@symas.com writes:
> Not thrilled with the magic constant 2^31-1. Seems like you should have just 
> used "if ( wrap && len > wrap )" instead of a word-size-dependent magic.

The code just needs to be a little less clever:-)  Pass -1 to a
'ber_len_t wrap'.  The constant (ber_len_t)-1 will prevent wrapping:
"if (len > (ber_len_t)-1)" always fails.

But if we are going to have smarter LDIF output, I'm more interested in
an option to avoid base64 encoding of valid UTF-8 strings.  Also one
to force base64-encoding for caller-specified attributes.  Or just
a bitflag to ldif_sput() after the caller checks the attribute type.