/* This is NOT a bogus extern declaration (unlike ldap_debug) */
LDAP_LDIF_V (int) ldif_debug;
-#define LDIF_LINE_WIDTH 76 /* default maximum length of LDIF lines */
+#define LDIF_LINE_WIDTH 78 /* default maximum length of LDIF lines */
#define LDIF_LINE_WIDTH_MAX ((ber_len_t)-1) /* maximum length of LDIF lines */
#define LDIF_LINE_WIDTH_WRAP(wrap) ((wrap) == 0 ? LDIF_LINE_WIDTH : (wrap))
* first newline + base64 value + continued lines. Each continued line
* needs room for a newline and a leading space character.
*/
-#define LDIF_SIZE_NEEDED(nlen,vlen) \
- ((nlen) + 4 + LDIF_BASE64_LEN(vlen) \
- + ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / (LDIF_LINE_WIDTH-1) * 2 ))
+#define LDIF_SIZE_NEEDED(nlen,vlen) LDIF_SIZE_NEEDED_WRAP(nlen, vlen, 0)
#define LDIF_SIZE_NEEDED_WRAP(nlen,vlen,wrap) \
((nlen) + 4 + LDIF_BASE64_LEN(vlen) \
return 0;
}
-/* compatibility with U-Mich off by two bug */
-#define LDIF_KLUDGE 2
-
/* NOTE: only preserved for binary compatibility */
void
ldif_sput(
LDAP_CONST char *val,
ber_len_t vlen )
{
- ldif_sput_wrap( out, type, name, val, vlen, LDIF_LINE_WIDTH+LDIF_KLUDGE );
+ ldif_sput_wrap( out, type, name, val, vlen, 0 );
}
void
ber_len_t i;
if ( !wrap )
- wrap = LDIF_LINE_WIDTH+LDIF_KLUDGE;
+ wrap = LDIF_LINE_WIDTH;
/* prefix */
switch( type ) {
LDAP_CONST char *val,
ber_len_t vlen )
{
- return ldif_put_wrap( type, name, val, vlen, LDIF_LINE_WIDTH );
+ return ldif_put_wrap( type, name, val, vlen, 0 );
}
char *