home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / games / volume8 / unidraw / part01 / init.c < prev    next >
C/C++ Source or Header  |  1989-12-19  |  936b  |  54 lines

  1. #ifndef LINT
  2. static char COPYRIGHT[]="\
  3.   COPYRIGHT --- COPYRIGHT --- COPYRIGHT --- COPYRIGHT \n\
  4.   This program is copyright 1989 Nils McCarthy. This \
  5.   program may be distributed if it is impossible for \
  6.   the distributor to get a more up-to-date-version of \
  7.   it. \n\
  8.   COPYRIGHT --- COPYRIGHT --- COPYRIGHT --- COPYRIGHT \n\
  9.   ";
  10. static char AUTHOR[]="Copyright 1989 Nils McCarthy";
  11. #endif /* LINT */
  12.  
  13. void endwin();
  14. #include "unidraw.h"
  15.  
  16. brkfunct()
  17. {
  18.    clear();
  19.    move(0,0);
  20.    printw("goodbye. see you in unidraw again sometime...\n");
  21.    refresh();
  22.    echo();
  23.    nl();
  24.    resetty();
  25.    endwin();
  26.    exit(0);
  27. }
  28.   
  29. init()
  30. {
  31.    int i,j;
  32.    
  33.    initscr();
  34.    savetty();
  35.    cbreak();
  36.    noecho();
  37.    signal(SIGINT,brkfunct);
  38.    nl();
  39.    
  40.    keymaps();
  41.    
  42.    pen=0;
  43.    pench='#';
  44.    padx=0;
  45.    pady=0;
  46.    padposx=0;
  47.    padposy=0;
  48.    for(i=0;i<PADLINES;i++)
  49.       for(j=0;j<PADCOLS;j++)
  50.      pad(i,j)=' ';
  51.    clear();
  52.    redraw();
  53. }
  54.