.in
\fIn\fP is the number of columns allowed for the LDIF output
-(\fIn\fP equal to \fI0\fP uses the default, corresponding to 76).
+(\fIn\fP equal to \fI0\fP uses the default, corresponding to 78).
+The minimum is 2, leaving space for one character and one
+continuation character.
Use \fIno\fP for no wrap.
.TP
.BI \-s \ subtree-dn
return 0;
}
-/* compatibility with U-Mich off by one bug */
-#define LDIF_KLUDGE 1
+/* compatibility with U-Mich off by two bug */
+#define LDIF_KLUDGE 2
/* NOTE: only preserved for binary compatibility */
void
LDAP_CONST char *val,
ber_len_t vlen )
{
- ldif_sput_wrap( out, type, name, val, vlen, LDIF_LINE_WIDTH );
+ ldif_sput_wrap( out, type, name, val, vlen, LDIF_LINE_WIDTH+LDIF_KLUDGE );
}
void
ber_len_t len=0;
ber_len_t i;
- wrap = LDIF_LINE_WIDTH_WRAP( wrap );
+ if ( !wrap )
+ wrap = LDIF_LINE_WIDTH+LDIF_KLUDGE;
/* prefix */
switch( type ) {
b64 = 1;
break;
}
- if ( len - LDIF_KLUDGE > wrap ) {
+ if ( len >= wrap ) {
*(*out)++ = '\n';
*(*out)++ = ' ';
len = 1;
bits |= (byte[2] & 0xff);
for ( i = 0; i < 4; i++, len++, bits <<= 6 ) {
- if ( len - LDIF_KLUDGE > wrap ) {
+ if ( len >= wrap ) {
*(*out)++ = '\n';
*(*out)++ = ' ';
len = 1;
bits |= (byte[2] & 0xff);
for ( i = 0; i < 4; i++, len++, bits <<= 6 ) {
- if ( len - LDIF_KLUDGE > wrap ) {
+ if ( len >= wrap ) {
*(*out)++ = '\n';
*(*out)++ = ' ';
len = 1;