|
NAMEaddchain - create a chain and add it to a list See the file man1/alc_origin.1. SYNOPSIS#include "mut.h" chain_list ∗addchain(pthead, ptdata) chain_list ∗pthead; void ∗ptdata; PARAMETERSDESCRIPTIONaddchain creates a new chain element and adds it to
the front of the list pointed to by pthead, and becomes itself the
list head.
RETURN VALUEaddchain returns a pointer to the new head of list. EXAMPLE
#include "mut.h"
#include "mlo.h"
chain_list ∗get_external_connectors(ptfig)
lofig_list ∗ptfig;
{
locon_list ∗pt = ptfig->LOCON;
chain_list ∗c = NULL; /∗ initialized for regularity ∗/
while (pt) {
if (pt->TYPE == EXTERNAL)
c = addchain(c, (void ∗)pt)
pt = pt->NEXT;
}
return c;
}
SEE ALSOmbk(1), chain(3), freechain(3), delchain(3). See the file man1/alc_bug_report.1.
|