if (( fp = fopen( file, "r" )) == NULL ) {
if (( fp = NSLDAPI_FOPEN( file, "r" )) == NULL ) {
ldap_init_templates( char *file, struct ldap_disptmpl **tmpllistp ){    FILE	*fp;    char	*buf;    long	rlen, len;    int		rc, eof;    *tmpllistp = NULLDISPTMPL;    if (( fp = fopen( file, "r" )) == NULL ) {	return( LDAP_TMPL_ERR_FILE );    }    if ( fseek( fp, 0L, SEEK_END ) != 0 ) {	/* move to end to get len */	fclose( fp );	return( LDAP_TMPL_ERR_FILE );    }    len = ftell( fp );    if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {	/* back to start of file */	fclose( fp );	return( LDAP_TMPL_ERR_FILE );    }    if (( buf = NSLDAPI_MALLOC( (size_t)len )) == NULL ) {	fclose( fp );	return( LDAP_TMPL_ERR_MEM );    }    rlen = fread( buf, 1, (size_t)len, fp );    eof = feof( fp );    fclose( fp );    if ( rlen != len && !eof ) {	/* error:  didn't get the whole file */	NSLDAPI_FREE( buf );	return( LDAP_TMPL_ERR_FILE );    }    rc = ldap_init_templates_buf( buf, rlen, tmpllistp );    NSLDAPI_FREE( buf );    return( rc );}