static int show_dots(int startHash) { int k; TranslationTableCharacter *thisDots; TranslationTableOffset nextDots; printf("Press enter for next or (e)xit, next-(h)ash, then enter\n"); if (startHash < 0) k = 0; else k = startHash; for (; k < HASHNUM; k++) if (table->dots[k]) { printf("Hash=%d\n", k); nextDots = table->dots[k]; while (nextDots) { thisDots = (TranslationTableCharacter *)&table->ruleArea[nextDots]; printCharacter(thisDots, 1); printf("=> "); getInput(); if (*inputBuffer == 'h') break; if (*inputBuffer == 'e') return 1; nextDots = thisDots->next; } } return 1; }
void print(char * string){ int stringTracker = 0; while (stringTracker < 8 && *string != 0x00){ printCharacter(*string); string++; stringTracker++; } }
void doConsumerThread(TMANAGER *m, tid_t id, TCTRL *ctrl, void *p) { QUEUE *queue = p; while(TRUE) { char c; TCTRL_check(ctrl); if(!TMANAGER_running(m)) break; if(!QUEUE_poll(queue, &c)) { printQueue(queue); printCharacter(c); TCTRL_sleep(ctrl, MXT_SLEEP_CONSUMER); } } }