DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T e

⟦0b18974b1⟧ TextFile

    Length: 2244 (0x8c4)
    Types: TextFile
    Names: »entry.c«

Derivation

└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
    └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« 
        └─⟦d3ac74d73⟧ 
            └─⟦this⟧ »isode-5.0/quipu/entry.c« 

TextFile

/* entry.c - */

#ifndef lint
static char *rcsid = "$Header: /f/osi/quipu/RCS/entry.c,v 6.0 89/03/18 23:41:32 mrose Rel $";
#endif

/*
 * $Header: /f/osi/quipu/RCS/entry.c,v 6.0 89/03/18 23:41:32 mrose Rel $
 *
 *
 * $Log:	entry.c,v $
 * Revision 6.0  89/03/18  23:41:32  mrose
 * Release 5.0
 * 
 */

/*
 *                                NOTICE
 *
 *    Acquisition, use, and distribution of this module and related
 *    materials are subject to the restrictions of a license agreement.
 *    Consult the Preface in the User's Manual for the full terms of
 *    this agreement.
 *
 */


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

directory_free (directory)
Entry directory;
{
Entry ptr;
	if (directory !=  NULLENTRY)
		for ( ptr = directory; ptr !=  NULLENTRY; ptr = ptr->e_sibling) {
			directory_free (ptr->e_child);
			entry_free (ptr);
		}
}

entry_free (entryptr)
Entry entryptr;
{
	rdn_free (entryptr->e_name);
	as_free (entryptr->e_attributes);

	if (entryptr->e_edbversion !=  NULLCP )
		free (entryptr->e_edbversion);

	if (entryptr->e_dsainfo != NULLDSA)
		free ((char *) entryptr->e_dsainfo);

	free ((char *) entryptr);
}


Entry entry_cpy (entryptr)
register Entry entryptr;
{
register Entry ptr;

	if (entryptr == NULLENTRY)
		return (NULLENTRY);

	ptr = get_default_entry (entryptr->e_parent);
	ptr->e_name = rdn_cpy (entryptr->e_name);
	ptr->e_attributes = as_cpy (entryptr->e_attributes);
	if (entryptr->e_edbversion != NULLCP)
		ptr->e_edbversion = strdup (entryptr->e_edbversion);
	else
		ptr->e_edbversion = NULLCP;
	ptr->e_sibling = entryptr->e_sibling;
	ptr->e_child = entryptr->e_child;
	ptr->e_leaf  = entryptr->e_leaf;
	ptr->e_complete = entryptr->e_complete;
	ptr->e_data = entryptr->e_data;
	ptr->e_lock = entryptr->e_lock;

	/* rest must be set by calling unravel_attributes */
	return (ptr);
}


Entry get_default_entry (parent)
Entry parent;
{
register Entry eptr;

	eptr = entry_alloc();
	eptr->e_leaf = TRUE;
	eptr->e_complete = TRUE;
	eptr->e_data = E_DATA_MASTER;
	eptr->e_acl = acl_alloc ();
	eptr->e_acl->ac_child = NULLACL_INFO;
	eptr->e_acl->ac_entry = NULLACL_INFO;
	eptr->e_acl->ac_default = NULLACL_INFO;
	eptr->e_acl->ac_attributes = NULLACL_ATTR;
	eptr->e_parent  = parent;
	return (eptr);
}