]> git.sur5r.net Git - openldap/commitdiff
Add LDIF_ to LINE_WIDTH
authorKurt Zeilenga <kurt@openldap.org>
Tue, 9 Mar 1999 00:50:41 +0000 (00:50 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 9 Mar 1999 00:50:41 +0000 (00:50 +0000)
include/ldif.h
libraries/libldif/line64.c

index 139d6ba7492bc845fd9a7112e16930d568f0d2ae..691c8bb52f6d45f8d4b527636a00e9b08a58bb7f 100644 (file)
@@ -28,7 +28,7 @@ LDAP_BEGIN_DECL
 
 extern int ldif_debug;
 
-#define LINE_WIDTH      76      /* maximum length of LDIF lines */
+#define LDIF_LINE_WIDTH      76      /* maximum length of LDIF lines */
 
 /*
  * Macro to calculate maximum number of bytes that the base64 equivalent
@@ -45,7 +45,7 @@ extern int ldif_debug;
  */
 #define LDIF_SIZE_NEEDED(tlen,vlen) \
     ((tlen) + 4 + LDIF_BASE64_LEN(vlen) \
-    + ((LDIF_BASE64_LEN(vlen) + (tlen) + 3) / LINE_WIDTH * 2 ))
+    + ((LDIF_BASE64_LEN(vlen) + (tlen) + 3) / LDIF_LINE_WIDTH * 2 ))
 
 LDAP_F int
 ldif_parse_line LDAP_P(( char *line, char **type, char **value, int *vlen));
index d0af5ae29be248acba19652d72af45bce917f215..ed53d7081718180ae8b0368bfc5e1ab9aeee0463 100644 (file)
@@ -228,7 +228,7 @@ ldif_put_type_and_value( char **out, char *t, char *val, int vlen )
                                b64 = 1;
                                break;
                        }
-                       if ( len > LINE_WIDTH ) {
+                       if ( len > LDIF_LINE_WIDTH ) {
                                *(*out)++ = '\n';
                                *(*out)++ = ' ';
                                len = 1;
@@ -249,7 +249,7 @@ ldif_put_type_and_value( char **out, char *t, char *val, int vlen )
                        bits |= (byte[2] & 0xff);
 
                        for ( i = 0; i < 4; i++, len++, bits <<= 6 ) {
-                               if ( len > LINE_WIDTH ) {
+                               if ( len > LDIF_LINE_WIDTH ) {
                                        *(*out)++ = '\n';
                                        *(*out)++ = ' ';
                                        len = 1;
@@ -274,7 +274,7 @@ ldif_put_type_and_value( char **out, char *t, char *val, int vlen )
                        bits |= (byte[2] & 0xff);
 
                        for ( i = 0; i < 4; i++, len++, bits <<= 6 ) {
-                               if ( len > LINE_WIDTH ) {
+                               if ( len > LDIF_LINE_WIDTH ) {
                                        *(*out)++ = '\n';
                                        *(*out)++ = ' ';
                                        len = 1;