X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fldif.h;h=69bb0c9b916f39a63e39f2b7c55c4ad287657214;hb=7df548dc043e673dba1bb49c6c8174992f07d91a;hp=e2b8a8e87a973ba90caa167d61a960a4112a8ea6;hpb=0b03c51e79e714b8f8c8d6811f942f52c52b2383;p=openldap diff --git a/include/ldif.h b/include/ldif.h index e2b8a8e87a..69bb0c9b91 100644 --- a/include/ldif.h +++ b/include/ldif.h @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2013 The OpenLDAP Foundation. + * Copyright 1998-2014 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -52,12 +52,12 @@ LDAP_LDIF_V (int) ldif_debug; */ #define LDIF_SIZE_NEEDED(nlen,vlen) \ ((nlen) + 4 + LDIF_BASE64_LEN(vlen) \ - + ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / LDIF_LINE_WIDTH * 2 )) + + ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / (LDIF_LINE_WIDTH-1) * 2 )) #define LDIF_SIZE_NEEDED_WRAP(nlen,vlen,wrap) \ ((nlen) + 4 + LDIF_BASE64_LEN(vlen) \ - + ((wrap) == 0 ? ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / ( LDIF_LINE_WIDTH ) * 2 ) : \ - ((wrap) == LDIF_LINE_WIDTH_MAX ? 0 : ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / (wrap) * 2 )))) + + ((wrap) == 0 ? ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / ( LDIF_LINE_WIDTH-1 ) * 2 ) : \ + ((wrap) == LDIF_LINE_WIDTH_MAX ? 0 : ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / (wrap-1) * 2 )))) LDAP_LDIF_F( int ) ldif_parse_line LDAP_P((