1: # include   "hangman.h"
   2: 
   3: /*
   4:  * setup:
   5:  *	Set up the strings on the screen.
   6:  */
   7: setup()
   8: {
   9:     register char       **sp;
  10:     static struct stat  sbuf;
  11: 
  12:     noecho();
  13:     crmode();
  14: 
  15:     mvaddstr(PROMPTY, PROMPTX, "Guess:");
  16:     mvaddstr(GUESSY, GUESSX, "Guessed:");
  17:     mvaddstr(NUMBERY, NUMBERX, "Word #:");
  18:     mvaddstr(AVGY, AVGX, "Current Average:");
  19:     mvaddstr(AVGY + 1, AVGX, "Overall Average:");
  20:     mvaddstr(KNOWNY, KNOWNX, "Word: ");
  21: 
  22:     for (sp = Noose_pict; *sp != NULL; sp++) {
  23:         move(sp - Noose_pict, 0);
  24:         addstr(*sp);
  25:     }
  26: 
  27:     srand(time(NULL) + getpid());
  28:     if ((Dict = fopen(DICT, "r")) == NULL) {
  29:         perror(DICT);
  30:         endwin();
  31:         exit(1);
  32:     }
  33:     fstat(fileno(Dict), &sbuf);
  34:     Dict_size = sbuf.st_size;
  35: }

Defined functions

setup defined in line 7; used 1 times
Last modified: 1983-01-07
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2726
Valid CSS Valid XHTML 1.0 Strict