From: Kurt Zeilenga Date: Tue, 25 Sep 2001 19:45:23 +0000 (+0000) Subject: Additional CR/LF fixes X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1060 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0e53126e686548f72041ed50d0f63a4052b92422;p=openldap Additional CR/LF fixes --- diff --git a/libraries/libldif/line64.c b/libraries/libldif/line64.c index f0db46a0f7..a3eabb88c3 100644 --- a/libraries/libldif/line64.c +++ b/libraries/libldif/line64.c @@ -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; }