mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-10 14:23:34 -05:00
Additional CR/LF fixes
This commit is contained in:
parent
2c1273cd17
commit
0e53126e68
1 changed files with 8 additions and 3 deletions
|
|
@ -274,15 +274,20 @@ ldif_getline( char **next )
|
|||
line = *next;
|
||||
|
||||
while ( (*next = strchr( *next, '\n' )) != NULL ) {
|
||||
unsigned char c = (*next)[1];
|
||||
|
||||
#if CONTINUED_LINE_MARKER != '\r'
|
||||
if ( (*next)[-1] == '\r' ) {
|
||||
(*next)[-1] = CONTINUED_LINE_MARKER;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( !isspace( c ) || c == '\n' ) {
|
||||
if ( (*next)[1] == '\r' ) {
|
||||
if( (*next)[2] == '\n' ) {
|
||||
*(*next)++ = '\0';
|
||||
}
|
||||
*(*next)++ = '\0';
|
||||
break;
|
||||
|
||||
} else if ( (*next)[1] != ' ' ) {
|
||||
*(*next)++ = '\0';
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue