source: vis_dev/glu-2.1/src/mdd/mdd_quit.c @ 10

Last change on this file since 10 was 8, checked in by cecile, 13 years ago

src glu

File size: 1.4 KB
Line 
1#include "mdd.h"
2
3/*
4 * MDD Package
5 *
6 * $Id: mdd_quit.c,v 1.10 2002/08/24 21:48:15 fabio Exp $
7 *
8 * Author: Timothy Kam
9 *
10 * Copyright 1992 by the Regents of the University of California.
11 *
12 * All rights reserved.  Permission to use, copy, modify and distribute
13 * this software is hereby granted, provided that the above copyright
14 * notice and this permission notice appear in all copies.  This software
15 * is made available as is, with no warranties.
16 */
17
18void
19mdd_quit(mdd_manager *mgr)
20{
21    int i;
22    mvar_type one_mvar_struct;
23    bvar_type one_bvar_struct;
24    bdd_external_hooks *hook; 
25    array_t *mvar_list = mdd_ret_mvar_list(mgr);
26    array_t *bvar_list = mdd_ret_bvar_list(mgr);
27
28
29    for (i=0; i<array_n(mvar_list); i++) {
30        one_mvar_struct = array_fetch(mvar_type, mvar_list, i);
31        FREE(one_mvar_struct.name);
32        FREE(one_mvar_struct.encoding);
33        array_free(one_mvar_struct.bvars);
34    }
35    array_free(mvar_list); 
36    for (i=0; i<array_n(bvar_list); i++) {
37        one_bvar_struct = array_fetch(bvar_type, bvar_list, i);
38        mdd_free(one_bvar_struct.node);
39    }
40    array_free(bvar_list); 
41
42    hook = bdd_get_external_hooks(mgr);
43    FREE(hook->mdd);
44
45    bdd_end(mgr);
46}
47
48/*---------------------------------------------------------------------------*/
49/* Static function prototypes                                                */
50/*---------------------------------------------------------------------------*/
51
Note: See TracBrowser for help on using the repository browser.