mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Additional CR/LF fixes
This commit is contained in:
parent
2c1273cd17
commit
0e53126e68
@ -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 New Issue
Block a user