2 /* ###--------------------------------------------------------------### */
3 /* file : beh_addbefig.c */
4 /* date : Mar 10 1997 */
6 /* authors : Pirouz BAZARGAN SABET */
7 /* content : low-level function */
8 /* ###--------------------------------------------------------------### */
15 /* ###--------------------------------------------------------------### */
16 /* function : beh_addbefig */
17 /* description : create an empty BEFIG structure at the top of the list*/
18 /* called func. : namealloc, mbkalloc */
19 /* ###--------------------------------------------------------------### */
21 struct befig
*beh_addbefig (lastbefig
, name
)
23 struct befig
*lastbefig
; /* pointer on the last befig structure */
24 char *name
; /* figure's name */
28 unsigned char err_flg
= 0;
30 ptfig
= (struct befig
*) mbkalloc (sizeof(struct befig
));
70 err_flg
= beh_error (200, NULL
);
73 ptfig
->NAME
= namealloc (name
);
75 ptfig
->BEVECTREG
= NULL
;
79 ptfig
->BEVECTOUT
= NULL
;
81 ptfig
->BEVECTBUS
= NULL
;
83 ptfig
->BEVECTAUX
= NULL
;
86 ptfig
->BEVECTBUX
= NULL
;
88 ptfig
->BEVECTPOR
= NULL
;
89 ptfig
->CIRCUI
= NULL
;
92 ptfig
->ERRFLG
= err_flg
;
95 ptfig
->TIME_UNIT
= BEH_TIMEUNIT
;
96 ptfig
->NEXT
= lastbefig
;