Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / beh / beh / beh_addbegen.c
1
2 /* ###--------------------------------------------------------------### */
3 /* */
4 /* file : beh_addbegen.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_addbegen */
19 /* description : create a BEGEN structure at the top the list */
20 /* called func. : namealloc, mbkalloc */
21 /* ###--------------------------------------------------------------### */
22
23 struct begen *beh_addbegen (lastbegen, name, type, value)
24
25 struct begen *lastbegen; /* pointer on the last begen structure */
26 char *name; /* generic's name */
27 char *type; /* generic's type mark */
28 void *value; /* generic's value */
29
30 {
31
32 struct begen *ptgen;
33
34 name = namealloc (name);
35 type = namealloc (type);
36
37 ptgen = (struct begen *) mbkalloc (sizeof(struct begen));
38 ptgen->NAME = name;
39 ptgen->TYPE = type;
40 ptgen->VALUE = value;
41 ptgen->NEXT = lastbegen;
42
43 return (ptgen);
44 }