tpg_get_pat_lines
for (pat = 0; pat < tpg_get_pat_lines(tpg); pat++) {
unsigned pat_lines = tpg_get_pat_lines(tpg);