BUFCNT
for (cnt = 0; cnt < BUFCNT; cnt++) {
for (cnt = 0; cnt < BUFCNT; cnt++) {
int Sem_id[BUFCNT], /* semaphore ids for controlling shared memory */
Shm_id[BUFCNT], /* shared memory identifier */
*Cnts[BUFCNT]; /* an array of byte counts for shared memory */
*Buf[BUFCNT]; /* buffer pointers (possibly to shared memory) */
cur_buf = (cur_buf + 1) % BUFCNT;