File:  [CSRG BSD Unix] / 43BSDReno / contrib / isode-beta / dsap / common / dn_cpy.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:56 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

#include "quipu/util.h"
#include "quipu/name.h"

extern LLog * log_dsap;

DN  dn_comp_cpy (dn)
register DN  dn;
{
register DN ptr;
	if (dn==NULLDN) {
		DLOG (log_dsap,LLOG_DEBUG,("copy of null dn"));
		return (NULLDN);
	}
	ptr = (DN) smalloc (sizeof(dncomp));
	ptr->dn_rdn    = rdn_cpy (dn->dn_rdn);
	ptr->dn_parent = NULLDN;
	return (ptr);
}

DN  dn_cpy (dn)
register DN  dn;
{
DN start;
register DN eptr,ptr,ptr2;

	if (dn == NULLDN) {
		DLOG (log_dsap,LLOG_DEBUG,("dn_cpy of null dn"));
		return (NULLDN);
	}
	start = dn_comp_cpy (dn);
	ptr2 = start;
	for (eptr = dn->dn_parent; eptr != NULLDN; eptr = eptr->dn_parent) {
		ptr = dn_comp_cpy (eptr);
		ptr2->dn_parent = ptr;
		ptr2 = ptr;
	}
	return (start);
}


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.