FUNPACOM(3)

NAME

pat_addpacom, pat_frepacom

SYNOPSYS

struct pacom *pat_addpacom (lastpacom, text, position)
struct pacom *lastpacom;
char         *text;
unsigned short position;
void pat_frepacom (listpacom)
struct pacom *listpacom;

PARAMETERS

lastpacom
    pointer on the last pacom structure

text
    text of the comment

position
    number of statements (input-output declaration or pattern) to be printed before the comment line

listpacom
    list of pacom structures to be deleted

DESCRIPTION

A pacom is a data structure representing a comment read from the pattern description file to be reproduced in the result file at the same place.

pat_addpacom() adds a pacom structure at the top of a list of pacom structures. The function returns the pointer of the new list. No check is made by this function.

pat_frepacom() deletes a list of pacom structures. 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 pacom *list;
list = pat_addpacom (list,"This is a comment",10);
pat_frepacom (list);

SEE ALSO

libpat(3), pacom(3)