]> git.sur5r.net Git - openldap/commitdiff
Additional CR/LF fixes
authorKurt Zeilenga <kurt@openldap.org>
Tue, 25 Sep 2001 19:45:23 +0000 (19:45 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 25 Sep 2001 19:45:23 +0000 (19:45 +0000)
libraries/libldif/line64.c

index f0db46a0f719eecc6104e220d0de9dfe568548e4..a3eabb88c3a4524f4d8da8b932cc499b4d1b0ba3 100644 (file)
@@ -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;
                        }