P_Replace new_replace(start, end, group)

- create a new replacement Bool start; Bool end; P_Group group;

void delete_replace(rep)

- delete the replacement rep P_Replace rep;

A replacement P_Replace defines the replacement text of a starttag or an endtag. The function new_replace() creates a new replacement. If start is `true', then the replacemet text must start at the beginning of a line. If end is `true', the the replacement text must be followed directly by a newline. The parameter group contains the chunks that constitute the replacement.

Bool replace_start_newline(rep)

- return whether rep must start on a new line P_Replace rep;

Bool replace_end_newline(rep)

- return whether rep must end on a new line P_Replace rep;

P_Group replace_chunk_group(rep)

- return group of chunks from rep P_Replace rep;

These functions return the values for the three fields of rep. These are the fields that are given to rep by he function new_replace().

P_Chunk new_chunk(type, string)

- create a new chunk int type; String string;

int chunk_type(chunk)

- return the type of chunk P_Chunk chunk;

String chunk_string(chunk)

- return the string belonging to chunk P_Chunk chunk;

String chunk_attname(chunk)

- return the attribute name belonging to chunk P_Chunk chunk;

A chunk P_Chunk defines a part of the replacement text for a replacement. The function new_chunk() creates a new chunk of type type. type may have the value CHUNK_STRING or CHUNK_ATTNAME. If the type is CHUNK_STRING, then string is a literal replacement string. If the type is CHUNK_ATTNAME, then string is the name of an attribute, whose value acts as the replacement string.


The function chunk_type() returns the type of chunk. The function chunk_string() returns the string of chunk that is of the type CHUNK_STRING. The function chunk_attname() returns the string of chunk that is of type CHUNK_ATTNAME. For the last two functions holds that the type of chunk must be correct.

replace.c replace.h