FUNPAPAT(3)

NAME

pat_addpapat, pat_frepapat

SYNOPSYS

struct papat *pat_addpapat (lastpapat, label, line)
struct papat *lastpapat;
char *label;
unsigned short line;
void pat_frepapat (listpapat)
struct papat *listpapat;

PARAMETERS

lastpapat
    pointer on the last papat structure

label
    pattern's label

line
    pattern's line number

listpapat
    list of papat structures to be deleted

DESCRIPTION

A papat is a data structure representing a complete pattern including the actions associated with the pattern. A pattern is a set of values either forced (at the same time) on the inputs or predicted for the outputs (after the simulation step).

pat_addpapat() adds a papat structure at the top of a list of papat structures. The label registered in the papat is produced by namealloc(). The function returns the pointer of the new list. No check is made by this function.

pat_frepapat() deletes a list of papat structures and all objects (paini and paevt) referenced by each papat structure in the list. If the list to be deleted is an empty list (NULL pointer), no action is produced. No check is made by this function.

EXAMPLE

#include <pat106.h>
struct papat *list;
list = pat_addpapat (list, "ram_test", 123);
pat_frepapat (list);

SEE ALSO

libpat(3), papat(3), namealloc(3)