Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / beh / beh / beh_addbemsg.c
1
2 /* ###--------------------------------------------------------------### */
3 /* */
4 /* file : beh_addbemsg.c */
5 /* date : Nov 6 1995 */
6 /* version : v109 */
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_addbemsg */
19 /* description : create BEMSG structure at the top the list */
20 /* called func. : mbkalloc, namealloc */
21 /* ###--------------------------------------------------------------### */
22
23 bemsg_list *beh_addbemsg (lastbemsg,label,level,message,abl_expr,bdd_expr)
24
25 bemsg_list *lastbemsg; /* pointer on the last bemsg structure */
26 char *label; /* assert's label */
27 char level; /* severity level (E or W) */
28 char *message; /* reported message */
29 struct chain *abl_expr; /* assert's condition (ABL) */
30 struct node *bdd_expr; /* assert's condition (BDD) */
31
32 {
33
34 struct bemsg *ptmsg;
35
36 label = namealloc (label);
37
38 ptmsg = (struct bemsg *) mbkalloc (sizeof(struct bemsg));
39 ptmsg->LABEL = label;
40 ptmsg->LEVEL = level;
41 ptmsg->MESSAGE = message;
42 ptmsg->ABL = abl_expr;
43 ptmsg->NODE = bdd_expr;
44 ptmsg->NEXT = lastbemsg;
45
46 return (ptmsg);
47 }