int		rc, linenum, modop;
int		rc, linenum;
process_ldapmod_rec( char *rbuf ){    char	*line, *dn, *p, *q, *attr, *value;    int		rc, linenum, modop;    LDAPMod	**pmods;    pmods = NULL;    dn = NULL;    linenum = 0;    line = rbuf;    rc = 0;    while ( rc == 0 && rbuf != NULL && *rbuf != '\0' ) {	++linenum;	if (( p = strchr( rbuf, '\n' )) == NULL ) {	    rbuf = NULL;	} else {	    if ( *(p-1) == '\\' ) {	/* lines ending in '\' are continued */		strcpy( p - 1, p );		rbuf = p;		continue;	    }	    *p++ = '\0';	    rbuf = p;	}	if ( dn == NULL ) {	/* first line contains DN */	    if (( dn = strdup( line )) == NULL ) {		perror( "strdup" );		exit( LDAP_NO_MEMORY );	    }	} else {	    if (( p = strchr( line, '=' )) == NULL ) {		value = NULL;		p = line + strlen( line );	    } else {		*p++ = '\0';		value = p;	    }	    for ( attr = line; *attr != '\0' && isspace( *attr ); ++attr ) {		;	/* skip attribute leading white space */	    }	    for ( q = p - 1; q > attr && isspace( *q ); --q ) {		*q = '\0';	/* remove attribute trailing white space */	    }	    if ( value != NULL ) {		while ( isspace( *value )) {		    ++value;		/* skip value leading white space */		}		for ( q = value + strlen( value ) - 1; q > value &&			isspace( *q ); --q ) {		    *q = '\0';	/* remove value trailing white space */		}		if ( *value == '\0' ) {		    value = NULL;		}	    }	    if ( value == NULL && newval ) {		fprintf( stderr, "%s: missing value on line %d (attr is %s)\n",			ldaptool_progname, linenum, attr );		rc = LDAP_PARAM_ERROR;	    } else {		 switch ( *attr ) {		case '-':		    modop = LDAP_MOD_DELETE;		    ++attr;		    break;		case '+':		    modop = LDAP_MOD_ADD;		    ++attr;		    break;		default:		    /*Bug 27479. Remove the add default*/		      fprintf(stderr, "%s: Invalid parameter specified for changetype modify (line %d of entry %s)\n", 		      ldaptool_progname, linenum, dn);		      rc = LDAP_PARAM_ERROR;		}		addmodifyop( &pmods, modop, attr, value,			( value == NULL ) ? 0 : strlen( value ));	    }	}	line = rbuf;    }    if ( rc == 0 ) {	if ( dn == NULL ) {	    rc = LDAP_PARAM_ERROR;	} else if (( rc = domodify( dn, pmods, newval )) == LDAP_SUCCESS ){	  rc = 0;	}      }        if ( pmods != NULL ) {	freepmods( pmods );    }    if ( dn != NULL ) {	free( dn );    }    return( rc );}