]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/ldif.c
Add valx arg to config_parse_add - indicate which value in the current
[openldap] / libraries / liblutil / ldif.c
index 69a2c28b6a85b4e932eca53bcd4aa9d58ea98b29..c639f875625fa217b4cefdf960035519796aff2b 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -734,7 +734,7 @@ int ldif_is_not_printable(
                ber_len_t i;
 
                for ( i = 0; val[i]; i++ ) {
-                       if ( !isascii( val[i] ) || !isprint( val[i] ) ) {
+                       if ( !isascii( val[i] ) || !isprint( (unsigned char) val[i] ) ) {
                                return 1;
                        }
                }
@@ -822,7 +822,8 @@ ldif_read_record(
                if ( last_ch == '\n' ) {
                        (*lno)++;
 
-                       if ( line[0] == '\n' ) {
+                       if ( line[0] == '\n' ||
+                               ( line[0] == '\r' && line[1] == '\n' )) {
                                if ( !found_entry ) {
                                        lcur = 0;
                                        top_comment = 0;
@@ -858,7 +859,7 @@ ldif_read_record(
                                                }
 
                                                ptr = line + STRLENOF("include:");
-                                               while (isspace(*ptr)) ptr++;
+                                               while (isspace((unsigned char) *ptr)) ptr++;
                                                fp2 = ldif_open_url( ptr );
                                                if ( fp2 ) {
                                                        LDIFFP *lnew = ber_memalloc( sizeof( LDIFFP ));