2 /* ###--------------------------------------------------------------### */
4 /* file : beh_frebefig.c */
5 /* date : Sep 3 1993 */
7 /* authors : Pirouz BAZARGAN SABET */
8 /* content : low-level function */
10 /* ###--------------------------------------------------------------### */
17 /* ###--------------------------------------------------------------### */
18 /* function : beh_frebefig */
19 /* description : delete a list of BEFIG structures and all objects */
20 /* pointed by any os BEFIGs in the list */
21 /* called func. : mbkfree */
22 /* ###--------------------------------------------------------------### */
24 void beh_frebefig (listbefig
)
26 struct befig
*listbefig
; /* list of befig to be deleted */
29 struct befig
*ptbefig
;
32 /* ###------------------------------------------------------### */
33 /* for each object of the list, first delete pointed objects */
34 /* then, delete the object itself */
35 /* ###------------------------------------------------------### */
37 while (listbefig
!= NULL
)
39 beh_frebereg (listbefig
->BEREG
);
40 beh_frebevectreg (listbefig
->BEVECTREG
);
41 beh_frebemsg (listbefig
->BEMSG
);
42 beh_freberin (listbefig
->BERIN
);
43 beh_frebeout (listbefig
->BEOUT
);
44 beh_frebevectout (listbefig
->BEVECTOUT
);
45 beh_frebebus (listbefig
->BEBUS
);
46 beh_frebevectbus (listbefig
->BEVECTBUS
);
47 beh_frebeaux (listbefig
->BEAUX
);
48 beh_frebevectaux (listbefig
->BEVECTAUX
);
49 beh_frebeaux (listbefig
->BEDLY
);
50 beh_frebebux (listbefig
->BEBUX
);
51 beh_frebevectbux (listbefig
->BEVECTBUX
);
52 beh_frebepor (listbefig
->BEPOR
);
53 beh_frebevectpor (listbefig
->BEVECTPOR
);
54 if ((ptptype
= getptype (listbefig
->USER
,BEH_GENERIC
)) != NULL
)
55 beh_frebegen (ptptype
->DATA
);
58 listbefig
= listbefig
->NEXT
;
59 if (ptbefig
->CIRCUI
) destroyCct(ptbefig
->CIRCUI
);