1  struct z_candidate { struct z_candidate *next;int viable;};
       2  int pedantic;
       3  
       4  static struct z_candidate *
       5  splice_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  }