* NextPgcn *********************************************************************** * Assumes pgc and cell_cur are correctly set, and sets cell_next to the * cell to be read when we will be done with cell_cur. * Since pg chains can be circularly linked (either from a read error or * deliberately) pgcn_map tracks program chains we've already seen. **********************************************
| 1993 | * deliberately) pgcn_map tracks program chains we've already seen. |
| 1994 | **********************************************************************/ |
| 1995 | static int NextPgcn( ifo_handle_t *ifo, int pgcn, uint32_t pgcn_map[MAX_PGCN/32] ) |
| 1996 | { |
| 1997 | int next_pgcn; |
| 1998 | pgc_t *pgc; |
| 1999 | |
| 2000 | pgcn_map[pgcn >> 5] |= (1 << (pgcn & 31)); |
| 2001 | |
| 2002 | pgc = ifo->vts_pgcit->pgci_srp[pgcn-1].pgc; |
| 2003 | next_pgcn = pgc->next_pgc_nr; |
| 2004 | if ( next_pgcn < 1 || next_pgcn >= MAX_PGCN || next_pgcn > ifo->vts_pgcit->nr_of_pgci_srp ) |
| 2005 | return 0; |
| 2006 | |
| 2007 | return pgcn_map[next_pgcn >> 5] & (1 << (next_pgcn & 31))? 0 : next_pgcn; |
| 2008 | } |
| 2009 | |
| 2010 | /*********************************************************************** |
| 2011 | * PgcWalkInit |
no outgoing calls
no test coverage detected