/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/* Portions
* Copyright (c) 1994 Regents of the University of Michigan.
* All rights reserved.
*
#include "portable.h"
-#ifndef lint
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
#include <stdio.h>
#include <stdlib.h>
int ncomps, maxcomps;
char *s;
char **rdns;
+ char *tok_r;
if ( (rdns = (char **) malloc( 8 * sizeof(char *) )) == NULL ) {
return( NULL );
maxcomps = 8;
ncomps = 0;
- for ( s = strtok( dn, "@." ); s != NULL; s = strtok( NULL, "@." ) ) {
+ for ( s = ldap_int_strtok( dn, "@.", &tok_r ); s != NULL;
+ s = ldap_int_strtok( NULL, "@.", &tok_r ) ) {
if ( ncomps == maxcomps ) {
maxcomps *= 2;
if ( (rdns = (char **) realloc( rdns, maxcomps *