pat_lodpaseq(3)

ORIGIN

This software belongs to the ALLIANCE CAD system from the
CAO-VLSI team at MASI laboratory, Universite P. et M. Curie
4, place Jussieu ; 75252 PARIS Cedex 05 ; FRANCE
Fax: (33-1) 44.27.62.86 ; E-mail: cao-vlsi@masi.ibp.fr

NAME

pat_lodpaseq - pattern file compiler

SYNOPSIS

struct paseq *pat_lodpaseq (name, ptseq, maxpat)
char         *name  ;
struct paseq *ptseq ;
unsigned int  maxpat;

PARAMETERS

name
    pattern file's name

ptseq
    pointer on a list of patterns' sequence

maxpat
    number of patterns to be loaded from the file

DESCRIPTION

pat_lodpaseq reads a sequence of patterns from a file named name. (according to MBK_CATA_LIB and VH_PATSFX environment variables). It loads at most maxpat number of patterns from the file and fills the structures.

For the first call, pat_lodpaseq first creates a new sequence (paseq structure) and puts it at the head of the ptseq list. Then, it reads the declaration part and maxpat pattern from the description part. It returns the pointer of the new sequence.

For subsequence calls, pat_lodpaseq first, removes the old patterns from the paseq, then read a new series of patterns.

The pattern file remains openned until the last subsequence is loaded.

Each call of pat_lodpaseq increments the SUBSEQ field of the paseq structure. When the end of file is reached, the ENDFLG of the paseq is set to 'Y'. The pattern file is closed before the function returns.

Setting maxpat to zero makes the whole file be read at once.

RETURN VALUES

pat_lodpaseq returns a NULL pointer if an error occurs when openning the pattern file.

If an error occurs at compil time pat_lodpaseq returns a paseq structure with the ERRFLG set to a non-zero value.

EXAMPLE

#include <pat104.h>
#include <ppt104.h>
struct paseq *paseq_pnt = NULL;
while ((paseq_pnt != NULL) && (paseq_pnt->ENDFLG != 'Y'))
  {
  paseq_pnt = pat_lodpaseq ("my_sequence", paseq_pnt, 1000);
  ...
  }

SEE ALSO

libpat(2), paseq(2), pat_addpaseq(2), pat_savpaseq(3), mbkfopen(2), mbkenv(2)

BUGS

Please e-mail to cao-vlsi@masi.ibp.fr for bug report and suggestions.