Annotation of 43BSD/games/hangman/prdata.c, revision 1.1.1.1

1.1       root        1: # include      "hangman.h"
                      2: 
                      3: /*
                      4:  * prdata:
                      5:  *     Print out the current guesses
                      6:  */
                      7: prdata()
                      8: {
                      9:        register bool   *bp;
                     10: 
                     11:        move(GUESSY, GUESSX + sizeof "Guessed: ");
                     12:        bp = Guessed;
                     13:        while (bp < &Guessed[26])
                     14:                if (*bp++)
                     15:                        addch((bp - Guessed) + 'a' - 1);
                     16:        clrtoeol();
                     17:        mvprintw(NUMBERY, NUMBERX + sizeof "Word #:          ", "%d", Wordnum);
                     18:        mvprintw(AVGY, AVGX + sizeof       "Current Average: ", "%.3f",
                     19:                                (Average * (Wordnum - 1) + Errors) / Wordnum);
                     20:        mvprintw(AVGY + 1, AVGX + sizeof   "Overall Average: ", "%.3f", Average);
                     21: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.