front > LIMIT - 1 signifies that it must wrap around

if((*pq).front > (LIMIT - 1))

(*pq).front = 0;