FUNBEOUT(3)

NAME

beh_addbeout , beh_delbeout , beh_rmvbeout , beh_frebeout

SYNOPSYS

struct beout *beh_addbeout (list, name, abl, bdd)
struct beout *list;
char *name;
struct chain *abl;
struct node *bdd;
struct beout *beh_delbeout (list, pnt, mode)
struct beout *list;
struct beout *pnt;
char mode;
struct beout *beh_rmvbeout (list, name, mode)
struct beout *list;
char *name;
char mode;
void beh_frebeout (list)
struct beout *list;

PARAMETERS

list
    pointer of a list of beout structures

name
    name of the output port to be added to or removed from the list

abl the abl representing the expression of the output port

bdd the bdd representing the expression of the output port

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

mode
    recursive mode (Y or N)

DESCRIPTION

A beout is a data structure representing a one-bit simple output port.

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

beh_delbeout() deletes a beout structure (pointed by pnt) from a list of beout 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 (abl) pointed by the beout will also be deleted. If mode is set to 'N' and there is any object (abl) pointed by the structure a warning message is printed on the standard error output.

beh_rmvbeout() deletes a beout structure (named name) from a list of beout 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 (abl) pointed by the beout will also be deleted. If mode is set to 'N' and there is any object (abl) pointed by the structure a warning message is printed on the standard error output.

beh_frebeout() deletes a list of beout structures (pointed by list) and all objects (abl) pointed by any beout 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 beout *list;
char *name;
name = namealloc ("carry_out");
list = beh_addbeout (list,"sum_0", NULL, NULL);
list = beh_rmvbeout (list,name);

SEE ALSO

beh(3), log(1), beout(3), namealloc(3)