1struct z_candidate { struct z_candidate *next;int viable;};
2int pedantic;
3
4static struct z_candidate *
5splice_viable (cands)
6     struct z_candidate *cands;
7{
8  struct z_candidate **p = &cands;
9
10  for (; *p; )
11    {
12      if (pedantic ? (*p)->viable == 1 : (*p)->viable)
13        p = &((*p)->next);
14      else
15        *p = (*p)->next;
16    }
17
18  return cands;
19}
20