PAT_SAVPASEQ(3)

NAME

pat_savpaseq - save pattern structures in a pattern description file

SYNOPSYS

int pat_savpaseq (name, ptseq, labelsiz)
char         *name    ;
struct paseq *ptseq   ;
unsigned int  labelsiz;

PARAMETERS

name
    pattern file's name

ptseq
    pointer on a list of patterns' sequence

labelsiz
    length of the longest pattern's label

DESCRIPTION

pat_savpaseq produces a pattern file named name from a paseq structure.

For the first call, pat_savpaseq opens a file (according to MBK_WORK_LIB and VH_PATSFX environment variables) named name. Then, the input-output declarations is produced followed by the pattern description. When calling pat_savpaseq the input-output list (list of PAIOL) is supposed to be organized as an array. If the input-output list is not an array (flag PAT_SEQ__IOLARRAY not set) the functions makes an array from the input-output list and releases the list.

For subsequent calls, the file is completed with the newly processed patterns. The file remains openned util the last subsequence is written into the file.

RETURN VALUES

pat_lodpaseq returns a non-zero value if an error has been occured.

EXAMPLE

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

SEE ALSO

libpat(3), paseq(3), pat_addpaseq(3), pat_lodpaseq(3), mbkfopen(3), mbkenv(3)