home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / sources / 3061 next >
Encoding:
Internet Message Format  |  1993-01-21  |  7.1 KB

  1. Path: sparky!uunet!usc!news.service.uci.edu!cerritos.edu!arizona.edu!arizona!azhao
  2. Newsgroups: alt.sources
  3. Subject: Generic Tetris Patch 2.1.2 to 2.1.3
  4. Message-ID: <30260@optima.cs.arizona.edu>
  5. From: azhao@cs.arizona.edu (Qiang Alex Zhao)
  6. Date: 21 Jan 93 19:27:07 GMT
  7. Sender: news@cs.arizona.edu
  8. Lines: 218
  9.  
  10.  
  11. Archive-name: gtetris
  12. Submitted-by: azhao@cs.arizona.edu
  13.  
  14.  
  15. diff -c tetris.2.1.orig/README tetris.2.1/README
  16. *** tetris.2.1.orig/README    Tue Jan 19 11:36:00 1993
  17. --- tetris.2.1/README    Thu Jan 21 12:17:33 1993
  18. ***************
  19. *** 1,5
  20.       GENERIC TETRIS
  21. !     ==============    Yet Another Tetris Game on X, V2.1.2
  22.   
  23.   
  24.   WHY ANOTHER?
  25.  
  26. --- 1,5 -----
  27.       GENERIC TETRIS
  28. !     ==============    Yet Another Tetris Game on X, V2.1.3
  29.   
  30.   
  31.   WHY ANOTHER?
  32. ***************
  33. *** 11,16
  34.   
  35.       Bull DPX/2        System V    ?
  36.       DEC 5000        Ultrix 4.2A    X11R4
  37.       HP 700            HP-UX 8.07    X11R5
  38.       Iris 4D            IRIX 4.0.1    Motif
  39.       Sun4, SPARC        SunOS 4.1.x    X11R4, X11R5
  40.  
  41. --- 11,17 -----
  42.   
  43.       Bull DPX/2        System V    ?
  44.       DEC 5000        Ultrix 4.2A    X11R4
  45. +     DEC Alpha AXP        DEC OSF/1 V1.2    ?
  46.       HP 700            HP-UX 8.07    X11R5
  47.       Iris 4D            IRIX 4.0.1    Motif
  48.       Sun4, SPARC        SunOS 4.1.x    X11R4, X11R5
  49. ***************
  50. *** 62,70
  51.   
  52.       In previous versions, all number keys on the keypad work. Since I'm
  53.       going to let the user fully configure things like key bindings,
  54. !     I'll only let those keys on the keypad with label '4', '5', '6'
  55. !     work for now, and do not include a key for "rotate
  56. !     counter-clockwise" (sorry :o).
  57.   
  58.       Refer to the man page for detailed command line options.
  59.   
  60.  
  61. --- 63,70 -----
  62.   
  63.       In previous versions, all number keys on the keypad work. Since I'm
  64.       going to let the user fully configure things like key bindings,
  65. !     I'll only let a few of them work for now, and do not include a key
  66. !     for "rotate counter-clockwise" (sorry :o).
  67.   
  68.       Refer to the man page for detailed command line options.
  69.   
  70. ***************
  71. *** 85,90
  72.   
  73.   HISTORY -- Oh no, not again: I failed my history course!
  74.   Well ... ACKNOWLEDGEMENTS
  75.   
  76.     [Jan 19, 93]  V2.1.2: Improved "paused" mode - so it won't take too
  77.           much CPU time - suggested by Philip JENNINGS
  78.  
  79. --- 85,95 -----
  80.   
  81.   HISTORY -- Oh no, not again: I failed my history course!
  82.   Well ... ACKNOWLEDGEMENTS
  83. +   [Jan 21, 93]  V2.1.3: Two bugs in finding user environment:
  84. +         "endpwent()" by Jari Tavi <jpt@rixrax.enet.dec.com>;
  85. +         "gethostname()" by Johan Vromans <jv@mh.nl>. Added two
  86. +         more arrow keys.
  87.   
  88.     [Jan 19, 93]  V2.1.2: Improved "paused" mode - so it won't take too
  89.           much CPU time - suggested by Philip JENNINGS
  90. Common subdirectories: tetris.2.1.orig/X11 and tetris.2.1/X11
  91. Common subdirectories: tetris.2.1.orig/bitmaps and tetris.2.1/bitmaps
  92. diff -c tetris.2.1.orig/tetris.c tetris.2.1/tetris.c
  93. *** tetris.2.1.orig/tetris.c    Tue Jan 19 11:36:49 1993
  94. --- tetris.2.1/tetris.c    Thu Jan 21 12:17:46 1993
  95. ***************
  96. *** 105,111
  97.       char           *argv[];
  98.   {
  99.       (void) fprintf(stderr,
  100. !            "                 GENERIC TETRIS V2.1.2\n");
  101.       (void) fprintf(stderr,
  102.        "Copyright (C) 1992-93      Q. Alex Zhao, azhao@cs.arizona.edu\n");
  103.       (void) fprintf(stderr,
  104.  
  105. --- 105,111 -----
  106.       char           *argv[];
  107.   {
  108.       (void) fprintf(stderr,
  109. !            "                 GENERIC TETRIS V2.1.3\n");
  110.       (void) fprintf(stderr,
  111.        "Copyright (C) 1992-93      Q. Alex Zhao, azhao@cs.arizona.edu\n");
  112.       (void) fprintf(stderr,
  113. ***************
  114. *** 177,183
  115.       (void) gethostname(myscore.myhost, NAMELEN);
  116.       setpwent();
  117.       pw = getpwuid(getuid());
  118. -     endpwent();
  119.       if (pw == NULL) {        /* impossible? */
  120.       (void) sprintf(myscore.myname, "%d", getuid());
  121.       myHome[0] = '.';
  122.  
  123. --- 177,182 -----
  124.       (void) gethostname(myscore.myhost, NAMELEN);
  125.       setpwent();
  126.       pw = getpwuid(getuid());
  127.       if (pw == NULL) {        /* impossible? */
  128.       (void) sprintf(myscore.myname, "%d", getuid());
  129.       myHome[0] = '.';
  130. ***************
  131. *** 187,192
  132.       (void) strncpy(myscore.myname, pw->pw_name, NAMELEN);
  133.       (void) strncpy(myHome, pw->pw_dir, FILENAMELEN);
  134.       }
  135.       myscore.myname[NAMELEN - 1] = '\0';
  136.       myscore.myhost[NAMELEN - 1] = '\0';
  137.       myHome[FILENAMELEN - 1] = '\0';
  138.  
  139. --- 186,192 -----
  140.       (void) strncpy(myscore.myname, pw->pw_name, NAMELEN);
  141.       (void) strncpy(myHome, pw->pw_dir, FILENAMELEN);
  142.       }
  143. +     endpwent();
  144.       myscore.myname[NAMELEN - 1] = '\0';
  145.       myscore.myhost[NAMELEN - 1] = '\0';
  146.       myHome[FILENAMELEN - 1] = '\0';
  147. ***************
  148. *** 251,256
  149.       env = &filenamebuf[0];
  150.       (void) strcpy(env, myHome);
  151.       len = strlen(env);
  152.       (void) gethostname(env + len, FILENAMELEN - len);
  153.       }
  154.       homeDB = XrmGetFileDatabase(env);
  155.  
  156. --- 251,257 -----
  157.       env = &filenamebuf[0];
  158.       (void) strcpy(env, myHome);
  159.       len = strlen(env);
  160. +     env[len++] = '/';
  161.       (void) gethostname(env + len, FILENAMELEN - len);
  162.       }
  163.       homeDB = XrmGetFileDatabase(env);
  164. diff -c tetris.2.1.orig/tetris.man tetris.2.1/tetris.man
  165. *** tetris.2.1.orig/tetris.man    Tue Jan 19 11:37:02 1993
  166. --- tetris.2.1/tetris.man    Thu Jan 21 12:18:04 1993
  167. ***************
  168. *** 1,4
  169. ! .TH TETRIS 6 "19 Jan 1993, V2.1.2" "Univ of Arizona"
  170.   .SH NAME
  171.   GENERIC TETRIS \- Yet Another Tetris Game on X
  172.   .SH SYNOPSIS
  173.  
  174. --- 1,4 -----
  175. ! .TH TETRIS 6 "19 Jan 1993, V2.1" "Univ of Arizona"
  176.   .SH NAME
  177.   GENERIC TETRIS \- Yet Another Tetris Game on X
  178.   .SH SYNOPSIS
  179. diff -c tetris.2.1.orig/utils.c tetris.2.1/utils.c
  180. *** tetris.2.1.orig/utils.c    Tue Jan 19 10:26:02 1993
  181. --- tetris.2.1/utils.c    Thu Jan 21 12:10:50 1993
  182. ***************
  183. *** 232,237
  184.       (unsigned char *) "j", sizeof(unsigned char));
  185.       XRebindKeysym(display, XK_Left, NULL, 0,
  186.       (unsigned char *) "j", sizeof(unsigned char));
  187.       XRebindKeysym(display, XK_R11, NULL, 0,
  188.       (unsigned char *) "k", sizeof(unsigned char));
  189.       XRebindKeysym(display, XK_R12, NULL, 0,
  190.  
  191. --- 232,241 -----
  192.       (unsigned char *) "j", sizeof(unsigned char));
  193.       XRebindKeysym(display, XK_Left, NULL, 0,
  194.       (unsigned char *) "j", sizeof(unsigned char));
  195. +     XRebindKeysym(display, XK_R8, NULL, 0,
  196. +     (unsigned char *) "k", sizeof(unsigned char));
  197. +     XRebindKeysym(display, XK_Up, NULL, 0,
  198. +     (unsigned char *) "k", sizeof(unsigned char));
  199.       XRebindKeysym(display, XK_R11, NULL, 0,
  200.       (unsigned char *) "k", sizeof(unsigned char));
  201.       XRebindKeysym(display, XK_R12, NULL, 0,
  202. ***************
  203. *** 238,243
  204.       (unsigned char *) "l", sizeof(unsigned char));
  205.       XRebindKeysym(display, XK_Right, NULL, 0,
  206.       (unsigned char *) "l", sizeof(unsigned char));
  207.   
  208.       /* create windows */
  209.       attvm = CWBackPixel | CWEventMask | CWDontPropagate | CWCursor;
  210.  
  211. --- 242,251 -----
  212.       (unsigned char *) "l", sizeof(unsigned char));
  213.       XRebindKeysym(display, XK_Right, NULL, 0,
  214.       (unsigned char *) "l", sizeof(unsigned char));
  215. +     XRebindKeysym(display, XK_Down, NULL, 0,
  216. +     (unsigned char *) " ", sizeof(unsigned char));
  217. +     XRebindKeysym(display, XK_R14, NULL, 0,
  218. +     (unsigned char *) " ", sizeof(unsigned char));
  219.   
  220.       /* create windows */
  221.       attvm = CWBackPixel | CWEventMask | CWDontPropagate | CWCursor;
  222. --
  223. = Qiang Alex Zhao                 ___       .             ______
  224.   Computer Science Dept          /   )     /|   )          __//  )
  225.   University of Arizona         /   /     /_|  / _        //    /_  _. ._
  226.   azhao@cs.arizona.edu         (__)(_o   /  (_(_(-'_)(   ((____/ (_(_(_(_)
  227.