/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#include "dthdr.h"
/* Restore dictionary from given tree or list of elements.
** There are two cases. If called from within, list is nil.
** From without, list is not nil and data->size must be 0.
**
** Written by Kiem-Phong Vo (5/25/96)
*/
#if __STD_C
#else
#endif
{
if(!list) /* restoring a flattened dictionary */
{ if(!type)
return -1;
}
else /* restoring an extracted list of elements */
return -1;
type = 0;
}
if(type) /* restoring a flattened dictionary */
{ if((t = *s) )
{ *s = list;
}
}
}
else /* restoring an extracted list of elements */
while(list)
list = t;
}
}
}
else
else /*if(dt->data->type&(DT_LIST|DT_STACK|DT_QUEUE))*/
}
if(!type)
}
return 0;
}