FUNBEBUX(3)

NAME

beh_addbebux , beh_delbebux , beh_rmvbebux , beh_frebebux

SYNOPSYS

struct bebux *beh_addbebux (list, name, biabl, bibdd, type)
struct bebux *list;
char *name;
struct biabl *biabl;
struct binode *bibdd;
char type;
struct bebux *beh_delbebux (list, pnt, mode)
struct bebux *list;
struct bebux *pnt;
char mode;
struct bebux *beh_rmvbebux (list, name, mode)
struct bebux *list;
char *name;
char mode;
void beh_frebebux (list)
struct bebux *list;

PARAMETERS

list
    pointer of a list of bebux structures

name
    name of the bused internal signal to be added to or removed from the list

biabl
    list of biabl representing the expression of drivers setting the value of the bused internal signal

bibdd
    list of bibdd representing the expression of drivers setting the value of the bused internal signal

pnt pointer of the bebux structure to be removed from the list

type
    type of the bused internal signal :

    W   for a WOR_BIT

    M   for a MUX_BIT

mode
    recursive mode (Y or N)

DESCRIPTION

A bebux is a data structure representing a one-bit bused internal signal.

beh_addbebux() adds a bebux structure at the top of a list of bebux structures. The name registred in the bebux structure is produced by namealloc(). The function returns the pointer of the new list. No checks are made by this function.

beh_delbebux() deletes a bebux structure (pointed by pnt) from a list of bebux structures. The function returns the pointer of the new list. No action is made if the structure pointed by pnt doesn't belong to the list. If mode is set to 'Y' all objects (biabl, binode) pointed by the bebux will also be deleted. If mode is set to 'N' and there is any object (biabl, binode) pointed by the bebux a warning message is printed on the standard error output.

beh_rmvbebux() deletes a bebux structure (named name) from a list of bebux structures. name is supposed to be produced by namealloc(). The function returns the pointer of the new list. No action is made if no structure named name has been found in the list. If mode is set to 'Y' all objects (biabl, binode) pointed by the bebux will also be deleted. If mode is set to 'N' and there is any object (biabl, binode) pointed by the bebux a warning message is printed on the standard error output.

beh_frebebux() deletes a list of bebux structures (pointed by list) and all objects (biabl, binode) pointed by any bebux structure of the list. No action is made if list is an empty list (NULL pointer). No checks are made by this function.

EXAMPLE

#include <beh108.h>
struct bebux *list;
char *name;
name = namealloc ("data_bus_0");
list = beh_addbebux (list,"result_bus_0", NULL, NULL, 'M');
list = beh_rmvbebux (list,name);

SEE ALSO

beh(3), log(1), biabl(3), binode(3), bebux(3), namealloc(3)