Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / beh / beh / beh_addbepor.c
1
2 /* ###--------------------------------------------------------------### */
3 /* */
4 /* file : beh_addbepor.c */
5 /* date : Sep 3 1993 */
6 /* version : v106 */
7 /* authors : Pirouz BAZARGAN SABET */
8 /* content : low-level function */
9 /* */
10 /* ###--------------------------------------------------------------### */
11
12 #include <stdio.h>
13 #include MUT_H
14 #include LOG_H
15 #include BEH_H
16
17 /* ###--------------------------------------------------------------### */
18 /* function : beh_addbepor */
19 /* description : create a BEPOR structure at the top the list */
20 /* called func. : namealloc, mbkalloc */
21 /* ###--------------------------------------------------------------### */
22
23 bepor_list *beh_addbepor (lastbepor, name, dir, type)
24
25 bepor_list *lastbepor; /* pointer on the last bepor structure */
26 char *name; /* signal's name */
27 char dir; /* signal's mode (I, O, B, Z, or T) */
28 char type; /* signal'type mark (M or W) */
29
30 {
31 struct bepor *ptbepor;
32
33 name = namealloc (name);
34
35 ptbepor = (struct bepor *) mbkalloc (sizeof(struct bepor));
36 ptbepor->NAME = name;
37 ptbepor->DIRECTION = dir;
38 ptbepor->TYPE = type;
39 ptbepor->NEXT = lastbepor;
40
41 return (ptbepor);
42 }